4#ifndef vtkWebGPUComputeBuffer_h
5#define vtkWebGPUComputeBuffer_h
10#include "vtkRenderingWebGPUModule.h"
17VTK_ABI_NAMESPACE_BEGIN
91 uint32_t
GetGroup()
const {
return this->Group; }
114 vtkGetMacro(Label, std::string);
115 vtkSetMacro(Label, std::string);
127 template <
typename T>
130 this->DataPointer = data.data();
131 this->ByteSize = data.size() *
sizeof(T);
198 const void* DataPointer =
nullptr;
abstract superclass for arrays of numeric data
a simple class to control print indentation
abstract base class for most VTK objects
Represents the set of parameters that will be used to create a compute shader buffer on the device wh...
const void * GetDataPointer()
The pointer to the std::vector<> data passed with SetData(std::vector)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetData(const std::vector< T > &data)
Sets the data that will be used by the buffer.
BufferDataType
Because the compute buffer can accept multiple data types as input (std::vector, vtkDataArray) but wi...
uint32_t GetGroup() const
Get/set the group of the buffer in the compute shader.
~vtkWebGPUComputeBuffer() override
void SetData(vtkDataArray *data)
Sets the data that will be used by the buffer.
@ READ_WRITE_MAP_COMPUTE_STORAGE
@ READ_WRITE_COMPUTE_STORAGE
@ READ_ONLY_COMPUTE_STORAGE
vtkSetEnumMacro(Mode, BufferMode)
Get/set the buffer mode.
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.
static vtkWebGPUComputeBuffer * New()
vtkGetEnumMacro(Mode, BufferMode)
Get/set the buffer mode.
A compute pass is an abstraction for offloading computation from the CPU onto the GPU using WebGPU co...