ComputeBuffer
Inherited: None
Description
The ComputeBuffer class provides functionality to manage and manipulate data buffers used in compute shaders. The count method retrieves the number of elements, stride gets and sets the stride of the buffer, and data gets the current data stored in the buffer. The setData method allows updating the buffer data and marks the buffer as dirty.
Public Methods
uint32_t |
count () const |
ByteArray |
data () const |
void |
setData (const ByteArray & data) |
void |
setStride (uint32_t stride) |
uint32_t |
stride () const |
Static Methods
None
Methods Description
uint32_t ComputeBuffer::count () const
Gets the number of elements in the compute buffer.
ByteArray ComputeBuffer::data () const
Gets the data stored in the compute buffer.
See also setData().
void ComputeBuffer::setData (ByteArray & data)
Sets the data of the compute buffer.
Note: This method updates the buffer data and marks it as dirty.
See also *data*().
void ComputeBuffer::setStride (uint32_t stride)
Sets the stride of the compute buffer.
See also *stride*().
uint32_t ComputeBuffer::stride () const
Returns stride, representing the size of a single element in the buffer.
See also setStride().