Skip to content

Buffer ​

Methods ​

create ​

Allocate the underlying GPU buffer without writing to it.

ArgumentTypeRequiredDescription
sizeInBytesYesThe size of the buffer.
usageYesThe GPUBufferUsage flags of the buffer.

createAndWrite ​

Allocate the GPU buffer, padded to a multiple of four bytes, and fill it.

ArgumentTypeRequiredDescription
dataYesThe data to write.
usageYesThe GPUBufferUsage flags of the buffer.

extend ​

Method used to decorate a given object (publicAPI+model) with vtkWebGPUBuffer characteristics.

ArgumentTypeRequiredDescription
publicAPIYesobject on which methods will be bounds (public)
modelYesobject on which data structure will be bounds (protected)
initialValuesIWebGPUBufferInitialValuesNo(default: {})

getArrayInformation ​

Get the description of the attributes packed into this buffer.

getDevice ​

Get the device this buffer belongs to.

getHandle ​

Get the underlying GPUBuffer.

getLabel ​

Get the label used when creating the GPUBuffer.

getMappedRange ​

Forwarded to the underlying GPUBuffer.

getSizeInBytes ​

Get the size of the allocated buffer in bytes.

getSourceTime ​

Get the modified time of the data this buffer was built from.

getStrideInBytes ​

Get the stride, in bytes, between two consecutive vertices.

getUsage ​

Get the GPUBufferUsage flags the buffer was created with.

mapAsync ​

Forwarded to the underlying GPUBuffer.

newInstance ​

Method used to create a new instance of vtkWebGPUBuffer.

ArgumentTypeRequiredDescription
initialValuesIWebGPUBufferInitialValuesNofor pre-setting some of its content

setArrayInformation ​

Set the description of the attributes packed into this buffer.

setDevice ​

Set the device this buffer belongs to.

setLabel ​

Set the label used when creating the GPUBuffer.

setSourceTime ​

Set the modified time of the data this buffer was built from.

setStrideInBytes ​

Set the stride, in bytes, between two consecutive vertices.

unmap ​

Forwarded to the underlying GPUBuffer.

write ​

Copy data into the already created GPU buffer.

ArgumentTypeRequiredDescription
dataYesThe data to write, starting at offset zero.