Compartilhar via


Point Lists

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

A point list is a collection of vertices that are rendered as isolated points. Your application can use them in 3-D scenes for star fields, or dotted lines on the surface of a polygon.

The following illustration shows a rendered point list.

Aa913730.3cba519c-6844-4390-abbc-642858aeda75(en-us,MSDN.10).gif

The point list primitive is identified by the D3DMPT_POINTLIST element of the D3DMPRIMITIVETYPE enumeration.

Your application can apply materials and textures to a point list. The colors in the material or texture appear only at the points drawn, and not anywhere between the points.

The following code shows how to create vertices for this point 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 following code example shows how to use IDirect3DMobileDevice::DrawPrimitive to render this point list.

//
// It is assumed that d3dmDevice is a valid
// pointer to a IDirect3DMobileDevice interface.
//
d3dmDevice->DrawPrimitive( D3DMPT_POINTLIST, 0, 6 );

See Also

Concepts

Device-Supported Primitive Types