ComputeBuffer

Inherited: Resource

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

int

count () const

ByteArray

data () const

void

setData (const ByteArray & data)

void

setStride (int stride)

int

stride () const

Static Methods

None

Methods Description

int 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 (int stride)

Sets the stride of the compute buffer.

See also *stride*().


int ComputeBuffer::stride () const

Returns stride, representing the size of a single element in the buffer.

See also setStride().