update upstream sources
[clinton/guile-figl.git] / upstream-doc / man3 / glTexImage1D.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="glTexImage1D">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>1991-2006</year>
9 <holder>Silicon Graphics, Inc.</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>glTexImage1D</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>glTexImage1D</refname>
17 <refpurpose>specify a one-dimensional texture image</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>C Specification</title>
20 <funcsynopsis>
21 <funcprototype>
22 <funcdef>void <function>glTexImage1D</function></funcdef>
23 <paramdef>GLenum <parameter>target</parameter></paramdef>
24 <paramdef>GLint <parameter>level</parameter></paramdef>
25 <paramdef>GLint <parameter>internalFormat</parameter></paramdef>
26 <paramdef>GLsizei <parameter>width</parameter></paramdef>
27 <paramdef>GLint <parameter>border</parameter></paramdef>
28 <paramdef>GLenum <parameter>format</parameter></paramdef>
29 <paramdef>GLenum <parameter>type</parameter></paramdef>
30 <paramdef>const GLvoid * <parameter>data</parameter></paramdef>
31 </funcprototype>
32 </funcsynopsis>
33 </refsynopsisdiv>
34 <!-- eqn: ignoring delim $$ -->
35 <para>
36 </para>
37 <refsect1 id="parameters"><title>Parameters</title>
38 <variablelist>
39 <varlistentry>
40 <term><parameter>target</parameter></term>
41 <listitem>
42 <para>
43 Specifies the target texture.
44 Must be <constant>GL_TEXTURE_1D</constant> or <constant>GL_PROXY_TEXTURE_1D</constant>.
45 </para>
46 </listitem>
47 </varlistentry>
48 <varlistentry>
49 <term><parameter>level</parameter></term>
50 <listitem>
51 <para>
52 Specifies the level-of-detail number.
53 Level 0 is the base image level.
54 Level <emphasis>n</emphasis> is the <emphasis>n</emphasis>th mipmap reduction image.
55 </para>
56 </listitem>
57 </varlistentry>
58 <varlistentry>
59 <term><parameter>internalFormat</parameter></term>
60 <listitem>
61 <para>
62 Specifies the number of color components in the texture.
63 Must be one of the following symbolic constants:
64 <constant>GL_COMPRESSED_RED</constant>,
65 <constant>GL_COMPRESSED_RG</constant>,
66 <constant>GL_COMPRESSED_RGB</constant>,
67 <constant>GL_COMPRESSED_RGBA</constant>,
68 <constant>GL_COMPRESSED_SRGB</constant>,
69 <constant>GL_COMPRESSED_SRGB_ALPHA</constant>,
70 <constant>GL_DEPTH_COMPONENT</constant>,
71 <constant>GL_DEPTH_COMPONENT16</constant>,
72 <constant>GL_DEPTH_COMPONENT24</constant>,
73 <constant>GL_DEPTH_COMPONENT32</constant>,
74 <constant>GL_R3_G3_B2</constant>,
75 <constant>GL_RED</constant>,
76 <constant>GL_RG</constant>,
77 <constant>GL_RGB</constant>,
78 <constant>GL_RGB4</constant>,
79 <constant>GL_RGB5</constant>,
80 <constant>GL_RGB8</constant>,
81 <constant>GL_RGB10</constant>,
82 <constant>GL_RGB12</constant>,
83 <constant>GL_RGB16</constant>,
84 <constant>GL_RGBA</constant>,
85 <constant>GL_RGBA2</constant>,
86 <constant>GL_RGBA4</constant>,
87 <constant>GL_RGB5_A1</constant>,
88 <constant>GL_RGBA8</constant>,
89 <constant>GL_RGB10_A2</constant>,
90 <constant>GL_RGBA12</constant>,
91 <constant>GL_RGBA16</constant>,
92 <constant>GL_SRGB</constant>,
93 <constant>GL_SRGB8</constant>,
94 <constant>GL_SRGB_ALPHA</constant>, or
95 <constant>GL_SRGB8_ALPHA8</constant>.
96 </para>
97 </listitem>
98 </varlistentry>
99 <varlistentry>
100 <term><parameter>width</parameter></term>
101 <listitem>
102 <para>
103 Specifies the width of the texture image.
104 All implementations support texture images that are at least 1024 texels
105 wide. The height of the 1D texture image is 1.
106 </para>
107 </listitem>
108 </varlistentry>
109 <varlistentry>
110 <term><parameter>border</parameter></term>
111 <listitem>
112 <para>
113 This value must be 0.
114 </para>
115 </listitem>
116 </varlistentry>
117 <varlistentry>
118 <term><parameter>format</parameter></term>
119 <listitem>
120 <para>
121 Specifies the format of the pixel data.
122 The following symbolic values are accepted:
123 <constant>GL_RED</constant>,
124 <constant>GL_RG</constant>,
125 <constant>GL_RGB</constant>,
126 <constant>GL_BGR</constant>,
127 <constant>GL_RGBA</constant>, and
128 <constant>GL_BGRA</constant>.
129 </para>
130 </listitem>
131 </varlistentry>
132 <varlistentry>
133 <term><parameter>type</parameter></term>
134 <listitem>
135 <para>
136 Specifies the data type of the pixel data.
137 The following symbolic values are accepted:
138 <constant>GL_UNSIGNED_BYTE</constant>,
139 <constant>GL_BYTE</constant>,
140 <constant>GL_UNSIGNED_SHORT</constant>,
141 <constant>GL_SHORT</constant>,
142 <constant>GL_UNSIGNED_INT</constant>,
143 <constant>GL_INT</constant>,
144 <constant>GL_FLOAT</constant>,
145 <constant>GL_UNSIGNED_BYTE_3_3_2</constant>,
146 <constant>GL_UNSIGNED_BYTE_2_3_3_REV</constant>,
147 <constant>GL_UNSIGNED_SHORT_5_6_5</constant>,
148 <constant>GL_UNSIGNED_SHORT_5_6_5_REV</constant>,
149 <constant>GL_UNSIGNED_SHORT_4_4_4_4</constant>,
150 <constant>GL_UNSIGNED_SHORT_4_4_4_4_REV</constant>,
151 <constant>GL_UNSIGNED_SHORT_5_5_5_1</constant>,
152 <constant>GL_UNSIGNED_SHORT_1_5_5_5_REV</constant>,
153 <constant>GL_UNSIGNED_INT_8_8_8_8</constant>,
154 <constant>GL_UNSIGNED_INT_8_8_8_8_REV</constant>,
155 <constant>GL_UNSIGNED_INT_10_10_10_2</constant>, and
156 <constant>GL_UNSIGNED_INT_2_10_10_10_REV</constant>.
157 </para>
158 </listitem>
159 </varlistentry>
160 <varlistentry>
161 <term><parameter>data</parameter></term>
162 <listitem>
163 <para>
164 Specifies a pointer to the image data in memory.
165 </para>
166 </listitem>
167 </varlistentry>
168 </variablelist>
169 </refsect1>
170 <refsect1 id="description"><title>Description</title>
171 <para>
172 Texturing maps a portion of a specified texture image
173 onto each graphical primitive for which texturing is enabled.
174 To enable and disable one-dimensional texturing, call <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry>
175 and <citerefentry><refentrytitle>glDisable</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_1D</constant>.
176 </para>
177 <para>
178 Texture images are defined with <function>glTexImage1D</function>.
179 The arguments describe the parameters of the texture image,
180 such as width,
181 width of the border,
182 level-of-detail number
183 (see <citerefentry><refentrytitle>glTexParameter</refentrytitle></citerefentry>),
184 and the internal resolution and format used to store the image.
185 The last three arguments describe how the image is represented in
186 memory.
187 </para>
188 <para>
189 If <parameter>target</parameter> is <constant>GL_PROXY_TEXTURE_1D</constant>, no data is read from <parameter>data</parameter>, but
190 all of the texture image state is recalculated, checked for
191 consistency, and checked against the implementation's capabilities.
192 If the implementation cannot handle a texture of the
193 requested texture size, it sets all of the image state to 0,
194 but does not generate an error (see <citerefentry><refentrytitle>glGetError</refentrytitle></citerefentry>). To query for an
195 entire mipmap array, use an image array level greater than or equal to
196 1.
197 </para>
198 <para>
199 If <parameter>target</parameter> is <constant>GL_TEXTURE_1D</constant>,
200 data is read from <parameter>data</parameter> as a sequence of signed or unsigned bytes,
201 shorts,
202 or longs,
203 or single-precision floating-point values,
204 depending on <parameter>type</parameter>.
205 These values are grouped into sets of one,
206 two,
207 three,
208 or four values,
209 depending on <parameter>format</parameter>,
210 to form elements.
211 Each data byte is treated as eight 1-bit elements,
212 with bit ordering determined by <constant>GL_UNPACK_LSB_FIRST</constant>
213 (see <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry>).
214 </para>
215 <para>
216 If a non-zero named buffer object is bound to the <constant>GL_PIXEL_UNPACK_BUFFER</constant> target
217 (see <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>) while a texture image is
218 specified, <parameter>data</parameter> is treated as a byte offset into the buffer object's data store.
219 </para>
220 <para>
221 The first element corresponds to the left end of the texture array.
222 Subsequent elements progress left-to-right through the remaining texels
223 in the texture array.
224 The final element corresponds to the right end of the texture array.
225 </para>
226 <para>
227 <parameter>format</parameter> determines the composition of each element in <parameter>data</parameter>.
228 It can assume one of these symbolic values:
229 </para>
230 <variablelist>
231 <varlistentry>
232 <term><constant>GL_RED</constant></term>
233 <listitem>
234 <para>
235 Each element is a single red component.
236 The GL converts it to floating point and assembles it into an RGBA element
237 by attaching 0 for green and blue, and 1 for alpha.
c7b31271 238 Each component is clamped to the range [0,1].
7faf1d71
AW
239 </para>
240 </listitem>
241 </varlistentry>
242 <varlistentry>
243 <term><constant>GL_RG</constant></term>
244 <listitem>
245 <para>
246 Each element is a single red/green double
247 The GL converts it to floating point and assembles it into an RGBA element
248 by attaching 0 for blue, and 1 for alpha.
c7b31271 249 Each component is clamped to the range [0,1].
7faf1d71
AW
250 </para>
251 </listitem>
252 </varlistentry>
253 <varlistentry>
254 <term><constant>GL_RGB</constant></term>
255 <listitem>
256 </listitem>
257 </varlistentry>
258 <varlistentry>
259 <term><constant>GL_BGR</constant></term>
260 <listitem>
261 <para>
262 Each element is an RGB triple.
263 The GL converts it to floating point and assembles it into an RGBA element
264 by attaching 1 for alpha.
c7b31271 265 Each component is clamped to the range [0,1].
7faf1d71
AW
266 </para>
267 </listitem>
268 </varlistentry>
269 <varlistentry>
270 <term><constant>GL_RGBA</constant></term>
271 <listitem>
272 </listitem>
273 </varlistentry>
274 <varlistentry>
275 <term><constant>GL_BGRA</constant></term>
276 <listitem>
277 <para>
278 Each element contains all four components.
c7b31271 279 Each component is clamped to the range [0,1].
7faf1d71
AW
280 </para>
281 </listitem>
282 </varlistentry>
283 <varlistentry>
284 <term><constant>GL_DEPTH_COMPONENT</constant></term>
285 <listitem>
286 <para>
287 Each element is a single depth value.
c7b31271 288 The GL converts it to floating point
7faf1d71
AW
289 and clamps to the range [0,1].
290 </para>
291 </listitem>
292 </varlistentry>
293 </variablelist>
294 <para>
295 If an application wants to store the texture at a certain
296 resolution or in a certain format, it can request the resolution
297 and format with <parameter>internalFormat</parameter>. The GL will choose an internal
298 representation that closely approximates that requested by <parameter>internalFormat</parameter>, but
299 it may not match exactly.
300 (The representations specified by <constant>GL_RED</constant>, <constant>GL_RG</constant>,
301 <constant>GL_RGB</constant> and <constant>GL_RGBA</constant> must match exactly.)
302 </para>
303 <para>
304 If the <parameter>internalFormat</parameter> parameter is one of the generic compressed formats,
305 <constant>GL_COMPRESSED_RED</constant>, <constant>GL_COMPRESSED_RG</constant>,
306 <constant>GL_COMPRESSED_RGB</constant>, or
307 <constant>GL_COMPRESSED_RGBA</constant>, 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.
308 </para>
309 <para>
310 If the <parameter>internalFormat</parameter> parameter is
311 <constant>GL_SRGB</constant>,
312 <constant>GL_SRGB8</constant>,
313 <constant>GL_SRGB_ALPHA</constant>or
314 <constant>GL_SRGB8_ALPHA8</constant>, the texture is treated as if the red, green, or blue components are encoded in the sRGB color space. Any alpha component is left unchanged. The conversion from the sRGB encoded component
315 <inlineequation><mml:math>
316 <mml:msub><mml:mi mathvariant="italic">c</mml:mi>
317 <mml:mi mathvariant="italic">s</mml:mi>
318 </mml:msub>
319 </mml:math></inlineequation>
320 to a linear component
321 <inlineequation><mml:math>
322 <mml:msub><mml:mi mathvariant="italic">c</mml:mi>
323 <mml:mi mathvariant="italic">l</mml:mi>
324 </mml:msub>
325 </mml:math></inlineequation>
326 is:
327 </para>
328 <para>
329 <inlineequation><mml:math>
330 <mml:mrow>
331 <mml:msub>
332 <mml:mi mathvariant="italic">c</mml:mi>
333 <mml:mi mathvariant="italic">l</mml:mi>
334 </mml:msub>
335 <mml:mo>=</mml:mo>
336 <mml:mrow>
337 <mml:mo>{</mml:mo>
338
339 <mml:mtable columnalign="left">
340 <mml:mtr>
341 <mml:mtd columnalign="left">
342 <mml:mfrac>
343 <mml:msub>
344 <mml:mi mathvariant="italic">c</mml:mi>
345 <mml:mi mathvariant="italic">s</mml:mi>
346 </mml:msub>
347 <mml:mn>12.92</mml:mn>
348 </mml:mfrac>
349 </mml:mtd>
350 <mml:mtd columnalign="left">
351 <mml:mrow>
352 <mml:mspace width="1ex"/>
353 <mml:mo>if</mml:mo>
354 <mml:mspace width="1ex"/>
355 </mml:mrow>
356 <mml:msub>
357 <mml:mi mathvariant="italic">c</mml:mi>
358 <mml:mi mathvariant="italic">s</mml:mi>
359 </mml:msub>
360 <mml:mo>&le;</mml:mo>
361 <mml:mn>0.04045</mml:mn>
362 </mml:mtd>
363 </mml:mtr>
364 <mml:mtr>
365 <mml:mtd columnalign="left">
366 <mml:msup>
367 <mml:mrow>
368 <mml:mo>(</mml:mo>
369 <mml:mfrac>
370 <mml:mrow>
371 <mml:msub>
372 <mml:mi>c</mml:mi>
373 <mml:mi>s</mml:mi>
374 </mml:msub>
375 <mml:mo>+</mml:mo>
376 <mml:mn>0.055</mml:mn>
377 </mml:mrow>
378 <mml:mn>1.055</mml:mn>
379 </mml:mfrac>
380 <mml:mo>)</mml:mo>
381 </mml:mrow>
382 <mml:mn>2.4</mml:mn>
383 </mml:msup>
384 </mml:mtd>
385 <mml:mtd columnalign="left">
386 <mml:mrow>
387 <mml:mspace width="1ex"/>
388 <mml:mo>if</mml:mo>
389 <mml:mspace width="1ex"/>
390 </mml:mrow>
391 <mml:msub>
392 <mml:mi mathvariant="italic">c</mml:mi>
393 <mml:mi mathvariant="italic">s</mml:mi>
394 </mml:msub>
395 <mml:mo>&gt;</mml:mo>
396 <mml:mn>0.04045</mml:mn>
397 </mml:mtd>
398 </mml:mtr>
399 </mml:mtable>
400 </mml:mrow>
401 </mml:mrow>
402 </mml:math>
403 </inlineequation>
404 </para>
405 <para>
406 Assume
407 <inlineequation><mml:math>
408 <mml:msub><mml:mi mathvariant="italic">c</mml:mi>
409 <mml:mi mathvariant="italic">s</mml:mi>
410 </mml:msub>
411 </mml:math></inlineequation>
412 is the sRGB component in the range [0,1].
413 </para>
414 <para>
415 Use the <constant>GL_PROXY_TEXTURE_1D</constant> target to try out a resolution and
416 format. The implementation will
417 update and recompute its best match for the requested storage resolution
418 and format. To then query this state, call <citerefentry><refentrytitle>glGetTexLevelParameter</refentrytitle></citerefentry>.
419 If the texture cannot be accommodated, texture state is set to 0.
420 </para>
421 <para>
422 A one-component texture image uses only the red component of the RGBA
423 color from <parameter>data</parameter>.
424 A two-component image uses the R and A values.
425 A three-component image uses the R, G, and B values.
426 A four-component image uses all of the RGBA components.
427 </para>
428 <para>
429 Image-based shadowing can be enabled by comparing texture r coordinates to depth texture values to generate a boolean result. See <citerefentry><refentrytitle>glTexParameter</refentrytitle></citerefentry> for details on texture comparison.
430 </para>
431 </refsect1>
432 <refsect1 id="notes"><title>Notes</title>
433 <para>
434 <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry> modes affect texture images.
435 </para>
436 <para>
437 <parameter>data</parameter> may be a null pointer. In this case texture memory is
438 allocated to accommodate a texture of width <parameter>width</parameter>.
439 You can then download subtextures to initialize the
440 texture memory. The image is undefined if the program tries to apply
441 an uninitialized portion of the texture image to a primitive.
442 </para>
443 <para>
444 <function>glTexImage1D</function> specifies the one-dimensional texture for the current texture unit,
445 specified with <citerefentry><refentrytitle>glActiveTexture</refentrytitle></citerefentry>.
446 </para>
447 </refsect1>
448 <refsect1 id="errors"><title>Errors</title>
449 <para>
450 <constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> is not <constant>GL_TEXTURE_1D</constant>
451 or <constant>GL_PROXY_TEXTURE_1D</constant>.
452 </para>
453 <para>
454 <constant>GL_INVALID_ENUM</constant> is generated if <parameter>format</parameter> is not an accepted
455 format constant. Format constants other than <constant>GL_STENCIL_INDEX</constant>
456 are accepted.
457 </para>
458 <para>
459 <constant>GL_INVALID_ENUM</constant> is generated if <parameter>type</parameter> is not a type constant.
460 </para>
461 <para>
462 <constant>GL_INVALID_VALUE</constant> is generated if <parameter>level</parameter> is less than 0.
463 </para>
464 <para>
465 <constant>GL_INVALID_VALUE</constant> may be generated if <parameter>level</parameter> is greater than
466 <inlineequation><mml:math>
467 <!-- eqn: log sub 2 (max): -->
468 <mml:mrow>
469 <mml:msub><mml:mi mathvariant="italic">log</mml:mi>
470 <mml:mn>2</mml:mn>
471 </mml:msub>
472 <mml:mo>&af;</mml:mo>
473 <mml:mfenced open="(" close=")">
474 <mml:mi mathvariant="italic">max</mml:mi>
475 </mml:mfenced>
476 </mml:mrow>
477 </mml:math></inlineequation>,
478 where <emphasis>max</emphasis> is the returned value of <constant>GL_MAX_TEXTURE_SIZE</constant>.
479 </para>
480 <para>
481 <constant>GL_INVALID_VALUE</constant> is generated if <parameter>internalFormat</parameter> is not
482 one of the accepted resolution and format symbolic constants.
483 </para>
484 <para>
485 <constant>GL_INVALID_VALUE</constant> is generated if <parameter>width</parameter> is less than 0
486 or greater than <constant>GL_MAX_TEXTURE_SIZE</constant>.
487 </para>
488 <para>
489 <constant>GL_INVALID_VALUE</constant> is generated if non-power-of-two textures are not supported and the <parameter>width</parameter> cannot be represented as
490 <inlineequation><mml:math>
491 <!-- eqn: 2 sup n + 2(border): -->
492 <mml:mrow>
493 <mml:msup><mml:mn>2</mml:mn>
494 <mml:mi mathvariant="italic">n</mml:mi>
495 </mml:msup>
496 <mml:mo>+</mml:mo>
497 <mml:mrow>
498 <mml:mn>2</mml:mn>
499 <mml:mo>&af;</mml:mo>
500 <mml:mfenced open="(" close=")">
501 <mml:mi mathvariant="italic">border</mml:mi>
502 </mml:mfenced>
503 </mml:mrow>
504 </mml:mrow>
505 </mml:math></inlineequation>
506 for some integer value of <emphasis>n</emphasis>.
507 </para>
508 <para>
509 <constant>GL_INVALID_VALUE</constant> is generated if <parameter>border</parameter> is not 0 or 1.
510 </para>
511 <para>
512 <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>type</parameter> is one of
513 <constant>GL_UNSIGNED_BYTE_3_3_2</constant>,
514 <constant>GL_UNSIGNED_BYTE_2_3_3_REV</constant>,
515 <constant>GL_UNSIGNED_SHORT_5_6_5</constant>, or
516 <constant>GL_UNSIGNED_SHORT_5_6_5_REV</constant>
517 and <parameter>format</parameter> is not <constant>GL_RGB</constant>.
518 </para>
519 <para>
520 <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>type</parameter> is one of
521 <constant>GL_UNSIGNED_SHORT_4_4_4_4</constant>,
522 <constant>GL_UNSIGNED_SHORT_4_4_4_4_REV</constant>,
523 <constant>GL_UNSIGNED_SHORT_5_5_5_1</constant>,
524 <constant>GL_UNSIGNED_SHORT_1_5_5_5_REV</constant>,
525 <constant>GL_UNSIGNED_INT_8_8_8_8</constant>,
526 <constant>GL_UNSIGNED_INT_8_8_8_8_REV</constant>,
527 <constant>GL_UNSIGNED_INT_10_10_10_2</constant>, or
528 <constant>GL_UNSIGNED_INT_2_10_10_10_REV</constant>
529 and <parameter>format</parameter> is neither <constant>GL_RGBA</constant> nor <constant>GL_BGRA</constant>.
530 </para>
531 <para>
532 <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>format</parameter> is
533 <constant>GL_DEPTH_COMPONENT</constant> and <parameter>internalFormat</parameter> is not
534 <constant>GL_DEPTH_COMPONENT</constant>, <constant>GL_DEPTH_COMPONENT16</constant>,
535 <constant>GL_DEPTH_COMPONENT24</constant>, or <constant>GL_DEPTH_COMPONENT32</constant>.
536 </para>
537 <para>
538 <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>internalFormat</parameter> is
539 <constant>GL_DEPTH_COMPONENT</constant>, <constant>GL_DEPTH_COMPONENT16</constant>,
540 <constant>GL_DEPTH_COMPONENT24</constant>, or <constant>GL_DEPTH_COMPONENT32</constant>, and <parameter>format</parameter> is
541 not <constant>GL_DEPTH_COMPONENT</constant>.
542 </para>
543 <para>
544 <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
545 <constant>GL_PIXEL_UNPACK_BUFFER</constant> target and the buffer object's data store is currently mapped.
546 </para>
547 <para>
548 <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
549 <constant>GL_PIXEL_UNPACK_BUFFER</constant> target and the data would be unpacked from the buffer
550 object such that the memory reads required would exceed the data store size.
551 </para>
552 <para>
553 <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
554 <constant>GL_PIXEL_UNPACK_BUFFER</constant> target and <parameter>data</parameter> is not evenly divisible
555 into the number of bytes needed to store in memory a datum indicated by <parameter>type</parameter>.
556 </para>
557 </refsect1>
558 <refsect1 id="associatedgets"><title>Associated Gets</title>
559 <para>
560 <citerefentry><refentrytitle>glGetTexImage</refentrytitle></citerefentry>
561 </para>
562 <para>
563 <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_PIXEL_UNPACK_BUFFER_BINDING</constant>
564 </para>
565 </refsect1>
566 <refsect1 id="seealso"><title>See Also</title>
567 <para>
568 <citerefentry><refentrytitle>glActiveTexture</refentrytitle></citerefentry>,
569 <citerefentry><refentrytitle>glCompressedTexImage1D</refentrytitle></citerefentry>,
570 <citerefentry><refentrytitle>glCompressedTexSubImage1D</refentrytitle></citerefentry>,
571 <citerefentry><refentrytitle>glCopyTexImage1D</refentrytitle></citerefentry>,
572 <citerefentry><refentrytitle>glCopyTexSubImage1D</refentrytitle></citerefentry>,
573 <citerefentry><refentrytitle>glGetCompressedTexImage</refentrytitle></citerefentry>,
574 <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry>,
575 <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>,
576 <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>,
577 <citerefentry><refentrytitle>glTexSubImage1D</refentrytitle></citerefentry>,
578 <citerefentry><refentrytitle>glTexSubImage2D</refentrytitle></citerefentry>,
579 <citerefentry><refentrytitle>glTexSubImage3D</refentrytitle></citerefentry>,
580 <citerefentry><refentrytitle>glTexParameter</refentrytitle></citerefentry>
581 </para>
582 </refsect1>
583 <refsect1 id="Copyright"><title>Copyright</title>
584 <para>
585 Copyright <trademark class="copyright"></trademark> 1991-2006
586 Silicon Graphics, Inc. This document is licensed under the SGI
587 Free Software B License. For details, see
588 <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>.
589 </para>
590 </refsect1>
591</refentry>