a61ccf1f45b93c47732c95030107c6f195ee4cdb
[clinton/guile-figl.git] / upstream-man-pages / man3 / xhtml / glGetTexLevelParameter.xml
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</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,
6 one of
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.
34 Level
35 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">n</mml:mi></mml:math>
36 is the
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_BORDER</code>,
46 <code class="constant">GL_TEXTURE_RED_SIZE</code>,
47 <code class="constant">GL_TEXTURE_GREEN_SIZE</code>,
48 <code class="constant">GL_TEXTURE_BLUE_SIZE</code>,
49 <code class="constant">GL_TEXTURE_ALPHA_SIZE</code>,
50 <code class="constant">GL_TEXTURE_DEPTH_SIZE</code>,
51 <code class="constant">GL_TEXTURE_COMPRESSED</code>, and
52 <code class="constant">GL_TEXTURE_COMPRESSED_IMAGE_SIZE</code>
53 are accepted.
54 </p></dd><dt><span class="term"><em class="parameter"><code>params</code></em></span></dt><dd><p>
55 Returns the requested data.
56 </p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="description"></a><h2>Description</h2><p>
57 <code class="function">glGetTexLevelParameter</code> returns in <em class="parameter"><code>params</code></em> texture parameter values for a specific
58 level-of-detail value,
59 specified as <em class="parameter"><code>level</code></em>.
60 <em class="parameter"><code>target</code></em> defines the target texture,
61 either <code class="constant">GL_TEXTURE_1D</code>, <code class="constant">GL_TEXTURE_2D</code>, <code class="constant">GL_TEXTURE_3D</code>,
62 <code class="constant">GL_PROXY_TEXTURE_1D</code>,
63 <code class="constant">GL_PROXY_TEXTURE_2D</code>,
64 <code class="constant">GL_PROXY_TEXTURE_3D</code>,
65 <code class="constant">GL_TEXTURE_CUBE_MAP_POSITIVE_X</code>,
66 <code class="constant">GL_TEXTURE_CUBE_MAP_NEGATIVE_X</code>,
67 <code class="constant">GL_TEXTURE_CUBE_MAP_POSITIVE_Y</code>,
68 <code class="constant">GL_TEXTURE_CUBE_MAP_NEGATIVE_Y</code>,
69 <code class="constant">GL_TEXTURE_CUBE_MAP_POSITIVE_Z</code>,
70 <code class="constant">GL_TEXTURE_CUBE_MAP_NEGATIVE_Z</code>, or
71 <code class="constant">GL_PROXY_TEXTURE_CUBE_MAP</code>.
72 </p><p>
73 <code class="constant">GL_MAX_TEXTURE_SIZE</code>, and <code class="constant">GL_MAX_3D_TEXTURE_SIZE</code> are not really
74 descriptive enough.
75 It has to report the largest square texture image that can be
76 accommodated with mipmaps and borders,
77 but a long skinny texture, or a texture without mipmaps and borders, may
78 easily fit in texture memory.
79 The proxy targets allow the user to more accurately query
80 whether the GL can accommodate a texture of a given configuration.
81 If the texture cannot be accommodated, the texture state variables, which
82 may be queried with <code class="function">glGetTexLevelParameter</code>, are set to 0. If the texture can be accommodated,
83 the texture state values will be set as they would be set for a
84 non-proxy target.
85 </p><p>
86 <em class="parameter"><code>pname</code></em> specifies the texture parameter whose value or values
87 will be returned.
88 </p><p>
89 The accepted parameter names are as follows:
90 </p><div class="variablelist"><dl><dt><span class="term"><code class="constant">GL_TEXTURE_WIDTH</code></span></dt><dd><p>
91 </p><p>
92 <em class="parameter"><code>params</code></em> returns a single value,
93 the width of the texture image.
94 This value includes the border of the texture image. The initial value is
95 0.
96 </p></dd><dt><span class="term"><code class="constant">GL_TEXTURE_HEIGHT</code></span></dt><dd><p>
97 </p><p>
98 <em class="parameter"><code>params</code></em> returns a single value,
99 the height of the texture image.
100 This value includes the border of the texture image. The initial value is
101 0.
102 </p></dd><dt><span class="term"><code class="constant">GL_TEXTURE_DEPTH</code></span></dt><dd><p>
103 </p><p>
104 <em class="parameter"><code>params</code></em> returns a single value,
105 the depth of the texture image.
106 This value includes the border of the texture image. The initial value is
107 0.
108 </p></dd><dt><span class="term"><code class="constant">GL_TEXTURE_INTERNAL_FORMAT</code></span></dt><dd><p>
109 </p><p>
110 <em class="parameter"><code>params</code></em> returns a single value,
111 the internal format of the texture image.
112 </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>
113 </p><p>
114 The data type used to store the component.
115 The types <code class="constant">GL_NONE</code>, <code class="constant">GL_SIGNED_NORMALIZED</code>,
116 <code class="constant">GL_UNSIGNED_NORMALIZED</code>, <code class="constant">GL_FLOAT</code>,
117 <code class="constant">GL_INT</code>, and <code class="constant">GL_UNSIGNED_INT</code> may be returned
118 to indicate signed normalized fixed-point, unsigned normalized fixed-point, floating-point, integer unnormalized, and
119 unsigned integer unnormalized components, respectively.
120 </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>
121 </p><p>
122 The internal storage resolution of an individual component.
123 The resolution chosen by the GL will be a close match for the resolution
124 requested by the user with the component argument of <a href="glTexImage1D.xml"><span class="citerefentry"><span class="refentrytitle">glTexImage1D</span></span></a>,
125 <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
126 <a href="glCopyTexImage2D.xml"><span class="citerefentry"><span class="refentrytitle">glCopyTexImage2D</span></span></a>. The initial value is 0.
127 </p></dd><dt><span class="term"><code class="constant">GL_TEXTURE_COMPRESSED</code></span></dt><dd><p>
128 </p><p>
129 <em class="parameter"><code>params</code></em> returns a single boolean value indicating if the texture image is
130 stored in a compressed internal format. The initiali value is <code class="constant">GL_FALSE</code>.
131 </p></dd><dt><span class="term"><code class="constant">GL_TEXTURE_COMPRESSED_IMAGE_SIZE</code></span></dt><dd><p>
132 </p><p>
133 <em class="parameter"><code>params</code></em> returns a single integer value, the number of unsigned bytes of the
134 compressed texture image that would be returned from
135 <a href="glGetCompressedTexImage.xml"><span class="citerefentry"><span class="refentrytitle">glGetCompressedTexImage</span></span></a>.
136 </p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="notes"></a><h2>Notes</h2><p>
137 If an error is generated,
138 no change is made to the contents of <em class="parameter"><code>params</code></em>.
139 </p><p>
140 <code class="function">glGetTexLevelParameter</code> returns the texture level parameters for the active texture unit.
141 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="errors"></a><h2>Errors</h2><p>
142 <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
143 accepted value.
144 </p><p>
145 <code class="constant">GL_INVALID_VALUE</code> is generated if <em class="parameter"><code>level</code></em> is less than 0.
146 </p><p>
147 <code class="constant">GL_INVALID_VALUE</code> may be generated if <em class="parameter"><code>level</code></em> is greater
148 than
149 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
150
151 <mml:msub><mml:mi mathvariant="italic">log</mml:mi>
152 <mml:mn>2</mml:mn>
153 </mml:msub>
154 </mml:math>
155 <span class="emphasis"><em>max</em></span>,
156 where <span class="emphasis"><em>max</em></span> is the returned value of <code class="constant">GL_MAX_TEXTURE_SIZE</code>.
157 </p><p>
158 <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>
159 and <em class="parameter"><code>level</code></em> is not zero.
160 </p><p>
161 <code class="constant">GL_INVALID_OPERATION</code> is generated if
162 <code class="constant">GL_TEXTURE_COMPRESSED_IMAGE_SIZE</code> is queried on texture images with an
163 uncompressed internal format or on proxy targets.
164 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p>
165 <a href="glActiveTexture.xml"><span class="citerefentry"><span class="refentrytitle">glActiveTexture</span></span></a>,
166 <a href="glGetTexParameter.xml"><span class="citerefentry"><span class="refentrytitle">glGetTexParameter</span></span></a>,
167 <a href="glCopyTexImage1D.xml"><span class="citerefentry"><span class="refentrytitle">glCopyTexImage1D</span></span></a>,
168 <a href="glCopyTexImage2D.xml"><span class="citerefentry"><span class="refentrytitle">glCopyTexImage2D</span></span></a>,
169 <a href="glCopyTexSubImage1D.xml"><span class="citerefentry"><span class="refentrytitle">glCopyTexSubImage1D</span></span></a>,
170 <a href="glCopyTexSubImage2D.xml"><span class="citerefentry"><span class="refentrytitle">glCopyTexSubImage2D</span></span></a>,
171 <a href="glCopyTexSubImage3D.xml"><span class="citerefentry"><span class="refentrytitle">glCopyTexSubImage3D</span></span></a>,
172 <a href="glTexImage1D.xml"><span class="citerefentry"><span class="refentrytitle">glTexImage1D</span></span></a>,
173 <a href="glTexImage2D.xml"><span class="citerefentry"><span class="refentrytitle">glTexImage2D</span></span></a>,
174 <a href="glTexImage3D.xml"><span class="citerefentry"><span class="refentrytitle">glTexImage3D</span></span></a>,
175 <a href="glTexSubImage1D.xml"><span class="citerefentry"><span class="refentrytitle">glTexSubImage1D</span></span></a>,
176 <a href="glTexSubImage2D.xml"><span class="citerefentry"><span class="refentrytitle">glTexSubImage2D</span></span></a>,
177 <a href="glTexSubImage3D.xml"><span class="citerefentry"><span class="refentrytitle">glTexSubImage3D</span></span></a>,
178 <a href="glTexParameter.xml"><span class="citerefentry"><span class="refentrytitle">glTexParameter</span></span></a>
179 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="Copyright"></a><h2>Copyright</h2><p>
180 Copyright <span class="trademark"></span>© 1991-2006
181 Silicon Graphics, Inc. Copyright <span class="trademark"></span>© 2010
182 Khronos Group. This document is licensed under the SGI
183 Free Software B License. For details, see
184 <a href="http://oss.sgi.com/projects/FreeB/" target="_top">http://oss.sgi.com/projects/FreeB/</a>.
185 </p></div></div></body></html>