D3DHAL_DP2INDEXEDLINELIST structure (d3dhal.h)
D3DHAL_DP2INDEXEDLINELIST is parsed from the command buffer by the D3dDrawPrimitives2 callback when the D3DHAL_DP2COMMAND structure's bCommand member is set to D3DDP2OP_INDEXEDLINELIST, and is used to render the lines using vertex indices.
Syntax
typedef struct _D3DHAL_DP2INDEXEDLINELIST {
WORD wV1;
WORD wV2;
} D3DHAL_DP2INDEXEDLINELIST, *LPD3DHAL_DP2INDEXEDLINELIST;
Members
wV1
Specifies the index into the vertex buffer, identifying the first endpoint of the line.
wV2
Specifies the index into the vertex buffer, identifying the second endpoint of the line.
Remarks
D3dDrawPrimitives2 should process (wPrimitiveCount * 2) indexes from the command buffer, in effect processing wPrimitiveCount D3DHAL_DP2INDEXEDLINELIST structures. The value of wPrimitiveCount is specified in the D3DHAL_DP2COMMAND structure.
The driver should process a total of (wPrimitiveCount * 2) vertices from the vertex buffer, two vertices per line. The sequence of lines rendered is (wV1₀, wV2₀), (wV1₁, wV2₁), ..., (wV1ₙ,wV2ₙ), where n equals (wPrimitiveCount- 1). The driver should interpret the vertex buffer indexes based on the current command as follows:
- When the command is D3DDP2OP_INDEXEDLINELIST, the vertex buffer indexes are relative to the vertex buffer offset specified by the dwVertexOffset member of the D3DHAL_DRAWPRIMITIVES2DATA structure.
- When the command is D3DDP2OP_INDEXEDLINELIST2, a D3DHAL_DP2STARTVERTEX structure immediately follows it and precedes the D3DHAL_DP2INDEXEDLINELIST structure(s) in the command buffer. The vertex buffer indexes are relative to the vertex buffer offset specified by dwVertexOffset plus the base offset obtained from the wVStart member of the D3DHAL_DP2STARTVERTEX structure.
Requirements
Requirement | Value |
---|---|
Header | d3dhal.h (include D3dhal.h) |
See also
D3DDP2OP_INDEXEDLINELIST