rename upstream-man-pages to upstream-doc
[clinton/guile-figl.git] / upstream-doc / man2 / xhtml / glLineStipple.xml
CommitLineData
7faf1d71
AW
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "xhtml1-transitional.dtd">
2<!-- saved from url=(0013)about:internet -->
3<?xml-stylesheet type="text/xsl" href="mathml.xsl"?><html xmlns="http://www.w3.org/1999/xhtml" xmlns:pref="http://www.w3.org/2002/Math/preference" pref:renderer="mathplayer-dl"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>glLineStipple</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /></head><body><div class="refentry" lang="en" xml:lang="en"><a id="glLineStipple"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glLineStipple — specify the line stipple pattern</p></div><div class="refsynopsisdiv"><h2>C Specification</h2><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">glLineStipple</b>(</code></td><td>GLint  </td><td><var class="pdparam">factor</var>, </td></tr><tr><td> </td><td>GLushort  </td><td><var class="pdparam">pattern</var><code>)</code>;</td></tr></table></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="parameters"></a><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><em class="parameter"><code>factor</code></em></span></dt><dd><p>
4 Specifies a multiplier for each bit in the line stipple pattern.
5 If <em class="parameter"><code>factor</code></em> is 3,
6 for example,
7 each bit in the pattern is used three times
8 before the next bit in the pattern is used.
9 <em class="parameter"><code>factor</code></em> is clamped to the range [1, 256] and defaults to 1.
10 </p></dd><dt><span class="term"><em class="parameter"><code>pattern</code></em></span></dt><dd><p>
11 Specifies a 16-bit integer whose bit pattern determines
12 which fragments of a line will be drawn when the line is rasterized.
13 Bit zero is used first; the default pattern is all 1's.
14 </p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="description"></a><h2>Description</h2><p>
15 Line stippling masks out certain fragments produced by rasterization;
16 those fragments will not be drawn.
17 The masking is achieved by using three parameters:
18 the 16-bit line stipple pattern <em class="parameter"><code>pattern</code></em>,
19 the repeat count <em class="parameter"><code>factor</code></em>,
20 and an integer stipple counter
21 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">s</mml:mi></mml:math>.
22 </p><p>
23 Counter
24 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">s</mml:mi></mml:math>
25 is reset to 0 whenever <a class="citerefentry" href="glBegin.xml"><span class="citerefentry"><span class="refentrytitle">glBegin</span></span></a> is called
26 and before each line segment of a <a class="citerefentry" href="glBegin.xml"><span class="citerefentry"><span class="refentrytitle">glBegin</span></span></a>(<code class="constant">GL_LINES</code>)/<a class="citerefentry" href="glEnd.xml"><span class="citerefentry"><span class="refentrytitle">glEnd</span></span></a>
27 sequence is generated.
28 It is incremented after each fragment of a unit width aliased line segment
29 is generated
30 or after each
31 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">i</mml:mi></mml:math>
32 fragments of an
33 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">i</mml:mi></mml:math>
34 width line segment are generated.
35 The
36 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">i</mml:mi></mml:math>
37 fragments associated with count
38 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">s</mml:mi></mml:math>
39 are masked out if
40 </p><p>
41 <em class="parameter"><code>pattern</code></em> bit
42 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
43
44 <mml:mrow>
45 <mml:mfenced open="(" close=")">
46 <mml:mfrac>
47 <mml:mi mathvariant="italic">s</mml:mi>
48 <mml:mi mathvariant="italic">factor</mml:mi>
49 </mml:mfrac>
50 </mml:mfenced>
51 <mml:mo>%</mml:mo>
52 <mml:mn>16</mml:mn>
53 </mml:mrow>
54 </mml:math>
55 </p><p>
56 is 0, otherwise these fragments are sent to the frame buffer.
57 Bit zero of <em class="parameter"><code>pattern</code></em> is the least significant bit.
58 </p><p>
59 Antialiased lines are treated as a sequence of
60 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
61
62 <mml:mrow>
63 <mml:mn>1</mml:mn>
64 <mml:mo>×</mml:mo>
65 <mml:mi mathvariant="italic">width</mml:mi>
66 </mml:mrow>
67 </mml:math>
68 rectangles
69 for purposes of stippling.
70 Whether rectangle
71 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">s</mml:mi></mml:math>
72 is rasterized or not depends on the fragment rule
73 described for aliased lines,
74 counting rectangles rather than groups of fragments.
75 </p><p>
76 To enable and disable line stippling, call <a class="citerefentry" href="glEnable.xml"><span class="citerefentry"><span class="refentrytitle">glEnable</span></span></a> and <a class="citerefentry" href="glDisable.xml"><span class="citerefentry"><span class="refentrytitle">glDisable</span></span></a>
77 with argument <code class="constant">GL_LINE_STIPPLE</code>.
78 When enabled,
79 the line stipple pattern is applied as described above.
80 When disabled,
81 it is as if the pattern were all 1's.
82 Initially, line stippling is disabled.
83 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="errors"></a><h2>Errors</h2><p>
84 <code class="constant">GL_INVALID_OPERATION</code> is generated if <code class="function">glLineStipple</code>
85 is executed between the execution of <a class="citerefentry" href="glBegin.xml"><span class="citerefentry"><span class="refentrytitle">glBegin</span></span></a>
86 and the corresponding execution of <a class="citerefentry" href="glEnd.xml"><span class="citerefentry"><span class="refentrytitle">glEnd</span></span></a>.
87 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="associatedgets"></a><h2>Associated Gets</h2><p>
88 <a class="citerefentry" href="glGet.xml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with argument <code class="constant">GL_LINE_STIPPLE_PATTERN</code>
89 </p><p>
90 <a class="citerefentry" href="glGet.xml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with argument <code class="constant">GL_LINE_STIPPLE_REPEAT</code>
91 </p><p>
92 <a class="citerefentry" href="glIsEnabled.xml"><span class="citerefentry"><span class="refentrytitle">glIsEnabled</span></span></a> with argument <code class="constant">GL_LINE_STIPPLE</code>
93 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p>
94 <a class="citerefentry" href="glLineWidth.xml"><span class="citerefentry"><span class="refentrytitle">glLineWidth</span></span></a>,
95 <a class="citerefentry" href="glPolygonStipple.xml"><span class="citerefentry"><span class="refentrytitle">glPolygonStipple</span></span></a>
96 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="Copyright"></a><h2>Copyright</h2><p>
97 Copyright <span class="trademark"></span>© 1991-2006
98 Silicon Graphics, Inc. This document is licensed under the SGI
99 Free Software B License. For details, see
100 <a class="ulink" href="http://oss.sgi.com/projects/FreeB/" target="_top">http://oss.sgi.com/projects/FreeB/</a>.
101 </p></div></div></body></html>