rename upstream-man-pages to upstream-doc
[clinton/guile-figl.git] / upstream-doc / man2 / glGetTexEnv.xml
CommitLineData
7faf1d71
AW
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN"
3 "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">
4<refentry id="glGetTexEnv">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>1991-2006</year>
9 <holder>Silicon Graphics, Inc.</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>glGetTexEnv</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>glGetTexEnv</refname>
17 <refpurpose>return texture environment parameters</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>C Specification</title>
20 <funcsynopsis>
21 <funcprototype>
22 <funcdef>void <function>glGetTexEnvfv</function></funcdef>
23 <paramdef>GLenum <parameter>target</parameter></paramdef>
24 <paramdef>GLenum <parameter>pname</parameter></paramdef>
25 <paramdef>GLfloat * <parameter>params</parameter></paramdef>
26 </funcprototype>
27 </funcsynopsis>
28 <para></para>
29 <funcsynopsis>
30 <funcprototype>
31 <funcdef>void <function>glGetTexEnviv</function></funcdef>
32 <paramdef>GLenum <parameter>target</parameter></paramdef>
33 <paramdef>GLenum <parameter>pname</parameter></paramdef>
34 <paramdef>GLint * <parameter>params</parameter></paramdef>
35 </funcprototype>
36 </funcsynopsis>
37 </refsynopsisdiv>
38 <refsect1 id="parameters"><title>Parameters</title>
39 <variablelist>
40 <varlistentry>
41 <term><parameter>target</parameter></term>
42 <listitem>
43 <para>
44 Specifies a texture environment. May be
45 <constant>GL_TEXTURE_ENV</constant>,
46 <constant>GL_TEXTURE_FILTER_CONTROL</constant>, or
47 <constant>GL_POINT_SPRITE</constant>.
48 </para>
49 </listitem>
50 </varlistentry>
51 <varlistentry>
52 <term><parameter>pname</parameter></term>
53 <listitem>
54 <para>
55 Specifies the symbolic name of a texture environment parameter.
56 Accepted values are <constant>GL_TEXTURE_ENV_MODE</constant>, <constant>GL_TEXTURE_ENV_COLOR</constant>,
57 <constant>GL_TEXTURE_LOD_BIAS</constant>,
58 <constant>GL_COMBINE_RGB</constant>,
59 <constant>GL_COMBINE_ALPHA</constant>,
60 <constant>GL_SRC0_RGB</constant>,
61 <constant>GL_SRC1_RGB</constant>,
62 <constant>GL_SRC2_RGB</constant>,
63 <constant>GL_SRC0_ALPHA</constant>,
64 <constant>GL_SRC1_ALPHA</constant>,
65 <constant>GL_SRC2_ALPHA</constant>,
66 <constant>GL_OPERAND0_RGB</constant>,
67 <constant>GL_OPERAND1_RGB</constant>,
68 <constant>GL_OPERAND2_RGB</constant>,
69 <constant>GL_OPERAND0_ALPHA</constant>,
70 <constant>GL_OPERAND1_ALPHA</constant>,
71 <constant>GL_OPERAND2_ALPHA</constant>,
72 <constant>GL_RGB_SCALE</constant>,
73 <constant>GL_ALPHA_SCALE</constant>, or
74 <constant>GL_COORD_REPLACE</constant>.
75 </para>
76 </listitem>
77 </varlistentry>
78 <varlistentry>
79 <term><parameter>params</parameter></term>
80 <listitem>
81 <para>
82 Returns the requested data.
83 </para>
84 </listitem>
85 </varlistentry>
86 </variablelist>
87 </refsect1>
88 <refsect1 id="description"><title>Description</title>
89 <para>
90 <function>glGetTexEnv</function> returns in <parameter>params</parameter> selected values of a texture environment that
91 was specified with <citerefentry><refentrytitle>glTexEnv</refentrytitle></citerefentry>.
92 <parameter>target</parameter> specifies a texture environment.
93 </para>
94 <para>
95 When <parameter>target</parameter> is <constant>GL_TEXTURE_FILTER_CONTROL</constant>,
96 <parameter>pname</parameter> must be <constant>GL_TEXTURE_LOD_BIAS</constant>.
97 When <parameter>target</parameter> is <constant>GL_POINT_SPRITE</constant>,
98 <parameter>pname</parameter> must be <constant>GL_COORD_REPLACE</constant>.
99 When <parameter>target</parameter> is
100 <constant>GL_TEXTURE_ENV</constant>, <parameter>pname</parameter> can be <constant>GL_TEXTURE_ENV_MODE</constant>,
101 <constant>GL_TEXTURE_ENV_COLOR</constant>, <constant>GL_COMBINE_RGB</constant>, <constant>GL_COMBINE_ALPHA</constant>,
102 <constant>GL_RGB_SCALE</constant>, <constant>GL_ALPHA_SCALE</constant>,
103 <constant>GL_SRC0_RGB</constant>, <constant>GL_SRC1_RGB</constant>, <constant>GL_SRC2_RGB</constant>,
104 <constant>GL_SRC0_ALPHA</constant>, <constant>GL_SRC1_ALPHA</constant>, or <constant>GL_SRC2_ALPHA</constant>.
105 </para>
106 <para>
107 <parameter>pname</parameter> names a specific texture environment parameter, as follows:
108 </para>
109 <variablelist>
110 <varlistentry>
111 <term><constant>GL_TEXTURE_ENV_MODE</constant></term>
112 <listitem>
113 <para>
114 <parameter>params</parameter> returns the single-valued texture environment mode,
115 a symbolic constant. The initial value is <constant>GL_MODULATE</constant>.
116 </para>
117 </listitem>
118 </varlistentry>
119 <varlistentry>
120 <term><constant>GL_TEXTURE_ENV_COLOR</constant></term>
121 <listitem>
122 <para>
123 <parameter>params</parameter> returns four integer or floating-point values that are the
124 texture environment color.
125 Integer values,
126 when requested,
127 are linearly mapped from the internal floating-point representation
128 such that 1.0 maps to the most positive representable integer,
129 and
130 <inlineequation><mml:math>
131 <!-- eqn: -1.0:-->
132 <mml:mn>-1.0</mml:mn>
133 </mml:math></inlineequation>
134 maps to the most negative representable integer. The initial
135 value is (0, 0, 0, 0).
136 </para>
137 </listitem>
138 </varlistentry>
139 <varlistentry>
140 <term><constant>GL_TEXTURE_LOD_BIAS</constant></term>
141 <listitem>
142 <para>
143 <parameter>params</parameter> returns a single floating-point value that is the texture
144 level-of-detail bias. The initial value is 0.
145 </para>
146 </listitem>
147 </varlistentry>
148 <varlistentry>
149 <term><constant>GL_COMBINE_RGB</constant></term>
150 <listitem>
151 <para>
152 <parameter>params</parameter> returns a single symbolic constant value representing the current
153 RGB combine mode. The initial value is <constant>GL_MODULATE</constant>.
154 </para>
155 </listitem>
156 </varlistentry>
157 <varlistentry>
158 <term><constant>GL_COMBINE_ALPHA</constant></term>
159 <listitem>
160 <para>
161 <parameter>params</parameter> returns a single symbolic constant value representing the current
162 alpha combine mode. The initial value is <constant>GL_MODULATE</constant>.
163 </para>
164 </listitem>
165 </varlistentry>
166 <varlistentry>
167 <term><constant>GL_SRC0_RGB</constant></term>
168 <listitem>
169 <para>
170 <parameter>params</parameter> returns a single symbolic constant value representing the texture
171 combiner zero's RGB source. The initial value is <constant>GL_TEXTURE</constant>.
172 </para>
173 </listitem>
174 </varlistentry>
175 <varlistentry>
176 <term><constant>GL_SRC1_RGB</constant></term>
177 <listitem>
178 <para>
179 <parameter>params</parameter> returns a single symbolic constant value representing the texture
180 combiner one's RGB source. The initial value is <constant>GL_PREVIOUS</constant>.
181 </para>
182 </listitem>
183 </varlistentry>
184 <varlistentry>
185 <term><constant>GL_SRC2_RGB</constant></term>
186 <listitem>
187 <para>
188 <parameter>params</parameter> returns a single symbolic constant value representing the texture
189 combiner two's RGB source. The initial value is <constant>GL_CONSTANT</constant>.
190 </para>
191 </listitem>
192 </varlistentry>
193 <varlistentry>
194 <term><constant>GL_SRC0_ALPHA</constant></term>
195 <listitem>
196 <para>
197 <parameter>params</parameter> returns a single symbolic constant value representing the texture
198 combiner zero's alpha source. The initial value is <constant>GL_TEXTURE</constant>.
199 </para>
200 </listitem>
201 </varlistentry>
202 <varlistentry>
203 <term><constant>GL_SRC1_ALPHA</constant></term>
204 <listitem>
205 <para>
206 <parameter>params</parameter> returns a single symbolic constant value representing the texture
207 combiner one's alpha source. The initial value is <constant>GL_PREVIOUS</constant>.
208 </para>
209 </listitem>
210 </varlistentry>
211 <varlistentry>
212 <term><constant>GL_SRC2_ALPHA</constant></term>
213 <listitem>
214 <para>
215 <parameter>params</parameter> returns a single symbolic constant value representing the texture
216 combiner two's alpha source. The initial value is <constant>GL_CONSTANT</constant>.
217 </para>
218 </listitem>
219 </varlistentry>
220 <varlistentry>
221 <term><constant>GL_OPERAND0_RGB</constant></term>
222 <listitem>
223 <para>
224 <parameter>params</parameter> returns a single symbolic constant value representing the texture
225 combiner zero's RGB operand. The initial value is <constant>GL_SRC_COLOR</constant>.
226 </para>
227 </listitem>
228 </varlistentry>
229 <varlistentry>
230 <term><constant>GL_OPERAND1_RGB</constant></term>
231 <listitem>
232 <para>
233 <parameter>params</parameter> returns a single symbolic constant value representing the texture
234 combiner one's RGB operand. The initial value is <constant>GL_SRC_COLOR</constant>.
235 </para>
236 </listitem>
237 </varlistentry>
238 <varlistentry>
239 <term><constant>GL_OPERAND2_RGB</constant></term>
240 <listitem>
241 <para>
242 <parameter>params</parameter> returns a single symbolic constant value representing the texture
243 combiner two's RGB operand. The initial value is <constant>GL_SRC_ALPHA</constant>.
244 </para>
245 </listitem>
246 </varlistentry>
247 <varlistentry>
248 <term><constant>GL_OPERAND0_ALPHA</constant></term>
249 <listitem>
250 <para>
251 <parameter>params</parameter> returns a single symbolic constant value representing the texture
252 combiner zero's alpha operand. The initial value is <constant>GL_SRC_ALPHA</constant>.
253 </para>
254 </listitem>
255 </varlistentry>
256 <varlistentry>
257 <term><constant>GL_OPERAND1_ALPHA</constant></term>
258 <listitem>
259 <para>
260 <parameter>params</parameter> returns a single symbolic constant value representing the texture
261 combiner one's alpha operand. The initial value is <constant>GL_SRC_ALPHA</constant>.
262 </para>
263 </listitem>
264 </varlistentry>
265 <varlistentry>
266 <term><constant>GL_OPERAND2_ALPHA</constant></term>
267 <listitem>
268 <para>
269 <parameter>params</parameter> returns a single symbolic constant value representing the texture
270 combiner two's alpha operand. The initial value is <constant>GL_SRC_ALPHA</constant>.
271 </para>
272 </listitem>
273 </varlistentry>
274 <varlistentry>
275 <term><constant>GL_RGB_SCALE</constant></term>
276 <listitem>
277 <para>
278 <parameter>params</parameter> returns a single floating-point value representing the current RGB
279 texture combiner scaling factor. The initial value is 1.0.
280 </para>
281 </listitem>
282 </varlistentry>
283 <varlistentry>
284 <term><constant>GL_ALPHA_SCALE</constant></term>
285 <listitem>
286 <para>
287 <parameter>params</parameter> returns a single floating-point value representing the current alpha
288 texture combiner scaling factor. The initial value is 1.0.
289 </para>
290 </listitem>
291 </varlistentry>
292 <varlistentry>
293 <term><constant>GL_COORD_REPLACE</constant></term>
294 <listitem>
295 <para>
296 <parameter>params</parameter> returns a single boolean value representing the current point sprite
297 texture coordinate replacement enable state. The initial value is <constant>GL_FALSE</constant>.
298 </para>
299 </listitem>
300 </varlistentry>
301 </variablelist>
302 </refsect1>
303 <refsect1 id="notes"><title>Notes</title>
304 <para>
305 If an error is generated,
306 no change is made to the contents of <parameter>params</parameter>.
307 </para>
308 <para>
309 For OpenGL versions 1.3 and greater, or when the <code>ARB_multitexture</code> extension is supported, <function>glGetTexEnv</function> returns
310 the texture environment parameters for the active texture unit.
311 </para>
312 <para>
313 <constant>GL_COMBINE_RGB</constant>,
314 <constant>GL_COMBINE_ALPHA</constant>,
315 <constant>GL_SRC0_RGB</constant>,
316 <constant>GL_SRC1_RGB</constant>,
317 <constant>GL_SRC2_RGB</constant>,
318 <constant>GL_SRC0_ALPHA</constant>,
319 <constant>GL_SRC1_ALPHA</constant>,
320 <constant>GL_SRC2_ALPHA</constant>,
321 <constant>GL_OPERAND0_RGB</constant>,
322 <constant>GL_OPERAND1_RGB</constant>,
323 <constant>GL_OPERAND2_RGB</constant>,
324 <constant>GL_OPERAND0_ALPHA</constant>,
325 <constant>GL_OPERAND1_ALPHA</constant>,
326 <constant>GL_OPERAND2_ALPHA</constant>,
327 <constant>GL_RGB_SCALE</constant>, and
328 <constant>GL_ALPHA_SCALE</constant> are available only if the GL version is 1.3 or greater.
329 </para>
330 <para>
331 <constant>GL_TEXTURE_FILTER_CONTROL</constant> and <constant>GL_TEXTURE_LOD_BIAS</constant> are available
332 only if the GL version is 1.4 or greater.
333 </para>
334 <para>
335 <constant>GL_POINT_SPRITE</constant> and <constant>GL_COORD_REPLACE</constant> are available
336 only if the GL version is 2.0 or greater.
337 </para>
338 </refsect1>
339 <refsect1 id="errors"><title>Errors</title>
340 <para>
341 <constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> or <parameter>pname</parameter> is not an
342 accepted value.
343 </para>
344 <para>
345 <constant>GL_INVALID_OPERATION</constant> is generated if <function>glGetTexEnv</function>
346 is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
347 and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
348 </para>
349 </refsect1>
350 <refsect1 id="seealso"><title>See Also</title>
351 <para>
352 <citerefentry><refentrytitle>glActiveTexture</refentrytitle></citerefentry>,
353 <citerefentry><refentrytitle>glTexEnv</refentrytitle></citerefentry>
354 </para>
355 </refsect1>
356 <refsect1 id="Copyright"><title>Copyright</title>
357 <para>
358 Copyright <trademark class="copyright"></trademark> 1991-2006
359 Silicon Graphics, Inc. This document is licensed under the SGI
360 Free Software B License. For details, see
361 <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>.
362 </para>
363 </refsect1>
364</refentry>