1 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN" "xhtml1-transitional.dtd">
2 <!-- saved from url=(0013)about:internet -->
3 <?xml-stylesheet type=
"text/xsl" href=
"mathml.xsl"?><html xmlns=
"http://www.w3.org/1999/xhtml" xmlns:
pref=
"http://www.w3.org/2002/Math/preference" pref:
renderer=
"mathplayer-dl"><head><meta http-equiv=
"Content-Type" content=
"text/html; charset=UTF-8" /><title>glPixelStore
</title><meta name=
"generator" content=
"DocBook XSL Stylesheets V1.73.2" /></head><body><div class=
"refentry" lang=
"en" xml:
lang=
"en"><a id=
"glPixelStore"></a><div class=
"titlepage"></div><div class=
"refnamediv"><h2>Name
</h2><p>glPixelStore — set pixel storage modes
</p></div><div class=
"refsynopsisdiv"><h2>C Specification
</h2><div class=
"funcsynopsis"><table border=
"0" summary=
"Function synopsis" cellspacing=
"0" cellpadding=
"0"><tr><td><code class=
"funcdef">void
<b class=
"fsfunc">glPixelStoref
</b>(
</code></td><td>GLenum
</td><td><var class=
"pdparam">pname
</var>,
</td></tr><tr><td> </td><td>GLfloat
</td><td><var class=
"pdparam">param
</var><code>)
</code>;
</td></tr></table></div><div class=
"funcsynopsis"><table border=
"0" summary=
"Function synopsis" cellspacing=
"0" cellpadding=
"0"><tr><td><code class=
"funcdef">void
<b class=
"fsfunc">glPixelStorei
</b>(
</code></td><td>GLenum
</td><td><var class=
"pdparam">pname
</var>,
</td></tr><tr><td> </td><td>GLint
</td><td><var class=
"pdparam">param
</var><code>)
</code>;
</td></tr></table></div></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"parameters"></a><h2>Parameters
</h2><div class=
"variablelist"><dl><dt><span class=
"term"><em class=
"parameter"><code>pname
</code></em></span></dt><dd><p>
4 Specifies the symbolic name of the parameter to be set.
5 Six values affect the packing of pixel data into memory:
6 <code class=
"constant">GL_PACK_SWAP_BYTES
</code>,
7 <code class=
"constant">GL_PACK_LSB_FIRST
</code>,
8 <code class=
"constant">GL_PACK_ROW_LENGTH
</code>,
9 <code class=
"constant">GL_PACK_IMAGE_HEIGHT
</code>,
10 <code class=
"constant">GL_PACK_SKIP_PIXELS
</code>,
11 <code class=
"constant">GL_PACK_SKIP_ROWS
</code>,
12 <code class=
"constant">GL_PACK_SKIP_IMAGES
</code>, and
13 <code class=
"constant">GL_PACK_ALIGNMENT
</code>.
14 Six more affect the unpacking of pixel data
<span class=
"emphasis"><em>from
</em></span> memory:
15 <code class=
"constant">GL_UNPACK_SWAP_BYTES
</code>,
16 <code class=
"constant">GL_UNPACK_LSB_FIRST
</code>,
17 <code class=
"constant">GL_UNPACK_ROW_LENGTH
</code>,
18 <code class=
"constant">GL_UNPACK_IMAGE_HEIGHT
</code>,
19 <code class=
"constant">GL_UNPACK_SKIP_PIXELS
</code>,
20 <code class=
"constant">GL_UNPACK_SKIP_ROWS
</code>,
21 <code class=
"constant">GL_UNPACK_SKIP_IMAGES
</code>, and
22 <code class=
"constant">GL_UNPACK_ALIGNMENT
</code>.
23 </p></dd><dt><span class=
"term"><em class=
"parameter"><code>param
</code></em></span></dt><dd><p>
24 Specifies the value that
<em class=
"parameter"><code>pname
</code></em> is set to.
25 </p></dd></dl></div></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"description"></a><h2>Description
</h2><p>
26 <code class=
"function">glPixelStore
</code> sets pixel storage modes that affect the operation of subsequent
27 <a class=
"citerefentry" href=
"glDrawPixels.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glDrawPixels
</span></span></a> and
<a class=
"citerefentry" href=
"glReadPixels.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glReadPixels
</span></span></a> as well as the unpacking of
28 polygon stipple patterns (see
<a class=
"citerefentry" href=
"glPolygonStipple.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glPolygonStipple
</span></span></a>), bitmaps (see
29 <a class=
"citerefentry" href=
"glBitmap.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glBitmap
</span></span></a>), texture patterns (see
<a class=
"citerefentry" href=
"glTexImage1D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexImage1D
</span></span></a>,
30 <a class=
"citerefentry" href=
"glTexImage2D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexImage2D
</span></span></a>,
<a class=
"citerefentry" href=
"glTexImage3D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexImage3D
</span></span></a>,
<a class=
"citerefentry" href=
"glTexSubImage1D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexSubImage1D
</span></span></a>,
31 <a class=
"citerefentry" href=
"glTexSubImage2D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexSubImage2D
</span></span></a>,
<a class=
"citerefentry" href=
"glTexSubImage3D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexSubImage3D
</span></span></a>).
32 Additionally, if the
<code class=
"code">ARB_imaging
</code> extension is supported, pixel
33 storage modes affect convolution filters
34 (see
<a class=
"citerefentry" href=
"glConvolutionFilter1D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glConvolutionFilter1D
</span></span></a>,
<a class=
"citerefentry" href=
"glConvolutionFilter2D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glConvolutionFilter2D
</span></span></a>, and
35 <a class=
"citerefentry" href=
"glSeparableFilter2D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glSeparableFilter2D
</span></span></a>, color table (see
<a class=
"citerefentry" href=
"glColorTable.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glColorTable
</span></span></a>, and
36 <a class=
"citerefentry" href=
"glColorSubTable.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glColorSubTable
</span></span></a>, and unpacking histogram (See
<a class=
"citerefentry" href=
"glHistogram.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glHistogram
</span></span></a>),
37 and minmax (See
<a class=
"citerefentry" href=
"glMinmax.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glMinmax
</span></span></a>) data.
39 <em class=
"parameter"><code>pname
</code></em> is a symbolic constant indicating the parameter to be set, and
40 <em class=
"parameter"><code>param
</code></em> is the new value. Six of the twelve storage parameters affect
41 how pixel data is returned to client memory.
43 </p><div class=
"variablelist"><dl><dt><span class=
"term"><code class=
"constant">GL_PACK_SWAP_BYTES
</code></span></dt><dd><p>
45 byte ordering for multibyte color components,
51 if a four-byte component consists of bytes
52 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
54 <mml:msub><mml:mi mathvariant=
"italic">b
</mml:mi>
58 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
60 <mml:msub><mml:mi mathvariant=
"italic">b
</mml:mi>
64 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
66 <mml:msub><mml:mi mathvariant=
"italic">b
</mml:mi>
70 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
72 <mml:msub><mml:mi mathvariant=
"italic">b
</mml:mi>
76 it is stored in memory as
77 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
79 <mml:msub><mml:mi mathvariant=
"italic">b
</mml:mi>
83 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
85 <mml:msub><mml:mi mathvariant=
"italic">b
</mml:mi>
89 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
91 <mml:msub><mml:mi mathvariant=
"italic">b
</mml:mi>
95 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
97 <mml:msub><mml:mi mathvariant=
"italic">b
</mml:mi>
101 if
<code class=
"constant">GL_PACK_SWAP_BYTES
</code> is true.
102 <code class=
"constant">GL_PACK_SWAP_BYTES
</code> has no effect on the memory order of components
104 only on the order of bytes within components or indices.
106 the three components of a
<code class=
"constant">GL_RGB
</code> format pixel are always stored with
110 regardless of the value of
<code class=
"constant">GL_PACK_SWAP_BYTES
</code>.
111 </p></dd><dt><span class=
"term"><code class=
"constant">GL_PACK_LSB_FIRST
</code></span></dt><dd><p>
113 bits are ordered within a byte from least significant to most significant;
115 the first bit in each byte is the most significant one.
116 This parameter is significant for bitmap data only.
117 </p></dd><dt><span class=
"term"><code class=
"constant">GL_PACK_ROW_LENGTH
</code></span></dt><dd><p>
119 <code class=
"constant">GL_PACK_ROW_LENGTH
</code> defines the number of pixels in a row.
120 If the first pixel of a row is placed at location
121 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">p
</mml:mi></mml:math>
123 then the location of the first pixel of the next row is obtained by skipping
125 </p><div class=
"informalequation"><mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
128 <mml:mi mathvariant=
"italic">k
</mml:mi>
130 <mml:mfenced open=
"{" close=
"">
135 <mml:mi mathvariant=
"italic">n
</mml:mi>
137 <mml:mi mathvariant=
"italic">l
</mml:mi>
142 <mml:mfenced open=
"" close=
"">
144 <mml:mi mathvariant=
"italic">a
</mml:mi>
145 <mml:mi mathvariant=
"italic">s
</mml:mi>
149 <mml:mfenced open=
"⌈" close=
"⌉">
151 <mml:mfenced open=
"" close=
"">
153 <mml:mi mathvariant=
"italic">s
</mml:mi>
155 <mml:mi mathvariant=
"italic">n
</mml:mi>
157 <mml:mi mathvariant=
"italic">l
</mml:mi>
160 <mml:mi mathvariant=
"italic">a
</mml:mi>
170 <mml:mi mathvariant=
"italic">s
</mml:mi>
171 <mml:mo>>=
</mml:mo>
172 <mml:mi mathvariant=
"italic">a
</mml:mi>
177 <mml:mi mathvariant=
"italic">s
</mml:mi>
178 <mml:mo><</mml:mo>
179 <mml:mi mathvariant=
"italic">a
</mml:mi>
188 components or indices,
190 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">n
</mml:mi></mml:math>
191 is the number of components or indices in a pixel,
192 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">l
</mml:mi></mml:math>
193 is the number of pixels in a row
194 (
<code class=
"constant">GL_PACK_ROW_LENGTH
</code> if it is greater than
0,
196 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">width
</mml:mi></mml:math>
197 argument to the pixel routine otherwise),
198 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">a
</mml:mi></mml:math>
199 is the value of
<code class=
"constant">GL_PACK_ALIGNMENT
</code>, and
200 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">s
</mml:mi></mml:math>
201 is the size, in bytes, of a single component
203 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
206 <mml:mi mathvariant=
"italic">a
</mml:mi>
207 <mml:mo><</mml:mo>
208 <mml:mi mathvariant=
"italic">s
</mml:mi>
212 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
215 <mml:mi mathvariant=
"italic">a
</mml:mi>
217 <mml:mi mathvariant=
"italic">s
</mml:mi>
220 In the case of
1-bit values,
221 the location of the next row is obtained by skipping
223 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
226 <mml:mi mathvariant=
"italic">k
</mml:mi>
231 <mml:mi mathvariant=
"italic">a
</mml:mi>
233 <mml:mfenced open=
"⌈" close=
"⌉">
235 <mml:mfenced open=
"" close=
"">
237 <mml:mi mathvariant=
"italic">n
</mml:mi>
239 <mml:mi mathvariant=
"italic">l
</mml:mi>
242 <mml:mfenced open=
"" close=
"">
246 <mml:mi mathvariant=
"italic">a
</mml:mi>
255 components or indices.
257 The word
<span class=
"emphasis"><em>component
</em></span> in this description refers to the nonindex values
263 Storage format
<code class=
"constant">GL_RGB
</code>,
265 has three components per pixel:
269 </p></dd><dt><span class=
"term"><code class=
"constant">GL_PACK_IMAGE_HEIGHT
</code></span></dt><dd><p>
271 <code class=
"constant">GL_PACK_IMAGE_HEIGHT
</code> defines the number of pixels in an image
272 three-dimensional texture volume, where ``image'' is defined by all pixels
273 sharing the same third dimension index.
274 If the first pixel of a row is placed at location
275 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">p
</mml:mi></mml:math>
277 then the location of the first pixel of the next row is obtained by skipping
279 </p><div class=
"informalequation"><mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
282 <mml:mi mathvariant=
"italic">k
</mml:mi>
284 <mml:mfenced open=
"{" close=
"">
289 <mml:mi mathvariant=
"italic">n
</mml:mi>
291 <mml:mi mathvariant=
"italic">l
</mml:mi>
293 <mml:mi mathvariant=
"italic">h
</mml:mi>
298 <mml:mfenced open=
"" close=
"">
300 <mml:mi mathvariant=
"italic">a
</mml:mi>
301 <mml:mi mathvariant=
"italic">s
</mml:mi>
305 <mml:mfenced open=
"⌈" close=
"⌉">
307 <mml:mfenced open=
"" close=
"">
309 <mml:mi mathvariant=
"italic">s
</mml:mi>
311 <mml:mi mathvariant=
"italic">n
</mml:mi>
313 <mml:mi mathvariant=
"italic">l
</mml:mi>
315 <mml:mi mathvariant=
"italic">h
</mml:mi>
318 <mml:mi mathvariant=
"italic">a
</mml:mi>
328 <mml:mi mathvariant=
"italic">s
</mml:mi>
329 <mml:mo>>=
</mml:mo>
330 <mml:mi mathvariant=
"italic">a
</mml:mi>
335 <mml:mi mathvariant=
"italic">s
</mml:mi>
336 <mml:mo><</mml:mo>
337 <mml:mi mathvariant=
"italic">a
</mml:mi>
346 components or indices, where
347 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">n
</mml:mi></mml:math>
348 is the number of components or indices
350 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">l
</mml:mi></mml:math>
351 is the number of pixels in a row
352 (
<code class=
"constant">GL_PACK_ROW_LENGTH
</code> if it is greater than
0, the
353 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">width
</mml:mi></mml:math>
354 argument to
<a class=
"citerefentry" href=
"glTexImage3D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexImage3D
</span></span></a> otherwise),
355 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">h
</mml:mi></mml:math>
357 rows in a pixel image (
<code class=
"constant">GL_PACK_IMAGE_HEIGHT
</code> if it is greater than
359 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">height
</mml:mi></mml:math>
360 argument to the
<a class=
"citerefentry" href=
"glTexImage3D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexImage3D
</span></span></a> routine otherwise),
361 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">a
</mml:mi></mml:math>
363 <code class=
"constant">GL_PACK_ALIGNMENT
</code>, and
364 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">s
</mml:mi></mml:math>
365 is the size, in bytes, of a single
367 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
370 <mml:mi mathvariant=
"italic">a
</mml:mi>
371 <mml:mo><</mml:mo>
372 <mml:mi mathvariant=
"italic">s
</mml:mi>
376 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
379 <mml:mi mathvariant=
"italic">a
</mml:mi>
381 <mml:mi mathvariant=
"italic">s
</mml:mi>
385 The word
<span class=
"emphasis"><em>component
</em></span> in this description refers to the nonindex values
391 Storage format
<code class=
"constant">GL_RGB
</code>,
393 has three components per pixel:
397 </p></dd><dt><span class=
"term"><code class=
"constant">GL_PACK_SKIP_PIXELS
</code>,
<code class=
"constant">GL_PACK_SKIP_ROWS
</code>, and
<code class=
"constant">GL_PACK_SKIP_IMAGES
</code></span></dt><dd><p>
398 These values are provided as a convenience to the programmer;
399 they provide no functionality that cannot be duplicated simply by
400 incrementing the pointer passed to
<a class=
"citerefentry" href=
"glReadPixels.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glReadPixels
</span></span></a>.
401 Setting
<code class=
"constant">GL_PACK_SKIP_PIXELS
</code> to
402 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">i
</mml:mi></mml:math>
403 is equivalent to incrementing
405 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
408 <mml:mi mathvariant=
"italic">i
</mml:mi>
410 <mml:mi mathvariant=
"italic">n
</mml:mi>
413 components or indices,
415 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">n
</mml:mi></mml:math>
416 is the number of components or indices in each pixel.
417 Setting
<code class=
"constant">GL_PACK_SKIP_ROWS
</code> to
418 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">j
</mml:mi></mml:math>
419 is equivalent to incrementing
421 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
424 <mml:mi mathvariant=
"italic">j
</mml:mi>
426 <mml:mi mathvariant=
"italic">m
</mml:mi>
429 components or indices,
431 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">m
</mml:mi></mml:math>
432 is the number of components or indices per row,
433 as just computed in the
<code class=
"constant">GL_PACK_ROW_LENGTH
</code> section.
434 Setting
<code class=
"constant">GL_PACK_SKIP_IMAGES
</code> to
435 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">k
</mml:mi></mml:math>
436 is equivalent to incrementing
438 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
441 <mml:mi mathvariant=
"italic">k
</mml:mi>
443 <mml:mi mathvariant=
"italic">p
</mml:mi>
447 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">p
</mml:mi></mml:math>
448 is the number of components or indices
449 per image, as computed in the
<code class=
"constant">GL_PACK_IMAGE_HEIGHT
</code> section.
450 </p></dd><dt><span class=
"term"><code class=
"constant">GL_PACK_ALIGNMENT
</code></span></dt><dd><p>
451 Specifies the alignment requirements for the start of each pixel row in memory.
452 The allowable values are
454 2 (rows aligned to even-numbered bytes),
455 4 (word-alignment), and
456 8 (rows start on double-word boundaries).
457 </p></dd></dl></div><p>
458 The other six of the twelve storage parameters affect how pixel data is
459 read from client memory.
460 These values are significant for
<a class=
"citerefentry" href=
"glDrawPixels.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glDrawPixels
</span></span></a>,
461 <a class=
"citerefentry" href=
"glTexImage1D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexImage1D
</span></span></a>,
462 <a class=
"citerefentry" href=
"glTexImage2D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexImage2D
</span></span></a>,
463 <a class=
"citerefentry" href=
"glTexImage3D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexImage3D
</span></span></a>,
464 <a class=
"citerefentry" href=
"glTexSubImage1D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexSubImage1D
</span></span></a>,
465 <a class=
"citerefentry" href=
"glTexSubImage2D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexSubImage2D
</span></span></a>,
466 <a class=
"citerefentry" href=
"glTexSubImage3D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexSubImage3D
</span></span></a>,
467 <a class=
"citerefentry" href=
"glBitmap.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glBitmap
</span></span></a>, and
468 <a class=
"citerefentry" href=
"glPolygonStipple.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glPolygonStipple
</span></span></a>.
470 Additionally, if the
<code class=
"code">ARB_imaging
</code> extension is supported,
471 <a class=
"citerefentry" href=
"glColorTable.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glColorTable
</span></span></a>,
472 <a class=
"citerefentry" href=
"glColorSubTable.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glColorSubTable
</span></span></a>,
473 <a class=
"citerefentry" href=
"glConvolutionFilter1D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glConvolutionFilter1D
</span></span></a>,
474 <a class=
"citerefentry" href=
"glConvolutionFilter2D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glConvolutionFilter2D
</span></span></a>, and
475 <a class=
"citerefentry" href=
"glSeparableFilter2D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glSeparableFilter2D
</span></span></a>.
477 </p><div class=
"variablelist"><dl><dt><span class=
"term"><code class=
"constant">GL_UNPACK_SWAP_BYTES
</code></span></dt><dd><p>
479 byte ordering for multibyte color components,
485 if a four-byte component consists of bytes
486 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
488 <mml:msub><mml:mi mathvariant=
"italic">b
</mml:mi>
492 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
494 <mml:msub><mml:mi mathvariant=
"italic">b
</mml:mi>
498 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
500 <mml:msub><mml:mi mathvariant=
"italic">b
</mml:mi>
504 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
506 <mml:msub><mml:mi mathvariant=
"italic">b
</mml:mi>
510 it is taken from memory as
511 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
513 <mml:msub><mml:mi mathvariant=
"italic">b
</mml:mi>
517 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
519 <mml:msub><mml:mi mathvariant=
"italic">b
</mml:mi>
523 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
525 <mml:msub><mml:mi mathvariant=
"italic">b
</mml:mi>
529 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
531 <mml:msub><mml:mi mathvariant=
"italic">b
</mml:mi>
535 if
<code class=
"constant">GL_UNPACK_SWAP_BYTES
</code> is true.
536 <code class=
"constant">GL_UNPACK_SWAP_BYTES
</code> has no effect on the memory order of components
538 only on the order of bytes within components or indices.
540 the three components of a
<code class=
"constant">GL_RGB
</code> format pixel are always stored with
544 regardless of the value of
<code class=
"constant">GL_UNPACK_SWAP_BYTES
</code>.
545 </p></dd><dt><span class=
"term"><code class=
"constant">GL_UNPACK_LSB_FIRST
</code></span></dt><dd><p>
547 bits are ordered within a byte from least significant to most significant;
549 the first bit in each byte is the most significant one.
550 This is relevant only for bitmap data.
551 </p></dd><dt><span class=
"term"><code class=
"constant">GL_UNPACK_ROW_LENGTH
</code></span></dt><dd><p>
553 <code class=
"constant">GL_UNPACK_ROW_LENGTH
</code> defines the number of pixels in a row.
554 If the first pixel of a row is placed at location
555 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">p
</mml:mi></mml:math>
557 then the location of the first pixel of the next row is obtained by skipping
559 </p><div class=
"informalequation"><mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
562 <mml:mi mathvariant=
"italic">k
</mml:mi>
564 <mml:mfenced open=
"{" close=
"">
569 <mml:mi mathvariant=
"italic">n
</mml:mi>
571 <mml:mi mathvariant=
"italic">l
</mml:mi>
576 <mml:mfenced open=
"" close=
"">
578 <mml:mi mathvariant=
"italic">a
</mml:mi>
579 <mml:mi mathvariant=
"italic">s
</mml:mi>
583 <mml:mfenced open=
"⌈" close=
"⌉">
585 <mml:mfenced open=
"" close=
"">
587 <mml:mi mathvariant=
"italic">s
</mml:mi>
589 <mml:mi mathvariant=
"italic">n
</mml:mi>
591 <mml:mi mathvariant=
"italic">l
</mml:mi>
594 <mml:mi mathvariant=
"italic">a
</mml:mi>
604 <mml:mi mathvariant=
"italic">s
</mml:mi>
605 <mml:mo>>=
</mml:mo>
606 <mml:mi mathvariant=
"italic">a
</mml:mi>
611 <mml:mi mathvariant=
"italic">s
</mml:mi>
612 <mml:mo><</mml:mo>
613 <mml:mi mathvariant=
"italic">a
</mml:mi>
622 components or indices,
624 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">n
</mml:mi></mml:math>
625 is the number of components or indices in a pixel,
626 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">l
</mml:mi></mml:math>
627 is the number of pixels in a row
628 (
<code class=
"constant">GL_UNPACK_ROW_LENGTH
</code> if it is greater than
0,
630 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">width
</mml:mi></mml:math>
631 argument to the pixel routine otherwise),
632 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">a
</mml:mi></mml:math>
633 is the value of
<code class=
"constant">GL_UNPACK_ALIGNMENT
</code>, and
634 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">s
</mml:mi></mml:math>
635 is the size, in bytes, of a single component
637 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
640 <mml:mi mathvariant=
"italic">a
</mml:mi>
641 <mml:mo><</mml:mo>
642 <mml:mi mathvariant=
"italic">s
</mml:mi>
646 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
649 <mml:mi mathvariant=
"italic">a
</mml:mi>
651 <mml:mi mathvariant=
"italic">s
</mml:mi>
654 In the case of
1-bit values,
655 the location of the next row is obtained by skipping
657 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
660 <mml:mi mathvariant=
"italic">k
</mml:mi>
665 <mml:mi mathvariant=
"italic">a
</mml:mi>
667 <mml:mfenced open=
"⌈" close=
"⌉">
669 <mml:mfenced open=
"" close=
"">
671 <mml:mi mathvariant=
"italic">n
</mml:mi>
673 <mml:mi mathvariant=
"italic">l
</mml:mi>
676 <mml:mfenced open=
"" close=
"">
680 <mml:mi mathvariant=
"italic">a
</mml:mi>
689 components or indices.
691 The word
<span class=
"emphasis"><em>component
</em></span> in this description refers to the nonindex values
697 Storage format
<code class=
"constant">GL_RGB
</code>,
699 has three components per pixel:
703 </p></dd><dt><span class=
"term"><code class=
"constant">GL_UNPACK_IMAGE_HEIGHT
</code></span></dt><dd><p>
705 <code class=
"constant">GL_UNPACK_IMAGE_HEIGHT
</code> defines the number of pixels in an image of
706 a three-dimensional texture volume. Where ``image'' is defined by all
707 pixel sharing the same third dimension index.
708 If the first pixel of a row is placed at location
709 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">p
</mml:mi></mml:math>
711 then the location of the first pixel of the next row is obtained by skipping
713 </p><div class=
"informalequation"><mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
716 <mml:mi mathvariant=
"italic">k
</mml:mi>
718 <mml:mfenced open=
"{" close=
"">
723 <mml:mi mathvariant=
"italic">n
</mml:mi>
725 <mml:mi mathvariant=
"italic">l
</mml:mi>
727 <mml:mi mathvariant=
"italic">h
</mml:mi>
732 <mml:mfenced open=
"" close=
"">
734 <mml:mi mathvariant=
"italic">a
</mml:mi>
735 <mml:mi mathvariant=
"italic">s
</mml:mi>
739 <mml:mfenced open=
"⌈" close=
"⌉">
741 <mml:mfenced open=
"" close=
"">
743 <mml:mi mathvariant=
"italic">s
</mml:mi>
745 <mml:mi mathvariant=
"italic">n
</mml:mi>
747 <mml:mi mathvariant=
"italic">l
</mml:mi>
749 <mml:mi mathvariant=
"italic">h
</mml:mi>
752 <mml:mi mathvariant=
"italic">a
</mml:mi>
762 <mml:mi mathvariant=
"italic">s
</mml:mi>
763 <mml:mo>>=
</mml:mo>
764 <mml:mi mathvariant=
"italic">a
</mml:mi>
769 <mml:mi mathvariant=
"italic">s
</mml:mi>
770 <mml:mo><</mml:mo>
771 <mml:mi mathvariant=
"italic">a
</mml:mi>
780 components or indices,
782 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">n
</mml:mi></mml:math>
783 is the number of components or indices in a pixel,
784 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">l
</mml:mi></mml:math>
785 is the number of pixels in a row
786 (
<code class=
"constant">GL_UNPACK_ROW_LENGTH
</code> if it is greater than
0,
788 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">width
</mml:mi></mml:math>
789 argument to
<a class=
"citerefentry" href=
"glTexImage3D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexImage3D
</span></span></a> otherwise),
790 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">h
</mml:mi></mml:math>
791 is the number of rows in an image (
<code class=
"constant">GL_UNPACK_IMAGE_HEIGHT
</code> if
792 it is greater than
0, the
793 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">height
</mml:mi></mml:math>
794 argument to
<a class=
"citerefentry" href=
"glTexImage3D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexImage3D
</span></span></a> otherwise),
795 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">a
</mml:mi></mml:math>
796 is the value of
<code class=
"constant">GL_UNPACK_ALIGNMENT
</code>, and
797 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">s
</mml:mi></mml:math>
798 is the size, in bytes, of a single component
800 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
803 <mml:mi mathvariant=
"italic">a
</mml:mi>
804 <mml:mo><</mml:mo>
805 <mml:mi mathvariant=
"italic">s
</mml:mi>
809 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
812 <mml:mi mathvariant=
"italic">a
</mml:mi>
814 <mml:mi mathvariant=
"italic">s
</mml:mi>
818 The word
<span class=
"emphasis"><em>component
</em></span> in this description refers to the nonindex values
824 Storage format
<code class=
"constant">GL_RGB
</code>,
826 has three components per pixel:
830 </p></dd><dt><span class=
"term"><code class=
"constant">GL_UNPACK_SKIP_PIXELS
</code> and
<code class=
"constant">GL_UNPACK_SKIP_ROWS
</code></span></dt><dd><p>
831 These values are provided as a convenience to the programmer;
832 they provide no functionality that cannot be duplicated by
833 incrementing the pointer passed to
834 <a class=
"citerefentry" href=
"glDrawPixels.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glDrawPixels
</span></span></a>,
835 <a class=
"citerefentry" href=
"glTexImage1D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexImage1D
</span></span></a>,
836 <a class=
"citerefentry" href=
"glTexImage2D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexImage2D
</span></span></a>,
837 <a class=
"citerefentry" href=
"glTexSubImage1D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexSubImage1D
</span></span></a>,
838 <a class=
"citerefentry" href=
"glTexSubImage2D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexSubImage2D
</span></span></a>,
839 <a class=
"citerefentry" href=
"glBitmap.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glBitmap
</span></span></a>, or
840 <a class=
"citerefentry" href=
"glPolygonStipple.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glPolygonStipple
</span></span></a>.
841 Setting
<code class=
"constant">GL_UNPACK_SKIP_PIXELS
</code> to
842 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">i
</mml:mi></mml:math>
843 is equivalent to incrementing
845 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
848 <mml:mi mathvariant=
"italic">i
</mml:mi>
850 <mml:mi mathvariant=
"italic">n
</mml:mi>
853 components or indices,
855 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">n
</mml:mi></mml:math>
856 is the number of components or indices in each pixel.
857 Setting
<code class=
"constant">GL_UNPACK_SKIP_ROWS
</code> to
858 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">j
</mml:mi></mml:math>
859 is equivalent to incrementing
861 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
864 <mml:mi mathvariant=
"italic">j
</mml:mi>
866 <mml:mi mathvariant=
"italic">k
</mml:mi>
869 components or indices,
871 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">k
</mml:mi></mml:math>
872 is the number of components or indices per row,
873 as just computed in the
<code class=
"constant">GL_UNPACK_ROW_LENGTH
</code> section.
874 </p></dd><dt><span class=
"term"><code class=
"constant">GL_UNPACK_ALIGNMENT
</code></span></dt><dd><p>
875 Specifies the alignment requirements for the start of each pixel row in memory.
876 The allowable values are
878 2 (rows aligned to even-numbered bytes),
879 4 (word-alignment), and
880 8 (rows start on double-word boundaries).
881 </p></dd></dl></div><p>
882 The following table gives the type,
884 and range of valid values for each storage parameter
885 that can be set with
<code class=
"function">glPixelStore
</code>.
887 </p><div class=
"informaltable"><table border=
"1"><colgroup><col align=
"left" /><col align=
"center" /><col align=
"center" /><col align=
"center" /></colgroup><thead><tr><th align=
"left"><span class=
"bold"><strong>
888 <em class=
"parameter"><code>pname
</code></em>
889 </strong></span></th><th align=
"center"><span class=
"bold"><strong>
891 </strong></span></th><th align=
"center"><span class=
"bold"><strong>
893 </strong></span></th><th align=
"center"><span class=
"bold"><strong>
895 </strong></span></th></tr></thead><tbody><tr><td align=
"left">
896 <code class=
"constant">GL_PACK_SWAP_BYTES
</code>
897 </td><td align=
"center">
899 </td><td align=
"center">
901 </td><td align=
"center">
903 </td></tr><tr><td align=
"left">
904 <code class=
"constant">GL_PACK_LSB_FIRST
</code>
905 </td><td align=
"center">
907 </td><td align=
"center">
909 </td><td align=
"center">
911 </td></tr><tr><td align=
"left">
912 <code class=
"constant">GL_PACK_ROW_LENGTH
</code>
913 </td><td align=
"center">
915 </td><td align=
"center">
917 </td><td align=
"center">
918 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
920 <mml:mfenced open=
"[" close=
")">
922 <mml:infinity definitionURL=
"" encoding=
""></mml:infinity>
925 </td></tr><tr><td align=
"left">
926 <code class=
"constant">GL_PACK_IMAGE_HEIGHT
</code>
927 </td><td align=
"center">
929 </td><td align=
"center">
931 </td><td align=
"center">
932 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
934 <mml:mfenced open=
"[" close=
")">
936 <mml:infinity definitionURL=
"" encoding=
""></mml:infinity>
939 </td></tr><tr><td align=
"left">
940 <code class=
"constant">GL_PACK_SKIP_ROWS
</code>
941 </td><td align=
"center">
943 </td><td align=
"center">
945 </td><td align=
"center">
946 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
948 <mml:mfenced open=
"[" close=
")">
950 <mml:infinity definitionURL=
"" encoding=
""></mml:infinity>
953 </td></tr><tr><td align=
"left">
954 <code class=
"constant">GL_PACK_SKIP_PIXELS
</code>
955 </td><td align=
"center">
957 </td><td align=
"center">
959 </td><td align=
"center">
960 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
962 <mml:mfenced open=
"[" close=
")">
964 <mml:infinity definitionURL=
"" encoding=
""></mml:infinity>
967 </td></tr><tr><td align=
"left">
968 <code class=
"constant">GL_PACK_SKIP_IMAGES
</code>
969 </td><td align=
"center">
971 </td><td align=
"center">
973 </td><td align=
"center">
974 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
976 <mml:mfenced open=
"[" close=
")">
978 <mml:infinity definitionURL=
"" encoding=
""></mml:infinity>
981 </td></tr><tr><td align=
"left">
982 <code class=
"constant">GL_PACK_ALIGNMENT
</code>
983 </td><td align=
"center">
985 </td><td align=
"center">
987 </td><td align=
"center">
989 </td></tr><tr><td align=
"left">
990 <code class=
"constant">GL_UNPACK_SWAP_BYTES
</code>
991 </td><td align=
"center">
993 </td><td align=
"center">
995 </td><td align=
"center">
997 </td></tr><tr><td align=
"left">
998 <code class=
"constant">GL_UNPACK_LSB_FIRST
</code>
999 </td><td align=
"center">
1001 </td><td align=
"center">
1003 </td><td align=
"center">
1005 </td></tr><tr><td align=
"left">
1006 <code class=
"constant">GL_UNPACK_ROW_LENGTH
</code>
1007 </td><td align=
"center">
1009 </td><td align=
"center">
1011 </td><td align=
"center">
1012 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
1014 <mml:mfenced open=
"[" close=
")">
1016 <mml:infinity definitionURL=
"" encoding=
""></mml:infinity>
1019 </td></tr><tr><td align=
"left">
1020 <code class=
"constant">GL_UNPACK_IMAGE_HEIGHT
</code>
1021 </td><td align=
"center">
1023 </td><td align=
"center">
1025 </td><td align=
"center">
1026 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
1028 <mml:mfenced open=
"[" close=
")">
1030 <mml:infinity definitionURL=
"" encoding=
""></mml:infinity>
1033 </td></tr><tr><td align=
"left">
1034 <code class=
"constant">GL_UNPACK_SKIP_ROWS
</code>
1035 </td><td align=
"center">
1037 </td><td align=
"center">
1039 </td><td align=
"center">
1040 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
1042 <mml:mfenced open=
"[" close=
")">
1044 <mml:infinity definitionURL=
"" encoding=
""></mml:infinity>
1047 </td></tr><tr><td align=
"left">
1048 <code class=
"constant">GL_UNPACK_SKIP_PIXELS
</code>
1049 </td><td align=
"center">
1051 </td><td align=
"center">
1053 </td><td align=
"center">
1054 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
1056 <mml:mfenced open=
"[" close=
")">
1058 <mml:infinity definitionURL=
"" encoding=
""></mml:infinity>
1061 </td></tr><tr><td align=
"left">
1062 <code class=
"constant">GL_UNPACK_SKIP_IMAGES
</code>
1063 </td><td align=
"center">
1065 </td><td align=
"center">
1067 </td><td align=
"center">
1068 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
1070 <mml:mfenced open=
"[" close=
")">
1072 <mml:infinity definitionURL=
"" encoding=
""></mml:infinity>
1075 </td></tr><tr><td align=
"left">
1076 <code class=
"constant">GL_UNPACK_ALIGNMENT
</code>
1077 </td><td align=
"center">
1079 </td><td align=
"center">
1081 </td><td align=
"center">
1083 </td></tr></tbody></table></div><p>
1084 <code class=
"function">glPixelStoref
</code> can be used to set any pixel store parameter.
1085 If the parameter type is boolean,
1086 then if
<em class=
"parameter"><code>param
</code></em> is
0,
1087 the parameter is false;
1088 otherwise it is set to true.
1089 If
<em class=
"parameter"><code>pname
</code></em> is a integer type parameter,
1090 <em class=
"parameter"><code>param
</code></em> is rounded to the nearest integer.
1092 Likewise,
<code class=
"function">glPixelStorei
</code> can also be used to set any of the
1093 pixel store parameters.
1094 Boolean parameters are set to false if
<em class=
"parameter"><code>param
</code></em> is
0 and true otherwise.
1095 </p></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"notes"></a><h2>Notes
</h2><p>
1096 The pixel storage modes in effect when
1097 <a class=
"citerefentry" href=
"glDrawPixels.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glDrawPixels
</span></span></a>,
1098 <a class=
"citerefentry" href=
"glReadPixels.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glReadPixels
</span></span></a>,
1099 <a class=
"citerefentry" href=
"glTexImage1D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexImage1D
</span></span></a>,
1100 <a class=
"citerefentry" href=
"glTexImage2D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexImage2D
</span></span></a>,
1101 <a class=
"citerefentry" href=
"glTexImage3D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexImage3D
</span></span></a>,
1102 <a class=
"citerefentry" href=
"glTexSubImage1D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexSubImage1D
</span></span></a>,
1103 <a class=
"citerefentry" href=
"glTexSubImage2D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexSubImage2D
</span></span></a>,
1104 <a class=
"citerefentry" href=
"glTexSubImage3D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexSubImage3D
</span></span></a>,
1105 <a class=
"citerefentry" href=
"glBitmap.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glBitmap
</span></span></a>,
1106 or
<a class=
"citerefentry" href=
"glPolygonStipple.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glPolygonStipple
</span></span></a> is placed in a display list control the interpretation
1108 Likewise, if the
<code class=
"code">ARB_imaging
</code> extension is supported, the pixel
1109 storage modes in effect when
1110 <a class=
"citerefentry" href=
"glColorTable.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glColorTable
</span></span></a>,
1111 <a class=
"citerefentry" href=
"glColorSubTable.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glColorSubTable
</span></span></a>,
1112 <a class=
"citerefentry" href=
"glConvolutionFilter1D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glConvolutionFilter1D
</span></span></a>,
1113 <a class=
"citerefentry" href=
"glConvolutionFilter2D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glConvolutionFilter2D
</span></span></a>, of
1114 <a class=
"citerefentry" href=
"glSeparableFilter2D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glSeparableFilter2D
</span></span></a> is placed in a display list control the
1115 interpretation of memory data.
1116 The pixel storage modes in effect when a display list is executed are
1119 Pixel storage modes are client state and must be pushed and restored
1121 <a class=
"citerefentry" href=
"glPushClientAttrib.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glPushClientAttrib
</span></span></a> and
<a class=
"citerefentry" href=
"glPopClientAttrib.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glPopClientAttrib
</span></span></a>.
1122 </p></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"errors"></a><h2>Errors
</h2><p>
1123 <code class=
"constant">GL_INVALID_ENUM
</code> is generated if
<em class=
"parameter"><code>pname
</code></em> is not an accepted value.
1125 <code class=
"constant">GL_INVALID_VALUE
</code> is generated if a negative row length,
1127 or row skip value is specified,
1128 or if alignment is specified as other than
1,
2,
4, or
8.
1130 <code class=
"constant">GL_INVALID_OPERATION
</code> is generated if
<code class=
"function">glPixelStore
</code>
1131 is executed between the execution of
<a class=
"citerefentry" href=
"glBegin.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glBegin
</span></span></a>
1132 and the corresponding execution of
<a class=
"citerefentry" href=
"glEnd.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glEnd
</span></span></a>.
1133 </p></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"associatedgets"></a><h2>Associated Gets
</h2><p>
1134 <a class=
"citerefentry" href=
"glGet.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glGet
</span></span></a> with argument
<code class=
"constant">GL_PACK_SWAP_BYTES
</code>
1136 <a class=
"citerefentry" href=
"glGet.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glGet
</span></span></a> with argument
<code class=
"constant">GL_PACK_LSB_FIRST
</code>
1138 <a class=
"citerefentry" href=
"glGet.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glGet
</span></span></a> with argument
<code class=
"constant">GL_PACK_ROW_LENGTH
</code>
1140 <a class=
"citerefentry" href=
"glGet.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glGet
</span></span></a> with argument
<code class=
"constant">GL_PACK_IMAGE_HEIGHT
</code>
1142 <a class=
"citerefentry" href=
"glGet.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glGet
</span></span></a> with argument
<code class=
"constant">GL_PACK_SKIP_ROWS
</code>
1144 <a class=
"citerefentry" href=
"glGet.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glGet
</span></span></a> with argument
<code class=
"constant">GL_PACK_SKIP_PIXELS
</code>
1146 <a class=
"citerefentry" href=
"glGet.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glGet
</span></span></a> with argument
<code class=
"constant">GL_PACK_SKIP_IMAGES
</code>
1148 <a class=
"citerefentry" href=
"glGet.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glGet
</span></span></a> with argument
<code class=
"constant">GL_PACK_ALIGNMENT
</code>
1150 <a class=
"citerefentry" href=
"glGet.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glGet
</span></span></a> with argument
<code class=
"constant">GL_UNPACK_SWAP_BYTES
</code>
1152 <a class=
"citerefentry" href=
"glGet.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glGet
</span></span></a> with argument
<code class=
"constant">GL_UNPACK_LSB_FIRST
</code>
1154 <a class=
"citerefentry" href=
"glGet.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glGet
</span></span></a> with argument
<code class=
"constant">GL_UNPACK_ROW_LENGTH
</code>
1156 <a class=
"citerefentry" href=
"glGet.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glGet
</span></span></a> with argument
<code class=
"constant">GL_UNPACK_IMAGE_HEIGHT
</code>
1158 <a class=
"citerefentry" href=
"glGet.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glGet
</span></span></a> with argument
<code class=
"constant">GL_UNPACK_SKIP_ROWS
</code>
1160 <a class=
"citerefentry" href=
"glGet.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glGet
</span></span></a> with argument
<code class=
"constant">GL_UNPACK_SKIP_PIXELS
</code>
1162 <a class=
"citerefentry" href=
"glGet.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glGet
</span></span></a> with argument
<code class=
"constant">GL_UNPACK_SKIP_IMAGES
</code>
1164 <a class=
"citerefentry" href=
"glGet.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glGet
</span></span></a> with argument
<code class=
"constant">GL_UNPACK_ALIGNMENT
</code>
1165 </p></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"seealso"></a><h2>See Also
</h2><p>
1166 <a class=
"citerefentry" href=
"glBitmap.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glBitmap
</span></span></a>,
1167 <a class=
"citerefentry" href=
"glColorTable.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glColorTable
</span></span></a>,
1168 <a class=
"citerefentry" href=
"glColorSubTable.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glColorSubTable
</span></span></a>,
1169 <a class=
"citerefentry" href=
"glConvolutionFilter1D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glConvolutionFilter1D
</span></span></a>,
1170 <a class=
"citerefentry" href=
"glConvolutionFilter2D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glConvolutionFilter2D
</span></span></a>,
1171 <a class=
"citerefentry" href=
"glSeparableFilter2D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glSeparableFilter2D
</span></span></a>,
1172 <a class=
"citerefentry" href=
"glDrawPixels.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glDrawPixels
</span></span></a>,
1173 <a class=
"citerefentry" href=
"glHistogram.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glHistogram
</span></span></a>,
1174 <a class=
"citerefentry" href=
"glMinmax.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glMinmax
</span></span></a>,
1175 <a class=
"citerefentry" href=
"glPixelMap.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glPixelMap
</span></span></a>,
1176 <a class=
"citerefentry" href=
"glPixelTransfer.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glPixelTransfer
</span></span></a>,
1177 <a class=
"citerefentry" href=
"glPixelZoom.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glPixelZoom
</span></span></a>,
1178 <a class=
"citerefentry" href=
"glPolygonStipple.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glPolygonStipple
</span></span></a>,
1179 <a class=
"citerefentry" href=
"glPushClientAttrib.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glPushClientAttrib
</span></span></a>,
1180 <a class=
"citerefentry" href=
"glReadPixels.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glReadPixels
</span></span></a>,
1181 <a class=
"citerefentry" href=
"glTexImage1D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexImage1D
</span></span></a>,
1182 <a class=
"citerefentry" href=
"glTexImage2D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexImage2D
</span></span></a>,
1183 <a class=
"citerefentry" href=
"glTexImage3D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexImage3D
</span></span></a>,
1184 <a class=
"citerefentry" href=
"glTexSubImage1D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexSubImage1D
</span></span></a>,
1185 <a class=
"citerefentry" href=
"glTexSubImage2D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexSubImage2D
</span></span></a>,
1186 <a class=
"citerefentry" href=
"glTexSubImage3D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexSubImage3D
</span></span></a>
1187 </p></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"Copyright"></a><h2>Copyright
</h2><p>
1188 Copyright
<span class=
"trademark"></span>©
1991-
2006
1189 Silicon Graphics, Inc. This document is licensed under the SGI
1190 Free Software B License. For details, see
1191 <a class=
"ulink" href=
"http://oss.sgi.com/projects/FreeB/" target=
"_top">http://oss.sgi.com/projects/FreeB/
</a>.
1192 </p></div></div></body></html>