1733baab3b749c2727a02691147651aeea0dfeb5
[clinton/guile-figl.git] / upstream-man-pages / man2 / xhtml / glWindowPos.xml
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>glWindowPos</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /></head><body><div class="refentry" lang="en" xml:lang="en"><a id="glWindowPos"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glWindowPos — specify the raster position in window coordinates for pixel operations</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">glWindowPos2s</b>(</code></td><td>GLshort  </td><td><var class="pdparam">x</var>, </td></tr><tr><td> </td><td>GLshort  </td><td><var class="pdparam">y</var><code>)</code>;</td></tr></table></div><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">glWindowPos2i</b>(</code></td><td>GLint  </td><td><var class="pdparam">x</var>, </td></tr><tr><td> </td><td>GLint  </td><td><var class="pdparam">y</var><code>)</code>;</td></tr></table></div><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">glWindowPos2f</b>(</code></td><td>GLfloat  </td><td><var class="pdparam">x</var>, </td></tr><tr><td> </td><td>GLfloat  </td><td><var class="pdparam">y</var><code>)</code>;</td></tr></table></div><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">glWindowPos2d</b>(</code></td><td>GLdouble  </td><td><var class="pdparam">x</var>, </td></tr><tr><td> </td><td>GLdouble  </td><td><var class="pdparam">y</var><code>)</code>;</td></tr></table></div><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">glWindowPos3s</b>(</code></td><td>GLshort  </td><td><var class="pdparam">x</var>, </td></tr><tr><td> </td><td>GLshort  </td><td><var class="pdparam">y</var>, </td></tr><tr><td> </td><td>GLshort  </td><td><var class="pdparam">z</var><code>)</code>;</td></tr></table></div><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">glWindowPos3i</b>(</code></td><td>GLint  </td><td><var class="pdparam">x</var>, </td></tr><tr><td> </td><td>GLint  </td><td><var class="pdparam">y</var>, </td></tr><tr><td> </td><td>GLint  </td><td><var class="pdparam">z</var><code>)</code>;</td></tr></table></div><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">glWindowPos3f</b>(</code></td><td>GLfloat  </td><td><var class="pdparam">x</var>, </td></tr><tr><td> </td><td>GLfloat  </td><td><var class="pdparam">y</var>, </td></tr><tr><td> </td><td>GLfloat  </td><td><var class="pdparam">z</var><code>)</code>;</td></tr></table></div><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">glWindowPos3d</b>(</code></td><td>GLdouble  </td><td><var class="pdparam">x</var>, </td></tr><tr><td> </td><td>GLdouble  </td><td><var class="pdparam">y</var>, </td></tr><tr><td> </td><td>GLdouble  </td><td><var class="pdparam">z</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>x</code></em>, </span><span class="term"><em class="parameter"><code>y</code></em>, </span><span class="term"><em class="parameter"><code>z</code></em></span></dt><dd><p>
4 Specify the
5 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">x</mml:mi></mml:math>,
6 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">y</mml:mi></mml:math>,
7 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">z</mml:mi></mml:math>
8 coordinates for the raster position.
9 </p></dd></dl></div></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">glWindowPos2sv</b>(</code></td><td>const GLshort *  </td><td><var class="pdparam">v</var><code>)</code>;</td></tr></table></div><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">glWindowPos2iv</b>(</code></td><td>const GLint *  </td><td><var class="pdparam">v</var><code>)</code>;</td></tr></table></div><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">glWindowPos2fv</b>(</code></td><td>const GLfloat *  </td><td><var class="pdparam">v</var><code>)</code>;</td></tr></table></div><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">glWindowPos2dv</b>(</code></td><td>const GLdouble *  </td><td><var class="pdparam">v</var><code>)</code>;</td></tr></table></div><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">glWindowPos3sv</b>(</code></td><td>const GLshort *  </td><td><var class="pdparam">v</var><code>)</code>;</td></tr></table></div><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">glWindowPos3iv</b>(</code></td><td>const GLint *  </td><td><var class="pdparam">v</var><code>)</code>;</td></tr></table></div><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">glWindowPos3fv</b>(</code></td><td>const GLfloat *  </td><td><var class="pdparam">v</var><code>)</code>;</td></tr></table></div><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">glWindowPos3dv</b>(</code></td><td>const GLdouble *  </td><td><var class="pdparam">v</var><code>)</code>;</td></tr></table></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="parameters2"></a><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><em class="parameter"><code>v</code></em></span></dt><dd><p>
10 Specifies a pointer to an array of two or three elements,
11 specifying
12 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">x</mml:mi></mml:math>,
13 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">y</mml:mi></mml:math>,
14 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">z</mml:mi></mml:math>
15 coordinates, respectively.
16 </p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="description"></a><h2>Description</h2><p>
17 The GL maintains a 3D position in window coordinates. This position,
18 called the raster position, is used to position pixel and bitmap write
19 operations. It is maintained with subpixel accuracy. See <a class="citerefentry" href="glBitmap.xml"><span class="citerefentry"><span class="refentrytitle">glBitmap</span></span></a>,
20 <a class="citerefentry" href="glDrawPixels.xml"><span class="citerefentry"><span class="refentrytitle">glDrawPixels</span></span></a>, and <a class="citerefentry" href="glCopyPixels.xml"><span class="citerefentry"><span class="refentrytitle">glCopyPixels</span></span></a>.
21 </p><p>
22 <code class="function">glWindowPos2</code> specifies the
23 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">x</mml:mi></mml:math>
24 and
25 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">y</mml:mi></mml:math>
26 coordinates, while
27 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">z</mml:mi></mml:math>
28 is
29 implicitly set to 0. <code class="function">glWindowPos3</code> specifies all three coordinates.
30 The
31 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">w</mml:mi></mml:math>
32 coordinate of the current raster position is always set to 1.0.
33 </p><p>
34 <code class="function">glWindowPos</code> directly updates the
35 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">x</mml:mi></mml:math>
36 and
37 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">y</mml:mi></mml:math>
38 coordinates of the current raster
39 position with the values specified. That is, the values are neither
40 transformed by the current modelview and projection matrices, nor by
41 the viewport-to-window transform. The
42 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">z</mml:mi></mml:math>
43 coordinate of the current raster
44 position is updated in the following manner:
45 </p><p>
46 </p><div class="informalequation"><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
47
48 <mml:mrow>
49 <mml:mi mathvariant="italic">z</mml:mi>
50 <mml:mo>=</mml:mo>
51 <mml:mfenced open="{" close="">
52 <mml:mrow>
53 <mml:mtable>
54 <mml:mtr><mml:mtd>
55 <mml:mi mathvariant="italic">n</mml:mi>
56 </mml:mtd></mml:mtr>
57 <mml:mtr><mml:mtd>
58 <mml:mi mathvariant="italic">f</mml:mi>
59 </mml:mtd></mml:mtr>
60 <mml:mtr><mml:mtd>
61 <mml:mfenced open="" close="">
62 <mml:mrow>
63 <mml:mi mathvariant="italic">n</mml:mi>
64 <mml:mo>+</mml:mo>
65 <mml:mrow>
66 <mml:mi mathvariant="italic">z</mml:mi>
67 <mml:mo>×</mml:mo>
68 <mml:mfenced open="(" close=")">
69 <mml:mrow>
70 <mml:mi mathvariant="italic">f</mml:mi>
71 <mml:mo>-</mml:mo>
72 <mml:mi mathvariant="italic">n</mml:mi>
73 </mml:mrow>
74 </mml:mfenced>
75 </mml:mrow>
76 </mml:mrow>
77 </mml:mfenced>
78 </mml:mtd></mml:mtr>
79 </mml:mtable>
80 <mml:mo></mml:mo>
81 <mml:mtable>
82 <mml:mtr><mml:mtd>
83 <mml:mrow>
84 <mml:mrow>
85 <mml:mi mathvariant="italic">if</mml:mi>
86 <mml:mo></mml:mo>
87 <mml:mi mathvariant="italic">z</mml:mi>
88 </mml:mrow>
89 <mml:mo>&lt;=</mml:mo>
90 <mml:mn>0</mml:mn>
91 </mml:mrow>
92 </mml:mtd></mml:mtr>
93 <mml:mtr><mml:mtd>
94 <mml:mrow>
95 <mml:mrow>
96 <mml:mi mathvariant="italic">if</mml:mi>
97 <mml:mo></mml:mo>
98 <mml:mi mathvariant="italic">z</mml:mi>
99 </mml:mrow>
100 <mml:mo>&gt;=</mml:mo>
101 <mml:mn>1</mml:mn>
102 </mml:mrow>
103 </mml:mtd></mml:mtr>
104 <mml:mtr><mml:mtd>
105 <mml:mfenced open="" close="">
106 <mml:mi mathvariant="normal">otherwise</mml:mi>
107 </mml:mfenced>
108 </mml:mtd></mml:mtr>
109 </mml:mtable>
110 </mml:mrow>
111 </mml:mfenced>
112 </mml:mrow>
113 </mml:math></div><p>
114 </p><p>
115 </p><p>
116 where
117 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">n</mml:mi></mml:math>
118 is <code class="constant">GL_DEPTH_RANGE</code>'s near value, and
119 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">f</mml:mi></mml:math>
120 is
121 <code class="constant">GL_DEPTH_RANGE</code>'s far value. See <a class="citerefentry" href="glDepthRange.xml"><span class="citerefentry"><span class="refentrytitle">glDepthRange</span></span></a>.
122 </p><p>
123 The specified coordinates are not clip-tested, causing the raster position
124 to always be valid.
125 </p><p>
126 The current raster position also includes some associated color data and
127 texture coordinates. If lighting is enabled, then
128 <code class="constant">GL_CURRENT_RASTER_COLOR</code> (in RGBA mode) or <code class="constant">GL_CURRENT_RASTER_INDEX</code>
129 (in color index mode) is set to the color produced by the lighting
130 calculation (see <a class="citerefentry" href="glLight.xml"><span class="citerefentry"><span class="refentrytitle">glLight</span></span></a>, <a class="citerefentry" href="glLightModel.xml"><span class="citerefentry"><span class="refentrytitle">glLightModel</span></span></a>, and <a class="citerefentry" href="glShadeModel.xml"><span class="citerefentry"><span class="refentrytitle">glShadeModel</span></span></a>).
131 If lighting is disabled, current color (in RGBA mode, state variable
132 <code class="constant">GL_CURRENT_COLOR</code>) or color index (in color index mode, state variable
133 <code class="constant">GL_CURRENT_INDEX</code>) is used to update the current raster color.
134 <code class="constant">GL_CURRENT_RASTER_SECONDARY_COLOR</code> (in RGBA mode) is likewise updated.
135 </p><p>
136 Likewise, <code class="constant">GL_CURRENT_RASTER_TEXTURE_COORDS</code> is updated as a function of
137 <code class="constant">GL_CURRENT_TEXTURE_COORDS</code>, based on the texture matrix and the texture
138 generation functions (see <a class="citerefentry" href="glTexGen.xml"><span class="citerefentry"><span class="refentrytitle">glTexGen</span></span></a>). The
139 <code class="constant">GL_CURRENT_RASTER_DISTANCE</code> is set to the <code class="constant">GL_CURRENT_FOG_COORD</code>.
140 </p><p>
141 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="notes"></a><h2>Notes</h2><p>
142 <code class="function">glWindowPos</code> is available only if the GL version is 1.4 or greater.
143 </p><p>
144 The raster position is modified by <a class="citerefentry" href="glRasterPos.xml"><span class="citerefentry"><span class="refentrytitle">glRasterPos</span></span></a>, <a class="citerefentry" href="glBitmap.xml"><span class="citerefentry"><span class="refentrytitle">glBitmap</span></span></a>, and
145 <code class="function">glWindowPos</code>.
146 </p><p>
147 Calling <a class="citerefentry" href="glDrawElements.xml"><span class="citerefentry"><span class="refentrytitle">glDrawElements</span></span></a>, or <a class="citerefentry" href="glDrawRangeElements.xml"><span class="citerefentry"><span class="refentrytitle">glDrawRangeElements</span></span></a> may leave the
148 current color or index indeterminate.
149 If <code class="function">glWindowPos</code> is executed while the current color or index is indeterminate, the
150 current raster color or current raster index remains indeterminate.
151 </p><p>
152 There are distinct raster texture coordinates for each texture unit. Each
153 texture unit's current raster texture coordinates are updated by <code class="function">glWindowPos</code>.
154 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="errors"></a><h2>Errors</h2><p>
155 <code class="constant">GL_INVALID_OPERATION</code> is generated if <code class="function">glWindowPos</code>
156 is executed between the execution of <a class="citerefentry" href="glBegin.xml"><span class="citerefentry"><span class="refentrytitle">glBegin</span></span></a>
157 and the corresponding execution of <a class="citerefentry" href="glEnd.xml"><span class="citerefentry"><span class="refentrytitle">glEnd</span></span></a>.
158 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="associatedgets"></a><h2>Associated Gets</h2><p>
159 <a class="citerefentry" href="glGet.xml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with argument <code class="constant">GL_CURRENT_RASTER_POSITION</code>
160 </p><p>
161 <a class="citerefentry" href="glGet.xml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with argument <code class="constant">GL_CURRENT_RASTER_POSITION_VALID</code>
162 </p><p>
163 <a class="citerefentry" href="glGet.xml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with argument <code class="constant">GL_CURRENT_RASTER_DISTANCE</code>
164 </p><p>
165 <a class="citerefentry" href="glGet.xml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with argument <code class="constant">GL_CURRENT_RASTER_COLOR</code>
166 </p><p>
167 <a class="citerefentry" href="glGet.xml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with argument <code class="constant">GL_CURRENT_RASTER_SECONDARY_COLOR</code>
168 </p><p>
169 <a class="citerefentry" href="glGet.xml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with argument <code class="constant">GL_CURRENT_RASTER_INDEX</code>
170 </p><p>
171 <a class="citerefentry" href="glGet.xml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with argument <code class="constant">GL_CURRENT_RASTER_TEXTURE_COORDS</code>
172 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p>
173 <a class="citerefentry" href="glBitmap.xml"><span class="citerefentry"><span class="refentrytitle">glBitmap</span></span></a>,
174 <a class="citerefentry" href="glCopyPixels.xml"><span class="citerefentry"><span class="refentrytitle">glCopyPixels</span></span></a>,
175 <a class="citerefentry" href="glDrawArrays.xml"><span class="citerefentry"><span class="refentrytitle">glDrawArrays</span></span></a>,
176 <a class="citerefentry" href="glDrawElements.xml"><span class="citerefentry"><span class="refentrytitle">glDrawElements</span></span></a>,
177 <a class="citerefentry" href="glDrawRangeElements.xml"><span class="citerefentry"><span class="refentrytitle">glDrawRangeElements</span></span></a>,
178 <a class="citerefentry" href="glDrawPixels.xml"><span class="citerefentry"><span class="refentrytitle">glDrawPixels</span></span></a>,
179 <a class="citerefentry" href="glMultiTexCoord.xml"><span class="citerefentry"><span class="refentrytitle">glMultiTexCoord</span></span></a>,
180 <a class="citerefentry" href="glRasterPos.xml"><span class="citerefentry"><span class="refentrytitle">glRasterPos</span></span></a>,
181 <a class="citerefentry" href="glTexCoord.xml"><span class="citerefentry"><span class="refentrytitle">glTexCoord</span></span></a>,
182 <a class="citerefentry" href="glTexGen.xml"><span class="citerefentry"><span class="refentrytitle">glTexGen</span></span></a>,
183 <a class="citerefentry" href="glVertex.xml"><span class="citerefentry"><span class="refentrytitle">glVertex</span></span></a>
184 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="Copyright"></a><h2>Copyright</h2><p>
185 Copyright <span class="trademark"></span>© 1991-2006
186 Silicon Graphics, Inc. This document is licensed under the SGI
187 Free Software B License. For details, see
188 <a class="ulink" href="http://oss.sgi.com/projects/FreeB/" target="_top">http://oss.sgi.com/projects/FreeB/</a>.
189 </p></div></div></body></html>