Export (0) Print
Expand All
Information
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.

IDirect3DMobileDevice::DrawIndexedPrimitive

Windows Mobile 6.5
A version of this page is also available for
4/8/2010

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


HRESULT DrawIndexedPrimitive(
  D3DMPRIMITIVETYPE PrimitiveType,
  INT BaseVertexIndex,
  UINT minIndex,
  UINT NumVertices,
  UINT startIndex,
  UINT primCount
);

PrimitiveType

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

BaseVertexIndex

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

minIndex

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

NumVertices

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

startIndex

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

primCount

[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

D3DMERR_DRIVERINVALIDCALL

See Remarks.

D3DMERR_DRIVERINTERNALERROR

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.

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

Community Additions

Show:
© 2015 Microsoft