DirectX9 IDirect3DDevice9::DrawIndexedPrimitive

来源:互联网 发布:php 大端小端 转换 编辑:程序博客网 时间:2024/06/04 20:51

IDirect3DDevice9::DrawIndexedPrimitive

This method is used to draw primitives using index info.

HRESULT IDirect3DDevice9::DrawIndexedPrimitive(
D3DPRIMITIVETYPE Type,
INT BaseVertexIndex,
UINT MinIndex,
UINT NumVertices,
UINT StartIndex,
UINT PrimitiveCount

);


Type—The type of primitive that we are drawing. For instance, we can draw points and lines in addition to triangles. Since we are using a triangle, useD3DPT_TRIANGLELISTfor this parameter.

BaseVertexIndex—A base number to be added to the indices used in this call. See the following note.

MinIndex—The minimum index value that will be referenced

NumVertices—The number of vertices that will be referenced in this call

StartIndex—Index to an element in the index buffer that marks the starting point from which to begin reading indices

PrimitiveCount—The number of primitives to draw


Example:
_device->DrawIndexedPrimitive(D3DPT_TRIANGLELIST, 0, 0, 8, 0, 12);

0 0
原创粉丝点击