Microsoft DirectX 8.1 (C++)

IDirect3DDevice8::GetIndices

Retrieves index data.

HRESULT GetIndices(
  IDirect3DIndexBuffer8** ppIndexData,
  UINT* pBaseVertexIndex
);

Parameters

ppIndexData
[out] Address of a pointer to an IDirect3DIndexBuffer8 interface, representing the returned index data.
pBaseVertexIndex
[out] Pointer to a UINT value, holding the returned 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.

Return Values

If the method succeeds, the return value is D3D_OK.

If the method fails, the return value can be D3DERR_INVALIDCALL.

Remarks

The values in the index list are used to index into a vertex list when creating geometry to render.

The value returned in the pBaseVertexIndex parameter specifies the base value for indices. This base value is added to all indices prior to referencing into the vertex data streams, the result of which is to set 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.

Note  Calling this method will increase the internal reference count on the IDirect3DIndexBuffer8 interface. Failure to call IUnknown::Release when finished using this IDirect3DIndexBuffer8 interface results in a memory leak.

Requirements

  Header: Declared in D3d8.h.
  Import Library: Use D3d8.lib.

See Also

IDirect3DDevice8::SetIndices