Skip to content

VertexArrayObject ​

Methods ​

addAttributeArray ​

Bind a buffer to a program attribute.

ArgumentTypeRequiredDescription
programYesThe bound shader program.
bufferYesThe array buffer holding the attribute.
nameYesThe attribute name in the program.
offsetYesThe offset in bytes of the attribute inside a block.
strideYesThe size in bytes of a block.
elementTypeYesThe GL type of a component.
elementTupleSizeYesThe number of components.
normalizeYesWhether integer components are normalized.

Returns ​

TypeDescription
booleanFalse when the attribute could not be bound.

addAttributeArrayWithDivisor ​

Bind a buffer to a program attribute, optionally instanced.

ArgumentTypeRequiredDescription
programYesThe bound shader program.
bufferYesThe array buffer holding the attribute.
nameYesThe attribute name in the program.
offsetYesThe offset in bytes of the attribute inside a block.
strideYesThe size in bytes of a block.
elementTypeYesThe GL type of a component.
elementTupleSizeYesThe number of components.
normalizeYesWhether integer components are normalized.
divisorYesWhen greater than zero, the attribute advances per instance.
isMatrixYesWhether the attribute is one row of a matrix attribute.

Returns ​

TypeDescription
booleanFalse when the attribute could not be bound.

addAttributeMatrixWithDivisor ​

Bind a buffer to a matrix program attribute, one attribute slot per row.

ArgumentTypeRequiredDescription
programYesThe bound shader program.
bufferYesThe array buffer holding the attribute.
nameYesThe attribute name in the program.
offsetYesThe offset in bytes of the attribute inside a block.
strideYesThe size in bytes of a block.
elementTypeYesThe GL type of a component.
elementTupleSizeYesThe number of rows and columns of the matrix.
normalizeYesWhether integer components are normalized.
divisorYesWhen greater than zero, the attribute advances per instance.

Returns ​

TypeDescription
booleanFalse when the attribute could not be bound.

bind ​

Bind the vertex array object, creating it if needed.

extend ​

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

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

initialize ​

Create the underlying GL vertex array object.

isReady ​

Whether the GL vertex array object exists.

newInstance ​

Method used to create a new instance of vtkOpenGLVertexArrayObject.

ArgumentTypeRequiredDescription
initialValuesIOpenGLVertexArrayObjectInitialValuesNofor pre-setting some of its content

release ​

Unbind the vertex array object.

releaseGraphicsResources ​

Delete the vertex array object.

removeAttributeArray ​

The attribute state lives inside the vertex array object and is overwritten on the next bind, so this only reports whether the object is usable.

ArgumentTypeRequiredDescription
nameYesThe attribute name in the program.

setOpenGLRenderWindow ​

Attach this vertex array object to an OpenGL render window, releasing any resources held for a previous one.

ArgumentTypeRequiredDescription
renWinYesThe OpenGL render window.

shaderProgramChanged ​

Drop the vertex array object so that it is rebuilt against the new program.