D3DHAL_DP2INDEXEDLINESTRIP
TOC
Collapse the table of content
Expand the table of content

D3DHAL_DP2INDEXEDLINESTRIP structure

D3DHAL_DP2INDEXEDLINESTRIP is parsed from the command buffer by the D3dDrawPrimitives2 callback when the D3DHAL_DP2COMMAND structure's bCommand member is set to D3DDP2OP_INDEXEDLINESTRIP, and is used to render a sequence of connected line segments using vertex indices.

Syntax


typedef struct _D3DHAL_DP2INDEXEDLINESTRIP {
  WORD wV[2];
} D3DHAL_DP2INDEXEDLINESTRIP, *LPD3DHAL_DP2INDEXEDLINESTRIP;

Members

wV

Specifies the indexes into the vertex buffer from which the driver obtains coordinate data for the vertices making up the line strip.

Although this member has only enough space to hold two indexes, this array of indexes should be treated as a variable-sized array with (wPrimitiveCount+ 1) elements. (wPrimitiveCount is a member of the D3DHAL_DP2COMMAND structure.)

Remarks

Indexed line strips rendered with vertex buffers are specified using D3DHAL_DP2INDEXEDLINESTRIP. The number of line segments to process is specified by the wPrimitiveCount member of D3DHAL_DP2COMMAND. The sequence of line segments rendered is: (wV[0], wV[1]), (wV[1], wV[2]), (wV[2], wV[3]), ..., (wVStart[wPrimitiveCount -1], wVStart[wPrimitiveCount]).

D3dDrawPrimitives2 should process (wPrimitiveCount+1) indexes from the command buffer, in effect processing wPrimitiveCount D3DHAL_DP2INDEXEDLINESTRIP structures. The value of wPrimitiveCount is specified in the D3DHAL_DP2COMMAND structure.

A D3DHAL_DP2STARTVERTEX structure immediately follows the command in the command buffer. The vertex buffer indexes are relative to the vertex buffer offset specified by the dwVertexOffset member of the D3DHAL_DRAWPRIMITIVES2DATA structure plus the base offset obtained from the wVStart member of the D3DHAL_DP2STARTVERTEX structure.

The following figure shows a portion of a sample command buffer containing a D3DDP2OP_INDEXEDLINESTRIP command, a D3DHAL_DP2STARTVERTEX offset, and a list of D3DHAL_DP2INDEXEDLINESTRIP structures. The driver should process four vertices from the vertex buffer, rendering three connected line segments defined by (v[8], v[4]), (v[4], v[7]), (v[7], v[6]).

Figure showing a buffer with a D3DDP2OP_INDEXEDLINESTRIP command, a D3DHAL_DP2STARTVERTEX offset, and a list of D3DHAL_DP2INDEXEDLINESTRIP structures

Requirements

Header

D3dhal.h (include D3dhal.h)

See also

D3DDP2OP_INDEXEDLINESTRIP
D3dDrawPrimitives2
D3DHAL_DP2COMMAND
D3DHAL_DP2STARTVERTEX
D3DHAL_DRAWPRIMITIVES2DATA

 

 

Send comments about this topic to Microsoft

Show:
© 2016 Microsoft