4 #ifndef vtkWebGPUTextureDeviceResource_h
5 #define vtkWebGPUTextureDeviceResource_h
8 #include "vtkRenderingWebGPUModule.h"
11 VTK_ABI_NAMESPACE_BEGIN
45 DEPTH_24_PLUS_8_STENCIL
127 virtual unsigned int GetBytesPerPixel()
const;
133 unsigned int GetPixelComponentsCount()
const;
139 unsigned int GetWidth()
const {
return Extents[0]; }
140 void SetWidth(
unsigned int width) { Extents[0] = width; }
155 unsigned int GetDepth()
const {
return Extents[2]; }
156 void SetDepth(
unsigned int depth) { Extents[2] = depth; }
166 VTK_WRAPEXCLUDE void GetSize(
unsigned int& x,
unsigned int& y,
unsigned int& z)
const;
171 VTK_WRAPEXCLUDE virtual
void SetSize(
unsigned int x,
unsigned int y,
unsigned int z = 1);
172 virtual
void SetSize(
unsigned int* xyz)
VTK_SIZEHINT(3);
179 vtkGetEnumMacro(Dimension, TextureDimension);
180 vtkSetEnumMacro(Dimension, TextureDimension);
187 vtkGetEnumMacro(Format, TextureFormat);
188 vtkSetEnumMacro(Format, TextureFormat);
195 vtkGetEnumMacro(Mode, TextureMode);
196 vtkSetEnumMacro(Mode, TextureMode);
203 vtkGetEnumMacro(SampleType, TextureSampleType);
204 vtkSetEnumMacro(SampleType, TextureSampleType);
211 vtkGetMacro(MipLevelCount,
unsigned int);
212 vtkSetMacro(MipLevelCount,
unsigned int);
217 ~vtkWebGPUTextureDeviceResource() override;
220 vtkWebGPUTextureDeviceResource(const vtkWebGPUTextureDeviceResource&) = delete;
221 void operator=(const vtkWebGPUTextureDeviceResource&) = delete;
225 unsigned int Extents[3] = { 0, 0, 1 };
228 TextureDimension Dimension = TextureDimension::DIMENSION_2D;
231 TextureFormat Format = TextureFormat::RGBA8_UNORM;
234 TextureMode Mode = TextureMode::UNDEFINED;
237 TextureSampleType SampleType = TextureSampleType::FLOAT;
240 unsigned int MipLevelCount = 1;
243 VTK_ABI_NAMESPACE_END
abstract base class for most VTK objects
TextureMode
How will the texture be used by the shader.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
unsigned int GetHeight() const
Get/set the height in pixels of the texture.
unsigned int GetWidth() const
Get/set the width in pixels of the texture.
unsigned int GetDepth() const
Get/set the depth in pixels of the texture.
a simple class to control print indentation
void SetWidth(unsigned int width)
Get/set the width in pixels of the texture.
Abstraction class for WebGPU textures.
TextureFormat
RGBA8_UNORM: Uses RGB + alpha.
#define VTK_SIZEHINT(...)
TextureSampleType
Determines what kind of value is returned when reading from the texture in the compute shader...
TextureDimension
How the texture data is arranged.
TextureDataType
Because the compute texture can accept multiple data types as input (std::vector, vtkDataArray) but w...
void SetDepth(unsigned int depth)
Get/set the depth in pixels of the texture.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
void SetHeight(unsigned int height)
Get/set the height in pixels of the texture.