1GLLINESTIPPLE(3G) GLLINESTIPPLE(3G)
2
3
4
6 glLineStipple - specify the line stipple pattern
7
8
10 void glLineStipple( GLint factor,
11 GLushort pattern )
12
13 delim $$
14
16 factor Specifies a multiplier for each bit in the line stipple pat‐
17 tern. If factor is 3, for example, each bit in the pattern is
18 used three times before the next bit in the pattern is used.
19 factor is clamped to the range [1, 256] and defaults to 1.
20
21 pattern Specifies a 16-bit integer whose bit pattern determines which
22 fragments of a line will be drawn when the line is rasterized.
23 Bit zero is used first; the default pattern is all 1's.
24
26 Line stippling masks out certain fragments produced by rasterization;
27 those fragments will not be drawn. The masking is achieved by using
28 three parameters: the 16-bit line stipple pattern pattern, the repeat
29 count factor, and an integer stipple counter $s$.
30
31 Counter $s$ is reset to 0 whenever glBegin is called, and before each
32 line segment of a glBegin(GL_LINES)/glEnd sequence is generated. It is
33 incremented after each fragment of a unit width aliased line segment is
34 generated, or after each $i$ fragments of an $i$ width line segment are
35 generated. The $i$ fragments associated with count $s$ are masked out
36 if
37
38 pattern bit $(s ~/~ "factor") ~roman mod~ 16$
39
40 is 0, otherwise these fragments are sent to the frame buffer. Bit zero
41 of pattern is the least significant bit.
42
43 Antialiased lines are treated as a sequence of $1 times width$ rectan‐
44 gles for purposes of stippling. Whether rectangle $s$ is rasterized or
45 not depends on the fragment rule described for aliased lines, counting
46 rectangles rather than groups of fragments.
47
48 To enable and disable line stippling, call glEnable and glDisable with
49 argument GL_LINE_STIPPLE. When enabled, the line stipple pattern is
50 applied as described above. When disabled, it is as if the pattern
51 were all 1's. Initially, line stippling is disabled.
52
54 GL_INVALID_OPERATION is generated if glLineStipple is executed between
55 the execution of glBegin and the corresponding execution of glEnd.
56
58 glGet with argument GL_LINE_STIPPLE_PATTERN
59 glGet with argument GL_LINE_STIPPLE_REPEAT
60 glIsEnabled with argument GL_LINE_STIPPLE
61
63 glLineWidth(3G), glPolygonStipple(3G)
64
65
66
67 GLLINESTIPPLE(3G)