D3DHAL_DP2TRIANGLELIST structure (d3dhal.h)

One D3DHAL_DP2TRIANGLELIST structure is parsed from the command buffer by the D3dDrawPrimitives2 callback when the D3DHAL_DP2COMMAND structure's bCommand member is set to D3DDP2OP_TRIANGLELIST, and is used to render the specified unconnected triangles.

Syntax

typedef struct _D3DHAL_DP2TRIANGLELIST {
  WORD wVStart;
} D3DHAL_DP2TRIANGLELIST, *LPD3DHAL_DP2TRIANGLELIST;

Members

wVStart

Specifies the offset into the vertex buffer containing coordinate data for the initial vertex of the triangle list

Remarks

One D3DHAL_DP2TRIANGLELIST structure follows the D3DHAL_DP2COMMAND structure in the command buffer.

D3dDrawPrimitives2 should sequentially process a total of wPrimitiveCount * 3 vertices from the vertex buffer, three vertices per triangle, rendering wPrimitiveCount triangles. Starting from the vertex buffer offset, the sequence of triangles rendered is (wVStart, wVStart + 1, wVStart + 2), (wVStart + 3, wVStart + 4, wVStart + 5),..., (wVStart + (wPrimitiveCount - 1) * 3, wVStart + wPrimitiveCount * 3 - 2, wVStart + wPrimitiveCount * 3 - 1). The value of wPrimitiveCount is specified in the D3DHAL_DP2COMMAND structure.

The following figure shows a portion of a sample command buffer containing a D3DDP2OP_TRIANGLELIST command and one D3DHAL_DP2TRIANGLELIST structure. The driver should draw two triangles using the following six vertices from the vertex buffer: (v[2], v[3], v[4]), (v[5], v[6], v[7]).

Figure showing a command buffer with a D3DDP2OP_TRIANGLELIST command and one D3DHAL_DP2TRIANGLELIST structure

Requirements

Requirement Value
Header d3dhal.h (include D3dhal.h)

See also

D3DDP2OP_TRIANGLELIST

D3DHAL_DP2COMMAND

D3dDrawPrimitives2