Drawing Lines

Drawing simple line types was actually covered back in Chapter 4, “More Rendering Techniques,” when dealing with primitive types, as there is a primitive type for a line list or a line strip that can be easily used. However, when drawing these types of lines, you cannot have lines with varying widths, or lines that are anti-aliased (unless the whole scene is).

Depending on the type of application you are trying to write, drawing lines can be a very common occurrence, or something that you simply never have to do. However, with the ease of the Line class, it's a simple matter to draw them anytime they're necessary. To show the simplicity of drawing some lines, we will write a quick example to draw a random number of lines on the ...

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

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.