4#ifndef vtkWebGPUTextureInternals_h
5#define vtkWebGPUTextureInternals_h
8#include "vtkRenderingWebGPUModule.h"
11VTK_ABI_NAMESPACE_BEGIN
19 static wgpu::Texture
CreateATexture(
const wgpu::Device& device, wgpu::Extent3D extents,
20 wgpu::TextureDimension dimension, wgpu::TextureFormat format, wgpu::TextureUsage usage,
21 int mipLevelCount = 1, std::string label =
"");
27 wgpu::TextureViewDimension dimension, wgpu::TextureAspect aspect, wgpu::TextureFormat format,
28 int baseMipLevel,
int mipLevelCount, std::string label);
34 static void Upload(
const wgpu::Device& device, wgpu::Texture texture, uint32_t bytesPerRow,
35 uint32_t byteSize,
const void* data);
53 static wgpu::TextureDataLayout
GetDataLayout(wgpu::Texture texture, uint32_t bytesPerRow);
abstract superclass for arrays of numeric data
static wgpu::Texture CreateATexture(const wgpu::Device &device, wgpu::Extent3D extents, wgpu::TextureDimension dimension, wgpu::TextureFormat format, wgpu::TextureUsage usage, int mipLevelCount=1, std::string label="")
Creates a WebGPU texture with the given device and returns it.
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 wgpu::TextureView CreateATextureView(const wgpu::Device &device, wgpu::Texture texture, wgpu::TextureViewDimension dimension, wgpu::TextureAspect aspect, wgpu::TextureFormat format, int baseMipLevel, int mipLevelCount, std::string label)
Creates a texture view of a texture.
static void Upload(const wgpu::Device &device, wgpu::Texture texture, uint32_t bytesPerRow, uint32_t byteSize, const void *data)
Upload byteSize of data from the data pointer to the given texture using the given device and assumin...
static void UploadFromDataArray(const wgpu::Device &device, wgpu::Texture texture, uint32_t bytesPerRow, vtkDataArray *dataArray)
Uploads a maximum of bytesToUpload from a vtkDataArray to a texure assuming bytesPerRow bytes of data...