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>glGetTexLevelParameter - 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=
"glGetTexLevelParameter"></a><div class=
"titlepage"></div><div class=
"refnamediv"><h2>Name
</h2><p>glGetTexLevelParameter — return texture parameter values for a specific level of detail
</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">glGetTexLevelParameterfv
</b>(
</code></td><td>GLenum
</td><td><var class=
"pdparam">target
</var>,
</td></tr><tr><td> </td><td>GLint
</td><td><var class=
"pdparam">level
</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">glGetTexLevelParameteriv
</b>(
</code></td><td>GLenum
</td><td><var class=
"pdparam">target
</var>,
</td></tr><tr><td> </td><td>GLint
</td><td><var class=
"pdparam">level
</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>
5 Specifies the symbolic name of the target texture,
7 <code class=
"constant">GL_TEXTURE_1D
</code>,
8 <code class=
"constant">GL_TEXTURE_2D
</code>,
9 <code class=
"constant">GL_TEXTURE_3D
</code>,
10 <code class=
"constant">GL_TEXTURE_1D_ARRAY
</code>,
11 <code class=
"constant">GL_TEXTURE_2D_ARRAY
</code>,
12 <code class=
"constant">GL_TEXTURE_RECTANGLE
</code>,
13 <code class=
"constant">GL_TEXTURE_2D_MULTISAMPLE
</code>,
14 <code class=
"constant">GL_TEXTURE_2D_MULTISAMPLE_ARRAY
</code>,
15 <code class=
"constant">GL_TEXTURE_CUBE_MAP_POSITIVE_X
</code>,
16 <code class=
"constant">GL_TEXTURE_CUBE_MAP_NEGATIVE_X
</code>,
17 <code class=
"constant">GL_TEXTURE_CUBE_MAP_POSITIVE_Y
</code>,
18 <code class=
"constant">GL_TEXTURE_CUBE_MAP_NEGATIVE_Y
</code>,
19 <code class=
"constant">GL_TEXTURE_CUBE_MAP_POSITIVE_Z
</code>,
20 <code class=
"constant">GL_TEXTURE_CUBE_MAP_NEGATIVE_Z
</code>,
21 <code class=
"constant">GL_PROXY_TEXTURE_1D
</code>,
22 <code class=
"constant">GL_PROXY_TEXTURE_2D
</code>,
23 <code class=
"constant">GL_PROXY_TEXTURE_3D
</code>,
24 <code class=
"constant">GL_PROXY_TEXTURE_1D_ARRAY
</code>,
25 <code class=
"constant">GL_PROXY_TEXTURE_2D_ARRAY
</code>,
26 <code class=
"constant">GL_PROXY_TEXTURE_RECTANGLE
</code>,
27 <code class=
"constant">GL_PROXY_TEXTURE_2D_MULTISAMPLE
</code>,
28 <code class=
"constant">GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY
</code>,
29 <code class=
"constant">GL_PROXY_TEXTURE_CUBE_MAP
</code>, or
30 <code class=
"constant">GL_TEXTURE_BUFFER
</code>.
31 </p></dd><dt><span class=
"term"><em class=
"parameter"><code>level
</code></em></span></dt><dd><p>
32 Specifies the level-of-detail number of the desired image.
33 Level
0 is the base image level.
35 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">n
</mml:mi></mml:math>
37 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">n
</mml:mi></mml:math>th
38 mipmap reduction image.
39 </p></dd><dt><span class=
"term"><em class=
"parameter"><code>pname
</code></em></span></dt><dd><p>
40 Specifies the symbolic name of a texture parameter.
41 <code class=
"constant">GL_TEXTURE_WIDTH
</code>,
42 <code class=
"constant">GL_TEXTURE_HEIGHT
</code>,
43 <code class=
"constant">GL_TEXTURE_DEPTH
</code>,
44 <code class=
"constant">GL_TEXTURE_INTERNAL_FORMAT
</code>,
45 <code class=
"constant">GL_TEXTURE_RED_SIZE
</code>,
46 <code class=
"constant">GL_TEXTURE_GREEN_SIZE
</code>,
47 <code class=
"constant">GL_TEXTURE_BLUE_SIZE
</code>,
48 <code class=
"constant">GL_TEXTURE_ALPHA_SIZE
</code>,
49 <code class=
"constant">GL_TEXTURE_DEPTH_SIZE
</code>,
50 <code class=
"constant">GL_TEXTURE_COMPRESSED
</code>, and
51 <code class=
"constant">GL_TEXTURE_COMPRESSED_IMAGE_SIZE
</code>
53 </p></dd><dt><span class=
"term"><em class=
"parameter"><code>params
</code></em></span></dt><dd><p>
54 Returns the requested data.
55 </p></dd></dl></div></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"description"></a><h2>Description
</h2><p>
56 <code class=
"function">glGetTexLevelParameter
</code> returns in
<em class=
"parameter"><code>params
</code></em> texture parameter values for a specific
57 level-of-detail value,
58 specified as
<em class=
"parameter"><code>level
</code></em>.
59 <em class=
"parameter"><code>target
</code></em> defines the target texture,
60 either
<code class=
"constant">GL_TEXTURE_1D
</code>,
<code class=
"constant">GL_TEXTURE_2D
</code>,
<code class=
"constant">GL_TEXTURE_3D
</code>,
61 <code class=
"constant">GL_PROXY_TEXTURE_1D
</code>,
62 <code class=
"constant">GL_PROXY_TEXTURE_2D
</code>,
63 <code class=
"constant">GL_PROXY_TEXTURE_3D
</code>,
64 <code class=
"constant">GL_TEXTURE_CUBE_MAP_POSITIVE_X
</code>,
65 <code class=
"constant">GL_TEXTURE_CUBE_MAP_NEGATIVE_X
</code>,
66 <code class=
"constant">GL_TEXTURE_CUBE_MAP_POSITIVE_Y
</code>,
67 <code class=
"constant">GL_TEXTURE_CUBE_MAP_NEGATIVE_Y
</code>,
68 <code class=
"constant">GL_TEXTURE_CUBE_MAP_POSITIVE_Z
</code>,
69 <code class=
"constant">GL_TEXTURE_CUBE_MAP_NEGATIVE_Z
</code>, or
70 <code class=
"constant">GL_PROXY_TEXTURE_CUBE_MAP
</code>.
72 <code class=
"constant">GL_MAX_TEXTURE_SIZE
</code>, and
<code class=
"constant">GL_MAX_3D_TEXTURE_SIZE
</code> are not really
74 It has to report the largest square texture image that can be
75 accommodated with mipmaps
76 but a long skinny texture, or a texture without mipmaps may
77 easily fit in texture memory.
78 The proxy targets allow the user to more accurately query
79 whether the GL can accommodate a texture of a given configuration.
80 If the texture cannot be accommodated, the texture state variables, which
81 may be queried with
<code class=
"function">glGetTexLevelParameter
</code>, are set to
0. If the texture can be accommodated,
82 the texture state values will be set as they would be set for a
85 <em class=
"parameter"><code>pname
</code></em> specifies the texture parameter whose value or values
88 The accepted parameter names are as follows:
89 </p><div class=
"variablelist"><dl><dt><span class=
"term"><code class=
"constant">GL_TEXTURE_WIDTH
</code></span></dt><dd><p>
91 <em class=
"parameter"><code>params
</code></em> returns a single value,
92 the width of the texture image.
93 The initial value is
0.
94 </p></dd><dt><span class=
"term"><code class=
"constant">GL_TEXTURE_HEIGHT
</code></span></dt><dd><p>
96 <em class=
"parameter"><code>params
</code></em> returns a single value,
97 the height of the texture image.
98 The initial value is
0.
99 </p></dd><dt><span class=
"term"><code class=
"constant">GL_TEXTURE_DEPTH
</code></span></dt><dd><p>
101 <em class=
"parameter"><code>params
</code></em> returns a single value,
102 the depth of the texture image.
103 The initial value is
0.
104 </p></dd><dt><span class=
"term"><code class=
"constant">GL_TEXTURE_INTERNAL_FORMAT
</code></span></dt><dd><p>
106 <em class=
"parameter"><code>params
</code></em> returns a single value,
107 the internal format of the texture image.
108 </p></dd><dt><span class=
"term"><code class=
"constant">GL_TEXTURE_RED_TYPE
</code>,
</span></dt><dd></dd><dt><span class=
"term"><code class=
"constant">GL_TEXTURE_GREEN_TYPE
</code>,
</span></dt><dd></dd><dt><span class=
"term"><code class=
"constant">GL_TEXTURE_BLUE_TYPE
</code>,
</span></dt><dd></dd><dt><span class=
"term"><code class=
"constant">GL_TEXTURE_ALPHA_TYPE
</code>,
</span></dt><dd></dd><dt><span class=
"term"><code class=
"constant">GL_TEXTURE_DEPTH_TYPE
</code></span></dt><dd><p>
110 The data type used to store the component.
111 The types
<code class=
"constant">GL_NONE
</code>,
<code class=
"constant">GL_SIGNED_NORMALIZED
</code>,
112 <code class=
"constant">GL_UNSIGNED_NORMALIZED
</code>,
<code class=
"constant">GL_FLOAT
</code>,
113 <code class=
"constant">GL_INT
</code>, and
<code class=
"constant">GL_UNSIGNED_INT
</code> may be returned
114 to indicate signed normalized fixed-point, unsigned normalized fixed-point, floating-point, integer unnormalized, and
115 unsigned integer unnormalized components, respectively.
116 </p></dd><dt><span class=
"term"><code class=
"constant">GL_TEXTURE_RED_SIZE
</code>,
</span></dt><dd></dd><dt><span class=
"term"><code class=
"constant">GL_TEXTURE_GREEN_SIZE
</code>,
</span></dt><dd></dd><dt><span class=
"term"><code class=
"constant">GL_TEXTURE_BLUE_SIZE
</code>,
</span></dt><dd></dd><dt><span class=
"term"><code class=
"constant">GL_TEXTURE_ALPHA_SIZE
</code>,
</span></dt><dd></dd><dt><span class=
"term"><code class=
"constant">GL_TEXTURE_DEPTH_SIZE
</code></span></dt><dd><p>
118 The internal storage resolution of an individual component.
119 The resolution chosen by the GL will be a close match for the resolution
120 requested by the user with the component argument of
<a href=
"glTexImage1D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexImage1D
</span></span></a>,
121 <a href=
"glTexImage2D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexImage2D
</span></span></a>,
<a href=
"glTexImage3D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexImage3D
</span></span></a>,
<a href=
"glCopyTexImage1D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glCopyTexImage1D
</span></span></a>, and
122 <a href=
"glCopyTexImage2D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glCopyTexImage2D
</span></span></a>. The initial value is
0.
123 </p></dd><dt><span class=
"term"><code class=
"constant">GL_TEXTURE_COMPRESSED
</code></span></dt><dd><p>
125 <em class=
"parameter"><code>params
</code></em> returns a single boolean value indicating if the texture image is
126 stored in a compressed internal format. The initiali value is
<code class=
"constant">GL_FALSE
</code>.
127 </p></dd><dt><span class=
"term"><code class=
"constant">GL_TEXTURE_COMPRESSED_IMAGE_SIZE
</code></span></dt><dd><p>
129 <em class=
"parameter"><code>params
</code></em> returns a single integer value, the number of unsigned bytes of the
130 compressed texture image that would be returned from
131 <a href=
"glGetCompressedTexImage.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glGetCompressedTexImage
</span></span></a>.
132 </p></dd></dl></div></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"notes"></a><h2>Notes
</h2><p>
133 If an error is generated,
134 no change is made to the contents of
<em class=
"parameter"><code>params
</code></em>.
136 <code class=
"function">glGetTexLevelParameter
</code> returns the texture level parameters for the active texture unit.
137 </p></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"errors"></a><h2>Errors
</h2><p>
138 <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
141 <code class=
"constant">GL_INVALID_VALUE
</code> is generated if
<em class=
"parameter"><code>level
</code></em> is less than
0.
143 <code class=
"constant">GL_INVALID_VALUE
</code> may be generated if
<em class=
"parameter"><code>level
</code></em> is greater
145 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
147 <mml:msub><mml:mi mathvariant=
"italic">log
</mml:mi>
151 <span class=
"emphasis"><em>max
</em></span>,
152 where
<span class=
"emphasis"><em>max
</em></span> is the returned value of
<code class=
"constant">GL_MAX_TEXTURE_SIZE
</code>.
154 <code class=
"constant">GL_INVALID_VALUE
</code> is generated if
<em class=
"parameter"><code>target
</code></em> is
<code class=
"constant">GL_TEXTURE_BUFFER
</code>
155 and
<em class=
"parameter"><code>level
</code></em> is not zero.
157 <code class=
"constant">GL_INVALID_OPERATION
</code> is generated if
158 <code class=
"constant">GL_TEXTURE_COMPRESSED_IMAGE_SIZE
</code> is queried on texture images with an
159 uncompressed internal format or on proxy targets.
160 </p></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"seealso"></a><h2>See Also
</h2><p>
161 <a href=
"glActiveTexture.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glActiveTexture
</span></span></a>,
162 <a href=
"glGetTexParameter.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glGetTexParameter
</span></span></a>,
163 <a href=
"glCopyTexImage1D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glCopyTexImage1D
</span></span></a>,
164 <a href=
"glCopyTexImage2D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glCopyTexImage2D
</span></span></a>,
165 <a href=
"glCopyTexSubImage1D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glCopyTexSubImage1D
</span></span></a>,
166 <a href=
"glCopyTexSubImage2D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glCopyTexSubImage2D
</span></span></a>,
167 <a href=
"glCopyTexSubImage3D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glCopyTexSubImage3D
</span></span></a>,
168 <a href=
"glTexImage1D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexImage1D
</span></span></a>,
169 <a href=
"glTexImage2D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexImage2D
</span></span></a>,
170 <a href=
"glTexImage3D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexImage3D
</span></span></a>,
171 <a href=
"glTexSubImage1D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexSubImage1D
</span></span></a>,
172 <a href=
"glTexSubImage2D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexSubImage2D
</span></span></a>,
173 <a href=
"glTexSubImage3D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexSubImage3D
</span></span></a>,
174 <a href=
"glTexParameter.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexParameter
</span></span></a>
175 </p></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"Copyright"></a><h2>Copyright
</h2><p>
176 Copyright
<span class=
"trademark"></span>©
1991-
2006
177 Silicon Graphics, Inc. Copyright
<span class=
"trademark"></span>©
2010
178 Khronos Group. This document is licensed under the SGI
179 Free Software B License. For details, see
180 <a href=
"http://oss.sgi.com/projects/FreeB/" target=
"_top">http://oss.sgi.com/projects/FreeB/
</a>.
181 </p></div></div></body></html>