b6ef496e0a4bbf39ea6233cb52a4cd42554f8602
[clinton/guile-figl.git] / upstream-man-pages / man4 / glTexImage1D.xml
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 base internal formats given in Table 1,
64 one of the sized internal formats given in Table 2, or one
65 of the compressed internal formats given in Table 3, below.
66 </para>
67 </listitem>
68 </varlistentry>
69 <varlistentry>
70 <term><parameter>width</parameter></term>
71 <listitem>
72 <para>
73 Specifies the width of the texture image.
74 All implementations support texture images that are at least 1024 texels
75 wide. The height of the 1D texture image is 1.
76 </para>
77 </listitem>
78 </varlistentry>
79 <varlistentry>
80 <term><parameter>border</parameter></term>
81 <listitem>
82 <para>
83 This value must be 0.
84 </para>
85 </listitem>
86 </varlistentry>
87 <varlistentry>
88 <term><parameter>format</parameter></term>
89 <listitem>
90 <para>
91 Specifies the format of the pixel data.
92 The following symbolic values are accepted:
93 <constant>GL_RED</constant>,
94 <constant>GL_RG</constant>,
95 <constant>GL_RGB</constant>,
96 <constant>GL_BGR</constant>,
97 <constant>GL_RGBA</constant>, and
98 <constant>GL_BGRA</constant>.
99 </para>
100 </listitem>
101 </varlistentry>
102 <varlistentry>
103 <term><parameter>type</parameter></term>
104 <listitem>
105 <para>
106 Specifies the data type of the pixel data.
107 The following symbolic values are accepted:
108 <constant>GL_UNSIGNED_BYTE</constant>,
109 <constant>GL_BYTE</constant>,
110 <constant>GL_UNSIGNED_SHORT</constant>,
111 <constant>GL_SHORT</constant>,
112 <constant>GL_UNSIGNED_INT</constant>,
113 <constant>GL_INT</constant>,
114 <constant>GL_FLOAT</constant>,
115 <constant>GL_UNSIGNED_BYTE_3_3_2</constant>,
116 <constant>GL_UNSIGNED_BYTE_2_3_3_REV</constant>,
117 <constant>GL_UNSIGNED_SHORT_5_6_5</constant>,
118 <constant>GL_UNSIGNED_SHORT_5_6_5_REV</constant>,
119 <constant>GL_UNSIGNED_SHORT_4_4_4_4</constant>,
120 <constant>GL_UNSIGNED_SHORT_4_4_4_4_REV</constant>,
121 <constant>GL_UNSIGNED_SHORT_5_5_5_1</constant>,
122 <constant>GL_UNSIGNED_SHORT_1_5_5_5_REV</constant>,
123 <constant>GL_UNSIGNED_INT_8_8_8_8</constant>,
124 <constant>GL_UNSIGNED_INT_8_8_8_8_REV</constant>,
125 <constant>GL_UNSIGNED_INT_10_10_10_2</constant>, and
126 <constant>GL_UNSIGNED_INT_2_10_10_10_REV</constant>.
127 </para>
128 </listitem>
129 </varlistentry>
130 <varlistentry>
131 <term><parameter>data</parameter></term>
132 <listitem>
133 <para>
134 Specifies a pointer to the image data in memory.
135 </para>
136 </listitem>
137 </varlistentry>
138 </variablelist>
139 </refsect1>
140 <refsect1 id="description"><title>Description</title>
141 <para>
142 Texturing maps a portion of a specified texture image
143 onto each graphical primitive for which texturing is enabled.
144 To enable and disable one-dimensional texturing, call <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry>
145 and <citerefentry><refentrytitle>glDisable</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_1D</constant>.
146 </para>
147 <para>
148 Texture images are defined with <function>glTexImage1D</function>.
149 The arguments describe the parameters of the texture image,
150 such as width,
151 width of the border,
152 level-of-detail number
153 (see <citerefentry><refentrytitle>glTexParameter</refentrytitle></citerefentry>),
154 and the internal resolution and format used to store the image.
155 The last three arguments describe how the image is represented in
156 memory.
157 </para>
158 <para>
159 If <parameter>target</parameter> is <constant>GL_PROXY_TEXTURE_1D</constant>, no data is read from <parameter>data</parameter>, but
160 all of the texture image state is recalculated, checked for
161 consistency, and checked against the implementation's capabilities.
162 If the implementation cannot handle a texture of the
163 requested texture size, it sets all of the image state to 0,
164 but does not generate an error (see <citerefentry><refentrytitle>glGetError</refentrytitle></citerefentry>). To query for an
165 entire mipmap array, use an image array level greater than or equal to
166 1.
167 </para>
168 <para>
169 If <parameter>target</parameter> is <constant>GL_TEXTURE_1D</constant>,
170 data is read from <parameter>data</parameter> as a sequence of signed or unsigned bytes,
171 shorts,
172 or longs,
173 or single-precision floating-point values,
174 depending on <parameter>type</parameter>.
175 These values are grouped into sets of one,
176 two,
177 three,
178 or four values,
179 depending on <parameter>format</parameter>,
180 to form elements.
181 Each data byte is treated as eight 1-bit elements,
182 with bit ordering determined by <constant>GL_UNPACK_LSB_FIRST</constant>
183 (see <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry>).
184 </para>
185 <para>
186 If a non-zero named buffer object is bound to the <constant>GL_PIXEL_UNPACK_BUFFER</constant> target
187 (see <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>) while a texture image is
188 specified, <parameter>data</parameter> is treated as a byte offset into the buffer object's data store.
189 </para>
190 <para>
191 The first element corresponds to the left end of the texture array.
192 Subsequent elements progress left-to-right through the remaining texels
193 in the texture array.
194 The final element corresponds to the right end of the texture array.
195 </para>
196 <para>
197 <parameter>format</parameter> determines the composition of each element in <parameter>data</parameter>.
198 It can assume one of these symbolic values:
199 </para>
200 <variablelist>
201 <varlistentry>
202 <term><constant>GL_RED</constant></term>
203 <listitem>
204 <para>
205 Each element is a single red component.
206 The GL converts it to floating point and assembles it into an RGBA element
207 by attaching 0 for green and blue, and 1 for alpha.
208 Each component is then multiplied by the signed scale factor <constant>GL_c_SCALE</constant>,
209 added to the signed bias <constant>GL_c_BIAS</constant>,
210 and clamped to the range [0,1].
211 </para>
212 </listitem>
213 </varlistentry>
214 <varlistentry>
215 <term><constant>GL_RG</constant></term>
216 <listitem>
217 <para>
218 Each element is a single red/green double
219 The GL converts it to floating point and assembles it into an RGBA element
220 by attaching 0 for blue, and 1 for alpha.
221 Each component is then multiplied by the signed scale factor <constant>GL_c_SCALE</constant>,
222 added to the signed bias <constant>GL_c_BIAS</constant>,
223 and clamped to the range [0,1].
224 </para>
225 </listitem>
226 </varlistentry>
227 <varlistentry>
228 <term><constant>GL_RGB</constant></term>
229 <listitem>
230 </listitem>
231 </varlistentry>
232 <varlistentry>
233 <term><constant>GL_BGR</constant></term>
234 <listitem>
235 <para>
236 Each element is an RGB triple.
237 The GL converts it to floating point and assembles it into an RGBA element
238 by attaching 1 for alpha.
239 Each component is then multiplied by the signed scale factor <constant>GL_c_SCALE</constant>,
240 added to the signed bias <constant>GL_c_BIAS</constant>,
241 and clamped to the range [0,1].
242 </para>
243 </listitem>
244 </varlistentry>
245 <varlistentry>
246 <term><constant>GL_RGBA</constant></term>
247 <listitem>
248 </listitem>
249 </varlistentry>
250 <varlistentry>
251 <term><constant>GL_BGRA</constant></term>
252 <listitem>
253 <para>
254 Each element contains all four components.
255 Each component is multiplied by the signed scale factor <constant>GL_c_SCALE</constant>,
256 added to the signed bias <constant>GL_c_BIAS</constant>,
257 and clamped to the range [0,1].
258 </para>
259 </listitem>
260 </varlistentry>
261 <varlistentry>
262 <term><constant>GL_DEPTH_COMPONENT</constant></term>
263 <listitem>
264 <para>
265 Each element is a single depth value.
266 The GL converts it to floating point, multiplies by the signed scale factor
267 <constant>GL_DEPTH_SCALE</constant>, adds the signed bias <constant>GL_DEPTH_BIAS</constant>,
268 and clamps to the range [0,1].
269 </para>
270 </listitem>
271 </varlistentry>
272 </variablelist>
273 <para>
274 If an application wants to store the texture at a certain
275 resolution or in a certain format, it can request the resolution
276 and format with <parameter>internalFormat</parameter>. The GL will choose an internal
277 representation that closely approximates that requested by <parameter>internalFormat</parameter>, but
278 it may not match exactly.
279 (The representations specified by <constant>GL_RED</constant>, <constant>GL_RG</constant>,
280 <constant>GL_RGB</constant> and <constant>GL_RGBA</constant> must match exactly.)
281 </para>
282 <para>
283 <parameter>internalFormat</parameter> may be one of the base internal formats shown in
284 Table 1, below
285 </para>
286 <para>
287 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="baseformattable.xml" />
288 </para>
289 <para>
290 <parameter>internalFormat</parameter> may also be one of the sized internal formats
291 shown in Table 2, below
292 </para>
293 <para>
294 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="internalformattable.xml" />
295 </para>
296 <para>
297 Finally, <parameter>internalFormat</parameter> may also be one of the generic or compressed
298 compressed texture formats shown in Table 3 below
299 </para>
300 <para>
301 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="compressedformattable.xml" />
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 Silicon Graphics, Inc.
586 Copyright <trademark class="copyright"></trademark> 2011 Khronos Group.
587 This document is licensed under the SGI
588 Free Software B License. For details, see
589 <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>.
590 </para>
591 </refsect1>
592 </refentry>