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">
9 <holder>Silicon Graphics, Inc.
</holder>
12 <refentrytitle>glGetTexParameter
</refentrytitle>
13 <manvolnum>3G
</manvolnum>
16 <refname>glGetTexParameter
</refname>
17 <refpurpose>return texture parameter values
</refpurpose>
19 <refsynopsisdiv><title>C Specification
</title>
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>
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>
37 <!-- eqn: ignoring delim $$ -->
38 <refsect1 id=
"parameters"><title>Parameters
</title>
41 <term><parameter>target
</parameter></term>
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>
54 <term><parameter>pname
</parameter></term>
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>
79 <term><parameter>params
</parameter></term>
82 Returns the texture parameters.
88 <refsect1 id=
"description"><title>Description
</title>
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:
100 <term><constant>GL_TEXTURE_MAG_FILTER
</constant></term>
103 Returns the single-valued texture magnification filter,
104 a symbolic constant. The initial value is
<constant>GL_LINEAR
</constant>.
109 <term><constant>GL_TEXTURE_MIN_FILTER
</constant></term>
112 Returns the single-valued texture minification filter,
113 a symbolic constant. The initial value is
<constant>GL_NEAREST_MIPMAP_LINEAR
</constant>.
118 <term><constant>GL_TEXTURE_MIN_LOD
</constant></term>
121 Returns the single-valued texture minimum level-of-detail value. The
123 <inlineequation><mml:math>
125 <mml:mn>-
1000</mml:mn>
126 </mml:math></inlineequation>.
131 <term><constant>GL_TEXTURE_MAX_LOD
</constant></term>
134 Returns the single-valued texture maximum level-of-detail value. The
135 initial value is
1000.
140 <term><constant>GL_TEXTURE_BASE_LEVEL
</constant></term>
143 Returns the single-valued base texture mipmap level. The initial value is
0.
148 <term><constant>GL_TEXTURE_MAX_LEVEL
</constant></term>
151 Returns the single-valued maximum texture mipmap array level. The initial
157 <term><constant>GL_TEXTURE_WRAP_S
</constant></term>
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>.
167 <term><constant>GL_TEXTURE_WRAP_T
</constant></term>
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>.
177 <term><constant>GL_TEXTURE_WRAP_R
</constant></term>
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>.
187 <term><constant>GL_TEXTURE_BORDER_COLOR
</constant></term>
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>
195 <mml:mfenced open=
"[" close=
"]">
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
203 <inlineequation><mml:math>
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).
213 <term><constant>GL_TEXTURE_PRIORITY
</constant></term>
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>.
223 <term><constant>GL_TEXTURE_RESIDENT
</constant></term>
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>.
234 <term><constant>GL_TEXTURE_COMPARE_MODE
</constant></term>
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>.
243 <term><constant>GL_TEXTURE_COMPARE_FUNC
</constant></term>
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>.
252 <term><constant>GL_DEPTH_TEXTURE_MODE
</constant></term>
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>.
262 <term><constant>GL_GENERATE_MIPMAP
</constant></term>
265 Returns a single boolean value indicating if automatic mipmap level updates
267 See
<citerefentry><refentrytitle>glTexParameter
</refentrytitle></citerefentry>.
273 <refsect1 id=
"notes"><title>Notes
</title>
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.
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.
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
290 If an error is generated,
291 no change is made to the contents of
<parameter>params
</parameter>.
294 <refsect1 id=
"errors"><title>Errors
</title>
296 <constant>GL_INVALID_ENUM
</constant> is generated if
<parameter>target
</parameter> or
<parameter>pname
</parameter> is not an
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>.
305 <refsect1 id=
"seealso"><title>See Also
</title>
307 <citerefentry><refentrytitle>glAreTexturesResident
</refentrytitle></citerefentry>,
308 <citerefentry><refentrytitle>glPrioritizeTextures
</refentrytitle></citerefentry>,
309 <citerefentry><refentrytitle>glTexParameter
</refentrytitle></citerefentry>
312 <refsect1 id=
"Copyright"><title>Copyright
</title>
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>.