Commit | Line | Data |
---|---|---|
7faf1d71 AW |
1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "xhtml1-transitional.dtd"> | |
3 | <!-- saved from url=(0013)about:internet --> | |
4 | <?xml-stylesheet type="text/xsl" href="mathml.xsl"?><html xmlns="http://www.w3.org/1999/xhtml" xmlns:pref="http://www.w3.org/2002/Math/preference" pref:renderer="mathplayer-dl"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="stylesheet" type="text/css" href="opengl-man.css" /><title>glReadPixels - OpenGL 4 Reference Pages</title><meta name="generator" content="DocBook XSL Stylesheets V1.69.1" /></head><body><div class="refentry" lang="en" xml:lang="en"><a id="glReadPixels"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glReadPixels — read a block of pixels from the frame buffer</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">glReadPixels</b>(</code></td><td>GLint </td><td><var class="pdparam">x</var>, </td></tr><tr><td> </td><td>GLint </td><td><var class="pdparam">y</var>, </td></tr><tr><td> </td><td>GLsizei </td><td><var class="pdparam">width</var>, </td></tr><tr><td> </td><td>GLsizei </td><td><var class="pdparam">height</var>, </td></tr><tr><td> </td><td>GLenum </td><td><var class="pdparam">format</var>, </td></tr><tr><td> </td><td>GLenum </td><td><var class="pdparam">type</var>, </td></tr><tr><td> </td><td>GLvoid * </td><td><var class="pdparam">data</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>x</code></em>, </span><span class="term"><em class="parameter"><code>y</code></em></span></dt><dd><p> | |
5 | Specify the window coordinates of the first pixel | |
6 | that is read from the frame buffer. | |
7 | This location is the lower left corner of a rectangular block of pixels. | |
8 | </p></dd><dt><span class="term"><em class="parameter"><code>width</code></em>, </span><span class="term"><em class="parameter"><code>height</code></em></span></dt><dd><p> | |
9 | Specify the dimensions of the pixel rectangle. | |
10 | <em class="parameter"><code>width</code></em> and <em class="parameter"><code>height</code></em> of one correspond to a single pixel. | |
11 | </p></dd><dt><span class="term"><em class="parameter"><code>format</code></em></span></dt><dd><p> | |
12 | Specifies the format of the pixel data. | |
13 | The following symbolic values are accepted: | |
14 | <code class="constant">GL_STENCIL_INDEX</code>, | |
15 | <code class="constant">GL_DEPTH_COMPONENT</code>, | |
16 | <code class="constant">GL_DEPTH_STENCIL</code>, | |
17 | <code class="constant">GL_RED</code>, | |
18 | <code class="constant">GL_GREEN</code>, | |
19 | <code class="constant">GL_BLUE</code>, | |
20 | <code class="constant">GL_RGB</code>, | |
21 | <code class="constant">GL_BGR</code>, | |
22 | <code class="constant">GL_RGBA</code>, and | |
23 | <code class="constant">GL_BGRA</code>. | |
24 | </p></dd><dt><span class="term"><em class="parameter"><code>type</code></em></span></dt><dd><p> | |
25 | Specifies the data type of the pixel data. | |
26 | Must be one of | |
27 | <code class="constant">GL_UNSIGNED_BYTE</code>, | |
28 | <code class="constant">GL_BYTE</code>, | |
29 | <code class="constant">GL_UNSIGNED_SHORT</code>, | |
30 | <code class="constant">GL_SHORT</code>, | |
31 | <code class="constant">GL_UNSIGNED_INT</code>, | |
32 | <code class="constant">GL_INT</code>, | |
33 | <code class="constant">GL_HALF_FLOAT</code>, | |
34 | <code class="constant">GL_FLOAT</code>, | |
35 | <code class="constant">GL_UNSIGNED_BYTE_3_3_2</code>, | |
36 | <code class="constant">GL_UNSIGNED_BYTE_2_3_3_REV</code>, | |
37 | <code class="constant">GL_UNSIGNED_SHORT_5_6_5</code>, | |
38 | <code class="constant">GL_UNSIGNED_SHORT_5_6_5_REV</code>, | |
39 | <code class="constant">GL_UNSIGNED_SHORT_4_4_4_4</code>, | |
40 | <code class="constant">GL_UNSIGNED_SHORT_4_4_4_4_REV</code>, | |
41 | <code class="constant">GL_UNSIGNED_SHORT_5_5_5_1</code>, | |
42 | <code class="constant">GL_UNSIGNED_SHORT_1_5_5_5_REV</code>, | |
43 | <code class="constant">GL_UNSIGNED_INT_8_8_8_8</code>, | |
44 | <code class="constant">GL_UNSIGNED_INT_8_8_8_8_REV</code>, | |
45 | <code class="constant">GL_UNSIGNED_INT_10_10_10_2</code>, | |
46 | <code class="constant">GL_UNSIGNED_INT_2_10_10_10_REV</code>, | |
47 | <code class="constant">GL_UNSIGNED_INT_24_8</code>, | |
48 | <code class="constant">GL_UNSIGNED_INT_10F_11F_11F_REV</code>, | |
49 | <code class="constant">GL_UNSIGNED_INT_5_9_9_9_REV</code>, or | |
50 | <code class="constant">GL_FLOAT_32_UNSIGNED_INT_24_8_REV</code>. | |
51 | </p></dd><dt><span class="term"><em class="parameter"><code>data</code></em></span></dt><dd><p> | |
52 | Returns the pixel data. | |
53 | </p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="description"></a><h2>Description</h2><p> | |
54 | <code class="function">glReadPixels</code> returns pixel data from the frame buffer, | |
55 | starting with the pixel whose lower left corner | |
56 | is at location (<em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em>), | |
57 | into client memory starting at location <em class="parameter"><code>data</code></em>. | |
58 | Several parameters control the processing of the pixel data before | |
59 | it is placed into client memory. | |
60 | These parameters are set with <a href="glPixelStore.xml"><span class="citerefentry"><span class="refentrytitle">glPixelStore</span></span></a>. | |
61 | This reference page describes the effects on <code class="function">glReadPixels</code> of most, | |
62 | but not all of the parameters specified by these three commands. | |
63 | </p><p> | |
64 | If a non-zero named buffer object is bound to the <code class="constant">GL_PIXEL_PACK_BUFFER</code> target | |
65 | (see <a href="glBindBuffer.xml"><span class="citerefentry"><span class="refentrytitle">glBindBuffer</span></span></a>) while a block of pixels is | |
66 | requested, <em class="parameter"><code>data</code></em> is treated as a byte offset into the buffer object's data store | |
67 | rather than a pointer to client memory. | |
68 | </p><p> | |
69 | <code class="function">glReadPixels</code> returns values from each pixel with lower left corner at | |
70 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
71 | ||
72 | <mml:mfenced open="(" close=")"> | |
73 | <mml:mrow> | |
74 | <mml:mi mathvariant="italic">x</mml:mi> | |
75 | <mml:mo>+</mml:mo> | |
76 | <mml:mi mathvariant="italic">i</mml:mi> | |
77 | </mml:mrow> | |
78 | <mml:mrow> | |
79 | <mml:mi mathvariant="italic">y</mml:mi> | |
80 | <mml:mo>+</mml:mo> | |
81 | <mml:mi mathvariant="italic">j</mml:mi> | |
82 | </mml:mrow> | |
83 | </mml:mfenced> | |
84 | </mml:math> | |
85 | for | |
86 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
87 | ||
88 | <mml:mrow> | |
89 | <mml:mn>0</mml:mn> | |
90 | <mml:mo><=</mml:mo> | |
91 | <mml:mi mathvariant="italic">i</mml:mi> | |
92 | <mml:mo><</mml:mo> | |
93 | <mml:mi mathvariant="italic">width</mml:mi> | |
94 | </mml:mrow> | |
95 | </mml:math> | |
96 | and | |
97 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
98 | ||
99 | <mml:mrow> | |
100 | <mml:mn>0</mml:mn> | |
101 | <mml:mo><=</mml:mo> | |
102 | <mml:mi mathvariant="italic">j</mml:mi> | |
103 | <mml:mo><</mml:mo> | |
104 | <mml:mi mathvariant="italic">height</mml:mi> | |
105 | </mml:mrow> | |
106 | </mml:math>. | |
107 | This pixel is said to be the | |
108 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">i</mml:mi></mml:math>th | |
109 | pixel in the | |
110 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">j</mml:mi></mml:math>th | |
111 | row. | |
112 | Pixels are returned in row order from the lowest to the highest row, | |
113 | left to right in each row. | |
114 | </p><p> | |
115 | <em class="parameter"><code>format</code></em> specifies the format for the returned pixel values; | |
116 | accepted values are: | |
117 | </p><div class="variablelist"><dl><dt><span class="term"><code class="constant">GL_STENCIL_INDEX</code></span></dt><dd><p> | |
118 | Stencil values are read from the stencil buffer. | |
7faf1d71 AW |
119 | </p></dd><dt><span class="term"><code class="constant">GL_DEPTH_COMPONENT</code></span></dt><dd><p> |
120 | Depth values are read from the depth buffer. | |
121 | Each component is converted to floating point such that the minimum depth | |
122 | value maps to 0 and the maximum value maps to 1. | |
c7b31271 | 123 | Each component is clamped to the range |
7faf1d71 AW |
124 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> |
125 | ||
126 | <mml:mfenced open="[" close="]"> | |
127 | <mml:mn>0</mml:mn> | |
128 | <mml:mn>1</mml:mn> | |
129 | </mml:mfenced> | |
130 | </mml:math>. | |
131 | </p></dd><dt><span class="term"><code class="constant">GL_DEPTH_STENCIL</code></span></dt><dd><p> | |
132 | Values are taken from both the depth and stencil buffers. The <em class="parameter"><code>type</code></em> parameter | |
133 | must be <code class="constant">GL_UNSIGNED_INT_24_8</code> or <code class="constant">GL_FLOAT_32_UNSIGNED_INT_24_8_REV</code>. | |
134 | </p></dd><dt><span class="term"><code class="constant">GL_RED</code></span></dt><dd></dd><dt><span class="term"><code class="constant">GL_GREEN</code></span></dt><dd></dd><dt><span class="term"><code class="constant">GL_BLUE</code></span></dt><dd></dd><dt><span class="term"><code class="constant">GL_RGB</code></span></dt><dd></dd><dt><span class="term"><code class="constant">GL_BGR</code></span></dt><dd></dd><dt><span class="term"><code class="constant">GL_RGBA</code></span></dt><dd></dd><dt><span class="term"><code class="constant">GL_BGRA</code></span></dt><dd></dd></dl></div><p> | |
135 | Finally, the indices or components | |
136 | are converted to the proper format, | |
137 | as specified by <em class="parameter"><code>type</code></em>. | |
138 | If <em class="parameter"><code>format</code></em> is <code class="constant">GL_STENCIL_INDEX</code> | |
139 | and <em class="parameter"><code>type</code></em> is not <code class="constant">GL_FLOAT</code>, | |
140 | each index is masked with the mask value given in the following table. | |
141 | If <em class="parameter"><code>type</code></em> is <code class="constant">GL_FLOAT</code>, then each integer index is converted to | |
142 | single-precision floating-point format. | |
143 | </p><p> | |
144 | If <em class="parameter"><code>format</code></em> is | |
145 | <code class="constant">GL_RED</code>, | |
146 | <code class="constant">GL_GREEN</code>, | |
147 | <code class="constant">GL_BLUE</code>, | |
148 | <code class="constant">GL_RGB</code>, | |
149 | <code class="constant">GL_BGR</code>, | |
150 | <code class="constant">GL_RGBA</code>, or | |
151 | <code class="constant">GL_BGRA</code> and <em class="parameter"><code>type</code></em> is not <code class="constant">GL_FLOAT</code>, | |
152 | each component is multiplied by the multiplier shown in the following table. | |
153 | If type is <code class="constant">GL_FLOAT</code>, then each component is passed as is | |
154 | (or converted to the client's single-precision floating-point format if | |
155 | it is different from the one used by the GL). | |
156 | </p><p> | |
157 | </p><div class="informaltable"><table border="1"><colgroup><col align="left" /><col align="center" /><col align="center" /></colgroup><thead><tr><th align="left"> | |
158 | <em class="parameter"><code>type</code></em> | |
159 | </th><th align="center"><span class="bold"><strong> | |
160 | Index Mask | |
161 | </strong></span></th><th align="center"><span class="bold"><strong> | |
162 | Component Conversion | |
163 | </strong></span></th></tr></thead><tbody><tr><td align="left"> | |
164 | <code class="constant">GL_UNSIGNED_BYTE</code> | |
165 | </td><td align="center"> | |
166 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
167 | ||
168 | <mml:mrow> | |
169 | <mml:msup><mml:mn>2</mml:mn> | |
170 | <mml:mn>8</mml:mn> | |
171 | </mml:msup> | |
172 | <mml:mo>-</mml:mo> | |
173 | <mml:mn>1</mml:mn> | |
174 | </mml:mrow> | |
175 | </mml:math> | |
176 | </td><td align="center"> | |
177 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
178 | ||
179 | <mml:mrow> | |
180 | <mml:mfenced open="(" close=")"> | |
181 | <mml:mrow> | |
182 | <mml:msup><mml:mn>2</mml:mn> | |
183 | <mml:mn>8</mml:mn> | |
184 | </mml:msup> | |
185 | <mml:mo>-</mml:mo> | |
186 | <mml:mn>1</mml:mn> | |
187 | </mml:mrow> | |
188 | </mml:mfenced> | |
189 | <mml:mo></mml:mo> | |
190 | <mml:mi mathvariant="italic">c</mml:mi> | |
191 | </mml:mrow> | |
192 | </mml:math> | |
193 | </td></tr><tr><td align="left"> | |
194 | <code class="constant">GL_BYTE</code> | |
195 | </td><td align="center"> | |
196 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
197 | ||
198 | <mml:mrow> | |
199 | <mml:msup><mml:mn>2</mml:mn> | |
200 | <mml:mn>7</mml:mn> | |
201 | </mml:msup> | |
202 | <mml:mo>-</mml:mo> | |
203 | <mml:mn>1</mml:mn> | |
204 | </mml:mrow> | |
205 | </mml:math> | |
206 | </td><td align="center"> | |
207 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
208 | ||
209 | <mml:mfrac> | |
210 | <mml:mfenced open="" close=""> | |
211 | <mml:mrow> | |
212 | <mml:mfenced open="(" close=")"> | |
213 | <mml:mrow> | |
214 | <mml:msup><mml:mn>2</mml:mn> | |
215 | <mml:mn>8</mml:mn> | |
216 | </mml:msup> | |
217 | <mml:mo>-</mml:mo> | |
218 | <mml:mn>1</mml:mn> | |
219 | </mml:mrow> | |
220 | </mml:mfenced> | |
221 | <mml:mo></mml:mo> | |
222 | <mml:mi mathvariant="italic">c</mml:mi> | |
223 | <mml:mo>-</mml:mo> | |
224 | <mml:mn>1</mml:mn> | |
225 | </mml:mrow> | |
226 | </mml:mfenced> | |
227 | <mml:mn>2</mml:mn> | |
228 | </mml:mfrac> | |
229 | </mml:math> | |
230 | </td></tr><tr><td align="left"> | |
231 | <code class="constant">GL_UNSIGNED_SHORT</code> | |
232 | </td><td align="center"> | |
233 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
234 | ||
235 | <mml:mrow> | |
236 | <mml:msup><mml:mn>2</mml:mn> | |
237 | <mml:mn>16</mml:mn> | |
238 | </mml:msup> | |
239 | <mml:mo>-</mml:mo> | |
240 | <mml:mn>1</mml:mn> | |
241 | </mml:mrow> | |
242 | </mml:math> | |
243 | </td><td align="center"> | |
244 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
245 | ||
246 | <mml:mrow> | |
247 | <mml:mfenced open="(" close=")"> | |
248 | <mml:mrow> | |
249 | <mml:msup><mml:mn>2</mml:mn> | |
250 | <mml:mn>16</mml:mn> | |
251 | </mml:msup> | |
252 | <mml:mo>-</mml:mo> | |
253 | <mml:mn>1</mml:mn> | |
254 | </mml:mrow> | |
255 | </mml:mfenced> | |
256 | <mml:mo></mml:mo> | |
257 | <mml:mi mathvariant="italic">c</mml:mi> | |
258 | </mml:mrow> | |
259 | </mml:math> | |
260 | </td></tr><tr><td align="left"> | |
261 | <code class="constant">GL_SHORT</code> | |
262 | </td><td align="center"> | |
263 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
264 | ||
265 | <mml:mrow> | |
266 | <mml:msup><mml:mn>2</mml:mn> | |
267 | <mml:mn>15</mml:mn> | |
268 | </mml:msup> | |
269 | <mml:mo>-</mml:mo> | |
270 | <mml:mn>1</mml:mn> | |
271 | </mml:mrow> | |
272 | </mml:math> | |
273 | </td><td align="center"> | |
274 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
275 | ||
276 | <mml:mfrac> | |
277 | <mml:mfenced open="" close=""> | |
278 | <mml:mrow> | |
279 | <mml:mfenced open="(" close=")"> | |
280 | <mml:mrow> | |
281 | <mml:msup><mml:mn>2</mml:mn> | |
282 | <mml:mn>16</mml:mn> | |
283 | </mml:msup> | |
284 | <mml:mo>-</mml:mo> | |
285 | <mml:mn>1</mml:mn> | |
286 | </mml:mrow> | |
287 | </mml:mfenced> | |
288 | <mml:mo></mml:mo> | |
289 | <mml:mi mathvariant="italic">c</mml:mi> | |
290 | <mml:mo>-</mml:mo> | |
291 | <mml:mn>1</mml:mn> | |
292 | </mml:mrow> | |
293 | </mml:mfenced> | |
294 | <mml:mn>2</mml:mn> | |
295 | </mml:mfrac> | |
296 | </mml:math> | |
297 | </td></tr><tr><td align="left"> | |
298 | <code class="constant">GL_UNSIGNED_INT</code> | |
299 | </td><td align="center"> | |
300 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
301 | ||
302 | <mml:mrow> | |
303 | <mml:msup><mml:mn>2</mml:mn> | |
304 | <mml:mn>32</mml:mn> | |
305 | </mml:msup> | |
306 | <mml:mo>-</mml:mo> | |
307 | <mml:mn>1</mml:mn> | |
308 | </mml:mrow> | |
309 | </mml:math> | |
310 | </td><td align="center"> | |
311 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
312 | ||
313 | <mml:mrow> | |
314 | <mml:mfenced open="(" close=")"> | |
315 | <mml:mrow> | |
316 | <mml:msup><mml:mn>2</mml:mn> | |
317 | <mml:mn>32</mml:mn> | |
318 | </mml:msup> | |
319 | <mml:mo>-</mml:mo> | |
320 | <mml:mn>1</mml:mn> | |
321 | </mml:mrow> | |
322 | </mml:mfenced> | |
323 | <mml:mo></mml:mo> | |
324 | <mml:mi mathvariant="italic">c</mml:mi> | |
325 | </mml:mrow> | |
326 | </mml:math> | |
327 | </td></tr><tr><td align="left"> | |
328 | <code class="constant">GL_INT</code> | |
329 | </td><td align="center"> | |
330 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
331 | ||
332 | <mml:mrow> | |
333 | <mml:msup><mml:mn>2</mml:mn> | |
334 | <mml:mn>31</mml:mn> | |
335 | </mml:msup> | |
336 | <mml:mo>-</mml:mo> | |
337 | <mml:mn>1</mml:mn> | |
338 | </mml:mrow> | |
339 | </mml:math> | |
340 | </td><td align="center"> | |
341 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
342 | ||
343 | <mml:mfrac> | |
344 | <mml:mfenced open="" close=""> | |
345 | <mml:mrow> | |
346 | <mml:mfenced open="(" close=")"> | |
347 | <mml:mrow> | |
348 | <mml:msup><mml:mn>2</mml:mn> | |
349 | <mml:mn>32</mml:mn> | |
350 | </mml:msup> | |
351 | <mml:mo>-</mml:mo> | |
352 | <mml:mn>1</mml:mn> | |
353 | </mml:mrow> | |
354 | </mml:mfenced> | |
355 | <mml:mo></mml:mo> | |
356 | <mml:mi mathvariant="italic">c</mml:mi> | |
357 | <mml:mo>-</mml:mo> | |
358 | <mml:mn>1</mml:mn> | |
359 | </mml:mrow> | |
360 | </mml:mfenced> | |
361 | <mml:mn>2</mml:mn> | |
362 | </mml:mfrac> | |
363 | </mml:math> | |
364 | </td></tr><tr><td align="left"> | |
365 | <code class="constant">GL_HALF_FLOAT</code> | |
366 | </td><td align="center"> | |
367 | none | |
368 | </td><td align="center"> | |
369 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">c</mml:mi></mml:math> | |
370 | </td></tr><tr><td align="left"> | |
371 | <code class="constant">GL_FLOAT</code> | |
372 | </td><td align="center"> | |
373 | none | |
374 | </td><td align="center"> | |
375 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">c</mml:mi></mml:math> | |
376 | </td></tr><tr><td align="left"> | |
377 | <code class="constant">GL_UNSIGNED_BYTE_3_3_2</code> | |
378 | </td><td align="center"> | |
379 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
380 | ||
381 | <mml:mrow> | |
382 | <mml:msup><mml:mn>2</mml:mn> | |
383 | <mml:mn>N</mml:mn> | |
384 | </mml:msup> | |
385 | <mml:mo>-</mml:mo> | |
386 | <mml:mn>1</mml:mn> | |
387 | </mml:mrow> | |
388 | </mml:math> | |
389 | </td><td align="center"> | |
390 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
391 | ||
392 | <mml:mrow> | |
393 | <mml:mfenced open="(" close=")"> | |
394 | <mml:mrow> | |
395 | <mml:msup><mml:mn>2</mml:mn> | |
396 | <mml:mn>N</mml:mn> | |
397 | </mml:msup> | |
398 | <mml:mo>-</mml:mo> | |
399 | <mml:mn>1</mml:mn> | |
400 | </mml:mrow> | |
401 | </mml:mfenced> | |
402 | <mml:mo></mml:mo> | |
403 | <mml:mi mathvariant="italic">c</mml:mi> | |
404 | </mml:mrow> | |
405 | </mml:math> | |
406 | </td></tr><tr><td align="left"> | |
407 | <code class="constant">GL_UNSIGNED_BYTE_2_3_3_REV</code> | |
408 | </td><td align="center"> | |
409 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
410 | ||
411 | <mml:mrow> | |
412 | <mml:msup><mml:mn>2</mml:mn> | |
413 | <mml:mn>N</mml:mn> | |
414 | </mml:msup> | |
415 | <mml:mo>-</mml:mo> | |
416 | <mml:mn>1</mml:mn> | |
417 | </mml:mrow> | |
418 | </mml:math> | |
419 | </td><td align="center"> | |
420 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
421 | ||
422 | <mml:mrow> | |
423 | <mml:mfenced open="(" close=")"> | |
424 | <mml:mrow> | |
425 | <mml:msup><mml:mn>2</mml:mn> | |
426 | <mml:mn>N</mml:mn> | |
427 | </mml:msup> | |
428 | <mml:mo>-</mml:mo> | |
429 | <mml:mn>1</mml:mn> | |
430 | </mml:mrow> | |
431 | </mml:mfenced> | |
432 | <mml:mo></mml:mo> | |
433 | <mml:mi mathvariant="italic">c</mml:mi> | |
434 | </mml:mrow> | |
435 | </mml:math> | |
436 | </td></tr><tr><td align="left"> | |
437 | <code class="constant">GL_UNSIGNED_SHORT_5_6_5</code> | |
438 | </td><td align="center"> | |
439 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
440 | ||
441 | <mml:mrow> | |
442 | <mml:msup><mml:mn>2</mml:mn> | |
443 | <mml:mn>N</mml:mn> | |
444 | </mml:msup> | |
445 | <mml:mo>-</mml:mo> | |
446 | <mml:mn>1</mml:mn> | |
447 | </mml:mrow> | |
448 | </mml:math> | |
449 | </td><td align="center"> | |
450 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
451 | ||
452 | <mml:mrow> | |
453 | <mml:mfenced open="(" close=")"> | |
454 | <mml:mrow> | |
455 | <mml:msup><mml:mn>2</mml:mn> | |
456 | <mml:mn>N</mml:mn> | |
457 | </mml:msup> | |
458 | <mml:mo>-</mml:mo> | |
459 | <mml:mn>1</mml:mn> | |
460 | </mml:mrow> | |
461 | </mml:mfenced> | |
462 | <mml:mo></mml:mo> | |
463 | <mml:mi mathvariant="italic">c</mml:mi> | |
464 | </mml:mrow> | |
465 | </mml:math> | |
466 | </td></tr><tr><td align="left"> | |
467 | <code class="constant">GL_UNSIGNED_SHORT_5_6_5_REV</code> | |
468 | </td><td align="center"> | |
469 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
470 | ||
471 | <mml:mrow> | |
472 | <mml:msup><mml:mn>2</mml:mn> | |
473 | <mml:mn>N</mml:mn> | |
474 | </mml:msup> | |
475 | <mml:mo>-</mml:mo> | |
476 | <mml:mn>1</mml:mn> | |
477 | </mml:mrow> | |
478 | </mml:math> | |
479 | </td><td align="center"> | |
480 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
481 | ||
482 | <mml:mrow> | |
483 | <mml:mfenced open="(" close=")"> | |
484 | <mml:mrow> | |
485 | <mml:msup><mml:mn>2</mml:mn> | |
486 | <mml:mn>N</mml:mn> | |
487 | </mml:msup> | |
488 | <mml:mo>-</mml:mo> | |
489 | <mml:mn>1</mml:mn> | |
490 | </mml:mrow> | |
491 | </mml:mfenced> | |
492 | <mml:mo></mml:mo> | |
493 | <mml:mi mathvariant="italic">c</mml:mi> | |
494 | </mml:mrow> | |
495 | </mml:math> | |
496 | </td></tr><tr><td align="left"> | |
497 | <code class="constant">GL_UNSIGNED_SHORT_4_4_4_4</code> | |
498 | </td><td align="center"> | |
499 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
500 | ||
501 | <mml:mrow> | |
502 | <mml:msup><mml:mn>2</mml:mn> | |
503 | <mml:mn>N</mml:mn> | |
504 | </mml:msup> | |
505 | <mml:mo>-</mml:mo> | |
506 | <mml:mn>1</mml:mn> | |
507 | </mml:mrow> | |
508 | </mml:math> | |
509 | </td><td align="center"> | |
510 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
511 | ||
512 | <mml:mrow> | |
513 | <mml:mfenced open="(" close=")"> | |
514 | <mml:mrow> | |
515 | <mml:msup><mml:mn>2</mml:mn> | |
516 | <mml:mn>N</mml:mn> | |
517 | </mml:msup> | |
518 | <mml:mo>-</mml:mo> | |
519 | <mml:mn>1</mml:mn> | |
520 | </mml:mrow> | |
521 | </mml:mfenced> | |
522 | <mml:mo></mml:mo> | |
523 | <mml:mi mathvariant="italic">c</mml:mi> | |
524 | </mml:mrow> | |
525 | </mml:math> | |
526 | </td></tr><tr><td align="left"> | |
527 | <code class="constant">GL_UNSIGNED_SHORT_4_4_4_4_REV</code> | |
528 | </td><td align="center"> | |
529 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
530 | ||
531 | <mml:mrow> | |
532 | <mml:msup><mml:mn>2</mml:mn> | |
533 | <mml:mn>N</mml:mn> | |
534 | </mml:msup> | |
535 | <mml:mo>-</mml:mo> | |
536 | <mml:mn>1</mml:mn> | |
537 | </mml:mrow> | |
538 | </mml:math> | |
539 | </td><td align="center"> | |
540 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
541 | ||
542 | <mml:mrow> | |
543 | <mml:mfenced open="(" close=")"> | |
544 | <mml:mrow> | |
545 | <mml:msup><mml:mn>2</mml:mn> | |
546 | <mml:mn>N</mml:mn> | |
547 | </mml:msup> | |
548 | <mml:mo>-</mml:mo> | |
549 | <mml:mn>1</mml:mn> | |
550 | </mml:mrow> | |
551 | </mml:mfenced> | |
552 | <mml:mo></mml:mo> | |
553 | <mml:mi mathvariant="italic">c</mml:mi> | |
554 | </mml:mrow> | |
555 | </mml:math> | |
556 | </td></tr><tr><td align="left"> | |
557 | <code class="constant">GL_UNSIGNED_SHORT_5_5_5_1</code> | |
558 | </td><td align="center"> | |
559 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
560 | ||
561 | <mml:mrow> | |
562 | <mml:msup><mml:mn>2</mml:mn> | |
563 | <mml:mn>N</mml:mn> | |
564 | </mml:msup> | |
565 | <mml:mo>-</mml:mo> | |
566 | <mml:mn>1</mml:mn> | |
567 | </mml:mrow> | |
568 | </mml:math> | |
569 | </td><td align="center"> | |
570 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
571 | ||
572 | <mml:mrow> | |
573 | <mml:mfenced open="(" close=")"> | |
574 | <mml:mrow> | |
575 | <mml:msup><mml:mn>2</mml:mn> | |
576 | <mml:mn>N</mml:mn> | |
577 | </mml:msup> | |
578 | <mml:mo>-</mml:mo> | |
579 | <mml:mn>1</mml:mn> | |
580 | </mml:mrow> | |
581 | </mml:mfenced> | |
582 | <mml:mo></mml:mo> | |
583 | <mml:mi mathvariant="italic">c</mml:mi> | |
584 | </mml:mrow> | |
585 | </mml:math> | |
586 | </td></tr><tr><td align="left"> | |
587 | <code class="constant">GL_UNSIGNED_SHORT_1_5_5_5_REV</code> | |
588 | </td><td align="center"> | |
589 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
590 | ||
591 | <mml:mrow> | |
592 | <mml:msup><mml:mn>2</mml:mn> | |
593 | <mml:mn>N</mml:mn> | |
594 | </mml:msup> | |
595 | <mml:mo>-</mml:mo> | |
596 | <mml:mn>1</mml:mn> | |
597 | </mml:mrow> | |
598 | </mml:math> | |
599 | </td><td align="center"> | |
600 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
601 | ||
602 | <mml:mrow> | |
603 | <mml:mfenced open="(" close=")"> | |
604 | <mml:mrow> | |
605 | <mml:msup><mml:mn>2</mml:mn> | |
606 | <mml:mn>N</mml:mn> | |
607 | </mml:msup> | |
608 | <mml:mo>-</mml:mo> | |
609 | <mml:mn>1</mml:mn> | |
610 | </mml:mrow> | |
611 | </mml:mfenced> | |
612 | <mml:mo></mml:mo> | |
613 | <mml:mi mathvariant="italic">c</mml:mi> | |
614 | </mml:mrow> | |
615 | </mml:math> | |
616 | </td></tr><tr><td align="left"> | |
617 | <code class="constant">GL_UNSIGNED_INT_8_8_8_8</code> | |
618 | </td><td align="center"> | |
619 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
620 | ||
621 | <mml:mrow> | |
622 | <mml:msup><mml:mn>2</mml:mn> | |
623 | <mml:mn>N</mml:mn> | |
624 | </mml:msup> | |
625 | <mml:mo>-</mml:mo> | |
626 | <mml:mn>1</mml:mn> | |
627 | </mml:mrow> | |
628 | </mml:math> | |
629 | </td><td align="center"> | |
630 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
631 | ||
632 | <mml:mrow> | |
633 | <mml:mfenced open="(" close=")"> | |
634 | <mml:mrow> | |
635 | <mml:msup><mml:mn>2</mml:mn> | |
636 | <mml:mn>N</mml:mn> | |
637 | </mml:msup> | |
638 | <mml:mo>-</mml:mo> | |
639 | <mml:mn>1</mml:mn> | |
640 | </mml:mrow> | |
641 | </mml:mfenced> | |
642 | <mml:mo></mml:mo> | |
643 | <mml:mi mathvariant="italic">c</mml:mi> | |
644 | </mml:mrow> | |
645 | </mml:math> | |
646 | </td></tr><tr><td align="left"> | |
647 | <code class="constant">GL_UNSIGNED_INT_8_8_8_8_REV</code> | |
648 | </td><td align="center"> | |
649 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
650 | ||
651 | <mml:mrow> | |
652 | <mml:msup><mml:mn>2</mml:mn> | |
653 | <mml:mn>N</mml:mn> | |
654 | </mml:msup> | |
655 | <mml:mo>-</mml:mo> | |
656 | <mml:mn>1</mml:mn> | |
657 | </mml:mrow> | |
658 | </mml:math> | |
659 | </td><td align="center"> | |
660 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
661 | ||
662 | <mml:mrow> | |
663 | <mml:mfenced open="(" close=")"> | |
664 | <mml:mrow> | |
665 | <mml:msup><mml:mn>2</mml:mn> | |
666 | <mml:mn>N</mml:mn> | |
667 | </mml:msup> | |
668 | <mml:mo>-</mml:mo> | |
669 | <mml:mn>1</mml:mn> | |
670 | </mml:mrow> | |
671 | </mml:mfenced> | |
672 | <mml:mo></mml:mo> | |
673 | <mml:mi mathvariant="italic">c</mml:mi> | |
674 | </mml:mrow> | |
675 | </mml:math> | |
676 | </td></tr><tr><td align="left"> | |
677 | <code class="constant">GL_UNSIGNED_INT_10_10_10_2</code> | |
678 | </td><td align="center"> | |
679 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
680 | ||
681 | <mml:mrow> | |
682 | <mml:msup><mml:mn>2</mml:mn> | |
683 | <mml:mn>N</mml:mn> | |
684 | </mml:msup> | |
685 | <mml:mo>-</mml:mo> | |
686 | <mml:mn>1</mml:mn> | |
687 | </mml:mrow> | |
688 | </mml:math> | |
689 | </td><td align="center"> | |
690 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
691 | ||
692 | <mml:mrow> | |
693 | <mml:mfenced open="(" close=")"> | |
694 | <mml:mrow> | |
695 | <mml:msup><mml:mn>2</mml:mn> | |
696 | <mml:mn>N</mml:mn> | |
697 | </mml:msup> | |
698 | <mml:mo>-</mml:mo> | |
699 | <mml:mn>1</mml:mn> | |
700 | </mml:mrow> | |
701 | </mml:mfenced> | |
702 | <mml:mo></mml:mo> | |
703 | <mml:mi mathvariant="italic">c</mml:mi> | |
704 | </mml:mrow> | |
705 | </mml:math> | |
706 | </td></tr><tr><td align="left"> | |
707 | <code class="constant">GL_UNSIGNED_INT_2_10_10_10_REV</code> | |
708 | </td><td align="center"> | |
709 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
710 | ||
711 | <mml:mrow> | |
712 | <mml:msup><mml:mn>2</mml:mn> | |
713 | <mml:mn>N</mml:mn> | |
714 | </mml:msup> | |
715 | <mml:mo>-</mml:mo> | |
716 | <mml:mn>1</mml:mn> | |
717 | </mml:mrow> | |
718 | </mml:math> | |
719 | </td><td align="center"> | |
720 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
721 | ||
722 | <mml:mrow> | |
723 | <mml:mfenced open="(" close=")"> | |
724 | <mml:mrow> | |
725 | <mml:msup><mml:mn>2</mml:mn> | |
726 | <mml:mn>N</mml:mn> | |
727 | </mml:msup> | |
728 | <mml:mo>-</mml:mo> | |
729 | <mml:mn>1</mml:mn> | |
730 | </mml:mrow> | |
731 | </mml:mfenced> | |
732 | <mml:mo></mml:mo> | |
733 | <mml:mi mathvariant="italic">c</mml:mi> | |
734 | </mml:mrow> | |
735 | </mml:math> | |
736 | </td></tr><tr><td align="left"> | |
737 | <code class="constant">GL_UNSIGNED_INT_24_8</code> | |
738 | </td><td align="center"> | |
739 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
740 | ||
741 | <mml:mrow> | |
742 | <mml:msup><mml:mn>2</mml:mn> | |
743 | <mml:mn>N</mml:mn> | |
744 | </mml:msup> | |
745 | <mml:mo>-</mml:mo> | |
746 | <mml:mn>1</mml:mn> | |
747 | </mml:mrow> | |
748 | </mml:math> | |
749 | </td><td align="center"> | |
750 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
751 | ||
752 | <mml:mrow> | |
753 | <mml:mfenced open="(" close=")"> | |
754 | <mml:mrow> | |
755 | <mml:msup><mml:mn>2</mml:mn> | |
756 | <mml:mn>N</mml:mn> | |
757 | </mml:msup> | |
758 | <mml:mo>-</mml:mo> | |
759 | <mml:mn>1</mml:mn> | |
760 | </mml:mrow> | |
761 | </mml:mfenced> | |
762 | <mml:mo></mml:mo> | |
763 | <mml:mi mathvariant="italic">c</mml:mi> | |
764 | </mml:mrow> | |
765 | </mml:math> | |
766 | </td></tr><tr><td align="left"> | |
767 | <code class="constant">GL_UNSIGNED_INT_10F_11F_11F_REV</code> | |
768 | </td><td align="center"> | |
769 | -- | |
770 | </td><td align="left"> | |
771 | Special | |
772 | </td></tr><tr><td align="left"> | |
773 | <code class="constant">GL_UNSIGNED_INT_5_9_9_9_REV</code> | |
774 | </td><td align="center"> | |
775 | -- | |
776 | </td><td align="left"> | |
777 | Special | |
778 | </td></tr><tr><td align="left"> | |
779 | <code class="constant">GL_FLOAT_32_UNSIGNED_INT_24_8_REV</code> | |
780 | </td><td align="center"> | |
781 | none | |
782 | </td><td align="center"> | |
783 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">c</mml:mi></mml:math> (Depth Only) | |
784 | </td></tr></tbody></table></div><p> | |
785 | Return values are placed in memory as follows. | |
786 | If <em class="parameter"><code>format</code></em> is | |
787 | <code class="constant">GL_STENCIL_INDEX</code>, | |
788 | <code class="constant">GL_DEPTH_COMPONENT</code>, | |
789 | <code class="constant">GL_RED</code>, | |
790 | <code class="constant">GL_GREEN</code>, or | |
791 | <code class="constant">GL_BLUE</code>, | |
792 | a single value is returned and the data for the | |
793 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">i</mml:mi></mml:math>th | |
794 | pixel in the | |
795 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">j</mml:mi></mml:math>th | |
796 | row | |
797 | is placed in location | |
798 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
799 | ||
800 | <mml:mrow> | |
801 | <mml:mfenced open="(" close=")"> | |
802 | <mml:mi mathvariant="italic">j</mml:mi> | |
803 | </mml:mfenced> | |
804 | <mml:mo></mml:mo> | |
805 | <mml:mi mathvariant="italic">width</mml:mi> | |
806 | <mml:mo>+</mml:mo> | |
807 | <mml:mi mathvariant="italic">i</mml:mi> | |
808 | </mml:mrow> | |
809 | </mml:math>. | |
810 | <code class="constant">GL_RGB</code> and <code class="constant">GL_BGR</code> return three values, | |
811 | <code class="constant">GL_RGBA</code> and <code class="constant">GL_BGRA</code> return four values for each pixel, | |
812 | with all values corresponding to a single pixel occupying contiguous space | |
813 | in <em class="parameter"><code>data</code></em>. | |
814 | Storage parameters set by <a href="glPixelStore.xml"><span class="citerefentry"><span class="refentrytitle">glPixelStore</span></span></a>, | |
815 | such as <code class="constant">GL_PACK_LSB_FIRST</code> and <code class="constant">GL_PACK_SWAP_BYTES</code>, | |
816 | affect the way that data is written into memory. | |
817 | See <a href="glPixelStore.xml"><span class="citerefentry"><span class="refentrytitle">glPixelStore</span></span></a> for a description. | |
818 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="notes"></a><h2>Notes</h2><p> | |
819 | Values for pixels that lie outside the window | |
820 | connected to the current GL context are undefined. | |
821 | </p><p> | |
822 | If an error is generated, | |
823 | no change is made to the contents of <em class="parameter"><code>data</code></em>. | |
824 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="errors"></a><h2>Errors</h2><p> | |
825 | <code class="constant">GL_INVALID_ENUM</code> is generated if <em class="parameter"><code>format</code></em> or <em class="parameter"><code>type</code></em> is not an | |
826 | accepted value. | |
827 | </p><p> | |
828 | <code class="constant">GL_INVALID_VALUE</code> is generated if either <em class="parameter"><code>width</code></em> or <em class="parameter"><code>height</code></em> is negative. | |
829 | </p><p> | |
830 | <code class="constant">GL_INVALID_OPERATION</code> is generated if <em class="parameter"><code>format</code></em> is <code class="constant">GL_STENCIL_INDEX</code> | |
831 | and there is no stencil buffer. | |
832 | </p><p> | |
833 | <code class="constant">GL_INVALID_OPERATION</code> is generated if <em class="parameter"><code>format</code></em> is <code class="constant">GL_DEPTH_COMPONENT</code> | |
834 | and there is no depth buffer. | |
835 | </p><p> | |
836 | <code class="constant">GL_INVALID_OPERATION</code> is generated if <em class="parameter"><code>format</code></em> is <code class="constant">GL_DEPTH_STENCIL</code> | |
837 | and there is no depth buffer or if there is no stencil buffer. | |
838 | </p><p> | |
839 | <code class="constant">GL_INVALID_ENUM</code> is generated if <em class="parameter"><code>format</code></em> is <code class="constant">GL_DEPTH_STENCIL</code> | |
840 | and <em class="parameter"><code>type</code></em> is not <code class="constant">GL_UNSIGNED_INT_24_8</code> or <code class="constant">GL_FLOAT_32_UNSIGNED_INT_24_8_REV</code>. | |
841 | </p><p> | |
842 | <code class="constant">GL_INVALID_OPERATION</code> is generated if <em class="parameter"><code>type</code></em> is one of | |
843 | <code class="constant">GL_UNSIGNED_BYTE_3_3_2</code>, | |
844 | <code class="constant">GL_UNSIGNED_BYTE_2_3_3_REV</code>, | |
845 | <code class="constant">GL_UNSIGNED_SHORT_5_6_5</code>, or | |
846 | <code class="constant">GL_UNSIGNED_SHORT_5_6_5_REV</code> | |
847 | and <em class="parameter"><code>format</code></em> is not <code class="constant">GL_RGB</code>. | |
848 | </p><p> | |
849 | <code class="constant">GL_INVALID_OPERATION</code> is generated if <em class="parameter"><code>type</code></em> is one of | |
850 | <code class="constant">GL_UNSIGNED_SHORT_4_4_4_4</code>, | |
851 | <code class="constant">GL_UNSIGNED_SHORT_4_4_4_4_REV</code>, | |
852 | <code class="constant">GL_UNSIGNED_SHORT_5_5_5_1</code>, | |
853 | <code class="constant">GL_UNSIGNED_SHORT_1_5_5_5_REV</code>, | |
854 | <code class="constant">GL_UNSIGNED_INT_8_8_8_8</code>, | |
855 | <code class="constant">GL_UNSIGNED_INT_8_8_8_8_REV</code>, | |
856 | <code class="constant">GL_UNSIGNED_INT_10_10_10_2</code>, or | |
857 | <code class="constant">GL_UNSIGNED_INT_2_10_10_10_REV</code> | |
858 | and <em class="parameter"><code>format</code></em> is neither <code class="constant">GL_RGBA</code> nor <code class="constant">GL_BGRA</code>. | |
859 | </p><p> | |
860 | <code class="constant">GL_INVALID_OPERATION</code> is generated if a non-zero buffer object name is bound to the | |
861 | <code class="constant">GL_PIXEL_PACK_BUFFER</code> target and the buffer object's data store is currently mapped. | |
862 | </p><p> | |
863 | <code class="constant">GL_INVALID_OPERATION</code> is generated if a non-zero buffer object name is bound to the | |
864 | <code class="constant">GL_PIXEL_PACK_BUFFER</code> target and the data would be packed to the buffer | |
865 | object such that the memory writes required would exceed the data store size. | |
866 | </p><p> | |
867 | <code class="constant">GL_INVALID_OPERATION</code> is generated if a non-zero buffer object name is bound to the | |
868 | <code class="constant">GL_PIXEL_PACK_BUFFER</code> target and <em class="parameter"><code>data</code></em> is not evenly divisible | |
869 | into the number of bytes needed to store in memory a datum indicated by <em class="parameter"><code>type</code></em>. | |
870 | </p><p> | |
871 | <code class="constant">GL_INVALID_OPERATION</code> is generated if <code class="constant">GL_READ_FRAMEBUFFER_BINDING</code> | |
872 | is non-zero, the read framebuffer is complete, and the value of <code class="constant">GL_SAMPLE_BUFFERS</code> | |
873 | for the read framebuffer is greater than zero. | |
874 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="associatedgets"></a><h2>Associated Gets</h2><p> | |
7faf1d71 AW |
875 | <a href="glGet.xml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with argument <code class="constant">GL_PIXEL_PACK_BUFFER_BINDING</code> |
876 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p> | |
877 | <a href="glPixelStore.xml"><span class="citerefentry"><span class="refentrytitle">glPixelStore</span></span></a>, | |
878 | <a href="glReadBuffer.xml"><span class="citerefentry"><span class="refentrytitle">glReadBuffer</span></span></a> | |
879 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="Copyright"></a><h2>Copyright</h2><p> | |
880 | Copyright <span class="trademark"></span>© 1991-2006 | |
881 | Silicon Graphics, Inc. This document is licensed under the SGI | |
882 | Free Software B License. For details, see | |
883 | <a href="http://oss.sgi.com/projects/FreeB/" target="_top">http://oss.sgi.com/projects/FreeB/</a>. | |
884 | </p></div></div></body></html> |