Microsoft DirectX 8.0 (C++) |
Renders the specified geometric primitive, based on indexing into an array of vertices.
HRESULT DrawIndexedPrimitive( D3DPRIMITIVETYPE Type, UINT MinIndex, UINT NumVertices, UINT StartIndex, UINT PrimitiveCount );
If the method succeeds, the return value is D3D_OK.
If the method fails, the return value can be D3DERR_INVALIDCALL.
This method draws indexed primitives from the current set of data input streams.
MinIndex and all the indices in the index stream are relative to the BaseVertexIndex, set during the IDirect3DDevice8::SetIndices call.
The minIndex and NumVertices parameters specify the range of vertex indices used for each DrawIndexedPrimitive call. These are used to optimize vertex processing of indexed primitives by processing a sequential range of vertices prior to indexing into these vertices. It is invalid for any indices used during this call to reference any vertices outside of this range.
DrawIndexedPrimitive fails if no index array is set.
The D3DPT_POINTLIST member of the D3DPRIMITIVETYPE enumerated type is not supported and should not be specified for Type.
Header: Declared in D3d8.h.
Import Library: Use D3d8.lib.
IDirect3DDevice8::DrawPrimitive, IDirect3DDevice8::SetStreamSource, Rendering Primitives