4#ifndef vtkWebGPUTexture_h
5#define vtkWebGPUTexture_h
8#include "vtkRenderingWebGPUModule.h"
10VTK_ABI_NAMESPACE_BEGIN
37 DEPTH_24_PLUS_8_STENCIL
120 unsigned int GetWidth()
const {
return Extents[0]; }
121 void SetWidth(
unsigned int width) { Extents[0] = width; }
129 void SetHeight(
unsigned int height) { Extents[1] = height; }
136 unsigned int GetDepth()
const {
return Extents[2]; }
137 void SetDepth(
unsigned int depth) { Extents[2] = depth; }
147 void GetSize(
unsigned int& x,
unsigned int& y,
unsigned int& z)
const;
148 void GetSize(
unsigned int& x,
unsigned int& y)
const;
152 virtual void SetSize(
unsigned int x,
unsigned int y,
unsigned int z = 1);
192 vtkGetMacro(MipLevelCount,
unsigned int);
193 vtkSetMacro(MipLevelCount,
unsigned int);
206 unsigned int Extents[3] = { 0, 0, 1 };
209 TextureDimension Dimension = TextureDimension::DIMENSION_2D;
212 TextureFormat Format = TextureFormat::RGBA8_UNORM;
215 TextureMode Mode = TextureMode::UNDEFINED;
218 TextureSampleType SampleType = TextureSampleType::FLOAT;
221 unsigned int MipLevelCount = 1;
a simple class to control print indentation
abstract base class for most VTK objects
Abstraction class for WebGPU textures.
vtkGetEnumMacro(Dimension, TextureDimension)
Get/set the texture dimension.
void SetDepth(unsigned int depth)
Get/set the depth in pixels of the texture.
vtkSetEnumMacro(Format, TextureFormat)
Get/set the texture format.
vtkGetEnumMacro(Mode, TextureMode)
Get/set the texture format.
unsigned int GetWidth() const
Get/set the width in pixels of the texture.
vtkSetEnumMacro(Mode, TextureMode)
Get/set the texture format.
unsigned int GetPixelComponentsCount() const
Returns the number of components per pixel for the format of this texture.
~vtkWebGPUTexture() override
void GetSize(unsigned int *xyz)
Get/set the size of the texture.
virtual void SetSize(unsigned int x, unsigned int y, unsigned int z=1)
Get/set the size of the texture.
unsigned int GetHeight() const
Get/set the height in pixels of the texture.
void SetHeight(unsigned int height)
Get/set the height in pixels of the texture.
TextureMode
How will the texture be used by the shader.
void GetSize(unsigned int &x, unsigned int &y, unsigned int &z) const
Get/set the size of the texture.
TextureDataType
Because the compute texture can accept multiple data types as input (std::vector, vtkDataArray) but w...
vtkSetEnumMacro(SampleType, TextureSampleType)
Get/set the texture sample type.
vtkSetEnumMacro(Dimension, TextureDimension)
Get/set the texture dimension.
TextureDimension
How the texture data is arranged.
unsigned int * GetSize()
Get/set the size of the texture.
vtkGetEnumMacro(SampleType, TextureSampleType)
Get/set the texture sample type.
void SetWidth(unsigned int width)
Get/set the width in pixels of the texture.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
unsigned int GetDepth() const
Get/set the depth in pixels of the texture.
TextureSampleType
Determines what kind of value is returned when reading from the texture in the compute shader.
virtual void SetSize(unsigned int *xyz)
Get/set the size of the texture.
virtual unsigned int GetBytesPerPixel() const
Number of bytes used per pixel.
static vtkWebGPUTexture * New()
TextureFormat
RGBA8_UNORM: Uses RGB + alpha.
vtkGetEnumMacro(Format, TextureFormat)
Get/set the texture format.
void GetSize(unsigned int &x, unsigned int &y) const
Get/set the size of the texture.