Home -> IRenderableNode -> BindIndexAttribute

Description

The BindIndexAttribute method is used to bind an index buffer to the renderable. Without an index buffer bound, the renderable will advance linearly through the vertex buffers to extract vertex information. An index buffer allows the target vertex buffer location to be specified per vertex, allowing shared vertices to be reused in the buffer.

ImportantImportant

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

WarningWarning

An index attribute can only be bound once, cannot be unbound, and cannot be set after an IRenderableNode has been added as a child of an IStateGroupNode.

Usage

SuccessToken BindIndexAttribute(IIndexAttribute& indexAttribute);

Argument list

indexAttribute [IIndexAttribute]
The index attribute to bind to this renderable

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