Export (0) Print
Expand All
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.


Windows Mobile 6.5
A version of this page is also available for

This method is used to draw primitives based on data read from an index buffer.

HRESULT DrawIndexedPrimitive(
  INT BaseVertexIndex,
  UINT minIndex,
  UINT NumVertices,
  UINT startIndex,
  UINT primCount


[in] Member of the D3DMPRIMITIVETYPE enumerated type, except for D3DMPT_POINTLIST, describing the type of primitive to render. For more information, see Remarks.


[in] An INT value that when added to minIndex specifies the start of the valid range of vertex offsets that the command may access.


[in] A UINT value that when added to BaseVertexIndex specifies the start of the valid range of vertex offsets that the command may access.


[in] A UINT value that specifies the end of the valid range of vertex offsets that the command may access.


[in] A UINT value that specifies the first position in the index buffer to begin reading indices from.


[in] A UNIT value that specifies the number of primitives to draw. In combination with PrimitiveType, this parameter implicitly defines the number of index values required for the operation. If there are insufficient index values in the current index buffer to draw a primitive, the primitive is ignored and processing continues.

Error Code Description


See Remarks.


There was no active vertex or index buffer when the method was called.

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 IDirect3DMobileDevice::SetIndices call.

Each time an index is read from the index buffer, the value is added to minIndex and baseVertexIndex to get the vertex offset to use. If that offset does not lie within the range specified then the drawing command is halted, a D3DMERR_DRIVERINVALIDCALL error returned, and the next command is processed.

IDirect3DMobileDevice::DrawIndexedPrimitive fails if no index array is set.

LibraryD3dm.lib, D3dmguid.lib
Windows Embedded CEWindows CE 5.0 and later
Windows MobileWindows Mobile Version 5.0 and later

Community Additions

© 2015 Microsoft