rename upstream-man-pages to upstream-doc
[clinton/guile-figl.git] / upstream-doc / man3 / glPixelStore.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="glPixelStore">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>1991-2006</year>
9 <holder>Silicon Graphics, Inc.</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>glPixelStore</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>glPixelStore</refname>
17 <refpurpose>set pixel storage modes</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>C Specification</title>
20 <funcsynopsis>
21 <funcprototype>
22 <funcdef>void <function>glPixelStoref</function></funcdef>
23 <paramdef>GLenum <parameter>pname</parameter></paramdef>
24 <paramdef>GLfloat <parameter>param</parameter></paramdef>
25 </funcprototype>
26 </funcsynopsis>
27 <funcsynopsis>
28 <funcprototype>
29 <funcdef>void <function>glPixelStorei</function></funcdef>
30 <paramdef>GLenum <parameter>pname</parameter></paramdef>
31 <paramdef>GLint <parameter>param</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>pname</parameter></term>
40 <listitem>
41 <para>
42 Specifies the symbolic name of the parameter to be set.
43 Six values affect the packing of pixel data into memory:
44 <constant>GL_PACK_SWAP_BYTES</constant>,
45 <constant>GL_PACK_LSB_FIRST</constant>,
46 <constant>GL_PACK_ROW_LENGTH</constant>,
47 <constant>GL_PACK_IMAGE_HEIGHT</constant>,
48 <constant>GL_PACK_SKIP_PIXELS</constant>,
49 <constant>GL_PACK_SKIP_ROWS</constant>,
50 <constant>GL_PACK_SKIP_IMAGES</constant>, and
51 <constant>GL_PACK_ALIGNMENT</constant>.
52 Six more affect the unpacking of pixel data <emphasis>from</emphasis> memory:
53 <constant>GL_UNPACK_SWAP_BYTES</constant>,
54 <constant>GL_UNPACK_LSB_FIRST</constant>,
55 <constant>GL_UNPACK_ROW_LENGTH</constant>,
56 <constant>GL_UNPACK_IMAGE_HEIGHT</constant>,
57 <constant>GL_UNPACK_SKIP_PIXELS</constant>,
58 <constant>GL_UNPACK_SKIP_ROWS</constant>,
59 <constant>GL_UNPACK_SKIP_IMAGES</constant>, and
60 <constant>GL_UNPACK_ALIGNMENT</constant>.
61 </para>
62 </listitem>
63 </varlistentry>
64 <varlistentry>
65 <term><parameter>param</parameter></term>
66 <listitem>
67 <para>
68 Specifies the value that <parameter>pname</parameter> is set to.
69 </para>
70 </listitem>
71 </varlistentry>
72 </variablelist>
73 </refsect1>
74 <refsect1 id="description"><title>Description</title>
75 <para>
76 <function>glPixelStore</function> sets pixel storage modes that affect the operation of subsequent
77 <citerefentry><refentrytitle>glReadPixels</refentrytitle></citerefentry> as well as the unpacking of
78 texture patterns (see <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>,
79 <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glTexSubImage1D</refentrytitle></citerefentry>,
80 <citerefentry><refentrytitle>glTexSubImage2D</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glTexSubImage3D</refentrytitle></citerefentry>).
81 </para>
82 <para>
83 <parameter>pname</parameter> is a symbolic constant indicating the parameter to be set, and
84 <parameter>param</parameter> is the new value. Six of the twelve storage parameters affect
85 how pixel data is returned to client memory.
86 They are as follows:
87 </para>
88 <variablelist>
89 <varlistentry>
90 <term><constant>GL_PACK_SWAP_BYTES</constant></term>
91 <listitem>
92 <para>
93 If true,
94 byte ordering for multibyte color components,
95 depth components,
96 or stencil indices
97 is reversed.
98 That is,
99 if a four-byte component consists of bytes
100 <inlineequation><mml:math>
101 <!-- eqn: b sub 0: -->
102 <mml:msub><mml:mi mathvariant="italic">b</mml:mi>
103 <mml:mn>0</mml:mn>
104 </mml:msub>
105 </mml:math></inlineequation>,
106 <inlineequation><mml:math>
107 <!-- eqn: b sub 1: -->
108 <mml:msub><mml:mi mathvariant="italic">b</mml:mi>
109 <mml:mn>1</mml:mn>
110 </mml:msub>
111 </mml:math></inlineequation>,
112 <inlineequation><mml:math>
113 <!-- eqn: b sub 2: -->
114 <mml:msub><mml:mi mathvariant="italic">b</mml:mi>
115 <mml:mn>2</mml:mn>
116 </mml:msub>
117 </mml:math></inlineequation>,
118 <inlineequation><mml:math>
119 <!-- eqn: b sub 3: -->
120 <mml:msub><mml:mi mathvariant="italic">b</mml:mi>
121 <mml:mn>3</mml:mn>
122 </mml:msub>
123 </mml:math></inlineequation>,
124 it is stored in memory as
125 <inlineequation><mml:math>
126 <!-- eqn: b sub 3: -->
127 <mml:msub><mml:mi mathvariant="italic">b</mml:mi>
128 <mml:mn>3</mml:mn>
129 </mml:msub>
130 </mml:math></inlineequation>,
131 <inlineequation><mml:math>
132 <!-- eqn: b sub 2: -->
133 <mml:msub><mml:mi mathvariant="italic">b</mml:mi>
134 <mml:mn>2</mml:mn>
135 </mml:msub>
136 </mml:math></inlineequation>,
137 <inlineequation><mml:math>
138 <!-- eqn: b sub 1: -->
139 <mml:msub><mml:mi mathvariant="italic">b</mml:mi>
140 <mml:mn>1</mml:mn>
141 </mml:msub>
142 </mml:math></inlineequation>,
143 <inlineequation><mml:math>
144 <!-- eqn: b sub 0: -->
145 <mml:msub><mml:mi mathvariant="italic">b</mml:mi>
146 <mml:mn>0</mml:mn>
147 </mml:msub>
148 </mml:math></inlineequation>
149 if <constant>GL_PACK_SWAP_BYTES</constant> is true.
150 <constant>GL_PACK_SWAP_BYTES</constant> has no effect on the memory order of components
151 within a pixel,
152 only on the order of bytes within components or indices.
153 For example,
154 the three components of a <constant>GL_RGB</constant> format pixel are always stored with
155 red first,
156 green second,
157 and blue third,
158 regardless of the value of <constant>GL_PACK_SWAP_BYTES</constant>.
159 </para>
160 </listitem>
161 </varlistentry>
162 <varlistentry>
163 <term><constant>GL_PACK_LSB_FIRST</constant></term>
164 <listitem>
165 <para>
166 If true,
167 bits are ordered within a byte from least significant to most significant;
168 otherwise,
169 the first bit in each byte is the most significant one.
170 </para>
171 </listitem>
172 </varlistentry>
173 <varlistentry>
174 <term><constant>GL_PACK_ROW_LENGTH</constant></term>
175 <listitem>
176 <para>
177 If greater than 0,
178 <constant>GL_PACK_ROW_LENGTH</constant> defines the number of pixels in a row.
179 If the first pixel of a row is placed at location
180 <inlineequation><mml:math><mml:mi mathvariant="italic">p</mml:mi></mml:math></inlineequation>
181 in memory,
182 then the location of the first pixel of the next row is obtained by skipping
183 </para>
184 <para>
185 <informalequation><mml:math>
186 <!-- eqn: k = left { lpile { n l above {a over s} left ceiling { s n l } over a right ceiling} lpile {s >= a above s < a }: -->
187 <mml:mrow>
188 <mml:mi mathvariant="italic">k</mml:mi>
189 <mml:mo>=</mml:mo>
190 <mml:mfenced open="{" close="">
191 <mml:mrow>
192 <mml:mtable>
193 <mml:mtr><mml:mtd>
194 <mml:mrow>
195 <mml:mi mathvariant="italic">n</mml:mi>
196 <mml:mo>&it;</mml:mo>
197 <mml:mi mathvariant="italic">l</mml:mi>
198 </mml:mrow>
199 </mml:mtd></mml:mtr>
200 <mml:mtr><mml:mtd>
201 <mml:mrow>
202 <mml:mfenced open="" close="">
203 <mml:mfrac>
204 <mml:mi mathvariant="italic">a</mml:mi>
205 <mml:mi mathvariant="italic">s</mml:mi>
206 </mml:mfrac>
207 </mml:mfenced>
208 <mml:mo>&it;</mml:mo>
209 <mml:mfenced open="&LeftCeiling;" close="&RightCeiling;">
210 <mml:mfrac>
211 <mml:mfenced open="" close="">
212 <mml:mrow>
213 <mml:mi mathvariant="italic">s</mml:mi>
214 <mml:mo>&it;</mml:mo>
215 <mml:mi mathvariant="italic">n</mml:mi>
216 <mml:mo>&it;</mml:mo>
217 <mml:mi mathvariant="italic">l</mml:mi>
218 </mml:mrow>
219 </mml:mfenced>
220 <mml:mi mathvariant="italic">a</mml:mi>
221 </mml:mfrac>
222 </mml:mfenced>
223 </mml:mrow>
224 </mml:mtd></mml:mtr>
225 </mml:mtable>
226 <mml:mo>&it;</mml:mo>
227 <mml:mtable>
228 <mml:mtr><mml:mtd>
229 <mml:mrow>
230 <mml:mi mathvariant="italic">s</mml:mi>
231 <mml:mo>&gt;=</mml:mo>
232 <mml:mi mathvariant="italic">a</mml:mi>
233 </mml:mrow>
234 </mml:mtd></mml:mtr>
235 <mml:mtr><mml:mtd>
236 <mml:mrow>
237 <mml:mi mathvariant="italic">s</mml:mi>
238 <mml:mo>&lt;</mml:mo>
239 <mml:mi mathvariant="italic">a</mml:mi>
240 </mml:mrow>
241 </mml:mtd></mml:mtr>
242 </mml:mtable>
243 </mml:mrow>
244 </mml:mfenced>
245 </mml:mrow>
246 </mml:math></informalequation>
247 </para>
248 <para>
249 components or indices,
250 where
251 <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>
252 is the number of components or indices in a pixel,
253 <inlineequation><mml:math><mml:mi mathvariant="italic">l</mml:mi></mml:math></inlineequation>
254 is the number of pixels in a row
255 (<constant>GL_PACK_ROW_LENGTH</constant> if it is greater than 0,
256 the
257 <inlineequation><mml:math><mml:mi mathvariant="italic">width</mml:mi></mml:math></inlineequation>
258 argument to the pixel routine otherwise),
259 <inlineequation><mml:math><mml:mi mathvariant="italic">a</mml:mi></mml:math></inlineequation>
260 is the value of <constant>GL_PACK_ALIGNMENT</constant>, and
261 <inlineequation><mml:math><mml:mi mathvariant="italic">s</mml:mi></mml:math></inlineequation>
262 is the size, in bytes, of a single component
263 (if
264 <inlineequation><mml:math>
265 <!-- eqn: a < s: -->
266 <mml:mrow>
267 <mml:mi mathvariant="italic">a</mml:mi>
268 <mml:mo>&lt;</mml:mo>
269 <mml:mi mathvariant="italic">s</mml:mi>
270 </mml:mrow>
271 </mml:math></inlineequation>,
272 then it is as if
273 <inlineequation><mml:math>
274 <!-- eqn: a = s: -->
275 <mml:mrow>
276 <mml:mi mathvariant="italic">a</mml:mi>
277 <mml:mo>=</mml:mo>
278 <mml:mi mathvariant="italic">s</mml:mi>
279 </mml:mrow>
280 </mml:math></inlineequation>).
281 In the case of 1-bit values,
282 the location of the next row is obtained by skipping
283 </para>
284 <para>
285 <inlineequation><mml:math>
286 <!-- eqn: k = 8 a left ceiling { n l } over { 8 a } right ceiling: -->
287 <mml:mrow>
288 <mml:mi mathvariant="italic">k</mml:mi>
289 <mml:mo>=</mml:mo>
290 <mml:mrow>
291 <mml:mn>8</mml:mn>
292 <mml:mo>&it;</mml:mo>
293 <mml:mi mathvariant="italic">a</mml:mi>
294 <mml:mo>&it;</mml:mo>
295 <mml:mfenced open="&LeftCeiling;" close="&RightCeiling;">
296 <mml:mfrac>
297 <mml:mfenced open="" close="">
298 <mml:mrow>
299 <mml:mi mathvariant="italic">n</mml:mi>
300 <mml:mo>&it;</mml:mo>
301 <mml:mi mathvariant="italic">l</mml:mi>
302 </mml:mrow>
303 </mml:mfenced>
304 <mml:mfenced open="" close="">
305 <mml:mrow>
306 <mml:mn>8</mml:mn>
307 <mml:mo>&it;</mml:mo>
308 <mml:mi mathvariant="italic">a</mml:mi>
309 </mml:mrow>
310 </mml:mfenced>
311 </mml:mfrac>
312 </mml:mfenced>
313 </mml:mrow>
314 </mml:mrow>
315 </mml:math></inlineequation>
316 </para>
317 <para>
318 components or indices.
319 </para>
320 <para>
321 The word <emphasis>component</emphasis> in this description refers to the nonindex values
322 red,
323 green,
324 blue,
325 alpha,
326 and depth.
327 Storage format <constant>GL_RGB</constant>,
328 for example,
329 has three components per pixel:
330 first red,
331 then green,
332 and finally blue.
333 </para>
334 </listitem>
335 </varlistentry>
336 <varlistentry>
337 <term><constant>GL_PACK_IMAGE_HEIGHT</constant></term>
338 <listitem>
339 <para>
340 If greater than 0,
341 <constant>GL_PACK_IMAGE_HEIGHT</constant> defines the number of pixels in an image
342 three-dimensional texture volume, where ``image'' is defined by all pixels
343 sharing the same third dimension index.
344 If the first pixel of a row is placed at location
345 <inlineequation><mml:math><mml:mi mathvariant="italic">p</mml:mi></mml:math></inlineequation>
346 in memory,
347 then the location of the first pixel of the next row is obtained by skipping
348 </para>
349 <para>
350 <informalequation><mml:math>
351 <!-- eqn: k = left { lpile { n l h above {a over s} left ceiling { s n l h } over a right ceiling} lpile {s >= a above s < a }: -->
352 <mml:mrow>
353 <mml:mi mathvariant="italic">k</mml:mi>
354 <mml:mo>=</mml:mo>
355 <mml:mfenced open="{" close="">
356 <mml:mrow>
357 <mml:mtable>
358 <mml:mtr><mml:mtd>
359 <mml:mrow>
360 <mml:mi mathvariant="italic">n</mml:mi>
361 <mml:mo>&it;</mml:mo>
362 <mml:mi mathvariant="italic">l</mml:mi>
363 <mml:mo>&it;</mml:mo>
364 <mml:mi mathvariant="italic">h</mml:mi>
365 </mml:mrow>
366 </mml:mtd></mml:mtr>
367 <mml:mtr><mml:mtd>
368 <mml:mrow>
369 <mml:mfenced open="" close="">
370 <mml:mfrac>
371 <mml:mi mathvariant="italic">a</mml:mi>
372 <mml:mi mathvariant="italic">s</mml:mi>
373 </mml:mfrac>
374 </mml:mfenced>
375 <mml:mo>&it;</mml:mo>
376 <mml:mfenced open="&LeftCeiling;" close="&RightCeiling;">
377 <mml:mfrac>
378 <mml:mfenced open="" close="">
379 <mml:mrow>
380 <mml:mi mathvariant="italic">s</mml:mi>
381 <mml:mo>&it;</mml:mo>
382 <mml:mi mathvariant="italic">n</mml:mi>
383 <mml:mo>&it;</mml:mo>
384 <mml:mi mathvariant="italic">l</mml:mi>
385 <mml:mo>&it;</mml:mo>
386 <mml:mi mathvariant="italic">h</mml:mi>
387 </mml:mrow>
388 </mml:mfenced>
389 <mml:mi mathvariant="italic">a</mml:mi>
390 </mml:mfrac>
391 </mml:mfenced>
392 </mml:mrow>
393 </mml:mtd></mml:mtr>
394 </mml:mtable>
395 <mml:mo>&it;</mml:mo>
396 <mml:mtable>
397 <mml:mtr><mml:mtd>
398 <mml:mrow>
399 <mml:mi mathvariant="italic">s</mml:mi>
400 <mml:mo>&gt;=</mml:mo>
401 <mml:mi mathvariant="italic">a</mml:mi>
402 </mml:mrow>
403 </mml:mtd></mml:mtr>
404 <mml:mtr><mml:mtd>
405 <mml:mrow>
406 <mml:mi mathvariant="italic">s</mml:mi>
407 <mml:mo>&lt;</mml:mo>
408 <mml:mi mathvariant="italic">a</mml:mi>
409 </mml:mrow>
410 </mml:mtd></mml:mtr>
411 </mml:mtable>
412 </mml:mrow>
413 </mml:mfenced>
414 </mml:mrow>
415 </mml:math></informalequation>
416 </para>
417 <para>
418 components or indices, where
419 <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>
420 is the number of components or indices
421 in a pixel,
422 <inlineequation><mml:math><mml:mi mathvariant="italic">l</mml:mi></mml:math></inlineequation>
423 is the number of pixels in a row
424 (<constant>GL_PACK_ROW_LENGTH</constant> if it is greater than 0, the
425 <inlineequation><mml:math><mml:mi mathvariant="italic">width</mml:mi></mml:math></inlineequation>
426 argument to <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry> otherwise),
427 <inlineequation><mml:math><mml:mi mathvariant="italic">h</mml:mi></mml:math></inlineequation>
428 is the number of
429 rows in a pixel image (<constant>GL_PACK_IMAGE_HEIGHT</constant> if it is greater than
430 0, the
431 <inlineequation><mml:math><mml:mi mathvariant="italic">height</mml:mi></mml:math></inlineequation>
432 argument to the <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry> routine otherwise),
433 <inlineequation><mml:math><mml:mi mathvariant="italic">a</mml:mi></mml:math></inlineequation>
434 is the value of
435 <constant>GL_PACK_ALIGNMENT</constant>, and
436 <inlineequation><mml:math><mml:mi mathvariant="italic">s</mml:mi></mml:math></inlineequation>
437 is the size, in bytes, of a single
438 component (if
439 <inlineequation><mml:math>
440 <!-- eqn: a < s: -->
441 <mml:mrow>
442 <mml:mi mathvariant="italic">a</mml:mi>
443 <mml:mo>&lt;</mml:mo>
444 <mml:mi mathvariant="italic">s</mml:mi>
445 </mml:mrow>
446 </mml:math></inlineequation>,
447 then it is as if
448 <inlineequation><mml:math>
449 <!-- eqn: a = s: -->
450 <mml:mrow>
451 <mml:mi mathvariant="italic">a</mml:mi>
452 <mml:mo>=</mml:mo>
453 <mml:mi mathvariant="italic">s</mml:mi>
454 </mml:mrow>
455 </mml:math></inlineequation>).
456 </para>
457 <para>
458 The word <emphasis>component</emphasis> in this description refers to the nonindex values
459 red,
460 green,
461 blue,
462 alpha,
463 and depth.
464 Storage format <constant>GL_RGB</constant>,
465 for example,
466 has three components per pixel:
467 first red,
468 then green,
469 and finally blue.
470 </para>
471 </listitem>
472 </varlistentry>
473 <varlistentry>
474 <term><constant>GL_PACK_SKIP_PIXELS</constant>, <constant>GL_PACK_SKIP_ROWS</constant>, and <constant>GL_PACK_SKIP_IMAGES</constant></term>
475 <listitem>
476 <para>
477 These values are provided as a convenience to the programmer;
478 they provide no functionality that cannot be duplicated simply by
479 incrementing the pointer passed to <citerefentry><refentrytitle>glReadPixels</refentrytitle></citerefentry>.
480 Setting <constant>GL_PACK_SKIP_PIXELS</constant> to
481 <inlineequation><mml:math><mml:mi mathvariant="italic">i</mml:mi></mml:math></inlineequation>
482 is equivalent to incrementing
483 the pointer by
484 <inlineequation><mml:math>
485 <!-- eqn: i n: -->
486 <mml:mrow>
487 <mml:mi mathvariant="italic">i</mml:mi>
488 <mml:mo>&it;</mml:mo>
489 <mml:mi mathvariant="italic">n</mml:mi>
490 </mml:mrow>
491 </mml:math></inlineequation>
492 components or indices,
493 where
494 <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>
495 is the number of components or indices in each pixel.
496 Setting <constant>GL_PACK_SKIP_ROWS</constant> to
497 <inlineequation><mml:math><mml:mi mathvariant="italic">j</mml:mi></mml:math></inlineequation>
498 is equivalent to incrementing
499 the pointer by
500 <inlineequation><mml:math>
501 <!-- eqn: j m: -->
502 <mml:mrow>
503 <mml:mi mathvariant="italic">j</mml:mi>
504 <mml:mo>&it;</mml:mo>
505 <mml:mi mathvariant="italic">m</mml:mi>
506 </mml:mrow>
507 </mml:math></inlineequation>
508 components or indices,
509 where
510 <inlineequation><mml:math><mml:mi mathvariant="italic">m</mml:mi></mml:math></inlineequation>
511 is the number of components or indices per row,
512 as just computed in the <constant>GL_PACK_ROW_LENGTH</constant> section.
513 Setting <constant>GL_PACK_SKIP_IMAGES</constant> to
514 <inlineequation><mml:math><mml:mi mathvariant="italic">k</mml:mi></mml:math></inlineequation>
515 is equivalent to incrementing
516 the pointer by
517 <inlineequation><mml:math>
518 <!-- eqn: k p: -->
519 <mml:mrow>
520 <mml:mi mathvariant="italic">k</mml:mi>
521 <mml:mo>&it;</mml:mo>
522 <mml:mi mathvariant="italic">p</mml:mi>
523 </mml:mrow>
524 </mml:math></inlineequation>,
525 where
526 <inlineequation><mml:math><mml:mi mathvariant="italic">p</mml:mi></mml:math></inlineequation>
527 is the number of components or indices
528 per image, as computed in the <constant>GL_PACK_IMAGE_HEIGHT</constant> section.
529 </para>
530 </listitem>
531 </varlistentry>
532 <varlistentry>
533 <term><constant>GL_PACK_ALIGNMENT</constant></term>
534 <listitem>
535 <para>
536 Specifies the alignment requirements for the start of each pixel row in memory.
537 The allowable values are
538 1 (byte-alignment),
539 2 (rows aligned to even-numbered bytes),
540 4 (word-alignment), and
541 8 (rows start on double-word boundaries).
542 </para>
543 </listitem>
544 </varlistentry>
545 </variablelist>
546 <para>
547 The other six of the twelve storage parameters affect how pixel data is
548 read from client memory.
549 These values are significant for
550 <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>,
551 <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>,
552 <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>,
553 <citerefentry><refentrytitle>glTexSubImage1D</refentrytitle></citerefentry>,
554 <citerefentry><refentrytitle>glTexSubImage2D</refentrytitle></citerefentry>, and
555 <citerefentry><refentrytitle>glTexSubImage3D</refentrytitle></citerefentry>
556 </para>
557 <para>
558 They are as follows:
559 </para>
560 <variablelist>
561 <varlistentry>
562 <term><constant>GL_UNPACK_SWAP_BYTES</constant></term>
563 <listitem>
564 <para>
565 If true,
566 byte ordering for multibyte color components,
567 depth components,
568 or stencil indices
569 is reversed.
570 That is,
571 if a four-byte component consists of bytes
572 <inlineequation><mml:math>
573 <!-- eqn: b sub 0: -->
574 <mml:msub><mml:mi mathvariant="italic">b</mml:mi>
575 <mml:mn>0</mml:mn>
576 </mml:msub>
577 </mml:math></inlineequation>,
578 <inlineequation><mml:math>
579 <!-- eqn: b sub 1: -->
580 <mml:msub><mml:mi mathvariant="italic">b</mml:mi>
581 <mml:mn>1</mml:mn>
582 </mml:msub>
583 </mml:math></inlineequation>,
584 <inlineequation><mml:math>
585 <!-- eqn: b sub 2: -->
586 <mml:msub><mml:mi mathvariant="italic">b</mml:mi>
587 <mml:mn>2</mml:mn>
588 </mml:msub>
589 </mml:math></inlineequation>,
590 <inlineequation><mml:math>
591 <!-- eqn: b sub 3: -->
592 <mml:msub><mml:mi mathvariant="italic">b</mml:mi>
593 <mml:mn>3</mml:mn>
594 </mml:msub>
595 </mml:math></inlineequation>,
596 it is taken from memory as
597 <inlineequation><mml:math>
598 <!-- eqn: b sub 3: -->
599 <mml:msub><mml:mi mathvariant="italic">b</mml:mi>
600 <mml:mn>3</mml:mn>
601 </mml:msub>
602 </mml:math></inlineequation>,
603 <inlineequation><mml:math>
604 <!-- eqn: b sub 2: -->
605 <mml:msub><mml:mi mathvariant="italic">b</mml:mi>
606 <mml:mn>2</mml:mn>
607 </mml:msub>
608 </mml:math></inlineequation>,
609 <inlineequation><mml:math>
610 <!-- eqn: b sub 1: -->
611 <mml:msub><mml:mi mathvariant="italic">b</mml:mi>
612 <mml:mn>1</mml:mn>
613 </mml:msub>
614 </mml:math></inlineequation>,
615 <inlineequation><mml:math>
616 <!-- eqn: b sub 0: -->
617 <mml:msub><mml:mi mathvariant="italic">b</mml:mi>
618 <mml:mn>0</mml:mn>
619 </mml:msub>
620 </mml:math></inlineequation>
621 if <constant>GL_UNPACK_SWAP_BYTES</constant> is true.
622 <constant>GL_UNPACK_SWAP_BYTES</constant> has no effect on the memory order of components
623 within a pixel,
624 only on the order of bytes within components or indices.
625 For example,
626 the three components of a <constant>GL_RGB</constant> format pixel are always stored with
627 red first,
628 green second,
629 and blue third,
630 regardless of the value of <constant>GL_UNPACK_SWAP_BYTES</constant>.
631 </para>
632 </listitem>
633 </varlistentry>
634 <varlistentry>
635 <term><constant>GL_UNPACK_LSB_FIRST</constant></term>
636 <listitem>
637 <para>
638 If true,
639 bits are ordered within a byte from least significant to most significant;
640 otherwise,
641 the first bit in each byte is the most significant one.
642 </para>
643 </listitem>
644 </varlistentry>
645 <varlistentry>
646 <term><constant>GL_UNPACK_ROW_LENGTH</constant></term>
647 <listitem>
648 <para>
649 If greater than 0,
650 <constant>GL_UNPACK_ROW_LENGTH</constant> defines the number of pixels in a row.
651 If the first pixel of a row is placed at location
652 <inlineequation><mml:math><mml:mi mathvariant="italic">p</mml:mi></mml:math></inlineequation>
653 in memory,
654 then the location of the first pixel of the next row is obtained by skipping
655 </para>
656 <para>
657 <informalequation><mml:math>
658 <!-- eqn: k = left { lpile { n l above {a over s} left ceiling { s n l } over a right ceiling } lpile { s >= a above s < a }: -->
659 <mml:mrow>
660 <mml:mi mathvariant="italic">k</mml:mi>
661 <mml:mo>=</mml:mo>
662 <mml:mfenced open="{" close="">
663 <mml:mrow>
664 <mml:mtable>
665 <mml:mtr><mml:mtd>
666 <mml:mrow>
667 <mml:mi mathvariant="italic">n</mml:mi>
668 <mml:mo>&it;</mml:mo>
669 <mml:mi mathvariant="italic">l</mml:mi>
670 </mml:mrow>
671 </mml:mtd></mml:mtr>
672 <mml:mtr><mml:mtd>
673 <mml:mrow>
674 <mml:mfenced open="" close="">
675 <mml:mfrac>
676 <mml:mi mathvariant="italic">a</mml:mi>
677 <mml:mi mathvariant="italic">s</mml:mi>
678 </mml:mfrac>
679 </mml:mfenced>
680 <mml:mo>&it;</mml:mo>
681 <mml:mfenced open="&LeftCeiling;" close="&RightCeiling;">
682 <mml:mfrac>
683 <mml:mfenced open="" close="">
684 <mml:mrow>
685 <mml:mi mathvariant="italic">s</mml:mi>
686 <mml:mo>&it;</mml:mo>
687 <mml:mi mathvariant="italic">n</mml:mi>
688 <mml:mo>&it;</mml:mo>
689 <mml:mi mathvariant="italic">l</mml:mi>
690 </mml:mrow>
691 </mml:mfenced>
692 <mml:mi mathvariant="italic">a</mml:mi>
693 </mml:mfrac>
694 </mml:mfenced>
695 </mml:mrow>
696 </mml:mtd></mml:mtr>
697 </mml:mtable>
698 <mml:mo>&it;</mml:mo>
699 <mml:mtable>
700 <mml:mtr><mml:mtd>
701 <mml:mrow>
702 <mml:mi mathvariant="italic">s</mml:mi>
703 <mml:mo>&gt;=</mml:mo>
704 <mml:mi mathvariant="italic">a</mml:mi>
705 </mml:mrow>
706 </mml:mtd></mml:mtr>
707 <mml:mtr><mml:mtd>
708 <mml:mrow>
709 <mml:mi mathvariant="italic">s</mml:mi>
710 <mml:mo>&lt;</mml:mo>
711 <mml:mi mathvariant="italic">a</mml:mi>
712 </mml:mrow>
713 </mml:mtd></mml:mtr>
714 </mml:mtable>
715 </mml:mrow>
716 </mml:mfenced>
717 </mml:mrow>
718 </mml:math></informalequation>
719 </para>
720 <para>
721 components or indices,
722 where
723 <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>
724 is the number of components or indices in a pixel,
725 <inlineequation><mml:math><mml:mi mathvariant="italic">l</mml:mi></mml:math></inlineequation>
726 is the number of pixels in a row
727 (<constant>GL_UNPACK_ROW_LENGTH</constant> if it is greater than 0,
728 the
729 <inlineequation><mml:math><mml:mi mathvariant="italic">width</mml:mi></mml:math></inlineequation>
730 argument to the pixel routine otherwise),
731 <inlineequation><mml:math><mml:mi mathvariant="italic">a</mml:mi></mml:math></inlineequation>
732 is the value of <constant>GL_UNPACK_ALIGNMENT</constant>, and
733 <inlineequation><mml:math><mml:mi mathvariant="italic">s</mml:mi></mml:math></inlineequation>
734 is the size, in bytes, of a single component
735 (if
736 <inlineequation><mml:math>
737 <!-- eqn: a < s: -->
738 <mml:mrow>
739 <mml:mi mathvariant="italic">a</mml:mi>
740 <mml:mo>&lt;</mml:mo>
741 <mml:mi mathvariant="italic">s</mml:mi>
742 </mml:mrow>
743 </mml:math></inlineequation>,
744 then it is as if
745 <inlineequation><mml:math>
746 <!-- eqn: a = s: -->
747 <mml:mrow>
748 <mml:mi mathvariant="italic">a</mml:mi>
749 <mml:mo>=</mml:mo>
750 <mml:mi mathvariant="italic">s</mml:mi>
751 </mml:mrow>
752 </mml:math></inlineequation>).
753 In the case of 1-bit values,
754 the location of the next row is obtained by skipping
755 </para>
756 <para>
757 <inlineequation><mml:math>
758 <!-- eqn: k = 8 a left ceiling { n l } over { 8 a } right ceiling: -->
759 <mml:mrow>
760 <mml:mi mathvariant="italic">k</mml:mi>
761 <mml:mo>=</mml:mo>
762 <mml:mrow>
763 <mml:mn>8</mml:mn>
764 <mml:mo>&it;</mml:mo>
765 <mml:mi mathvariant="italic">a</mml:mi>
766 <mml:mo>&it;</mml:mo>
767 <mml:mfenced open="&LeftCeiling;" close="&RightCeiling;">
768 <mml:mfrac>
769 <mml:mfenced open="" close="">
770 <mml:mrow>
771 <mml:mi mathvariant="italic">n</mml:mi>
772 <mml:mo>&it;</mml:mo>
773 <mml:mi mathvariant="italic">l</mml:mi>
774 </mml:mrow>
775 </mml:mfenced>
776 <mml:mfenced open="" close="">
777 <mml:mrow>
778 <mml:mn>8</mml:mn>
779 <mml:mo>&it;</mml:mo>
780 <mml:mi mathvariant="italic">a</mml:mi>
781 </mml:mrow>
782 </mml:mfenced>
783 </mml:mfrac>
784 </mml:mfenced>
785 </mml:mrow>
786 </mml:mrow>
787 </mml:math></inlineequation>
788 </para>
789 <para>
790 components or indices.
791 </para>
792 <para>
793 The word <emphasis>component</emphasis> in this description refers to the nonindex values
794 red,
795 green,
796 blue,
797 alpha,
798 and depth.
799 Storage format <constant>GL_RGB</constant>,
800 for example,
801 has three components per pixel:
802 first red,
803 then green,
804 and finally blue.
805 </para>
806 </listitem>
807 </varlistentry>
808 <varlistentry>
809 <term><constant>GL_UNPACK_IMAGE_HEIGHT</constant></term>
810 <listitem>
811 <para>
812 If greater than 0,
813 <constant>GL_UNPACK_IMAGE_HEIGHT</constant> defines the number of pixels in an image of
814 a three-dimensional texture volume. Where ``image'' is defined by all
815 pixel sharing the same third dimension index.
816 If the first pixel of a row is placed at location
817 <inlineequation><mml:math><mml:mi mathvariant="italic">p</mml:mi></mml:math></inlineequation>
818 in memory,
819 then the location of the first pixel of the next row is obtained by skipping
820 </para>
821 <para>
822 <informalequation><mml:math>
823 <!-- eqn: k = left { lpile { n l h above {a over s} left ceiling { s n l h } over a right ceiling } lpile { s >= a above s < a }: -->
824 <mml:mrow>
825 <mml:mi mathvariant="italic">k</mml:mi>
826 <mml:mo>=</mml:mo>
827 <mml:mfenced open="{" close="">
828 <mml:mrow>
829 <mml:mtable>
830 <mml:mtr><mml:mtd>
831 <mml:mrow>
832 <mml:mi mathvariant="italic">n</mml:mi>
833 <mml:mo>&it;</mml:mo>
834 <mml:mi mathvariant="italic">l</mml:mi>
835 <mml:mo>&it;</mml:mo>
836 <mml:mi mathvariant="italic">h</mml:mi>
837 </mml:mrow>
838 </mml:mtd></mml:mtr>
839 <mml:mtr><mml:mtd>
840 <mml:mrow>
841 <mml:mfenced open="" close="">
842 <mml:mfrac>
843 <mml:mi mathvariant="italic">a</mml:mi>
844 <mml:mi mathvariant="italic">s</mml:mi>
845 </mml:mfrac>
846 </mml:mfenced>
847 <mml:mo>&it;</mml:mo>
848 <mml:mfenced open="&LeftCeiling;" close="&RightCeiling;">
849 <mml:mfrac>
850 <mml:mfenced open="" close="">
851 <mml:mrow>
852 <mml:mi mathvariant="italic">s</mml:mi>
853 <mml:mo>&it;</mml:mo>
854 <mml:mi mathvariant="italic">n</mml:mi>
855 <mml:mo>&it;</mml:mo>
856 <mml:mi mathvariant="italic">l</mml:mi>
857 <mml:mo>&it;</mml:mo>
858 <mml:mi mathvariant="italic">h</mml:mi>
859 </mml:mrow>
860 </mml:mfenced>
861 <mml:mi mathvariant="italic">a</mml:mi>
862 </mml:mfrac>
863 </mml:mfenced>
864 </mml:mrow>
865 </mml:mtd></mml:mtr>
866 </mml:mtable>
867 <mml:mo>&it;</mml:mo>
868 <mml:mtable>
869 <mml:mtr><mml:mtd>
870 <mml:mrow>
871 <mml:mi mathvariant="italic">s</mml:mi>
872 <mml:mo>&gt;=</mml:mo>
873 <mml:mi mathvariant="italic">a</mml:mi>
874 </mml:mrow>
875 </mml:mtd></mml:mtr>
876 <mml:mtr><mml:mtd>
877 <mml:mrow>
878 <mml:mi mathvariant="italic">s</mml:mi>
879 <mml:mo>&lt;</mml:mo>
880 <mml:mi mathvariant="italic">a</mml:mi>
881 </mml:mrow>
882 </mml:mtd></mml:mtr>
883 </mml:mtable>
884 </mml:mrow>
885 </mml:mfenced>
886 </mml:mrow>
887 </mml:math></informalequation>
888 </para>
889 <para>
890 components or indices,
891 where
892 <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>
893 is the number of components or indices in a pixel,
894 <inlineequation><mml:math><mml:mi mathvariant="italic">l</mml:mi></mml:math></inlineequation>
895 is the number of pixels in a row
896 (<constant>GL_UNPACK_ROW_LENGTH</constant> if it is greater than 0,
897 the
898 <inlineequation><mml:math><mml:mi mathvariant="italic">width</mml:mi></mml:math></inlineequation>
899 argument to <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry> otherwise),
900 <inlineequation><mml:math><mml:mi mathvariant="italic">h</mml:mi></mml:math></inlineequation>
901 is the number of rows in an image (<constant>GL_UNPACK_IMAGE_HEIGHT</constant> if
902 it is greater than 0, the
903 <inlineequation><mml:math><mml:mi mathvariant="italic">height</mml:mi></mml:math></inlineequation>
904 argument to <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry> otherwise),
905 <inlineequation><mml:math><mml:mi mathvariant="italic">a</mml:mi></mml:math></inlineequation>
906 is the value of <constant>GL_UNPACK_ALIGNMENT</constant>, and
907 <inlineequation><mml:math><mml:mi mathvariant="italic">s</mml:mi></mml:math></inlineequation>
908 is the size, in bytes, of a single component
909 (if
910 <inlineequation><mml:math>
911 <!-- eqn: a < s: -->
912 <mml:mrow>
913 <mml:mi mathvariant="italic">a</mml:mi>
914 <mml:mo>&lt;</mml:mo>
915 <mml:mi mathvariant="italic">s</mml:mi>
916 </mml:mrow>
917 </mml:math></inlineequation>,
918 then it is as if
919 <inlineequation><mml:math>
920 <!-- eqn: a = s: -->
921 <mml:mrow>
922 <mml:mi mathvariant="italic">a</mml:mi>
923 <mml:mo>=</mml:mo>
924 <mml:mi mathvariant="italic">s</mml:mi>
925 </mml:mrow>
926 </mml:math></inlineequation>).
927 </para>
928 <para>
929 The word <emphasis>component</emphasis> in this description refers to the nonindex values
930 red,
931 green,
932 blue,
933 alpha,
934 and depth.
935 Storage format <constant>GL_RGB</constant>,
936 for example,
937 has three components per pixel:
938 first red,
939 then green,
940 and finally blue.
941 </para>
942 </listitem>
943 </varlistentry>
944 <varlistentry>
945 <term><constant>GL_UNPACK_SKIP_PIXELS</constant> and <constant>GL_UNPACK_SKIP_ROWS</constant></term>
946 <listitem>
947 <para>
948 These values are provided as a convenience to the programmer;
949 they provide no functionality that cannot be duplicated by
950 incrementing the pointer passed to
951 <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>,
952 <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>,
953 <citerefentry><refentrytitle>glTexSubImage1D</refentrytitle></citerefentry> or
954 <citerefentry><refentrytitle>glTexSubImage2D</refentrytitle></citerefentry>.
955 Setting <constant>GL_UNPACK_SKIP_PIXELS</constant> to
956 <inlineequation><mml:math><mml:mi mathvariant="italic">i</mml:mi></mml:math></inlineequation>
957 is equivalent to incrementing
958 the pointer by
959 <inlineequation><mml:math>
960 <!-- eqn: i n: -->
961 <mml:mrow>
962 <mml:mi mathvariant="italic">i</mml:mi>
963 <mml:mo>&it;</mml:mo>
964 <mml:mi mathvariant="italic">n</mml:mi>
965 </mml:mrow>
966 </mml:math></inlineequation>
967 components or indices,
968 where
969 <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>
970 is the number of components or indices in each pixel.
971 Setting <constant>GL_UNPACK_SKIP_ROWS</constant> to
972 <inlineequation><mml:math><mml:mi mathvariant="italic">j</mml:mi></mml:math></inlineequation>
973 is equivalent to incrementing
974 the pointer by
975 <inlineequation><mml:math>
976 <!-- eqn: j k: -->
977 <mml:mrow>
978 <mml:mi mathvariant="italic">j</mml:mi>
979 <mml:mo>&it;</mml:mo>
980 <mml:mi mathvariant="italic">k</mml:mi>
981 </mml:mrow>
982 </mml:math></inlineequation>
983 components or indices,
984 where
985 <inlineequation><mml:math><mml:mi mathvariant="italic">k</mml:mi></mml:math></inlineequation>
986 is the number of components or indices per row,
987 as just computed in the <constant>GL_UNPACK_ROW_LENGTH</constant> section.
988 </para>
989 </listitem>
990 </varlistentry>
991 <varlistentry>
992 <term><constant>GL_UNPACK_ALIGNMENT</constant></term>
993 <listitem>
994 <para>
995 Specifies the alignment requirements for the start of each pixel row in memory.
996 The allowable values are
997 1 (byte-alignment),
998 2 (rows aligned to even-numbered bytes),
999 4 (word-alignment), and
1000 8 (rows start on double-word boundaries).
1001 </para>
1002 </listitem>
1003 </varlistentry>
1004 </variablelist>
1005 <para>
1006 The following table gives the type,
1007 initial value,
1008 and range of valid values for each storage parameter
1009 that can be set with <function>glPixelStore</function>.
1010 </para>
1011 <para>
1012 </para>
1013 <informaltable frame="topbot">
1014 <tgroup cols="4" align="left">
1015 <colspec colwidth="2.5*" />
1016 <colspec colwidth="1*" align="center"/>
1017 <colspec colwidth="1*" align="center"/>
1018 <colspec colwidth="2*" align="center"/>
1019 <thead>
1020 <row>
1021 <entry rowsep="1" align="left"><emphasis role="bold">
1022 <parameter>pname</parameter>
1023 </emphasis></entry>
1024 <entry rowsep="1" align="center"><emphasis role="bold">
1025 Type
1026 </emphasis></entry>
1027 <entry rowsep="1" align="center"><emphasis role="bold">
1028 Initial Value
1029 </emphasis></entry>
1030 <entry rowsep="1" align="center"><emphasis role="bold">
1031 Valid Range
1032 </emphasis></entry>
1033 </row>
1034 </thead>
1035 <tbody>
1036 <row>
1037 <entry align="left">
1038 <constant>GL_PACK_SWAP_BYTES</constant>
1039 </entry>
1040 <entry align="center">
1041 boolean
1042 </entry>
1043 <entry align="center">
1044 false
1045 </entry>
1046 <entry align="center">
1047 true or false
1048 </entry>
1049 </row>
1050 <row>
1051 <entry align="left">
1052 <constant>GL_PACK_LSB_FIRST</constant>
1053 </entry>
1054 <entry align="center">
1055 boolean
1056 </entry>
1057 <entry align="center">
1058 false
1059 </entry>
1060 <entry align="center">
1061 true or false
1062 </entry>
1063 </row>
1064 <row>
1065 <entry align="left">
1066 <constant>GL_PACK_ROW_LENGTH</constant>
1067 </entry>
1068 <entry align="center">
1069 integer
1070 </entry>
1071 <entry align="center">
1072 0
1073 </entry>
1074 <entry align="center">
1075 <inlineequation><mml:math>
1076 <!-- eqn: left [ 0,\(if right ): -->
1077 <mml:mfenced open="[" close=")">
1078 <mml:mn>0</mml:mn>
1079 <mml:infinity/>
1080 </mml:mfenced>
1081 </mml:math></inlineequation>
1082 </entry>
1083 </row>
1084 <row>
1085 <entry align="left">
1086 <constant>GL_PACK_IMAGE_HEIGHT</constant>
1087 </entry>
1088 <entry align="center">
1089 integer
1090 </entry>
1091 <entry align="center">
1092 0
1093 </entry>
1094 <entry align="center">
1095 <inlineequation><mml:math>
1096 <!-- eqn: left [ 0, \(if right ): -->
1097 <mml:mfenced open="[" close=")">
1098 <mml:mn>0</mml:mn>
1099 <mml:infinity/>
1100 </mml:mfenced>
1101 </mml:math></inlineequation>
1102 </entry>
1103 </row>
1104 <row>
1105 <entry align="left">
1106 <constant>GL_PACK_SKIP_ROWS</constant>
1107 </entry>
1108 <entry align="center">
1109 integer
1110 </entry>
1111 <entry align="center">
1112 0
1113 </entry>
1114 <entry align="center">
1115 <inlineequation><mml:math>
1116 <!-- eqn: left [ 0,\(if right ): -->
1117 <mml:mfenced open="[" close=")">
1118 <mml:mn>0</mml:mn>
1119 <mml:infinity/>
1120 </mml:mfenced>
1121 </mml:math></inlineequation>
1122 </entry>
1123 </row>
1124 <row>
1125 <entry align="left">
1126 <constant>GL_PACK_SKIP_PIXELS</constant>
1127 </entry>
1128 <entry align="center">
1129 integer
1130 </entry>
1131 <entry align="center">
1132 0
1133 </entry>
1134 <entry align="center">
1135 <inlineequation><mml:math>
1136 <!-- eqn: left [ 0,\(if right ): -->
1137 <mml:mfenced open="[" close=")">
1138 <mml:mn>0</mml:mn>
1139 <mml:infinity/>
1140 </mml:mfenced>
1141 </mml:math></inlineequation>
1142 </entry>
1143 </row>
1144 <row>
1145 <entry align="left">
1146 <constant>GL_PACK_SKIP_IMAGES</constant>
1147 </entry>
1148 <entry align="center">
1149 integer
1150 </entry>
1151 <entry align="center">
1152 0
1153 </entry>
1154 <entry align="center">
1155 <inlineequation><mml:math>
1156 <!-- eqn: left [ 0,\(if right ): -->
1157 <mml:mfenced open="[" close=")">
1158 <mml:mn>0</mml:mn>
1159 <mml:infinity/>
1160 </mml:mfenced>
1161 </mml:math></inlineequation>
1162 </entry>
1163 </row>
1164 <row>
1165 <entry align="left">
1166 <constant>GL_PACK_ALIGNMENT</constant>
1167 </entry>
1168 <entry align="center">
1169 integer
1170 </entry>
1171 <entry align="center">
1172 4
1173 </entry>
1174 <entry align="center">
1175 1, 2, 4, or 8
1176 </entry>
1177 </row>
1178 <row>
1179 <entry align="left">
1180 <constant>GL_UNPACK_SWAP_BYTES</constant>
1181 </entry>
1182 <entry align="center">
1183 boolean
1184 </entry>
1185 <entry align="center">
1186 false
1187 </entry>
1188 <entry align="center">
1189 true or false
1190 </entry>
1191 </row>
1192 <row>
1193 <entry align="left">
1194 <constant>GL_UNPACK_LSB_FIRST</constant>
1195 </entry>
1196 <entry align="center">
1197 boolean
1198 </entry>
1199 <entry align="center">
1200 false
1201 </entry>
1202 <entry align="center">
1203 true or false
1204 </entry>
1205 </row>
1206 <row>
1207 <entry align="left">
1208 <constant>GL_UNPACK_ROW_LENGTH</constant>
1209 </entry>
1210 <entry align="center">
1211 integer
1212 </entry>
1213 <entry align="center">
1214 0
1215 </entry>
1216 <entry align="center">
1217 <inlineequation><mml:math>
1218 <!-- eqn: left [ 0,\(if right ): -->
1219 <mml:mfenced open="[" close=")">
1220 <mml:mn>0</mml:mn>
1221 <mml:infinity/>
1222 </mml:mfenced>
1223 </mml:math></inlineequation>
1224 </entry>
1225 </row>
1226 <row>
1227 <entry align="left">
1228 <constant>GL_UNPACK_IMAGE_HEIGHT</constant>
1229 </entry>
1230 <entry align="center">
1231 integer
1232 </entry>
1233 <entry align="center">
1234 0
1235 </entry>
1236 <entry align="center">
1237 <inlineequation><mml:math>
1238 <!-- eqn: left [ 0,\(if right ): -->
1239 <mml:mfenced open="[" close=")">
1240 <mml:mn>0</mml:mn>
1241 <mml:infinity/>
1242 </mml:mfenced>
1243 </mml:math></inlineequation>
1244 </entry>
1245 </row>
1246 <row>
1247 <entry align="left">
1248 <constant>GL_UNPACK_SKIP_ROWS</constant>
1249 </entry>
1250 <entry align="center">
1251 integer
1252 </entry>
1253 <entry align="center">
1254 0
1255 </entry>
1256 <entry align="center">
1257 <inlineequation><mml:math>
1258 <!-- eqn: left [ 0,\(if right ): -->
1259 <mml:mfenced open="[" close=")">
1260 <mml:mn>0</mml:mn>
1261 <mml:infinity/>
1262 </mml:mfenced>
1263 </mml:math></inlineequation>
1264 </entry>
1265 </row>
1266 <row>
1267 <entry align="left">
1268 <constant>GL_UNPACK_SKIP_PIXELS</constant>
1269 </entry>
1270 <entry align="center">
1271 integer
1272 </entry>
1273 <entry align="center">
1274 0
1275 </entry>
1276 <entry align="center">
1277 <inlineequation><mml:math>
1278 <!-- eqn: left [ 0,\(if right ): -->
1279 <mml:mfenced open="[" close=")">
1280 <mml:mn>0</mml:mn>
1281 <mml:infinity/>
1282 </mml:mfenced>
1283 </mml:math></inlineequation>
1284 </entry>
1285 </row>
1286 <row>
1287 <entry align="left">
1288 <constant>GL_UNPACK_SKIP_IMAGES</constant>
1289 </entry>
1290 <entry align="center">
1291 integer
1292 </entry>
1293 <entry align="center">
1294 0
1295 </entry>
1296 <entry align="center">
1297 <inlineequation><mml:math>
1298 <!-- eqn: left [ 0,\(if right ): -->
1299 <mml:mfenced open="[" close=")">
1300 <mml:mn>0</mml:mn>
1301 <mml:infinity/>
1302 </mml:mfenced>
1303 </mml:math></inlineequation>
1304 </entry>
1305 </row>
1306 <row>
1307 <entry align="left">
1308 <constant>GL_UNPACK_ALIGNMENT</constant>
1309 </entry>
1310 <entry align="center">
1311 integer
1312 </entry>
1313 <entry align="center">
1314 4
1315 </entry>
1316 <entry align="center">
1317 1, 2, 4, or 8
1318 </entry>
1319 </row>
1320 </tbody>
1321 </tgroup>
1322 </informaltable>
1323 <para>
1324 <function>glPixelStoref</function> can be used to set any pixel store parameter.
1325 If the parameter type is boolean,
1326 then if <parameter>param</parameter> is 0,
1327 the parameter is false;
1328 otherwise it is set to true.
1329 If <parameter>pname</parameter> is a integer type parameter,
1330 <parameter>param</parameter> is rounded to the nearest integer.
1331 </para>
1332 <para>
1333 Likewise, <function>glPixelStorei</function> can also be used to set any of the
1334 pixel store parameters.
1335 Boolean parameters are set to false if <parameter>param</parameter> is 0 and true otherwise.
1336 </para>
1337 </refsect1>
1338 <refsect1 id="errors"><title>Errors</title>
1339 <para>
1340 <constant>GL_INVALID_ENUM</constant> is generated if <parameter>pname</parameter> is not an accepted value.
1341 </para>
1342 <para>
1343 <constant>GL_INVALID_VALUE</constant> is generated if a negative row length,
1344 pixel skip,
1345 or row skip value is specified,
1346 or if alignment is specified as other than 1, 2, 4, or 8.
1347 </para>
1348 </refsect1>
1349 <refsect1 id="associatedgets"><title>Associated Gets</title>
1350 <para>
1351 <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_PACK_SWAP_BYTES</constant>
1352 </para>
1353 <para>
1354 <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_PACK_LSB_FIRST</constant>
1355 </para>
1356 <para>
1357 <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_PACK_ROW_LENGTH</constant>
1358 </para>
1359 <para>
1360 <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_PACK_IMAGE_HEIGHT</constant>
1361 </para>
1362 <para>
1363 <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_PACK_SKIP_ROWS</constant>
1364 </para>
1365 <para>
1366 <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_PACK_SKIP_PIXELS</constant>
1367 </para>
1368 <para>
1369 <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_PACK_SKIP_IMAGES</constant>
1370 </para>
1371 <para>
1372 <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_PACK_ALIGNMENT</constant>
1373 </para>
1374 <para>
1375 <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_UNPACK_SWAP_BYTES</constant>
1376 </para>
1377 <para>
1378 <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_UNPACK_LSB_FIRST</constant>
1379 </para>
1380 <para>
1381 <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_UNPACK_ROW_LENGTH</constant>
1382 </para>
1383 <para>
1384 <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_UNPACK_IMAGE_HEIGHT</constant>
1385 </para>
1386 <para>
1387 <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_UNPACK_SKIP_ROWS</constant>
1388 </para>
1389 <para>
1390 <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_UNPACK_SKIP_PIXELS</constant>
1391 </para>
1392 <para>
1393 <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_UNPACK_SKIP_IMAGES</constant>
1394 </para>
1395 <para>
1396 <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_UNPACK_ALIGNMENT</constant>
1397 </para>
1398 </refsect1>
1399 <refsect1 id="seealso"><title>See Also</title>
1400 <para>
1401 <citerefentry><refentrytitle>glReadPixels</refentrytitle></citerefentry>,
1402 <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>,
1403 <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>,
1404 <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>,
1405 <citerefentry><refentrytitle>glTexSubImage1D</refentrytitle></citerefentry>,
1406 <citerefentry><refentrytitle>glTexSubImage2D</refentrytitle></citerefentry>,
1407 <citerefentry><refentrytitle>glTexSubImage3D</refentrytitle></citerefentry>
1408 </para>
1409 </refsect1>
1410 <refsect1 id="Copyright"><title>Copyright</title>
1411 <para>
1412 Copyright <trademark class="copyright"></trademark> 1991-2006
1413 Silicon Graphics, Inc. This document is licensed under the SGI
1414 Free Software B License. For details, see
1415 <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>.
1416 </para>
1417 </refsect1>
1418</refentry>