VTK  9.4.20250201
vtkWebGPUTextureInternals.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
3
4#ifndef vtkWebGPUTextureInternals_h
5#define vtkWebGPUTextureInternals_h
6
7#include "vtkDataArray.h"
8#include "vtkRenderingWebGPUModule.h"
10#include "vtk_wgpu.h"
11
12VTK_ABI_NAMESPACE_BEGIN
13
14class VTKRENDERINGWEBGPU_NO_EXPORT vtkWebGPUTextureInternals
15{
16public:
21 static void Upload(vtkSmartPointer<vtkWebGPUConfiguration> wgpuConfiguration,
22 wgpu::Texture texture, uint32_t bytesPerRow, uint32_t byteSize, const void* data,
23 const char* description = nullptr);
24
30 wgpu::Texture texture, uint32_t bytesPerRow, vtkDataArray* dataArray,
31 const char* description = nullptr);
32
36 static wgpu::ImageCopyTexture GetImageCopyTexture(wgpu::Texture texture);
37
42 static wgpu::TextureDataLayout GetDataLayout(wgpu::Texture texture, uint32_t bytesPerRow);
43};
44
45VTK_ABI_NAMESPACE_END
46
47#endif
abstract superclass for arrays of numeric data
Hold a reference to a vtkObjectBase instance.
static wgpu::TextureDataLayout GetDataLayout(wgpu::Texture texture, uint32_t bytesPerRow)
Get the texture data layout from the given texture and bytes per row for use in uploading data to the...
static wgpu::ImageCopyTexture GetImageCopyTexture(wgpu::Texture texture)
Get the image copy texture from the given texture for use in uploading data to the texture.
static void Upload(vtkSmartPointer< vtkWebGPUConfiguration > wgpuConfiguration, wgpu::Texture texture, uint32_t bytesPerRow, uint32_t byteSize, const void *data, const char *description=nullptr)
Upload byteSize of data from the data pointer to the given texture using the given device and assumin...
static void UploadFromDataArray(vtkSmartPointer< vtkWebGPUConfiguration > wgpuConfiguration, wgpu::Texture texture, uint32_t bytesPerRow, vtkDataArray *dataArray, const char *description=nullptr)
Uploads a maximum of bytesToUpload from a vtkDataArray to a texure assuming bytesPerRow bytes of data...