Commit | Line | Data |
---|---|---|
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="glGetTexParameter"> | |
5 | <refmeta> | |
6 | <refmetainfo> | |
7 | <copyright> | |
8 | <year>1991-2006</year> | |
9 | <holder>Silicon Graphics, Inc.</holder> | |
10 | </copyright> | |
11 | </refmetainfo> | |
12 | <refentrytitle>glGetTexParameter</refentrytitle> | |
13 | <manvolnum>3G</manvolnum> | |
14 | </refmeta> | |
15 | <refnamediv> | |
16 | <refname>glGetTexParameter</refname> | |
17 | <refpurpose>return texture parameter values</refpurpose> | |
18 | </refnamediv> | |
19 | <refsynopsisdiv><title>C Specification</title> | |
20 | <funcsynopsis> | |
21 | <funcprototype> | |
22 | <funcdef>void <function>glGetTexParameterfv</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 | <funcsynopsis> | |
29 | <funcprototype> | |
30 | <funcdef>void <function>glGetTexParameteriv</function></funcdef> | |
31 | <paramdef>GLenum <parameter>target</parameter></paramdef> | |
32 | <paramdef>GLenum <parameter>pname</parameter></paramdef> | |
33 | <paramdef>GLint * <parameter>params</parameter></paramdef> | |
34 | </funcprototype> | |
35 | </funcsynopsis> | |
36 | </refsynopsisdiv> | |
37 | <!-- eqn: ignoring delim $$ --> | |
38 | <refsect1 id="parameters"><title>Parameters</title> | |
39 | <variablelist> | |
40 | <varlistentry> | |
41 | <term><parameter>target</parameter></term> | |
42 | <listitem> | |
43 | <para> | |
44 | Specifies the symbolic name of the target texture. | |
45 | <constant>GL_TEXTURE_1D</constant>, | |
46 | <constant>GL_TEXTURE_2D</constant>, | |
47 | <constant>GL_TEXTURE_3D</constant>, and | |
48 | <constant>GL_TEXTURE_CUBE_MAP</constant> | |
49 | are accepted. | |
50 | </para> | |
51 | </listitem> | |
52 | </varlistentry> | |
53 | <varlistentry> | |
54 | <term><parameter>pname</parameter></term> | |
55 | <listitem> | |
56 | <para> | |
57 | Specifies the symbolic name of a texture parameter. | |
58 | <constant>GL_TEXTURE_MAG_FILTER</constant>, | |
59 | <constant>GL_TEXTURE_MIN_FILTER</constant>, | |
60 | <constant>GL_TEXTURE_MIN_LOD</constant>, | |
61 | <constant>GL_TEXTURE_MAX_LOD</constant>, | |
62 | <constant>GL_TEXTURE_BASE_LEVEL</constant>, | |
63 | <constant>GL_TEXTURE_MAX_LEVEL</constant>, | |
64 | <constant>GL_TEXTURE_WRAP_S</constant>, | |
65 | <constant>GL_TEXTURE_WRAP_T</constant>, | |
66 | <constant>GL_TEXTURE_WRAP_R</constant>, | |
67 | <constant>GL_TEXTURE_BORDER_COLOR</constant>, | |
68 | <constant>GL_TEXTURE_PRIORITY</constant>, | |
69 | <constant>GL_TEXTURE_RESIDENT</constant>, | |
70 | <constant>GL_TEXTURE_COMPARE_MODE</constant>, | |
71 | <constant>GL_TEXTURE_COMPARE_FUNC</constant>, | |
72 | <constant>GL_DEPTH_TEXTURE_MODE</constant>, and | |
73 | <constant>GL_GENERATE_MIPMAP</constant> | |
74 | are accepted. | |
75 | </para> | |
76 | </listitem> | |
77 | </varlistentry> | |
78 | <varlistentry> | |
79 | <term><parameter>params</parameter></term> | |
80 | <listitem> | |
81 | <para> | |
82 | Returns the texture parameters. | |
83 | </para> | |
84 | </listitem> | |
85 | </varlistentry> | |
86 | </variablelist> | |
87 | </refsect1> | |
88 | <refsect1 id="description"><title>Description</title> | |
89 | <para> | |
90 | <function>glGetTexParameter</function> returns in <parameter>params</parameter> the value or values of the texture parameter | |
91 | specified as <parameter>pname</parameter>. | |
92 | <parameter>target</parameter> defines the target texture, | |
93 | either <constant>GL_TEXTURE_1D</constant>, <constant>GL_TEXTURE_2D</constant>, <constant>GL_TEXTURE_3D</constant>, or <constant>GL_TEXTURE_CUBE_MAP</constant>, | |
94 | to specify one-, two-, or three-dimensional or cube-mapped texturing. | |
95 | <parameter>pname</parameter> accepts the same symbols as <citerefentry><refentrytitle>glTexParameter</refentrytitle></citerefentry>, | |
96 | with the same interpretations: | |
97 | </para> | |
98 | <variablelist> | |
99 | <varlistentry> | |
100 | <term><constant>GL_TEXTURE_MAG_FILTER</constant></term> | |
101 | <listitem> | |
102 | <para> | |
103 | Returns the single-valued texture magnification filter, | |
104 | a symbolic constant. The initial value is <constant>GL_LINEAR</constant>. | |
105 | </para> | |
106 | </listitem> | |
107 | </varlistentry> | |
108 | <varlistentry> | |
109 | <term><constant>GL_TEXTURE_MIN_FILTER</constant></term> | |
110 | <listitem> | |
111 | <para> | |
112 | Returns the single-valued texture minification filter, | |
113 | a symbolic constant. The initial value is <constant>GL_NEAREST_MIPMAP_LINEAR</constant>. | |
114 | </para> | |
115 | </listitem> | |
116 | </varlistentry> | |
117 | <varlistentry> | |
118 | <term><constant>GL_TEXTURE_MIN_LOD</constant></term> | |
119 | <listitem> | |
120 | <para> | |
121 | Returns the single-valued texture minimum level-of-detail value. The | |
122 | initial value is | |
123 | <inlineequation><mml:math> | |
124 | <!-- eqn: -1000:--> | |
125 | <mml:mn>-1000</mml:mn> | |
126 | </mml:math></inlineequation>. | |
127 | </para> | |
128 | </listitem> | |
129 | </varlistentry> | |
130 | <varlistentry> | |
131 | <term><constant>GL_TEXTURE_MAX_LOD</constant></term> | |
132 | <listitem> | |
133 | <para> | |
134 | Returns the single-valued texture maximum level-of-detail value. The | |
135 | initial value is 1000. | |
136 | </para> | |
137 | </listitem> | |
138 | </varlistentry> | |
139 | <varlistentry> | |
140 | <term><constant>GL_TEXTURE_BASE_LEVEL</constant></term> | |
141 | <listitem> | |
142 | <para> | |
143 | Returns the single-valued base texture mipmap level. The initial value is 0. | |
144 | </para> | |
145 | </listitem> | |
146 | </varlistentry> | |
147 | <varlistentry> | |
148 | <term><constant>GL_TEXTURE_MAX_LEVEL</constant></term> | |
149 | <listitem> | |
150 | <para> | |
151 | Returns the single-valued maximum texture mipmap array level. The initial | |
152 | value is 1000. | |
153 | </para> | |
154 | </listitem> | |
155 | </varlistentry> | |
156 | <varlistentry> | |
157 | <term><constant>GL_TEXTURE_WRAP_S</constant></term> | |
158 | <listitem> | |
159 | <para> | |
160 | Returns the single-valued wrapping function for texture coordinate | |
161 | <inlineequation><mml:math><mml:mi mathvariant="italic">s</mml:mi></mml:math></inlineequation>, | |
162 | a symbolic constant. The initial value is <constant>GL_REPEAT</constant>. | |
163 | </para> | |
164 | </listitem> | |
165 | </varlistentry> | |
166 | <varlistentry> | |
167 | <term><constant>GL_TEXTURE_WRAP_T</constant></term> | |
168 | <listitem> | |
169 | <para> | |
170 | Returns the single-valued wrapping function for texture coordinate | |
171 | <inlineequation><mml:math><mml:mi mathvariant="italic">t</mml:mi></mml:math></inlineequation>, | |
172 | a symbolic constant. The initial value is <constant>GL_REPEAT</constant>. | |
173 | </para> | |
174 | </listitem> | |
175 | </varlistentry> | |
176 | <varlistentry> | |
177 | <term><constant>GL_TEXTURE_WRAP_R</constant></term> | |
178 | <listitem> | |
179 | <para> | |
180 | Returns the single-valued wrapping function for texture coordinate | |
181 | <inlineequation><mml:math><mml:mi mathvariant="italic">r</mml:mi></mml:math></inlineequation>, | |
182 | a symbolic constant. The initial value is <constant>GL_REPEAT</constant>. | |
183 | </para> | |
184 | </listitem> | |
185 | </varlistentry> | |
186 | <varlistentry> | |
187 | <term><constant>GL_TEXTURE_BORDER_COLOR</constant></term> | |
188 | <listitem> | |
189 | <para> | |
190 | Returns four integer or floating-point numbers that comprise the RGBA color | |
191 | of the texture border. | |
192 | Floating-point values are returned in the range | |
193 | <inlineequation><mml:math> | |
194 | <!-- eqn: [0,1]:--> | |
195 | <mml:mfenced open="[" close="]"> | |
196 | <mml:mn>0</mml:mn> | |
197 | <mml:mn>1</mml:mn> | |
198 | </mml:mfenced> | |
199 | </mml:math></inlineequation>. | |
200 | Integer values are returned as a linear mapping of the internal floating-point | |
201 | representation such that 1.0 maps to the most positive representable | |
202 | integer and | |
203 | <inlineequation><mml:math> | |
204 | <!-- eqn: -1.0:--> | |
205 | <mml:mn>-1.0</mml:mn> | |
206 | </mml:math></inlineequation> | |
207 | maps to the most negative representable | |
208 | integer. The initial value is (0, 0, 0, 0). | |
209 | </para> | |
210 | </listitem> | |
211 | </varlistentry> | |
212 | <varlistentry> | |
213 | <term><constant>GL_TEXTURE_PRIORITY</constant></term> | |
214 | <listitem> | |
215 | <para> | |
216 | Returns the residence priority of the target texture (or the named | |
217 | texture bound to it). The initial value is 1. | |
218 | See <citerefentry><refentrytitle>glPrioritizeTextures</refentrytitle></citerefentry>. | |
219 | </para> | |
220 | </listitem> | |
221 | </varlistentry> | |
222 | <varlistentry> | |
223 | <term><constant>GL_TEXTURE_RESIDENT</constant></term> | |
224 | <listitem> | |
225 | <para> | |
226 | Returns the residence status of the target texture. | |
227 | If the value returned in <parameter>params</parameter> is <constant>GL_TRUE</constant>, the texture is | |
228 | resident in texture memory. | |
229 | See <citerefentry><refentrytitle>glAreTexturesResident</refentrytitle></citerefentry>. | |
230 | </para> | |
231 | </listitem> | |
232 | </varlistentry> | |
233 | <varlistentry> | |
234 | <term><constant>GL_TEXTURE_COMPARE_MODE</constant></term> | |
235 | <listitem> | |
236 | <para> | |
237 | Returns a single-valued texture comparison mode, a symbolic constant. The | |
238 | initial value is <constant>GL_NONE</constant>. See <citerefentry><refentrytitle>glTexParameter</refentrytitle></citerefentry>. | |
239 | </para> | |
240 | </listitem> | |
241 | </varlistentry> | |
242 | <varlistentry> | |
243 | <term><constant>GL_TEXTURE_COMPARE_FUNC</constant></term> | |
244 | <listitem> | |
245 | <para> | |
246 | Returns a single-valued texture comparison function, a symbolic constant. The | |
247 | initial value is <constant>GL_LEQUAL</constant>. See <citerefentry><refentrytitle>glTexParameter</refentrytitle></citerefentry>. | |
248 | </para> | |
249 | </listitem> | |
250 | </varlistentry> | |
251 | <varlistentry> | |
252 | <term><constant>GL_DEPTH_TEXTURE_MODE</constant></term> | |
253 | <listitem> | |
254 | <para> | |
255 | Returns a single-valued texture format indicating how the depth values | |
256 | should be converted into color components. The initial value is | |
257 | <constant>GL_LUMINANCE</constant>. See <citerefentry><refentrytitle>glTexParameter</refentrytitle></citerefentry>. | |
258 | </para> | |
259 | </listitem> | |
260 | </varlistentry> | |
261 | <varlistentry> | |
262 | <term><constant>GL_GENERATE_MIPMAP</constant></term> | |
263 | <listitem> | |
264 | <para> | |
265 | Returns a single boolean value indicating if automatic mipmap level updates | |
266 | are enabled. | |
267 | See <citerefentry><refentrytitle>glTexParameter</refentrytitle></citerefentry>. | |
268 | </para> | |
269 | </listitem> | |
270 | </varlistentry> | |
271 | </variablelist> | |
272 | </refsect1> | |
273 | <refsect1 id="notes"><title>Notes</title> | |
274 | <para> | |
275 | <constant>GL_TEXTURE_PRIORITY</constant> and <constant>GL_TEXTURE_RESIDENT</constant> are | |
276 | available only if the GL version is 1.1 or greater. | |
277 | </para> | |
278 | <para> | |
279 | <constant>GL_TEXTURE_3D</constant>, | |
280 | <constant>GL_TEXTURE_MIN_LOD</constant>, <constant>GL_TEXTURE_MAX_LOD</constant>, <constant>GL_TEXTURE_BASE_LEVEL</constant>, | |
281 | <constant>GL_TEXTURE_MAX_LEVEL</constant>, and <constant>GL_TEXTURE_WRAP_R</constant> are available only | |
282 | if the GL version is 1.2 or greater. | |
283 | </para> | |
284 | <para> | |
285 | <constant>GL_TEXTURE_COMPARE_MODE</constant>, <constant>GL_TEXTURE_COMPARE_FUNC</constant>, and | |
286 | <constant>GL_GENERATE_MIPMAP</constant> is available only if the GL version is 1.4 or | |
287 | greater. | |
288 | </para> | |
289 | <para> | |
290 | If an error is generated, | |
291 | no change is made to the contents of <parameter>params</parameter>. | |
292 | </para> | |
293 | </refsect1> | |
294 | <refsect1 id="errors"><title>Errors</title> | |
295 | <para> | |
296 | <constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> or <parameter>pname</parameter> is not an | |
297 | accepted value. | |
298 | </para> | |
299 | <para> | |
300 | <constant>GL_INVALID_OPERATION</constant> is generated if <function>glGetTexParameter</function> | |
301 | is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> | |
302 | and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>. | |
303 | </para> | |
304 | </refsect1> | |
305 | <refsect1 id="seealso"><title>See Also</title> | |
306 | <para> | |
307 | <citerefentry><refentrytitle>glAreTexturesResident</refentrytitle></citerefentry>, | |
308 | <citerefentry><refentrytitle>glPrioritizeTextures</refentrytitle></citerefentry>, | |
309 | <citerefentry><refentrytitle>glTexParameter</refentrytitle></citerefentry> | |
310 | </para> | |
311 | </refsect1> | |
312 | <refsect1 id="Copyright"><title>Copyright</title> | |
313 | <para> | |
314 | Copyright <trademark class="copyright"></trademark> 1991-2006 | |
315 | Silicon Graphics, Inc. This document is licensed under the SGI | |
316 | Free Software B License. For details, see | |
317 | <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>. | |
318 | </para> | |
319 | </refsect1> | |
320 | </refentry> |