IDirect3DDevice9::DrawPrimitive
This method is used to draw primitives that do not use index info.
HRESULT IDirect3DDevice9::DrawPrimitive(
D3DPRIMITIVETYPE PrimitiveType,
UINT StartVertex,
UINT PrimitiveCount
);
PrimitiveType—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.
StartVertex—Index to an element in the vertex streams that marks the starting point from which to begin reading vertices. This parameter gives us the flexibility to only draw certain portions of a vertex buffer.
PrimitiveCount—The number of primitives to draw
Example:
// draw four triangles.
_device->DrawPrimitive( D3DPT_TRIANGLELIST, 0, 4);