Platform SDK: DirectX

ID3DXSimpleShape::GetIndices

The ID3DXSimpleShape::GetIndices method is used to obtain index information from shape objects.

DWORD GetIndices(
  LPWORD* ppIndices
); 

Parameters

ppIndices
After the method returns, this parameter holds the address of a pointer to the index list.

Return Values

This method returns the number of indices in the index list.

Remarks

Only shapes drawn with the IDirect3DDevice7::DrawIndexedPrimitiveVB method will have an index list. If a shape is drawn with the IDirect3DDevice7::DrawPrimitiveVB method, this method will return zero and ppIndices will be NULL. The D3DXCreateTeapot and D3DXCreateTorus functions use an index list while the D3DXCreateBox, D3DXCreateCylinder, D3DXCreatePolygon, and D3DXCreateSphere functions do not use an index list.

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

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Version: Requires DirectX 7.0.
  Header: Declared in d3dxshapes.h.
  Library: Use d3dx.lib.

See Also

IDirect3DDevice7::DrawIndexedPrimitive