-
Figure 2-8
To make stippled (dotted or dashed) lines, you use
the command glLineStipple() to define the stipple pattern, and then you
enable line stippling with glEnable().
glLineStipple(1, 0x3F07);
glEnable(GL_LINE_STIPPLE);
void glLineStipple(GLint factor, GLushort pattern);
Sets the current stippling pattern for lines.
The pattern argument is a 16-bit series of 0s and 1s,
and it's repeated as necessary to stipple a given line. A 1 indicates that
drawing occurs, and 0 that it does not, on a pixel-by-pixel basis, beginning
with the low-order bit of the pattern.