1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN" "xhtml1-transitional.dtd">
3 <!-- saved from url=(0013)about:internet -->
4 <?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" /><link rel=
"stylesheet" type=
"text/css" href=
"opengl-man.css" /><title>glGetTexParameter - OpenGL
3.3 Reference Pages
</title><meta name=
"generator" content=
"DocBook XSL Stylesheets V1.69.1" /></head><body><div class=
"refentry" lang=
"en" xml:
lang=
"en"><a id=
"glGetTexParameter"></a><div class=
"titlepage"></div><div class=
"refnamediv"><h2>Name
</h2><p>glGetTexParameter — return texture parameter values
</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">glGetTexParameterfv
</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><div class=
"funcsynopsis"><table border=
"0" summary=
"Function synopsis" cellspacing=
"0" cellpadding=
"0"><tr><td><code class=
"funcdef">void
<b class=
"fsfunc">glGetTexParameteriv
</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 class=
"funcsynopsis"><table border=
"0" summary=
"Function synopsis" cellspacing=
"0" cellpadding=
"0"><tr><td><code class=
"funcdef">void
<b class=
"fsfunc">glGetTexParameterIiv
</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 class=
"funcsynopsis"><table border=
"0" summary=
"Function synopsis" cellspacing=
"0" cellpadding=
"0"><tr><td><code class=
"funcdef">void
<b class=
"fsfunc">glGetTexParameterIuiv
</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>GLuint *
</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>
5 Specifies the symbolic name of the target texture.
6 <code class=
"constant">GL_TEXTURE_1D
</code>,
7 <code class=
"constant">GL_TEXTURE_2D
</code>,
8 <code class=
"constant">GL_TEXTURE_1D_ARRAY
</code>,
9 <code class=
"constant">GL_TEXTURE_2D_ARRAY
</code>,
10 <code class=
"constant">GL_TEXTURE_3D
</code>,
11 <code class=
"constant">GL_TEXTURE_RECTANGLE
</code>, and
12 <code class=
"constant">GL_TEXTURE_CUBE_MAP
</code>
14 </p></dd><dt><span class=
"term"><em class=
"parameter"><code>pname
</code></em></span></dt><dd><p>
15 Specifies the symbolic name of a texture parameter.
16 <code class=
"constant">GL_TEXTURE_BASE_LEVEL
</code>,
17 <code class=
"constant">GL_TEXTURE_BORDER_COLOR
</code>,
18 <code class=
"constant">GL_TEXTURE_COMPARE_MODE
</code>,
19 <code class=
"constant">GL_TEXTURE_COMPARE_FUNC
</code>,
20 <code class=
"constant">GL_TEXTURE_LOD_BIAS
</code>,
21 <code class=
"constant">GL_TEXTURE_MAG_FILTER
</code>,
22 <code class=
"constant">GL_TEXTURE_MAX_LEVEL
</code>,
23 <code class=
"constant">GL_TEXTURE_MAX_LOD
</code>,
24 <code class=
"constant">GL_TEXTURE_MIN_FILTER
</code>,
25 <code class=
"constant">GL_TEXTURE_MIN_LOD
</code>,
26 <code class=
"constant">GL_TEXTURE_SWIZZLE_R
</code>,
27 <code class=
"constant">GL_TEXTURE_SWIZZLE_G
</code>,
28 <code class=
"constant">GL_TEXTURE_SWIZZLE_B
</code>,
29 <code class=
"constant">GL_TEXTURE_SWIZZLE_A
</code>,
30 <code class=
"constant">GL_TEXTURE_SWIZZLE_RGBA
</code>,
31 <code class=
"constant">GL_TEXTURE_WRAP_S
</code>,
32 <code class=
"constant">GL_TEXTURE_WRAP_T
</code>, and
33 <code class=
"constant">GL_TEXTURE_WRAP_R
</code>
35 </p></dd><dt><span class=
"term"><em class=
"parameter"><code>params
</code></em></span></dt><dd><p>
36 Returns the texture parameters.
37 </p></dd></dl></div></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"description"></a><h2>Description
</h2><p>
38 <code class=
"function">glGetTexParameter
</code> returns in
<em class=
"parameter"><code>params
</code></em> the value or values of the texture parameter
39 specified as
<em class=
"parameter"><code>pname
</code></em>.
40 <em class=
"parameter"><code>target
</code></em> defines the target texture.
41 <code class=
"constant">GL_TEXTURE_1D
</code>,
42 <code class=
"constant">GL_TEXTURE_2D
</code>,
43 <code class=
"constant">GL_TEXTURE_3D
</code>,
44 <code class=
"constant">GL_TEXTURE_1D_ARRAY
</code>,
45 <code class=
"constant">GL_TEXTURE_2D_ARRAY
</code>,
46 <code class=
"constant">GL_TEXTURE_RECTANGLE
</code>, and
47 <code class=
"constant">GL_TEXTURE_CUBE_MAP
</code>
48 specify one-, two-, or three-dimensional, one-dimensional array, two-dimensional array, rectangle or cube-mapped texturing, respectively.
49 <em class=
"parameter"><code>pname
</code></em> accepts the same symbols as
<a href=
"glTexParameter.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexParameter
</span></span></a>,
50 with the same interpretations:
51 </p><div class=
"variablelist"><dl><dt><span class=
"term"><code class=
"constant">GL_TEXTURE_MAG_FILTER
</code></span></dt><dd><p>
52 Returns the single-valued texture magnification filter,
53 a symbolic constant. The initial value is
<code class=
"constant">GL_LINEAR
</code>.
54 </p></dd><dt><span class=
"term"><code class=
"constant">GL_TEXTURE_MIN_FILTER
</code></span></dt><dd><p>
55 Returns the single-valued texture minification filter,
56 a symbolic constant. The initial value is
<code class=
"constant">GL_NEAREST_MIPMAP_LINEAR
</code>.
57 </p></dd><dt><span class=
"term"><code class=
"constant">GL_TEXTURE_MIN_LOD
</code></span></dt><dd><p>
58 Returns the single-valued texture minimum level-of-detail value. The
60 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
62 <mml:mn>-
1000</mml:mn>
64 </p></dd><dt><span class=
"term"><code class=
"constant">GL_TEXTURE_MAX_LOD
</code></span></dt><dd><p>
65 Returns the single-valued texture maximum level-of-detail value. The
66 initial value is
1000.
67 </p></dd><dt><span class=
"term"><code class=
"constant">GL_TEXTURE_BASE_LEVEL
</code></span></dt><dd><p>
68 Returns the single-valued base texture mipmap level. The initial value is
0.
69 </p></dd><dt><span class=
"term"><code class=
"constant">GL_TEXTURE_MAX_LEVEL
</code></span></dt><dd><p>
70 Returns the single-valued maximum texture mipmap array level. The initial
72 </p></dd><dt><span class=
"term"><code class=
"constant">GL_TEXTURE_SWIZZLE_R
</code></span></dt><dd><p>
73 Returns the red component swizzle. The initial value is
<code class=
"constant">GL_RED
</code>.
74 </p></dd><dt><span class=
"term"><code class=
"constant">GL_TEXTURE_SWIZZLE_G
</code></span></dt><dd><p>
75 Returns the green component swizzle. The initial value is
<code class=
"constant">GL_GREEN
</code>.
76 </p></dd><dt><span class=
"term"><code class=
"constant">GL_TEXTURE_SWIZZLE_B
</code></span></dt><dd><p>
77 Returns the blue component swizzle. The initial value is
<code class=
"constant">GL_BLUE
</code>.
78 </p></dd><dt><span class=
"term"><code class=
"constant">GL_TEXTURE_SWIZZLE_A
</code></span></dt><dd><p>
79 Returns the alpha component swizzle. The initial value is
<code class=
"constant">GL_ALPHA
</code>.
80 </p></dd><dt><span class=
"term"><code class=
"constant">GL_TEXTURE_SWIZZLE_RGBA
</code></span></dt><dd><p>
81 Returns the component swizzle for all channels in a single query.
82 </p></dd><dt><span class=
"term"><code class=
"constant">GL_TEXTURE_WRAP_S
</code></span></dt><dd><p>
83 Returns the single-valued wrapping function for texture coordinate
84 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">s
</mml:mi></mml:math>,
85 a symbolic constant. The initial value is
<code class=
"constant">GL_REPEAT
</code>.
86 </p></dd><dt><span class=
"term"><code class=
"constant">GL_TEXTURE_WRAP_T
</code></span></dt><dd><p>
87 Returns the single-valued wrapping function for texture coordinate
88 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">t
</mml:mi></mml:math>,
89 a symbolic constant. The initial value is
<code class=
"constant">GL_REPEAT
</code>.
90 </p></dd><dt><span class=
"term"><code class=
"constant">GL_TEXTURE_WRAP_R
</code></span></dt><dd><p>
91 Returns the single-valued wrapping function for texture coordinate
92 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">r
</mml:mi></mml:math>,
93 a symbolic constant. The initial value is
<code class=
"constant">GL_REPEAT
</code>.
94 </p></dd><dt><span class=
"term"><code class=
"constant">GL_TEXTURE_BORDER_COLOR
</code></span></dt><dd><p>
95 Returns four integer or floating-point numbers that comprise the RGBA color
96 of the texture border.
97 Floating-point values are returned in the range
98 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
100 <mml:mfenced open=
"[" close=
"]">
105 Integer values are returned as a linear mapping of the internal floating-point
106 representation such that
1.0 maps to the most positive representable
108 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
110 <mml:mn>-
1.0</mml:mn>
112 maps to the most negative representable
113 integer. The initial value is (
0,
0,
0,
0).
114 </p></dd><dt><span class=
"term"><code class=
"constant">GL_TEXTURE_COMPARE_MODE
</code></span></dt><dd><p>
115 Returns a single-valued texture comparison mode, a symbolic constant. The
116 initial value is
<code class=
"constant">GL_NONE
</code>. See
<a href=
"glTexParameter.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexParameter
</span></span></a>.
117 </p></dd><dt><span class=
"term"><code class=
"constant">GL_TEXTURE_COMPARE_FUNC
</code></span></dt><dd><p>
118 Returns a single-valued texture comparison function, a symbolic constant. The
119 initial value is
<code class=
"constant">GL_LEQUAL
</code>. See
<a href=
"glTexParameter.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexParameter
</span></span></a>.
120 </p></dd></dl></div></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"notes"></a><h2>Notes
</h2><p>
121 If an error is generated,
122 no change is made to the contents of
<em class=
"parameter"><code>params
</code></em>.
123 </p></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"errors"></a><h2>Errors
</h2><p>
124 <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
126 </p></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"seealso"></a><h2>See Also
</h2><p>
127 <a href=
"glTexParameter.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexParameter
</span></span></a>
128 </p></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"Copyright"></a><h2>Copyright
</h2><p>
129 Copyright
<span class=
"trademark"></span>©
1991-
2006
130 Silicon Graphics, Inc. Copyright
<span class=
"trademark"></span>©
2010
131 Khronos Group. This document is licensed under the SGI
132 Free Software B License. For details, see
133 <a href=
"http://oss.sgi.com/projects/FreeB/" target=
"_top">http://oss.sgi.com/projects/FreeB/
</a>.
134 </p></div></div></body></html>