Skip to content

BufferObject ​

Introduction ​

Object containing the newInstance and extend functions for vtkOpenGLBufferObject.

Methods ​

bind ​

Binds the buffer object.

Returns ​

TypeDescription
booleanWhether the binding was successful.

extend ​

Extends the given object with the properties and methods of vtkOpenGLBufferObject.

ArgumentTypeRequiredDescription
publicAPIYesThe public API to extend.
modelYesThe model to extend.
initialValuesYesThe initial values to apply.

generateBuffer ​

Generates the underlying WebGL buffer if needed.

ArgumentTypeRequiredDescription
typeYesThe type of the buffer object.

Returns ​

TypeDescription
booleanWhether the generated buffer is compatible with the given type.

getAllocatedGPUMemoryInBytes ​

Gets the amount of GPU memory allocated by the buffer object in bytes.

Returns ​

TypeDescription
numberThe allocated GPU memory in bytes.

getError ​

Retrieves the error message, if any.

Returns ​

TypeDescription
stringThe error message.

getHandle ​

Gets the WebGL handle of the buffer object.

Returns ​

TypeDescription
The WebGL buffer handle.

getOpenGLRenderWindow ​

Gets the OpenGL render window.

Returns ​

TypeDescription
The render window.

getType ​

Gets the type of the buffer object.

Returns ​

TypeDescription
Nullable<ObjectType>The type of the buffer object.

isReady ​

Checks if the buffer object is ready, i.e. data has been uploaded.

Returns ​

TypeDescription
booleanWhether the buffer object is ready.

newInstance ​

Creates a new instance of vtkOpenGLBufferObject with the given initial values.

ArgumentTypeRequiredDescription
initialValuesYesThe initial values to use.

Returns ​

TypeDescription
vtkOpenGLBufferObjectThe new instance.

release ​

Releases the buffer object.

Returns ​

TypeDescription
booleanWhether the release was successful.

releaseGraphicsResources ​

Releases graphics resources associated with the buffer object.

setOpenGLRenderWindow ​

Sets the OpenGL render window.

ArgumentTypeRequiredDescription
renWinYesThe render window to set.

setType ​

Sets the type of the buffer object.

ArgumentTypeRequiredDescription
valueYesThe type to set.

upload ​

Uploads data to the buffer object.

ArgumentTypeRequiredDescription
dataYesThe data to be uploaded.
typeYesThe type of the data.

Returns ​

TypeDescription
booleanWhether the upload was successful.