Commit | Line | Data |
---|---|---|
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>glGetTexEnv</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /></head><body><div class="refentry" lang="en" xml:lang="en"><a id="glGetTexEnv"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glGetTexEnv — return texture environment parameters</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">glGetTexEnvfv</b>(</code></td><td>GLenum </td><td><var class="pdparam">target</var>, </td></tr><tr><td> </td><td>GLenum </td><td><var class="pdparam">pname</var>, </td></tr><tr><td> </td><td>GLfloat * </td><td><var class="pdparam">params</var><code>)</code>;</td></tr></table></div><p></p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">glGetTexEnviv</b>(</code></td><td>GLenum </td><td><var class="pdparam">target</var>, </td></tr><tr><td> </td><td>GLenum </td><td><var class="pdparam">pname</var>, </td></tr><tr><td> </td><td>GLint * </td><td><var class="pdparam">params</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>target</code></em></span></dt><dd><p> | |
4 | Specifies a texture environment. May be | |
5 | <code class="constant">GL_TEXTURE_ENV</code>, | |
6 | <code class="constant">GL_TEXTURE_FILTER_CONTROL</code>, or | |
7 | <code class="constant">GL_POINT_SPRITE</code>. | |
8 | </p></dd><dt><span class="term"><em class="parameter"><code>pname</code></em></span></dt><dd><p> | |
9 | Specifies the symbolic name of a texture environment parameter. | |
10 | Accepted values are <code class="constant">GL_TEXTURE_ENV_MODE</code>, <code class="constant">GL_TEXTURE_ENV_COLOR</code>, | |
11 | <code class="constant">GL_TEXTURE_LOD_BIAS</code>, | |
12 | <code class="constant">GL_COMBINE_RGB</code>, | |
13 | <code class="constant">GL_COMBINE_ALPHA</code>, | |
14 | <code class="constant">GL_SRC0_RGB</code>, | |
15 | <code class="constant">GL_SRC1_RGB</code>, | |
16 | <code class="constant">GL_SRC2_RGB</code>, | |
17 | <code class="constant">GL_SRC0_ALPHA</code>, | |
18 | <code class="constant">GL_SRC1_ALPHA</code>, | |
19 | <code class="constant">GL_SRC2_ALPHA</code>, | |
20 | <code class="constant">GL_OPERAND0_RGB</code>, | |
21 | <code class="constant">GL_OPERAND1_RGB</code>, | |
22 | <code class="constant">GL_OPERAND2_RGB</code>, | |
23 | <code class="constant">GL_OPERAND0_ALPHA</code>, | |
24 | <code class="constant">GL_OPERAND1_ALPHA</code>, | |
25 | <code class="constant">GL_OPERAND2_ALPHA</code>, | |
26 | <code class="constant">GL_RGB_SCALE</code>, | |
27 | <code class="constant">GL_ALPHA_SCALE</code>, or | |
28 | <code class="constant">GL_COORD_REPLACE</code>. | |
29 | </p></dd><dt><span class="term"><em class="parameter"><code>params</code></em></span></dt><dd><p> | |
30 | Returns the requested data. | |
31 | </p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="description"></a><h2>Description</h2><p> | |
32 | <code class="function">glGetTexEnv</code> returns in <em class="parameter"><code>params</code></em> selected values of a texture environment that | |
33 | was specified with <a class="citerefentry" href="glTexEnv.xml"><span class="citerefentry"><span class="refentrytitle">glTexEnv</span></span></a>. | |
34 | <em class="parameter"><code>target</code></em> specifies a texture environment. | |
35 | </p><p> | |
36 | When <em class="parameter"><code>target</code></em> is <code class="constant">GL_TEXTURE_FILTER_CONTROL</code>, | |
37 | <em class="parameter"><code>pname</code></em> must be <code class="constant">GL_TEXTURE_LOD_BIAS</code>. | |
38 | When <em class="parameter"><code>target</code></em> is <code class="constant">GL_POINT_SPRITE</code>, | |
39 | <em class="parameter"><code>pname</code></em> must be <code class="constant">GL_COORD_REPLACE</code>. | |
40 | When <em class="parameter"><code>target</code></em> is | |
41 | <code class="constant">GL_TEXTURE_ENV</code>, <em class="parameter"><code>pname</code></em> can be <code class="constant">GL_TEXTURE_ENV_MODE</code>, | |
42 | <code class="constant">GL_TEXTURE_ENV_COLOR</code>, <code class="constant">GL_COMBINE_RGB</code>, <code class="constant">GL_COMBINE_ALPHA</code>, | |
43 | <code class="constant">GL_RGB_SCALE</code>, <code class="constant">GL_ALPHA_SCALE</code>, | |
44 | <code class="constant">GL_SRC0_RGB</code>, <code class="constant">GL_SRC1_RGB</code>, <code class="constant">GL_SRC2_RGB</code>, | |
45 | <code class="constant">GL_SRC0_ALPHA</code>, <code class="constant">GL_SRC1_ALPHA</code>, or <code class="constant">GL_SRC2_ALPHA</code>. | |
46 | </p><p> | |
47 | <em class="parameter"><code>pname</code></em> names a specific texture environment parameter, as follows: | |
48 | </p><div class="variablelist"><dl><dt><span class="term"><code class="constant">GL_TEXTURE_ENV_MODE</code></span></dt><dd><p> | |
49 | <em class="parameter"><code>params</code></em> returns the single-valued texture environment mode, | |
50 | a symbolic constant. The initial value is <code class="constant">GL_MODULATE</code>. | |
51 | </p></dd><dt><span class="term"><code class="constant">GL_TEXTURE_ENV_COLOR</code></span></dt><dd><p> | |
52 | <em class="parameter"><code>params</code></em> returns four integer or floating-point values that are the | |
53 | texture environment color. | |
54 | Integer values, | |
55 | when requested, | |
56 | are linearly mapped from the internal floating-point representation | |
57 | such that 1.0 maps to the most positive representable integer, | |
58 | and | |
59 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
60 | ||
61 | <mml:mn>-1.0</mml:mn> | |
62 | </mml:math> | |
63 | maps to the most negative representable integer. The initial | |
64 | value is (0, 0, 0, 0). | |
65 | </p></dd><dt><span class="term"><code class="constant">GL_TEXTURE_LOD_BIAS</code></span></dt><dd><p> | |
66 | <em class="parameter"><code>params</code></em> returns a single floating-point value that is the texture | |
67 | level-of-detail bias. The initial value is 0. | |
68 | </p></dd><dt><span class="term"><code class="constant">GL_COMBINE_RGB</code></span></dt><dd><p> | |
69 | <em class="parameter"><code>params</code></em> returns a single symbolic constant value representing the current | |
70 | RGB combine mode. The initial value is <code class="constant">GL_MODULATE</code>. | |
71 | </p></dd><dt><span class="term"><code class="constant">GL_COMBINE_ALPHA</code></span></dt><dd><p> | |
72 | <em class="parameter"><code>params</code></em> returns a single symbolic constant value representing the current | |
73 | alpha combine mode. The initial value is <code class="constant">GL_MODULATE</code>. | |
74 | </p></dd><dt><span class="term"><code class="constant">GL_SRC0_RGB</code></span></dt><dd><p> | |
75 | <em class="parameter"><code>params</code></em> returns a single symbolic constant value representing the texture | |
76 | combiner zero's RGB source. The initial value is <code class="constant">GL_TEXTURE</code>. | |
77 | </p></dd><dt><span class="term"><code class="constant">GL_SRC1_RGB</code></span></dt><dd><p> | |
78 | <em class="parameter"><code>params</code></em> returns a single symbolic constant value representing the texture | |
79 | combiner one's RGB source. The initial value is <code class="constant">GL_PREVIOUS</code>. | |
80 | </p></dd><dt><span class="term"><code class="constant">GL_SRC2_RGB</code></span></dt><dd><p> | |
81 | <em class="parameter"><code>params</code></em> returns a single symbolic constant value representing the texture | |
82 | combiner two's RGB source. The initial value is <code class="constant">GL_CONSTANT</code>. | |
83 | </p></dd><dt><span class="term"><code class="constant">GL_SRC0_ALPHA</code></span></dt><dd><p> | |
84 | <em class="parameter"><code>params</code></em> returns a single symbolic constant value representing the texture | |
85 | combiner zero's alpha source. The initial value is <code class="constant">GL_TEXTURE</code>. | |
86 | </p></dd><dt><span class="term"><code class="constant">GL_SRC1_ALPHA</code></span></dt><dd><p> | |
87 | <em class="parameter"><code>params</code></em> returns a single symbolic constant value representing the texture | |
88 | combiner one's alpha source. The initial value is <code class="constant">GL_PREVIOUS</code>. | |
89 | </p></dd><dt><span class="term"><code class="constant">GL_SRC2_ALPHA</code></span></dt><dd><p> | |
90 | <em class="parameter"><code>params</code></em> returns a single symbolic constant value representing the texture | |
91 | combiner two's alpha source. The initial value is <code class="constant">GL_CONSTANT</code>. | |
92 | </p></dd><dt><span class="term"><code class="constant">GL_OPERAND0_RGB</code></span></dt><dd><p> | |
93 | <em class="parameter"><code>params</code></em> returns a single symbolic constant value representing the texture | |
94 | combiner zero's RGB operand. The initial value is <code class="constant">GL_SRC_COLOR</code>. | |
95 | </p></dd><dt><span class="term"><code class="constant">GL_OPERAND1_RGB</code></span></dt><dd><p> | |
96 | <em class="parameter"><code>params</code></em> returns a single symbolic constant value representing the texture | |
97 | combiner one's RGB operand. The initial value is <code class="constant">GL_SRC_COLOR</code>. | |
98 | </p></dd><dt><span class="term"><code class="constant">GL_OPERAND2_RGB</code></span></dt><dd><p> | |
99 | <em class="parameter"><code>params</code></em> returns a single symbolic constant value representing the texture | |
100 | combiner two's RGB operand. The initial value is <code class="constant">GL_SRC_ALPHA</code>. | |
101 | </p></dd><dt><span class="term"><code class="constant">GL_OPERAND0_ALPHA</code></span></dt><dd><p> | |
102 | <em class="parameter"><code>params</code></em> returns a single symbolic constant value representing the texture | |
103 | combiner zero's alpha operand. The initial value is <code class="constant">GL_SRC_ALPHA</code>. | |
104 | </p></dd><dt><span class="term"><code class="constant">GL_OPERAND1_ALPHA</code></span></dt><dd><p> | |
105 | <em class="parameter"><code>params</code></em> returns a single symbolic constant value representing the texture | |
106 | combiner one's alpha operand. The initial value is <code class="constant">GL_SRC_ALPHA</code>. | |
107 | </p></dd><dt><span class="term"><code class="constant">GL_OPERAND2_ALPHA</code></span></dt><dd><p> | |
108 | <em class="parameter"><code>params</code></em> returns a single symbolic constant value representing the texture | |
109 | combiner two's alpha operand. The initial value is <code class="constant">GL_SRC_ALPHA</code>. | |
110 | </p></dd><dt><span class="term"><code class="constant">GL_RGB_SCALE</code></span></dt><dd><p> | |
111 | <em class="parameter"><code>params</code></em> returns a single floating-point value representing the current RGB | |
112 | texture combiner scaling factor. The initial value is 1.0. | |
113 | </p></dd><dt><span class="term"><code class="constant">GL_ALPHA_SCALE</code></span></dt><dd><p> | |
114 | <em class="parameter"><code>params</code></em> returns a single floating-point value representing the current alpha | |
115 | texture combiner scaling factor. The initial value is 1.0. | |
116 | </p></dd><dt><span class="term"><code class="constant">GL_COORD_REPLACE</code></span></dt><dd><p> | |
117 | <em class="parameter"><code>params</code></em> returns a single boolean value representing the current point sprite | |
118 | texture coordinate replacement enable state. The initial value is <code class="constant">GL_FALSE</code>. | |
119 | </p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="notes"></a><h2>Notes</h2><p> | |
120 | If an error is generated, | |
121 | no change is made to the contents of <em class="parameter"><code>params</code></em>. | |
122 | </p><p> | |
123 | For OpenGL versions 1.3 and greater, or when the <code class="code">ARB_multitexture</code> extension is supported, <code class="function">glGetTexEnv</code> returns | |
124 | the texture environment parameters for the active texture unit. | |
125 | </p><p> | |
126 | <code class="constant">GL_COMBINE_RGB</code>, | |
127 | <code class="constant">GL_COMBINE_ALPHA</code>, | |
128 | <code class="constant">GL_SRC0_RGB</code>, | |
129 | <code class="constant">GL_SRC1_RGB</code>, | |
130 | <code class="constant">GL_SRC2_RGB</code>, | |
131 | <code class="constant">GL_SRC0_ALPHA</code>, | |
132 | <code class="constant">GL_SRC1_ALPHA</code>, | |
133 | <code class="constant">GL_SRC2_ALPHA</code>, | |
134 | <code class="constant">GL_OPERAND0_RGB</code>, | |
135 | <code class="constant">GL_OPERAND1_RGB</code>, | |
136 | <code class="constant">GL_OPERAND2_RGB</code>, | |
137 | <code class="constant">GL_OPERAND0_ALPHA</code>, | |
138 | <code class="constant">GL_OPERAND1_ALPHA</code>, | |
139 | <code class="constant">GL_OPERAND2_ALPHA</code>, | |
140 | <code class="constant">GL_RGB_SCALE</code>, and | |
141 | <code class="constant">GL_ALPHA_SCALE</code> are available only if the GL version is 1.3 or greater. | |
142 | </p><p> | |
143 | <code class="constant">GL_TEXTURE_FILTER_CONTROL</code> and <code class="constant">GL_TEXTURE_LOD_BIAS</code> are available | |
144 | only if the GL version is 1.4 or greater. | |
145 | </p><p> | |
146 | <code class="constant">GL_POINT_SPRITE</code> and <code class="constant">GL_COORD_REPLACE</code> are available | |
147 | only if the GL version is 2.0 or greater. | |
148 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="errors"></a><h2>Errors</h2><p> | |
149 | <code class="constant">GL_INVALID_ENUM</code> is generated if <em class="parameter"><code>target</code></em> or <em class="parameter"><code>pname</code></em> is not an | |
150 | accepted value. | |
151 | </p><p> | |
152 | <code class="constant">GL_INVALID_OPERATION</code> is generated if <code class="function">glGetTexEnv</code> | |
153 | is executed between the execution of <a class="citerefentry" href="glBegin.xml"><span class="citerefentry"><span class="refentrytitle">glBegin</span></span></a> | |
154 | and the corresponding execution of <a class="citerefentry" href="glEnd.xml"><span class="citerefentry"><span class="refentrytitle">glEnd</span></span></a>. | |
155 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p> | |
156 | <a class="citerefentry" href="glActiveTexture.xml"><span class="citerefentry"><span class="refentrytitle">glActiveTexture</span></span></a>, | |
157 | <a class="citerefentry" href="glTexEnv.xml"><span class="citerefentry"><span class="refentrytitle">glTexEnv</span></span></a> | |
158 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="Copyright"></a><h2>Copyright</h2><p> | |
159 | Copyright <span class="trademark"></span>© 1991-2006 | |
160 | Silicon Graphics, Inc. This document is licensed under the SGI | |
161 | Free Software B License. For details, see | |
162 | <a class="ulink" href="http://oss.sgi.com/projects/FreeB/" target="_top">http://oss.sgi.com/projects/FreeB/</a>. | |
163 | </p></div></div></body></html> |