Home -> IRenderableNode -> BindVertexAttribute

Description

The BindVertexAttribute method is used to bind a vertex attribute to the renderable. Multiple vertex attributes can be bound of varying types, and they can be sourced from different underlying IVertexBuffer objects.

ImportantImportant

A single vertex attribute can be bound to any number of IRenderableNode objects.

WarningWarning

A vertex attribute can only be bound to a given slot once, cannot be unbound, and cannot be set after an IRenderableNode has been added as a child of an IStateGroupNode.

Usage

SuccessToken BindVertexAttribute(IVertexAttribute& vertexAttribute, VertexAttributeId shaderAttributeID);

Argument list

vertexAttribute [IVertexAttribute]
The vertex attribute to bind to this renderable
shaderAttributeID [VertexAttributeId]
The slot to bind this vertex attribute to, as returned by the GetVertexAttributeId method from the IShaderProgram object.

Return value

[SuccessToken]
True if the attribute was successfully bound, false otherwise. An assertion will be raised in debug builds if the result isn't tested.

See also