Share via


IDirect3DDevice8::DrawIndexedPrimitive

This method 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
);

Parameters

  • Type
    [in] Member of the D3DPRIMITIVETYPE enumerated type, describing the type of primitive to render. See Remarks.
  • MinIndex
    [in] Minimum vertex index for vertices used during this call.
  • NumVertices
    [in] The number of vertices used during this call starting from BaseVertexIndex + MinIndex.
  • StartIndex
    [in] Location in the index array to start reading vertices.
  • PrimitiveCount
    [in] Number of primitives to render. The number of vertices used is a function of the primitive count and the primitive type. The maximum number of primitives allowed is determined by checking the MaxPrimitiveCount member of the D3DCAPS8 structure.

Return Values

If the method succeeds, the return value is D3D_OK.

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

Remarks

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.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: D3d8.h.
Link Library: D3d8.lib.

See Also

Rendering Primitives | D3DPRIMITIVETYPE | IDirect3DDevice8::DrawPrimitive | IDirect3DDevice8::SetIndices | IDirect3DDevice8::SetStreamSource | D3DCAPS8 | IDirect3DDevice8

 Last updated on Thursday, April 08, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.