4 #ifndef vtkWebGPUComputeBuffer_h
5 #define vtkWebGPUComputeBuffer_h
10 #include "vtkRenderingWebGPUModule.h"
11 #include "vtkSetGet.h"
17 VTK_ABI_NAMESPACE_BEGIN
79 vtkGetEnumMacro(Mode, BufferMode);
80 vtkSetEnumMacro(Mode, BufferMode);
127 template <
typename T>
130 this->DataPointer = data.data();
131 this->ByteSize = data.size() *
sizeof(T);
149 vtkGetMacro(DataType, BufferDataType);
150 vtkSetMacro(DataType, BufferDataType);
198 const void* DataPointer =
nullptr;
209 VTK_ABI_NAMESPACE_END
abstract base class for most VTK objects
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
const void * GetDataPointer()
The pointer to the std::vector<> data passed with SetData(std::vector)
BufferDataType
Because the compute buffer can accept multiple data types as input (std::vector, vtkDataArray) but wi...
Represents the set of parameters that will be used to create a compute shader buffer on the device wh...
vtkDataArray * GetDataArray()
The pointer to the vtkDataArray passed with SetData(vtkDataArray)
uint32_t GetBinding() const
Get/set the binding of the buffer in the compute shader.
a simple class to control print indentation
abstract superclass for arrays of numeric data
uint32_t GetGroup() const
Get/set the group of the buffer in the compute shader.
void SetData(const std::vector< T > &data)
Sets the data that will be used by the buffer.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
A compute pass is an abstraction for offloading computation from the CPU onto the GPU using WebGPU co...