Line Lists (Windows CE 5.0)
A line list is a list of isolated, straight line segments. Line lists are useful for such tasks as adding sleet or heavy rain to a 3-D scene. Applications create a line list by filling an array of vertices, and the number of vertices in a line list must be an even number greater than or equal to two.
The following illustration shows a rendered line list.
The line list primitive is identified by the D3DMPT_LINELIST element of the D3DMPRIMITIVETYPE enumeration.
You can apply materials and textures to a line list. The colors in the material or texture appear only along the lines drawn, not at any point in between the lines.
The following code shows how to create vertices for this line list.
struct CUSTOMVERTEX
{
float x,y,z;
};
CUSTOMVERTEX Vertices[] =
{
{-5.0, -5.0, 0.0},
{ 0.0, 5.0, 0.0},
{ 5.0, -5.0, 0.0},
{10.0, 5.0, 0.0},
{15.0, -5.0, 0.0},
{20.0, 5.0, 0.0}
};
The code example below shows how to use IDirect3DMobileDevice::DrawPrimitive to render this line list:
//
// It is assumed that d3dmDevice is a valid
// pointer to a IDirect3DMobileDevice interface.
//
d3dmDevice->DrawPrimitive( D3DMPT_LINELIST, 0, 3 );
See Also
Device-Supported Primitive Types
Send Feedback on this topic to the authors