Microsoft DirectX 8.1 (Visual Basic)

Line Lists

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.

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.

Private Type CUSTOMVERTEX
    x As Single
    y As Single
    z As Single
End Type

Dim Vertices(5) As CUSTOMVERTEX
With Vertices(0): .x = -5.0: .y = -5.0: .z = 0.0: End With
With Vertices(1): .x =  0.0: .y =  5.0: .z = 0.0: End With
With Vertices(2): .x =  5.0: .y = -5.0: .z = 0.0: End With
With Vertices(3): .x = 10.0: .y =  5.0: .z = 0.0: End With
With Vertices(4): .x = 15.0: .y = -5.0: .z = 0.0: End With
With Vertices(5): .x = 20.0: .y =  5.0: .z = 0.0: End With