71015252da488c79cffabe0c53cbad204e2e74da
[clinton/guile-figl.git] / upstream-man-pages / man2 / xhtml / glGetTexLevelParameter.xml
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>glGetTexLevelParameter</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /></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>
4 Specifies the symbolic name of the target texture,
5 either <code class="constant">GL_TEXTURE_1D</code>, <code class="constant">GL_TEXTURE_2D</code>, <code class="constant">GL_TEXTURE_3D</code>,
6 <code class="constant">GL_PROXY_TEXTURE_1D</code>, <code class="constant">GL_PROXY_TEXTURE_2D</code>,
7 <code class="constant">GL_PROXY_TEXTURE_3D</code>,
8 <code class="constant">GL_TEXTURE_CUBE_MAP_POSITIVE_X</code>,
9 <code class="constant">GL_TEXTURE_CUBE_MAP_NEGATIVE_X</code>,
10 <code class="constant">GL_TEXTURE_CUBE_MAP_POSITIVE_Y</code>,
11 <code class="constant">GL_TEXTURE_CUBE_MAP_NEGATIVE_Y</code>,
12 <code class="constant">GL_TEXTURE_CUBE_MAP_POSITIVE_Z</code>,
13 <code class="constant">GL_TEXTURE_CUBE_MAP_NEGATIVE_Z</code>, or
14 <code class="constant">GL_PROXY_TEXTURE_CUBE_MAP</code>.
15 </p></dd><dt><span class="term"><em class="parameter"><code>level</code></em></span></dt><dd><p>
16 Specifies the level-of-detail number of the desired image.
17 Level 0 is the base image level.
18 Level
19 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">n</mml:mi></mml:math>
20 is the
21 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">n</mml:mi></mml:math>th
22 mipmap reduction image.
23 </p></dd><dt><span class="term"><em class="parameter"><code>pname</code></em></span></dt><dd><p>
24 Specifies the symbolic name of a texture parameter.
25 <code class="constant">GL_TEXTURE_WIDTH</code>,
26 <code class="constant">GL_TEXTURE_HEIGHT</code>,
27 <code class="constant">GL_TEXTURE_DEPTH</code>,
28 <code class="constant">GL_TEXTURE_INTERNAL_FORMAT</code>,
29 <code class="constant">GL_TEXTURE_BORDER</code>,
30 <code class="constant">GL_TEXTURE_RED_SIZE</code>,
31 <code class="constant">GL_TEXTURE_GREEN_SIZE</code>,
32 <code class="constant">GL_TEXTURE_BLUE_SIZE</code>,
33 <code class="constant">GL_TEXTURE_ALPHA_SIZE</code>,
34 <code class="constant">GL_TEXTURE_LUMINANCE_SIZE</code>,
35 <code class="constant">GL_TEXTURE_INTENSITY_SIZE</code>,
36 <code class="constant">GL_TEXTURE_DEPTH_SIZE</code>,
37 <code class="constant">GL_TEXTURE_COMPRESSED</code>, and
38 <code class="constant">GL_TEXTURE_COMPRESSED_IMAGE_SIZE</code>
39 are accepted.
40 </p></dd><dt><span class="term"><em class="parameter"><code>params</code></em></span></dt><dd><p>
41 Returns the requested data.
42 </p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="description"></a><h2>Description</h2><p>
43 <code class="function">glGetTexLevelParameter</code> returns in <em class="parameter"><code>params</code></em> texture parameter values for a specific
44 level-of-detail value,
45 specified as <em class="parameter"><code>level</code></em>.
46 <em class="parameter"><code>target</code></em> defines the target texture,
47 either <code class="constant">GL_TEXTURE_1D</code>, <code class="constant">GL_TEXTURE_2D</code>, <code class="constant">GL_TEXTURE_3D</code>,
48 <code class="constant">GL_PROXY_TEXTURE_1D</code>,
49 <code class="constant">GL_PROXY_TEXTURE_2D</code>,
50 <code class="constant">GL_PROXY_TEXTURE_3D</code>,
51 <code class="constant">GL_TEXTURE_CUBE_MAP_POSITIVE_X</code>,
52 <code class="constant">GL_TEXTURE_CUBE_MAP_NEGATIVE_X</code>,
53 <code class="constant">GL_TEXTURE_CUBE_MAP_POSITIVE_Y</code>,
54 <code class="constant">GL_TEXTURE_CUBE_MAP_NEGATIVE_Y</code>,
55 <code class="constant">GL_TEXTURE_CUBE_MAP_POSITIVE_Z</code>,
56 <code class="constant">GL_TEXTURE_CUBE_MAP_NEGATIVE_Z</code>, or
57 <code class="constant">GL_PROXY_TEXTURE_CUBE_MAP</code>.
58 </p><p>
59 <code class="constant">GL_MAX_TEXTURE_SIZE</code>, and <code class="constant">GL_MAX_3D_TEXTURE_SIZE</code> are not really
60 descriptive enough.
61 It has to report the largest square texture image that can be
62 accommodated with mipmaps and borders,
63 but a long skinny texture, or a texture without mipmaps and borders, may
64 easily fit in texture memory.
65 The proxy targets allow the user to more accurately query
66 whether the GL can accommodate a texture of a given configuration.
67 If the texture cannot be accommodated, the texture state variables, which
68 may be queried with <code class="function">glGetTexLevelParameter</code>, are set to 0. If the texture can be accommodated,
69 the texture state values will be set as they would be set for a
70 non-proxy target.
71 </p><p>
72 <em class="parameter"><code>pname</code></em> specifies the texture parameter whose value or values
73 will be returned.
74 </p><p>
75 The accepted parameter names are as follows:
76 </p><div class="variablelist"><dl><dt><span class="term"><code class="constant">GL_TEXTURE_WIDTH</code></span></dt><dd><p>
77 </p><p>
78 <em class="parameter"><code>params</code></em> returns a single value,
79 the width of the texture image.
80 This value includes the border of the texture image. The initial value is
81 0.
82 </p></dd><dt><span class="term"><code class="constant">GL_TEXTURE_HEIGHT</code></span></dt><dd><p>
83 </p><p>
84 <em class="parameter"><code>params</code></em> returns a single value,
85 the height of the texture image.
86 This value includes the border of the texture image. The initial value is
87 0.
88 </p></dd><dt><span class="term"><code class="constant">GL_TEXTURE_DEPTH</code></span></dt><dd><p>
89 </p><p>
90 <em class="parameter"><code>params</code></em> returns a single value,
91 the depth of the texture image.
92 This value includes the border of the texture image. The initial value is
93 0.
94 </p></dd><dt><span class="term"><code class="constant">GL_TEXTURE_INTERNAL_FORMAT</code></span></dt><dd><p>
95 </p><p>
96 <em class="parameter"><code>params</code></em> returns a single value,
97 the internal format of the texture image.
98 </p></dd><dt><span class="term"><code class="constant">GL_TEXTURE_BORDER</code></span></dt><dd><p>
99 </p><p>
100 <em class="parameter"><code>params</code></em> returns a single value,
101 the width in pixels of the border of the texture image. The initial value
102 is 0.
103 </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_LUMINANCE_SIZE</code>,</span></dt><dd></dd><dt><span class="term"><code class="constant">GL_TEXTURE_INTENSITY_SIZE</code>,</span></dt><dd></dd><dt><span class="term"><code class="constant">GL_TEXTURE_DEPTH_SIZE</code></span></dt><dd><p>
104 </p><p>
105 The internal storage resolution of an individual component.
106 The resolution chosen by the GL will be a close match for the resolution
107 requested by the user with the component argument of <a class="citerefentry" href="glTexImage1D.xml"><span class="citerefentry"><span class="refentrytitle">glTexImage1D</span></span></a>,
108 <a class="citerefentry" href="glTexImage2D.xml"><span class="citerefentry"><span class="refentrytitle">glTexImage2D</span></span></a>, <a class="citerefentry" href="glTexImage3D.xml"><span class="citerefentry"><span class="refentrytitle">glTexImage3D</span></span></a>, <a class="citerefentry" href="glCopyTexImage1D.xml"><span class="citerefentry"><span class="refentrytitle">glCopyTexImage1D</span></span></a>, and
109 <a class="citerefentry" href="glCopyTexImage2D.xml"><span class="citerefentry"><span class="refentrytitle">glCopyTexImage2D</span></span></a>. The initial value is 0.
110 </p></dd><dt><span class="term"><code class="constant">GL_TEXTURE_COMPRESSED</code></span></dt><dd><p>
111 </p><p>
112 <em class="parameter"><code>params</code></em> returns a single boolean value indicating if the texture image is
113 stored in a compressed internal format. The initiali value is <code class="constant">GL_FALSE</code>.
114 </p></dd><dt><span class="term"><code class="constant">GL_TEXTURE_COMPRESSED_IMAGE_SIZE</code></span></dt><dd><p>
115 </p><p>
116 <em class="parameter"><code>params</code></em> returns a single integer value, the number of unsigned bytes of the
117 compressed texture image that would be returned from
118 <a class="citerefentry" href="glGetCompressedTexImage.xml"><span class="citerefentry"><span class="refentrytitle">glGetCompressedTexImage</span></span></a>.
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 <code class="constant">GL_TEXTURE_INTERNAL_FORMAT</code> is available only if the GL version is
124 1.1 or greater. In version 1.0, use <code class="constant">GL_TEXTURE_COMPONENTS</code>
125 instead.
126 </p><p>
127 <code class="constant">GL_PROXY_TEXTURE_1D</code> and <code class="constant">GL_PROXY_TEXTURE_2D</code> are
128 available only if the GL version is 1.1 or greater.
129 </p><p>
130 <code class="constant">GL_TEXTURE_3D</code>, <code class="constant">GL_PROXY_TEXTURE_3D</code>, and <code class="constant">GL_TEXTURE_DEPTH</code>
131 are available only if the GL version is 1.2 or greater.
132 </p><p>
133 <code class="constant">GL_TEXTURE_COMPRESSED</code>,
134 <code class="constant">GL_TEXTURE_COMPRESSED_IMAGE_SIZE</code>,
135 <code class="constant">GL_TEXTURE_CUBE_MAP_POSITIVE_X</code>,
136 <code class="constant">GL_TEXTURE_CUBE_MAP_NEGATIVE_X</code>,
137 <code class="constant">GL_TEXTURE_CUBE_MAP_POSITIVE_Y</code>,
138 <code class="constant">GL_TEXTURE_CUBE_MAP_NEGATIVE_Y</code>,
139 <code class="constant">GL_TEXTURE_CUBE_MAP_POSITIVE_Z</code>,
140 <code class="constant">GL_TEXTURE_CUBE_MAP_NEGATIVE_Z</code>, and
141 <code class="constant">GL_PROXY_TEXTURE_CUBE_MAP</code> are available only if the GL version is 1.3
142 or greater.
143 </p><p>
144 For OpenGL versions 1.3 and greater, or when the <code class="code">ARB_multitexture</code> extension is supported, <code class="function">glGetTexLevelParameter</code> returns
145 the texture level parameters for the active texture unit.
146 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="errors"></a><h2>Errors</h2><p>
147 <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
148 accepted value.
149 </p><p>
150 <code class="constant">GL_INVALID_VALUE</code> is generated if <em class="parameter"><code>level</code></em> is less than 0.
151 </p><p>
152 <code class="constant">GL_INVALID_VALUE</code> may be generated if <em class="parameter"><code>level</code></em> is greater
153 than
154 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
155
156 <mml:msub><mml:mi mathvariant="italic">log</mml:mi>
157 <mml:mn>2</mml:mn>
158 </mml:msub>
159 </mml:math>
160 <span class="emphasis"><em>max</em></span>,
161 where <span class="emphasis"><em>max</em></span> is the returned value of <code class="constant">GL_MAX_TEXTURE_SIZE</code>.
162 </p><p>
163 <code class="constant">GL_INVALID_OPERATION</code> is generated if <code class="function">glGetTexLevelParameter</code>
164 is executed between the execution of <a class="citerefentry" href="glBegin.xml"><span class="citerefentry"><span class="refentrytitle">glBegin</span></span></a>
165 and the corresponding execution of <a class="citerefentry" href="glEnd.xml"><span class="citerefentry"><span class="refentrytitle">glEnd</span></span></a>.
166 </p><p>
167 <code class="constant">GL_INVALID_OPERATION</code> is generated if
168 <code class="constant">GL_TEXTURE_COMPRESSED_IMAGE_SIZE</code> is queried on texture images with an
169 uncompressed internal format or on proxy targets.
170 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p>
171 <a class="citerefentry" href="glActiveTexture.xml"><span class="citerefentry"><span class="refentrytitle">glActiveTexture</span></span></a>,
172 <a class="citerefentry" href="glGetTexParameter.xml"><span class="citerefentry"><span class="refentrytitle">glGetTexParameter</span></span></a>,
173 <a class="citerefentry" href="glCopyTexImage1D.xml"><span class="citerefentry"><span class="refentrytitle">glCopyTexImage1D</span></span></a>,
174 <a class="citerefentry" href="glCopyTexImage2D.xml"><span class="citerefentry"><span class="refentrytitle">glCopyTexImage2D</span></span></a>,
175 <a class="citerefentry" href="glCopyTexSubImage1D.xml"><span class="citerefentry"><span class="refentrytitle">glCopyTexSubImage1D</span></span></a>,
176 <a class="citerefentry" href="glCopyTexSubImage2D.xml"><span class="citerefentry"><span class="refentrytitle">glCopyTexSubImage2D</span></span></a>,
177 <a class="citerefentry" href="glCopyTexSubImage3D.xml"><span class="citerefentry"><span class="refentrytitle">glCopyTexSubImage3D</span></span></a>,
178 <a class="citerefentry" href="glTexEnv.xml"><span class="citerefentry"><span class="refentrytitle">glTexEnv</span></span></a>,
179 <a class="citerefentry" href="glTexGen.xml"><span class="citerefentry"><span class="refentrytitle">glTexGen</span></span></a>,
180 <a class="citerefentry" href="glTexImage1D.xml"><span class="citerefentry"><span class="refentrytitle">glTexImage1D</span></span></a>,
181 <a class="citerefentry" href="glTexImage2D.xml"><span class="citerefentry"><span class="refentrytitle">glTexImage2D</span></span></a>,
182 <a class="citerefentry" href="glTexImage3D.xml"><span class="citerefentry"><span class="refentrytitle">glTexImage3D</span></span></a>,
183 <a class="citerefentry" href="glTexSubImage1D.xml"><span class="citerefentry"><span class="refentrytitle">glTexSubImage1D</span></span></a>,
184 <a class="citerefentry" href="glTexSubImage2D.xml"><span class="citerefentry"><span class="refentrytitle">glTexSubImage2D</span></span></a>,
185 <a class="citerefentry" href="glTexSubImage3D.xml"><span class="citerefentry"><span class="refentrytitle">glTexSubImage3D</span></span></a>,
186 <a class="citerefentry" href="glTexParameter.xml"><span class="citerefentry"><span class="refentrytitle">glTexParameter</span></span></a>
187 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="Copyright"></a><h2>Copyright</h2><p>
188 Copyright <span class="trademark"></span>© 1991-2006
189 Silicon Graphics, Inc. This document is licensed under the SGI
190 Free Software B License. For details, see
191 <a class="ulink" href="http://oss.sgi.com/projects/FreeB/" target="_top">http://oss.sgi.com/projects/FreeB/</a>.
192 </p></div></div></body></html>