Microsoft DirectX 8.1 (C++) |
Renders the indexed geometric primitive 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.
When converting a fixed function legacy application to Microsoft® DirectX® 8, you must add a call to IDirect3DDevice8::SetVertexShader before you make any calls to DrawIndexedPrimitive. Supply SetVertexShader with the fixed function flag to tell the pipeline that the application is fixed function.
Header: Declared in D3d8.h.
Import Library: Use D3d8.lib.
IDirect3DDevice8::DrawPrimitive, IDirect3DDevice8::SetStreamSource, Rendering Primitives