rename upstream-man-pages to upstream-doc
[clinton/guile-figl.git] / upstream-doc / man2 / glCompressedTexImage3D.xml
CommitLineData
7faf1d71
AW
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="glCompressedTexImage3D">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>1991-2006</year>
9 <holder>Silicon Graphics, Inc.</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>glCompressedTexImage3D</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>glCompressedTexImage3D</refname>
17 <refpurpose>specify a three-dimensional texture image in a compressed format</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>C Specification</title>
20 <funcsynopsis>
21 <funcprototype>
22 <funcdef>void <function>glCompressedTexImage3D</function></funcdef>
23 <paramdef>GLenum <parameter>target</parameter></paramdef>
24 <paramdef>GLint <parameter>level</parameter></paramdef>
25 <paramdef>GLenum <parameter>internalformat</parameter></paramdef>
26 <paramdef>GLsizei <parameter>width</parameter></paramdef>
27 <paramdef>GLsizei <parameter>height</parameter></paramdef>
28 <paramdef>GLsizei <parameter>depth</parameter></paramdef>
29 <paramdef>GLint <parameter>border</parameter></paramdef>
30 <paramdef>GLsizei <parameter>imageSize</parameter></paramdef>
31 <paramdef>const GLvoid * <parameter>data</parameter></paramdef>
32 </funcprototype>
33 </funcsynopsis>
34 </refsynopsisdiv>
35 <!-- eqn: ignoring delim $$ -->
36 <refsect1 id="parameters"><title>Parameters</title>
37 <variablelist>
38 <varlistentry>
39 <term><parameter>target</parameter></term>
40 <listitem>
41 <para>
42 Specifies the target texture.
43 Must be <constant>GL_TEXTURE_3D</constant> or <constant>GL_PROXY_TEXTURE_3D</constant>.
44 </para>
45 </listitem>
46 </varlistentry>
47 <varlistentry>
48 <term><parameter>level</parameter></term>
49 <listitem>
50 <para>
51 Specifies the level-of-detail number.
52 Level 0 is the base image level.
53 Level <emphasis>n</emphasis> is the <emphasis>n</emphasis>th mipmap reduction image.
54 </para>
55 </listitem>
56 </varlistentry>
57 <varlistentry>
58 <term><parameter>internalformat</parameter></term>
59 <listitem>
60 <para>
61 Specifies the format of the compressed image data stored at address <parameter>data</parameter>.
62 </para>
63 </listitem>
64 </varlistentry>
65 <varlistentry>
66 <term><parameter>width</parameter></term>
67 <listitem>
68 <para>
69 Specifies the width of the texture image including the border if any. If the GL version does not support non-power-of-two sizes, this value must be
70 <inlineequation><mml:math>
71 <!-- eqn: 2 sup n + 2 ( border ):-->
72 <mml:mrow>
73 <mml:msup><mml:mn>2</mml:mn>
74 <mml:mi mathvariant="italic">n</mml:mi>
75 </mml:msup>
76 <mml:mo>+</mml:mo>
77 <mml:mrow>
78 <mml:mn>2</mml:mn>
79 <mml:mo>&af;</mml:mo>
80 <mml:mfenced open="(" close=")">
81 <mml:mi mathvariant="italic">border</mml:mi>
82 </mml:mfenced>
83 </mml:mrow>
84 </mml:mrow>
85 </mml:math></inlineequation>
86 for some integer
87 <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>.
88 All
89 implementations support 3D texture images that are at least 16 texels
90 wide.
91 </para>
92 </listitem>
93 </varlistentry>
94 <varlistentry>
95 <term><parameter>height</parameter></term>
96 <listitem>
97 <para>
98 Specifies the height of the texture image including the border if any. If the GL version does not support non-power-of-two sizes, this value must be
99 <inlineequation><mml:math>
100 <!-- eqn: 2 sup n + 2 ( border ):-->
101 <mml:mrow>
102 <mml:msup><mml:mn>2</mml:mn>
103 <mml:mi mathvariant="italic">n</mml:mi>
104 </mml:msup>
105 <mml:mo>+</mml:mo>
106 <mml:mrow>
107 <mml:mn>2</mml:mn>
108 <mml:mo>&af;</mml:mo>
109 <mml:mfenced open="(" close=")">
110 <mml:mi mathvariant="italic">border</mml:mi>
111 </mml:mfenced>
112 </mml:mrow>
113 </mml:mrow>
114 </mml:math></inlineequation>
115 for some integer
116 <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>.
117 All
118 implementations support 3D texture images that are at least 16 texels
119 high.
120 </para>
121 </listitem>
122 </varlistentry>
123 <varlistentry>
124 <term><parameter>depth</parameter></term>
125 <listitem>
126 <para>
127 Specifies the depth of the texture image including the border if any. If the GL version does not support non-power-of-two sizes, this value must be
128 <inlineequation><mml:math>
129 <!-- eqn: 2 sup n + 2 ( border ):-->
130 <mml:mrow>
131 <mml:msup><mml:mn>2</mml:mn>
132 <mml:mi mathvariant="italic">n</mml:mi>
133 </mml:msup>
134 <mml:mo>+</mml:mo>
135 <mml:mrow>
136 <mml:mn>2</mml:mn>
137 <mml:mo>&af;</mml:mo>
138 <mml:mfenced open="(" close=")">
139 <mml:mi mathvariant="italic">border</mml:mi>
140 </mml:mfenced>
141 </mml:mrow>
142 </mml:mrow>
143 </mml:math></inlineequation>
144 for some integer
145 <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>.
146 All
147 implementations support 3D texture images that are at least 16 texels
148 deep.
149 </para>
150 </listitem>
151 </varlistentry>
152 <varlistentry>
153 <term><parameter>border</parameter></term>
154 <listitem>
155 <para>
156 Specifies the width of the border.
157 Must be either 0 or 1.
158 </para>
159 </listitem>
160 </varlistentry>
161 <varlistentry>
162 <term><parameter>imageSize</parameter></term>
163 <listitem>
164 <para>
165 Specifies the number of unsigned bytes of image data starting at the
166 address specified by <parameter>data</parameter>.
167 </para>
168 </listitem>
169 </varlistentry>
170 <varlistentry>
171 <term><parameter>data</parameter></term>
172 <listitem>
173 <para>
174 Specifies a pointer to the compressed image data in memory.
175 </para>
176 </listitem>
177 </varlistentry>
178 </variablelist>
179 </refsect1>
180 <refsect1 id="description"><title>Description</title>
181 <para>
182 Texturing maps a portion of a specified texture image onto each graphical
183 primitive for which texturing is enabled. To enable and disable
184 three-dimensional texturing, call <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glDisable</refentrytitle></citerefentry> with argument
185 <constant>GL_TEXTURE_3D</constant>.
186 </para>
187 <para>
188 <function>glCompressedTexImage3D</function> loads a previously defined, and retrieved, compressed three-dimensional
189 texture image if <parameter>target</parameter> is <constant>GL_TEXTURE_3D</constant> (see <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>).
190 </para>
191 <para>
192 If <parameter>target</parameter> is <constant>GL_PROXY_TEXTURE_3D</constant>, no data is read from <parameter>data</parameter>, but
193 all of the texture image state is recalculated, checked for consistency,
194 and checked against the implementation's capabilities. If the
195 implementation cannot handle a texture of the requested texture size, it
196 sets all of the image state to 0, but does not generate an error (see
197 <citerefentry><refentrytitle>glGetError</refentrytitle></citerefentry>). To query for an entire mipmap array, use an image array level
198 greater than or equal to 1.
199 </para>
200 <para>
201 <parameter>internalformat</parameter> must be an extension-specified compressed-texture format.
202 When a texture is loaded with <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry> using a generic compressed
203 texture format (e.g., <constant>GL_COMPRESSED_RGB</constant>), the GL selects from one of
204 its extensions supporting compressed textures. In order to load the
205 compressed texture image using <function>glCompressedTexImage3D</function>, query the compressed texture image's
206 size and format using <citerefentry><refentrytitle>glGetTexLevelParameter</refentrytitle></citerefentry>.
207 </para>
208 <para>
209 If a non-zero named buffer object is bound to the <constant>GL_PIXEL_UNPACK_BUFFER</constant> target
210 (see <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>) while a texture image is
211 specified, <parameter>data</parameter> is treated as a byte offset into the buffer object's data store.
212 </para>
213 </refsect1>
214 <refsect1 id="notes"><title>Notes</title>
215 <para>
216 <function>glCompressedTexImage3D</function> is available only if the GL version is 1.3 or greater.
217 </para>
218 <para>
219 Non-power-of-two textures are supported if the GL version is 2.0 or greater, or if the implementation exports the <constant>GL_ARB_texture_non_power_of_two</constant> extension.
220 </para>
221 </refsect1>
222 <refsect1 id="errors"><title>Errors</title>
223 <para>
224 <constant>GL_INVALID_ENUM</constant> is generated if <parameter>internalformat</parameter> is one of the generic compressed internal formats: <constant>GL_COMPRESSED_ALPHA</constant>,
225 <constant>GL_COMPRESSED_LUMINANCE</constant>, <constant>GL_COMPRESSED_LUMINANCE_ALPHA</constant>,
226 <constant>GL_COMPRESSED_INTENSITY</constant>, <constant>GL_COMPRESSED_RGB</constant>, or
227 <constant>GL_COMPRESSED_RGBA</constant>.
228 </para>
229 <para>
230 <constant>GL_INVALID_VALUE</constant> is generated if <parameter>imageSize</parameter> is not consistent with
231 the format, dimensions, and contents of the specified compressed image data.
232 </para>
233 <para>
234 <constant>GL_INVALID_OPERATION</constant> is generated if parameter combinations are not
235 supported by the specific compressed internal format as specified in the
236 specific texture compression extension.
237 </para>
238 <para>
239 <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
240 <constant>GL_PIXEL_UNPACK_BUFFER</constant> target and the buffer object's data store is currently mapped.
241 </para>
242 <para>
243 <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
244 <constant>GL_PIXEL_UNPACK_BUFFER</constant> target and the data would be unpacked from the buffer
245 object such that the memory reads required would exceed the data store size.
246 </para>
247 <para>
248 <constant>GL_INVALID_OPERATION</constant> is generated if <function>glCompressedTexImage3D</function>
249 is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
250 and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
251 </para>
252 <para>
253 Undefined results, including abnormal program termination, are generated if <parameter>data</parameter> is not encoded in a manner consistent with the extension specification defining the internal compression format.
254 </para>
255 </refsect1>
256 <refsect1 id="associatedgets"><title>Associated Gets</title>
257 <para>
258 <citerefentry><refentrytitle>glGetCompressedTexImage</refentrytitle></citerefentry>
259 </para>
260 <para>
261 <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_COMPRESSED</constant>
262 </para>
263 <para>
264 <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_PIXEL_UNPACK_BUFFER_BINDING</constant>
265 </para>
266 <para>
267 <citerefentry><refentrytitle>glGetTexLevelParameter</refentrytitle></citerefentry> with arguments <constant>GL_TEXTURE_INTERNAL_FORMAT</constant>
268 and <constant>GL_TEXTURE_COMPRESSED_IMAGE_SIZE</constant>
269 </para>
270 <para>
271 <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_3D</constant>
272 </para>
273 </refsect1>
274 <refsect1 id="seealso"><title>See Also</title>
275 <para>
276 <citerefentry><refentrytitle>glActiveTexture</refentrytitle></citerefentry>,
277 <citerefentry><refentrytitle>glColorTable</refentrytitle></citerefentry>,
278 <citerefentry><refentrytitle>glCompressedTexImage1D</refentrytitle></citerefentry>,
279 <citerefentry><refentrytitle>glCompressedTexImage2D</refentrytitle></citerefentry>,
280 <citerefentry><refentrytitle>glCompressedTexSubImage1D</refentrytitle></citerefentry>,
281 <citerefentry><refentrytitle>glCompressedTexSubImage2D</refentrytitle></citerefentry>,
282 <citerefentry><refentrytitle>glCompressedTexSubImage3D</refentrytitle></citerefentry>,
283 <citerefentry><refentrytitle>glConvolutionFilter1D</refentrytitle></citerefentry>,
284 <citerefentry><refentrytitle>glCopyPixels</refentrytitle></citerefentry>,
285 <citerefentry><refentrytitle>glCopyTexImage1D</refentrytitle></citerefentry>,
286 <citerefentry><refentrytitle>glCopyTexSubImage1D</refentrytitle></citerefentry>,
287 <citerefentry><refentrytitle>glCopyTexSubImage2D</refentrytitle></citerefentry>,
288 <citerefentry><refentrytitle>glCopyTexSubImage3D</refentrytitle></citerefentry>,
289 <citerefentry><refentrytitle>glDrawPixels</refentrytitle></citerefentry>,
290 <citerefentry><refentrytitle>glMatrixMode</refentrytitle></citerefentry>,
291 <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry>,
292 <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>,
293 <citerefentry><refentrytitle>glTexEnv</refentrytitle></citerefentry>,
294 <citerefentry><refentrytitle>glTexGen</refentrytitle></citerefentry>,
295 <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>,
296 <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>,
297 <citerefentry><refentrytitle>glTexSubImage1D</refentrytitle></citerefentry>,
298 <citerefentry><refentrytitle>glTexSubImage2D</refentrytitle></citerefentry>,
299 <citerefentry><refentrytitle>glTexSubImage3D</refentrytitle></citerefentry>,
300 <citerefentry><refentrytitle>glTexParameter</refentrytitle></citerefentry>
301 </para>
302 </refsect1>
303 <refsect1 id="Copyright"><title>Copyright</title>
304 <para>
305 Copyright <trademark class="copyright"></trademark> 1991-2006
306 Silicon Graphics, Inc. This document is licensed under the SGI
307 Free Software B License. For details, see
308 <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>.
309 </para>
310 </refsect1>
311</refentry>