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