update upstream sources
[clinton/guile-figl.git] / upstream-doc / man3 / xhtml / glTexImage3D.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>glTexImage3D - 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="glTexImage3D"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glTexImage3D — specify a three-dimensional texture image</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">glTexImage3D</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>GLint  </td><td><var class="pdparam">internalFormat</var>, </td></tr><tr><td> </td><td>GLsizei  </td><td><var class="pdparam">width</var>, </td></tr><tr><td> </td><td>GLsizei  </td><td><var class="pdparam">height</var>, </td></tr><tr><td> </td><td>GLsizei  </td><td><var class="pdparam">depth</var>, </td></tr><tr><td> </td><td>GLint  </td><td><var class="pdparam">border</var>, </td></tr><tr><td> </td><td>GLenum  </td><td><var class="pdparam">format</var>, </td></tr><tr><td> </td><td>GLenum  </td><td><var class="pdparam">type</var>, </td></tr><tr><td> </td><td>const GLvoid *  </td><td><var class="pdparam">data</var><code>)</code>;</td></tr></table></div></div><p>
5 </p><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>
6 Specifies the target texture.
7 Must be one of <code class="constant">GL_TEXTURE_3D</code>, <code class="constant">GL_PROXY_TEXTURE_3D</code>,
8 <code class="constant">GL_TEXTURE_2D_ARRAY</code> or <code class="constant">GL_PROXY_TEXTURE_2D_ARRAY</code>.
9 </p></dd><dt><span class="term"><em class="parameter"><code>level</code></em></span></dt><dd><p>
10 Specifies the level-of-detail number.
11 Level 0 is the base image level.
12 Level
13 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">n</mml:mi></mml:math>
14 is the
15 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
16
17 <mml:msup><mml:mi mathvariant="italic">n</mml:mi>
18 <mml:mi mathvariant="italic">th</mml:mi>
19 </mml:msup>
20 </mml:math>
21 mipmap reduction image.
22 </p></dd><dt><span class="term"><em class="parameter"><code>internalFormat</code></em></span></dt><dd><p>
23 Specifies the number of color components in the texture.
24 Must be one of the following symbolic constants:
25 <code class="constant">GL_RGBA32F</code>,
26 <code class="constant">GL_RGBA32I</code>,
27 <code class="constant">GL_RGBA32UI</code>,
28 <code class="constant">GL_RGBA16</code>,
29 <code class="constant">GL_RGBA16F</code>,
30 <code class="constant">GL_RGBA16I</code>,
31 <code class="constant">GL_RGBA16UI</code>,
32 <code class="constant">GL_RGBA8</code>,
33 <code class="constant">GL_RGBA8UI</code>,
34 <code class="constant">GL_SRGB8_ALPHA8</code>,
35 <code class="constant">GL_RGB10_A2</code>,
36 <code class="constant">GL_RGB10_A2UI</code>,
37 <code class="constant">GL_R11F_G11F_B10F</code>,
38 <code class="constant">GL_RG32F</code>,
39 <code class="constant">GL_RG32I</code>,
40 <code class="constant">GL_RG32UI</code>,
41 <code class="constant">GL_RG16</code>,
42 <code class="constant">GL_RG16F</code>,
43 <code class="constant">GL_RGB16I</code>,
44 <code class="constant">GL_RGB16UI</code>,
45 <code class="constant">GL_RG8</code>,
46 <code class="constant">GL_RG8I</code>,
47 <code class="constant">GL_RG8UI</code>,
48 <code class="constant">GL_R32F</code>,
49 <code class="constant">GL_R32I</code>,
50 <code class="constant">GL_R32UI</code>,
51 <code class="constant">GL_R16F</code>,
52 <code class="constant">GL_R16I</code>,
53 <code class="constant">GL_R16UI</code>,
54 <code class="constant">GL_R8</code>,
55 <code class="constant">GL_R8I</code>,
56 <code class="constant">GL_R8UI</code>,
57 <code class="constant">GL_RGBA16_SNORM</code>,
58 <code class="constant">GL_RGBA8_SNORM</code>,
59 <code class="constant">GL_RGB32F</code>,
60 <code class="constant">GL_RGB32I</code>,
61 <code class="constant">GL_RGB32UI</code>,
62 <code class="constant">GL_RGB16_SNORM</code>,
63 <code class="constant">GL_RGB16F</code>,
64 <code class="constant">GL_RGB16I</code>,
65 <code class="constant">GL_RGB16UI</code>,
66 <code class="constant">GL_RGB16</code>,
67 <code class="constant">GL_RGB8_SNORM</code>,
68 <code class="constant">GL_RGB8</code>,
69 <code class="constant">GL_RGB8I</code>,
70 <code class="constant">GL_RGB8UI</code>,
71 <code class="constant">GL_SRGB8</code>,
72 <code class="constant">GL_RGB9_E5</code>,
73 <code class="constant">GL_RG16_SNORM</code>,
74 <code class="constant">GL_RG8_SNORM</code>,
75 <code class="constant">GL_COMPRESSED_RG_RGTC2</code>,
76 <code class="constant">GL_COMPRESSED_SIGNED_RG_RGTC2</code>,
77 <code class="constant">GL_R16_SNORM</code>,
78 <code class="constant">GL_R8_SNORM</code>,
79 <code class="constant">GL_COMPRESSED_RED_RGTC1</code>,
80 <code class="constant">GL_COMPRESSED_SIGNED_RED_RGTC1</code>,
81 <code class="constant">GL_DEPTH_COMPONENT32F</code>,
82 <code class="constant">GL_DEPTH_COMPONENT24</code>,
83 <code class="constant">GL_DEPTH_COMPONENT16</code>,
84 <code class="constant">GL_DEPTH32F_STENCIL8</code>,
85 <code class="constant">GL_DEPTH24_STENCIL8</code>.
86 </p></dd><dt><span class="term"><em class="parameter"><code>width</code></em></span></dt><dd><p>
87 Specifies the width of the texture image.
88 All implementations support 3D texture images that are at least 16 texels
89 wide.
90 </p></dd><dt><span class="term"><em class="parameter"><code>height</code></em></span></dt><dd><p>
91 Specifies the height of the texture image.
92 All implementations support 3D texture images that are at least 256 texels
93 high.
94 </p></dd><dt><span class="term"><em class="parameter"><code>depth</code></em></span></dt><dd><p>
95 Specifies the depth of the texture image, or the number of layers in a texture array.
96 All implementations support 3D texture images that are at least 256 texels
97 deep, and texture arrays that are at least 256 layers deep.
98 </p></dd><dt><span class="term"><em class="parameter"><code>border</code></em></span></dt><dd><p>
99 This value must be 0.
100 </p></dd><dt><span class="term"><em class="parameter"><code>format</code></em></span></dt><dd><p>
101 Specifies the format of the pixel data.
102 The following symbolic values are accepted:
103 <code class="constant">GL_RED</code>,
104 <code class="constant">GL_RG</code>,
105 <code class="constant">GL_RGB</code>,
106 <code class="constant">GL_BGR</code>,
107 <code class="constant">GL_RGBA</code>, and
108 <code class="constant">GL_BGRA</code>.
109 </p></dd><dt><span class="term"><em class="parameter"><code>type</code></em></span></dt><dd><p>
110 Specifies the data type of the pixel data.
111 The following symbolic values are accepted:
112 <code class="constant">GL_UNSIGNED_BYTE</code>,
113 <code class="constant">GL_BYTE</code>,
114 <code class="constant">GL_UNSIGNED_SHORT</code>,
115 <code class="constant">GL_SHORT</code>,
116 <code class="constant">GL_UNSIGNED_INT</code>,
117 <code class="constant">GL_INT</code>,
118 <code class="constant">GL_FLOAT</code>,
119 <code class="constant">GL_UNSIGNED_BYTE_3_3_2</code>,
120 <code class="constant">GL_UNSIGNED_BYTE_2_3_3_REV</code>,
121 <code class="constant">GL_UNSIGNED_SHORT_5_6_5</code>,
122 <code class="constant">GL_UNSIGNED_SHORT_5_6_5_REV</code>,
123 <code class="constant">GL_UNSIGNED_SHORT_4_4_4_4</code>,
124 <code class="constant">GL_UNSIGNED_SHORT_4_4_4_4_REV</code>,
125 <code class="constant">GL_UNSIGNED_SHORT_5_5_5_1</code>,
126 <code class="constant">GL_UNSIGNED_SHORT_1_5_5_5_REV</code>,
127 <code class="constant">GL_UNSIGNED_INT_8_8_8_8</code>,
128 <code class="constant">GL_UNSIGNED_INT_8_8_8_8_REV</code>,
129 <code class="constant">GL_UNSIGNED_INT_10_10_10_2</code>, and
130 <code class="constant">GL_UNSIGNED_INT_2_10_10_10_REV</code>.
131 </p></dd><dt><span class="term"><em class="parameter"><code>data</code></em></span></dt><dd><p>
132 Specifies a pointer to the image data in memory.
133 </p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="description"></a><h2>Description</h2><p>
134 Texturing maps a portion of a specified texture image
135 onto each graphical primitive for which texturing is enabled.
136 To enable and disable three-dimensional texturing, call <a href="glEnable.xml"><span class="citerefentry"><span class="refentrytitle">glEnable</span></span></a>
137 and <a href="glDisable.xml"><span class="citerefentry"><span class="refentrytitle">glDisable</span></span></a> with argument <code class="constant">GL_TEXTURE_3D</code>.
138 </p><p>
139 To define texture images, call <code class="function">glTexImage3D</code>.
140 The arguments describe the parameters of the texture image,
141 such as height,
142 width, depth,
143 width of the border,
144 level-of-detail number
145 (see <a href="glTexParameter.xml"><span class="citerefentry"><span class="refentrytitle">glTexParameter</span></span></a>),
146 and number of color components provided.
147 The last three arguments describe how the image is represented in memory.
148 </p><p>
149 If <em class="parameter"><code>target</code></em> is <code class="constant">GL_PROXY_TEXTURE_3D</code>, no data is read from <em class="parameter"><code>data</code></em>, but
150 all of the texture image state is recalculated, checked for
151 consistency, and checked
152 against the implementation's capabilities. If the implementation cannot
153 handle a texture of the requested texture size, it sets
154 all of the image state to 0,
155 but does not generate an error (see <a href="glGetError.xml"><span class="citerefentry"><span class="refentrytitle">glGetError</span></span></a>). To query for an
156 entire mipmap array, use an image array level greater than or equal to
157 1.
158 </p><p>
159 If <em class="parameter"><code>target</code></em> is <code class="constant">GL_TEXTURE_3D</code>,
160 data is read from <em class="parameter"><code>data</code></em> as a sequence of signed or unsigned bytes,
161 shorts,
162 or longs,
163 or single-precision floating-point values,
164 depending on <em class="parameter"><code>type</code></em>.
165 These values are grouped into sets of one,
166 two,
167 three,
168 or four values,
169 depending on <em class="parameter"><code>format</code></em>,
170 to form elements.
171 Each data byte is treated as eight 1-bit elements,
172 with bit ordering determined by <code class="constant">GL_UNPACK_LSB_FIRST</code>
173 (see <a href="glPixelStore.xml"><span class="citerefentry"><span class="refentrytitle">glPixelStore</span></span></a>).
174 </p><p>
175 If a non-zero named buffer object is bound to the <code class="constant">GL_PIXEL_UNPACK_BUFFER</code> target
176 (see <a href="glBindBuffer.xml"><span class="citerefentry"><span class="refentrytitle">glBindBuffer</span></span></a>) while a texture image is
177 specified, <em class="parameter"><code>data</code></em> is treated as a byte offset into the buffer object's data store.
178 </p><p>
179 The first element corresponds to the lower left corner of the texture
180 image.
181 Subsequent elements progress left-to-right through the remaining texels
182 in the lowest row of the texture image, and then in successively higher
183 rows of the texture image.
184 The final element corresponds to the upper right corner of the texture
185 image.
186 </p><p>
187 <em class="parameter"><code>format</code></em> determines the composition of each element in <em class="parameter"><code>data</code></em>.
188 It can assume one of these symbolic values:
189 </p><div class="variablelist"><dl><dt><span class="term"><code class="constant">GL_RED</code></span></dt><dd><p>
190 Each element is a single red component.
191 The GL converts it to floating point and assembles it into an RGBA element
192 by attaching 0 for green and blue, and 1 for alpha.
193 Each component is clamped to the range [0,1].
194 </p></dd><dt><span class="term"><code class="constant">GL_RG</code></span></dt><dd><p>
195 Each element is a red and green pair.
196 The GL converts each to floating point and assembles it into an RGBA element
197 by attaching 0 for blue, and 1 for alpha.
198 Each component is clamped to the range [0,1].
199 </p></dd><dt><span class="term"><code class="constant">GL_RGB</code></span></dt><dd></dd><dt><span class="term"><code class="constant">GL_BGR</code></span></dt><dd><p>
200 Each element is an RGB triple.
201 The GL converts it to floating point and assembles it into an RGBA element
202 by attaching 1 for alpha.
203 Each component is clamped to the range [0,1].
204 </p></dd><dt><span class="term"><code class="constant">GL_RGBA</code></span></dt><dd></dd><dt><span class="term"><code class="constant">GL_BGRA</code></span></dt><dd><p>
205 Each element contains all four components.
206 Each component is clamped to the range [0,1].
207 </p></dd></dl></div><p>
208 If an application wants to store the texture at a certain
209 resolution or in a certain format, it can request the resolution
210 and format with <em class="parameter"><code>internalFormat</code></em>. The GL will choose an internal
211 representation that closely approximates that requested by <em class="parameter"><code>internalFormat</code></em>, but
212 it may not match exactly.
213 (The representations specified by <code class="constant">GL_RED</code>, <code class="constant">GL_RG</code>, <code class="constant">GL_RGB</code>,
214 and <code class="constant">GL_RGBA</code> must match exactly.)
215 </p><p>
216 If the <em class="parameter"><code>internalFormat</code></em> parameter is one of the generic compressed formats,
217 <code class="constant">GL_COMPRESSED_RED</code>, <code class="constant">GL_COMPRESSED_RG</code>,
218 <code class="constant">GL_COMPRESSED_RGB</code>, or
219 <code class="constant">GL_COMPRESSED_RGBA</code>, the GL will replace the internal format with the symbolic constant for a specific internal format and compress the texture before storage. If no corresponding internal format is available, or the GL can not compress that image for any reason, the internal format is instead replaced with a corresponding base internal format.
220 </p><p>
221 If the <em class="parameter"><code>internalFormat</code></em> parameter is
222 <code class="constant">GL_SRGB</code>,
223 <code class="constant">GL_SRGB8</code>,
224 <code class="constant">GL_SRGB_ALPHA</code>, or
225 <code class="constant">GL_SRGB8_ALPHA8</code>, the texture is treated as if the red, green, blue, or luminance components are encoded in the sRGB color space. Any alpha component is left unchanged. The conversion from the sRGB encoded component
226 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
227 <mml:msub><mml:mi mathvariant="italic">c</mml:mi>
228 <mml:mi mathvariant="italic">s</mml:mi>
229 </mml:msub>
230 </mml:math>
231 to a linear component
232 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
233 <mml:msub><mml:mi mathvariant="italic">c</mml:mi>
234 <mml:mi mathvariant="italic">l</mml:mi>
235 </mml:msub>
236 </mml:math>
237 is:
238 </p><p>
239 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
240 <mml:mrow>
241 <mml:msub>
242 <mml:mi mathvariant="italic">c</mml:mi>
243 <mml:mi mathvariant="italic">l</mml:mi>
244 </mml:msub>
245 <mml:mo>=</mml:mo>
246 <mml:mrow>
247 <mml:mo>{</mml:mo>
248
249 <mml:mtable columnalign="left">
250 <mml:mtr>
251 <mml:mtd columnalign="left">
252 <mml:mfrac>
253 <mml:msub>
254 <mml:mi mathvariant="italic">c</mml:mi>
255 <mml:mi mathvariant="italic">s</mml:mi>
256 </mml:msub>
257 <mml:mn>12.92</mml:mn>
258 </mml:mfrac>
259 </mml:mtd>
260 <mml:mtd columnalign="left">
261 <mml:mrow>
262 <mml:mspace width="1ex"></mml:mspace>
263 <mml:mo>if</mml:mo>
264 <mml:mspace width="1ex"></mml:mspace>
265 </mml:mrow>
266 <mml:msub>
267 <mml:mi mathvariant="italic">c</mml:mi>
268 <mml:mi mathvariant="italic">s</mml:mi>
269 </mml:msub>
270 <mml:mo></mml:mo>
271 <mml:mn>0.04045</mml:mn>
272 </mml:mtd>
273 </mml:mtr>
274 <mml:mtr>
275 <mml:mtd columnalign="left">
276 <mml:msup>
277 <mml:mrow>
278 <mml:mo>(</mml:mo>
279 <mml:mfrac>
280 <mml:mrow>
281 <mml:msub>
282 <mml:mi>c</mml:mi>
283 <mml:mi>s</mml:mi>
284 </mml:msub>
285 <mml:mo>+</mml:mo>
286 <mml:mn>0.055</mml:mn>
287 </mml:mrow>
288 <mml:mn>1.055</mml:mn>
289 </mml:mfrac>
290 <mml:mo>)</mml:mo>
291 </mml:mrow>
292 <mml:mn>2.4</mml:mn>
293 </mml:msup>
294 </mml:mtd>
295 <mml:mtd columnalign="left">
296 <mml:mrow>
297 <mml:mspace width="1ex"></mml:mspace>
298 <mml:mo>if</mml:mo>
299 <mml:mspace width="1ex"></mml:mspace>
300 </mml:mrow>
301 <mml:msub>
302 <mml:mi mathvariant="italic">c</mml:mi>
303 <mml:mi mathvariant="italic">s</mml:mi>
304 </mml:msub>
305 <mml:mo>&gt;</mml:mo>
306 <mml:mn>0.04045</mml:mn>
307 </mml:mtd>
308 </mml:mtr>
309 </mml:mtable>
310 </mml:mrow>
311 </mml:mrow>
312 </mml:math>
313 </p><p>
314 Assume
315 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
316 <mml:msub><mml:mi mathvariant="italic">c</mml:mi>
317 <mml:mi mathvariant="italic">s</mml:mi>
318 </mml:msub>
319 </mml:math>
320 is the sRGB component in the range [0,1].
321 </p><p>
322 Use the <code class="constant">GL_PROXY_TEXTURE_3D</code> target to try out a resolution and
323 format. The implementation will
324 update and recompute its best match for the requested storage resolution
325 and format. To then query this state, call <a href="glGetTexLevelParameter.xml"><span class="citerefentry"><span class="refentrytitle">glGetTexLevelParameter</span></span></a>.
326 If the texture cannot be accommodated, texture state is set to 0.
327 </p><p>
328 A one-component texture image uses only the red component of the RGBA
329 color extracted from <em class="parameter"><code>data</code></em>.
330 A two-component image uses the R and A values.
331 A three-component image uses the R, G, and B values.
332 A four-component image uses all of the RGBA components.
333 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="notes"></a><h2>Notes</h2><p>
334 The <a href="glPixelStore.xml"><span class="citerefentry"><span class="refentrytitle">glPixelStore</span></span></a> mode affects texture images.
335 </p><p>
336 <em class="parameter"><code>data</code></em> may be a null pointer.
337 In this case texture memory is
338 allocated to accommodate a texture of width <em class="parameter"><code>width</code></em>, height <em class="parameter"><code>height</code></em>,
339 and depth <em class="parameter"><code>depth</code></em>.
340 You can then download subtextures to initialize this
341 texture memory.
342 The image is undefined if the user tries to apply
343 an uninitialized portion of the texture image to a primitive.
344 </p><p>
345 <code class="function">glTexImage3D</code> specifies the three-dimensional texture for the current texture unit,
346 specified with <a href="glActiveTexture.xml"><span class="citerefentry"><span class="refentrytitle">glActiveTexture</span></span></a>.
347 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="errors"></a><h2>Errors</h2><p>
348 <code class="constant">GL_INVALID_ENUM</code> is generated if <em class="parameter"><code>target</code></em> is not <code class="constant">GL_TEXTURE_3D</code>
349 or <code class="constant">GL_PROXY_TEXTURE_3D</code>.
350 </p><p>
351 <code class="constant">GL_INVALID_ENUM</code> is generated if <em class="parameter"><code>format</code></em> is not an accepted
352 format constant. Format constants other than <code class="constant">GL_STENCIL_INDEX</code> and <code class="constant">GL_DEPTH_COMPONENT</code>
353 are accepted.
354 </p><p>
355 <code class="constant">GL_INVALID_ENUM</code> is generated if <em class="parameter"><code>type</code></em> is not a type constant.
356 </p><p>
357 <code class="constant">GL_INVALID_VALUE</code> is generated if <em class="parameter"><code>level</code></em> is less than 0.
358 </p><p>
359 <code class="constant">GL_INVALID_VALUE</code> may be generated if <em class="parameter"><code>level</code></em> is greater than
360 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
361
362 <mml:mrow>
363 <mml:msub><mml:mi mathvariant="italic">log</mml:mi>
364 <mml:mn>2</mml:mn>
365 </mml:msub>
366 <mml:mo></mml:mo>
367 <mml:mfenced open="(" close=")">
368 <mml:mi mathvariant="italic">max</mml:mi>
369 </mml:mfenced>
370 </mml:mrow>
371 </mml:math>,
372 where <span class="emphasis"><em>max</em></span> is the returned value of <code class="constant">GL_MAX_TEXTURE_SIZE</code>.
373 </p><p>
374 <code class="constant">GL_INVALID_VALUE</code> is generated if <em class="parameter"><code>internalFormat</code></em> is not one of the
375 accepted resolution and format symbolic constants.
376 </p><p>
377 <code class="constant">GL_INVALID_VALUE</code> is generated if <em class="parameter"><code>width</code></em>, <em class="parameter"><code>height</code></em>, or <em class="parameter"><code>depth</code></em> is less than 0 or greater than <code class="constant">GL_MAX_TEXTURE_SIZE</code>.
378 </p><p>
379 <code class="constant">GL_INVALID_VALUE</code> is generated if non-power-of-two textures are not supported and the <em class="parameter"><code>width</code></em>, <em class="parameter"><code>height</code></em>, or <em class="parameter"><code>depth</code></em> cannot be represented as
380 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
381
382 <mml:mrow>
383 <mml:msup><mml:mn>2</mml:mn>
384 <mml:mi mathvariant="italic">k</mml:mi>
385 </mml:msup>
386 <mml:mo>+</mml:mo>
387 <mml:mrow>
388 <mml:mn>2</mml:mn>
389 <mml:mo></mml:mo>
390 <mml:mfenced open="(" close=")">
391 <mml:mi mathvariant="italic">border</mml:mi>
392 </mml:mfenced>
393 </mml:mrow>
394 </mml:mrow>
395 </mml:math>
396 for some
397 integer value of <span class="emphasis"><em>k</em></span>.
398 </p><p>
399 <code class="constant">GL_INVALID_VALUE</code> is generated if <em class="parameter"><code>border</code></em> is not 0 or 1.
400 </p><p>
401 <code class="constant">GL_INVALID_OPERATION</code> is generated if <em class="parameter"><code>type</code></em> is one of
402 <code class="constant">GL_UNSIGNED_BYTE_3_3_2</code>,
403 <code class="constant">GL_UNSIGNED_BYTE_2_3_3_REV</code>,
404 <code class="constant">GL_UNSIGNED_SHORT_5_6_5</code>, or
405 <code class="constant">GL_UNSIGNED_SHORT_5_6_5_REV</code>
406 and <em class="parameter"><code>format</code></em> is not <code class="constant">GL_RGB</code>.
407 </p><p>
408 <code class="constant">GL_INVALID_OPERATION</code> is generated if <em class="parameter"><code>type</code></em> is one of
409 <code class="constant">GL_UNSIGNED_SHORT_4_4_4_4</code>,
410 <code class="constant">GL_UNSIGNED_SHORT_4_4_4_4_REV</code>,
411 <code class="constant">GL_UNSIGNED_SHORT_5_5_5_1</code>,
412 <code class="constant">GL_UNSIGNED_SHORT_1_5_5_5_REV</code>,
413 <code class="constant">GL_UNSIGNED_INT_8_8_8_8</code>,
414 <code class="constant">GL_UNSIGNED_INT_8_8_8_8_REV</code>,
415 <code class="constant">GL_UNSIGNED_INT_10_10_10_2</code>, or
416 <code class="constant">GL_UNSIGNED_INT_2_10_10_10_REV</code>
417 and <em class="parameter"><code>format</code></em> is neither <code class="constant">GL_RGBA</code> nor <code class="constant">GL_BGRA</code>.
418 </p><p>
419 <code class="constant">GL_INVALID_OPERATION</code> is generated if <em class="parameter"><code>format</code></em> or <em class="parameter"><code>internalFormat</code></em> is
420 <code class="constant">GL_DEPTH_COMPONENT</code>, <code class="constant">GL_DEPTH_COMPONENT16</code>,
421 <code class="constant">GL_DEPTH_COMPONENT24</code>, or <code class="constant">GL_DEPTH_COMPONENT32</code>.
422 </p><p>
423 <code class="constant">GL_INVALID_OPERATION</code> is generated if a non-zero buffer object name is bound to the
424 <code class="constant">GL_PIXEL_UNPACK_BUFFER</code> target and the buffer object's data store is currently mapped.
425 </p><p>
426 <code class="constant">GL_INVALID_OPERATION</code> is generated if a non-zero buffer object name is bound to the
427 <code class="constant">GL_PIXEL_UNPACK_BUFFER</code> target and the data would be unpacked from the buffer
428 object such that the memory reads required would exceed the data store size.
429 </p><p>
430 <code class="constant">GL_INVALID_OPERATION</code> is generated if a non-zero buffer object name is bound to the
431 <code class="constant">GL_PIXEL_UNPACK_BUFFER</code> target and <em class="parameter"><code>data</code></em> is not evenly divisible
432 into the number of bytes needed to store in memory a datum indicated by <em class="parameter"><code>type</code></em>.
433 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="associatedgets"></a><h2>Associated Gets</h2><p>
434 <a href="glGetTexImage.xml"><span class="citerefentry"><span class="refentrytitle">glGetTexImage</span></span></a>
435 </p><p>
436 <a href="glGet.xml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with argument <code class="constant">GL_PIXEL_UNPACK_BUFFER_BINDING</code>
437 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p>
438 <a href="glActiveTexture.xml"><span class="citerefentry"><span class="refentrytitle">glActiveTexture</span></span></a>,
439 <a href="glCompressedTexImage1D.xml"><span class="citerefentry"><span class="refentrytitle">glCompressedTexImage1D</span></span></a>,
440 <a href="glCompressedTexImage2D.xml"><span class="citerefentry"><span class="refentrytitle">glCompressedTexImage2D</span></span></a>,
441 <a href="glCompressedTexImage3D.xml"><span class="citerefentry"><span class="refentrytitle">glCompressedTexImage3D</span></span></a>,
442 <a href="glCompressedTexSubImage1D.xml"><span class="citerefentry"><span class="refentrytitle">glCompressedTexSubImage1D</span></span></a>,
443 <a href="glCompressedTexSubImage2D.xml"><span class="citerefentry"><span class="refentrytitle">glCompressedTexSubImage2D</span></span></a>,
444 <a href="glCompressedTexSubImage3D.xml"><span class="citerefentry"><span class="refentrytitle">glCompressedTexSubImage3D</span></span></a>,
445 <a href="glCopyTexImage1D.xml"><span class="citerefentry"><span class="refentrytitle">glCopyTexImage1D</span></span></a>,
446 <a href="glCopyTexImage2D.xml"><span class="citerefentry"><span class="refentrytitle">glCopyTexImage2D</span></span></a>,
447 <a href="glCopyTexSubImage1D.xml"><span class="citerefentry"><span class="refentrytitle">glCopyTexSubImage1D</span></span></a>,
448 <a href="glCopyTexSubImage2D.xml"><span class="citerefentry"><span class="refentrytitle">glCopyTexSubImage2D</span></span></a>,
449 <a href="glCopyTexSubImage3D.xml"><span class="citerefentry"><span class="refentrytitle">glCopyTexSubImage3D</span></span></a>,
450 <a href="glGetCompressedTexImage.xml"><span class="citerefentry"><span class="refentrytitle">glGetCompressedTexImage</span></span></a>,
451 <a href="glPixelStore.xml"><span class="citerefentry"><span class="refentrytitle">glPixelStore</span></span></a>,
452 <a href="glTexImage1D.xml"><span class="citerefentry"><span class="refentrytitle">glTexImage1D</span></span></a>,
453 <a href="glTexImage2D.xml"><span class="citerefentry"><span class="refentrytitle">glTexImage2D</span></span></a>,
454 <a href="glTexSubImage1D.xml"><span class="citerefentry"><span class="refentrytitle">glTexSubImage1D</span></span></a>,
455 <a href="glTexSubImage2D.xml"><span class="citerefentry"><span class="refentrytitle">glTexSubImage2D</span></span></a>,
456 <a href="glTexSubImage3D.xml"><span class="citerefentry"><span class="refentrytitle">glTexSubImage3D</span></span></a>,
457 <a href="glTexParameter.xml"><span class="citerefentry"><span class="refentrytitle">glTexParameter</span></span></a>
458 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="Copyright"></a><h2>Copyright</h2><p>
459 Copyright <span class="trademark"></span>© 1991-2006
460 Silicon Graphics, Inc. This document is licensed under the SGI
461 Free Software B License. For details, see
462 <a href="http://oss.sgi.com/projects/FreeB/" target="_top">http://oss.sgi.com/projects/FreeB/</a>.
463 </p></div></div></body></html>