Microsoft DirectX 8.1 (Visual Basic)

Direct3DDevice8.SetIndices

Sets index data.

object.SetIndices( _ 
    IndexData As Direct3DIndexBuffer8, _ 
    BaseVertexIndex As Long)

Parts

object
Object expression that resolves to a Direct3DDevice8 object.
IndexData
A Direct3DIndexBuffer8 object, representing the index data to be set.
BaseVertexIndex
Base value for vertex indices. This value is added to all indices prior to referencing vertex data, defining a starting position in the vertex streams.

Error Codes

If the method fails, an error is raised and Err.Number can be set to D3DERR_INVALIDCALL.

For information on trapping errors, see the Microsoft® Visual Basic® Error Handling topic.

Remarks

The SetIndices method sets the current index array to an index buffer. The single set of indices is used to index all streams.

The BaseVertexIndex parameter specifies the base value for indices. This base value is added to all indices prior to referencing into the vertex data streams, which results in setting a starting position in the vertex data streams. The base vertex index enables multiple indexed primitives to be packed into a single set of vertex data without requiring the indices to be recomputed based on where the corresponding primitive is placed in the vertex data.

See Also

Direct3DDevice8.GetIndices