Skip to content

VertexInput ​

Methods ​

addBuffer ​

Register a vertex buffer under one or more attribute names. Registering a new set of names keeps the inputs sorted alphabetically, as the shader locations depend on that order.

ArgumentTypeRequiredDescription
bufferYesThe vertex buffer.
inamesYesThe attribute name or names the buffer provides.
stepModeStringNo(default: 'vertex')

bindBuffers ​

Bind the vertex buffers, and the index buffer when there is one, on the given render encoder.

ArgumentTypeRequiredDescription
renderEncoderYesThe vtkWebGPURenderEncoder to bind onto.

extend ​

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

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

getAttributeTime ​

Get the source time of the buffer providing the given attribute, or zero when the attribute is not registered.

ArgumentTypeRequiredDescription
nameYesThe attribute name.

getBuffer ​

Get the buffer providing the given attribute name.

ArgumentTypeRequiredDescription
nameYesThe attribute name.

getCreated ​

Get whether the vertex input was created.

getDevice ​

Get the device this vertex input belongs to.

getIndexBuffer ​

Get the index buffer bound along with the vertex buffers.

getShaderCode ​

Get the WGSL declaration of the vertex shader inputs.

getVertexInputInformation ​

Get the vertex buffer layouts of the render pipeline.

hasAttribute ​

Check whether an attribute of the given name is registered.

ArgumentTypeRequiredDescription
nameYesThe attribute name.

newInstance ​

Method used to create a new instance of vtkWebGPUVertexInput.

ArgumentTypeRequiredDescription
initialValuesIWebGPUVertexInputInitialValuesNofor pre-setting some of its content

releaseGraphicsResources ​

Drop the registered buffers when this vertex input was created.

removeBufferIfPresent ​

Remove the buffer providing the given attribute name, if there is one.

ArgumentTypeRequiredDescription
nameYesThe attribute name.

setCreated ​

Set whether the vertex input was created.

setDevice ​

Set the device this vertex input belongs to.

setIndexBuffer ​

Set the index buffer bound along with the vertex buffers.