Rendering Other Primitive Types

All of the code we've written thus far concentrated on drawing a single type of primitive, namely a list of triangles. However, there are actually numerous different primitive types we can draw. The following list describes these primitive types:

  • PointList— This is a self-describing primitive type, as it will render the data as a list of points. You cannot use this primitive type if you are drawing indexed primitives (which we'll cover later in this chapter). See Figure 4.1.

    Figure 4.1. Point lists.

  • LineList— Renders each pair of vertices as individual lines. You must pass in an even number of vertices (at least ...

Get Managed DirectX® 9 Kick Start: Graphics and Game Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.