rename upstream-man-pages to upstream-doc
[clinton/guile-figl.git] / upstream-doc / man3 / xhtml / glTexImage1D.xml
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>glTexImage1D</title><meta name="generator" content="DocBook XSL Stylesheets V1.69.1" /></head><body><div class="refentry" lang="en" xml:lang="en"><a id="glTexImage1D"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glTexImage1D — specify a one-dimensional texture image</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">glTexImage1D</b>(</code></td><td>GLenum  </td><td><var class="pdparam">target</var>, </td></tr><tr><td> </td><td>GLint  </td><td><var class="pdparam">level</var>, </td></tr><tr><td> </td><td>GLint  </td><td><var class="pdparam">internalFormat</var>, </td></tr><tr><td> </td><td>GLsizei  </td><td><var class="pdparam">width</var>, </td></tr><tr><td> </td><td>GLint  </td><td><var class="pdparam">border</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>const GLvoid *  </td><td><var class="pdparam">data</var><code>)</code>;</td></tr></table></div></div><p>
5 </p><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>target</code></em></span></dt><dd><p>
6 Specifies the target texture.
7 Must be <code class="constant">GL_TEXTURE_1D</code> or <code class="constant">GL_PROXY_TEXTURE_1D</code>.
8 </p></dd><dt><span class="term"><em class="parameter"><code>level</code></em></span></dt><dd><p>
9 Specifies the level-of-detail number.
10 Level 0 is the base image level.
11 Level <span class="emphasis"><em>n</em></span> is the <span class="emphasis"><em>n</em></span>th mipmap reduction image.
12 </p></dd><dt><span class="term"><em class="parameter"><code>internalFormat</code></em></span></dt><dd><p>
13 Specifies the number of color components in the texture.
14 Must be one of the following symbolic constants:
15 <code class="constant">GL_COMPRESSED_RED</code>,
16 <code class="constant">GL_COMPRESSED_RG</code>,
17 <code class="constant">GL_COMPRESSED_RGB</code>,
18 <code class="constant">GL_COMPRESSED_RGBA</code>,
19 <code class="constant">GL_COMPRESSED_SRGB</code>,
20 <code class="constant">GL_COMPRESSED_SRGB_ALPHA</code>,
21 <code class="constant">GL_DEPTH_COMPONENT</code>,
22 <code class="constant">GL_DEPTH_COMPONENT16</code>,
23 <code class="constant">GL_DEPTH_COMPONENT24</code>,
24 <code class="constant">GL_DEPTH_COMPONENT32</code>,
25 <code class="constant">GL_R3_G3_B2</code>,
26 <code class="constant">GL_RED</code>,
27 <code class="constant">GL_RG</code>,
28 <code class="constant">GL_RGB</code>,
29 <code class="constant">GL_RGB4</code>,
30 <code class="constant">GL_RGB5</code>,
31 <code class="constant">GL_RGB8</code>,
32 <code class="constant">GL_RGB10</code>,
33 <code class="constant">GL_RGB12</code>,
34 <code class="constant">GL_RGB16</code>,
35 <code class="constant">GL_RGBA</code>,
36 <code class="constant">GL_RGBA2</code>,
37 <code class="constant">GL_RGBA4</code>,
38 <code class="constant">GL_RGB5_A1</code>,
39 <code class="constant">GL_RGBA8</code>,
40 <code class="constant">GL_RGB10_A2</code>,
41 <code class="constant">GL_RGBA12</code>,
42 <code class="constant">GL_RGBA16</code>,
43 <code class="constant">GL_SRGB</code>,
44 <code class="constant">GL_SRGB8</code>,
45 <code class="constant">GL_SRGB_ALPHA</code>, or
46 <code class="constant">GL_SRGB8_ALPHA8</code>.
47 </p></dd><dt><span class="term"><em class="parameter"><code>width</code></em></span></dt><dd><p>
48 Specifies the width of the texture image.
49 All implementations support texture images that are at least 1024 texels
50 wide. The height of the 1D texture image is 1.
51 </p></dd><dt><span class="term"><em class="parameter"><code>border</code></em></span></dt><dd><p>
52 This value must be 0.
53 </p></dd><dt><span class="term"><em class="parameter"><code>format</code></em></span></dt><dd><p>
54 Specifies the format of the pixel data.
55 The following symbolic values are accepted:
56 <code class="constant">GL_RED</code>,
57 <code class="constant">GL_RG</code>,
58 <code class="constant">GL_RGB</code>,
59 <code class="constant">GL_BGR</code>,
60 <code class="constant">GL_RGBA</code>, and
61 <code class="constant">GL_BGRA</code>.
62 </p></dd><dt><span class="term"><em class="parameter"><code>type</code></em></span></dt><dd><p>
63 Specifies the data type of the pixel data.
64 The following symbolic values are accepted:
65 <code class="constant">GL_UNSIGNED_BYTE</code>,
66 <code class="constant">GL_BYTE</code>,
67 <code class="constant">GL_UNSIGNED_SHORT</code>,
68 <code class="constant">GL_SHORT</code>,
69 <code class="constant">GL_UNSIGNED_INT</code>,
70 <code class="constant">GL_INT</code>,
71 <code class="constant">GL_FLOAT</code>,
72 <code class="constant">GL_UNSIGNED_BYTE_3_3_2</code>,
73 <code class="constant">GL_UNSIGNED_BYTE_2_3_3_REV</code>,
74 <code class="constant">GL_UNSIGNED_SHORT_5_6_5</code>,
75 <code class="constant">GL_UNSIGNED_SHORT_5_6_5_REV</code>,
76 <code class="constant">GL_UNSIGNED_SHORT_4_4_4_4</code>,
77 <code class="constant">GL_UNSIGNED_SHORT_4_4_4_4_REV</code>,
78 <code class="constant">GL_UNSIGNED_SHORT_5_5_5_1</code>,
79 <code class="constant">GL_UNSIGNED_SHORT_1_5_5_5_REV</code>,
80 <code class="constant">GL_UNSIGNED_INT_8_8_8_8</code>,
81 <code class="constant">GL_UNSIGNED_INT_8_8_8_8_REV</code>,
82 <code class="constant">GL_UNSIGNED_INT_10_10_10_2</code>, and
83 <code class="constant">GL_UNSIGNED_INT_2_10_10_10_REV</code>.
84 </p></dd><dt><span class="term"><em class="parameter"><code>data</code></em></span></dt><dd><p>
85 Specifies a pointer to the image data in memory.
86 </p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="description"></a><h2>Description</h2><p>
87 Texturing maps a portion of a specified texture image
88 onto each graphical primitive for which texturing is enabled.
89 To enable and disable one-dimensional texturing, call <a href="glEnable.xml"><span class="citerefentry"><span class="refentrytitle">glEnable</span></span></a>
90 and <a href="glDisable.xml"><span class="citerefentry"><span class="refentrytitle">glDisable</span></span></a> with argument <code class="constant">GL_TEXTURE_1D</code>.
91 </p><p>
92 Texture images are defined with <code class="function">glTexImage1D</code>.
93 The arguments describe the parameters of the texture image,
94 such as width,
95 width of the border,
96 level-of-detail number
97 (see <a href="glTexParameter.xml"><span class="citerefentry"><span class="refentrytitle">glTexParameter</span></span></a>),
98 and the internal resolution and format used to store the image.
99 The last three arguments describe how the image is represented in
100 memory.
101 </p><p>
102 If <em class="parameter"><code>target</code></em> is <code class="constant">GL_PROXY_TEXTURE_1D</code>, no data is read from <em class="parameter"><code>data</code></em>, but
103 all of the texture image state is recalculated, checked for
104 consistency, and checked against the implementation's capabilities.
105 If the implementation cannot handle a texture of the
106 requested texture size, it sets all of the image state to 0,
107 but does not generate an error (see <a href="glGetError.xml"><span class="citerefentry"><span class="refentrytitle">glGetError</span></span></a>). To query for an
108 entire mipmap array, use an image array level greater than or equal to
109 1.
110 </p><p>
111 If <em class="parameter"><code>target</code></em> is <code class="constant">GL_TEXTURE_1D</code>,
112 data is read from <em class="parameter"><code>data</code></em> as a sequence of signed or unsigned bytes,
113 shorts,
114 or longs,
115 or single-precision floating-point values,
116 depending on <em class="parameter"><code>type</code></em>.
117 These values are grouped into sets of one,
118 two,
119 three,
120 or four values,
121 depending on <em class="parameter"><code>format</code></em>,
122 to form elements.
123 Each data byte is treated as eight 1-bit elements,
124 with bit ordering determined by <code class="constant">GL_UNPACK_LSB_FIRST</code>
125 (see <a href="glPixelStore.xml"><span class="citerefentry"><span class="refentrytitle">glPixelStore</span></span></a>).
126 </p><p>
127 If a non-zero named buffer object is bound to the <code class="constant">GL_PIXEL_UNPACK_BUFFER</code> target
128 (see <a href="glBindBuffer.xml"><span class="citerefentry"><span class="refentrytitle">glBindBuffer</span></span></a>) while a texture image is
129 specified, <em class="parameter"><code>data</code></em> is treated as a byte offset into the buffer object's data store.
130 </p><p>
131 The first element corresponds to the left end of the texture array.
132 Subsequent elements progress left-to-right through the remaining texels
133 in the texture array.
134 The final element corresponds to the right end of the texture array.
135 </p><p>
136 <em class="parameter"><code>format</code></em> determines the composition of each element in <em class="parameter"><code>data</code></em>.
137 It can assume one of these symbolic values:
138 </p><div class="variablelist"><dl><dt><span class="term"><code class="constant">GL_RED</code></span></dt><dd><p>
139 Each element is a single red component.
140 The GL converts it to floating point and assembles it into an RGBA element
141 by attaching 0 for green and blue, and 1 for alpha.
142 Each component is then multiplied by the signed scale factor <code class="constant">GL_c_SCALE</code>,
143 added to the signed bias <code class="constant">GL_c_BIAS</code>,
144 and clamped to the range [0,1].
145 </p></dd><dt><span class="term"><code class="constant">GL_RG</code></span></dt><dd><p>
146 Each element is a single red/green double
147 The GL converts it to floating point and assembles it into an RGBA element
148 by attaching 0 for blue, and 1 for alpha.
149 Each component is then multiplied by the signed scale factor <code class="constant">GL_c_SCALE</code>,
150 added to the signed bias <code class="constant">GL_c_BIAS</code>,
151 and clamped to the range [0,1].
152 </p></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><p>
153 Each element is an RGB triple.
154 The GL converts it to floating point and assembles it into an RGBA element
155 by attaching 1 for alpha.
156 Each component is then multiplied by the signed scale factor <code class="constant">GL_c_SCALE</code>,
157 added to the signed bias <code class="constant">GL_c_BIAS</code>,
158 and clamped to the range [0,1].
159 </p></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><p>
160 Each element contains all four components.
161 Each component is multiplied by the signed scale factor <code class="constant">GL_c_SCALE</code>,
162 added to the signed bias <code class="constant">GL_c_BIAS</code>,
163 and clamped to the range [0,1].
164 </p></dd><dt><span class="term"><code class="constant">GL_DEPTH_COMPONENT</code></span></dt><dd><p>
165 Each element is a single depth value.
166 The GL converts it to floating point, multiplies by the signed scale factor
167 <code class="constant">GL_DEPTH_SCALE</code>, adds the signed bias <code class="constant">GL_DEPTH_BIAS</code>,
168 and clamps to the range [0,1].
169 </p></dd></dl></div><p>
170 If an application wants to store the texture at a certain
171 resolution or in a certain format, it can request the resolution
172 and format with <em class="parameter"><code>internalFormat</code></em>. The GL will choose an internal
173 representation that closely approximates that requested by <em class="parameter"><code>internalFormat</code></em>, but
174 it may not match exactly.
175 (The representations specified by <code class="constant">GL_RED</code>, <code class="constant">GL_RG</code>,
176 <code class="constant">GL_RGB</code> and <code class="constant">GL_RGBA</code> must match exactly.)
177 </p><p>
178 If the <em class="parameter"><code>internalFormat</code></em> parameter is one of the generic compressed formats,
179 <code class="constant">GL_COMPRESSED_RED</code>, <code class="constant">GL_COMPRESSED_RG</code>,
180 <code class="constant">GL_COMPRESSED_RGB</code>, or
181 <code class="constant">GL_COMPRESSED_RGBA</code>, the GL will replace the internal format with the symbolic constant for a specific internal format and compress the texture before storage. If no corresponding internal format is available, or the GL can not compress that image for any reason, the internal format is instead replaced with a corresponding base internal format.
182 </p><p>
183 If the <em class="parameter"><code>internalFormat</code></em> parameter is
184 <code class="constant">GL_SRGB</code>,
185 <code class="constant">GL_SRGB8</code>,
186 <code class="constant">GL_SRGB_ALPHA</code>or
187 <code class="constant">GL_SRGB8_ALPHA8</code>, the texture is treated as if the red, green, or blue components are encoded in the sRGB color space. Any alpha component is left unchanged. The conversion from the sRGB encoded component
188 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
189 <mml:msub><mml:mi mathvariant="italic">c</mml:mi>
190 <mml:mi mathvariant="italic">s</mml:mi>
191 </mml:msub>
192 </mml:math>
193 to a linear component
194 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
195 <mml:msub><mml:mi mathvariant="italic">c</mml:mi>
196 <mml:mi mathvariant="italic">l</mml:mi>
197 </mml:msub>
198 </mml:math>
199 is:
200 </p><p>
201 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
202 <mml:mrow>
203 <mml:msub>
204 <mml:mi mathvariant="italic">c</mml:mi>
205 <mml:mi mathvariant="italic">l</mml:mi>
206 </mml:msub>
207 <mml:mo>=</mml:mo>
208 <mml:mrow>
209 <mml:mo>{</mml:mo>
210
211 <mml:mtable columnalign="left">
212 <mml:mtr>
213 <mml:mtd columnalign="left">
214 <mml:mfrac>
215 <mml:msub>
216 <mml:mi mathvariant="italic">c</mml:mi>
217 <mml:mi mathvariant="italic">s</mml:mi>
218 </mml:msub>
219 <mml:mn>12.92</mml:mn>
220 </mml:mfrac>
221 </mml:mtd>
222 <mml:mtd columnalign="left">
223 <mml:mrow>
224 <mml:mspace width="1ex"></mml:mspace>
225 <mml:mo>if</mml:mo>
226 <mml:mspace width="1ex"></mml:mspace>
227 </mml:mrow>
228 <mml:msub>
229 <mml:mi mathvariant="italic">c</mml:mi>
230 <mml:mi mathvariant="italic">s</mml:mi>
231 </mml:msub>
232 <mml:mo></mml:mo>
233 <mml:mn>0.04045</mml:mn>
234 </mml:mtd>
235 </mml:mtr>
236 <mml:mtr>
237 <mml:mtd columnalign="left">
238 <mml:msup>
239 <mml:mrow>
240 <mml:mo>(</mml:mo>
241 <mml:mfrac>
242 <mml:mrow>
243 <mml:msub>
244 <mml:mi>c</mml:mi>
245 <mml:mi>s</mml:mi>
246 </mml:msub>
247 <mml:mo>+</mml:mo>
248 <mml:mn>0.055</mml:mn>
249 </mml:mrow>
250 <mml:mn>1.055</mml:mn>
251 </mml:mfrac>
252 <mml:mo>)</mml:mo>
253 </mml:mrow>
254 <mml:mn>2.4</mml:mn>
255 </mml:msup>
256 </mml:mtd>
257 <mml:mtd columnalign="left">
258 <mml:mrow>
259 <mml:mspace width="1ex"></mml:mspace>
260 <mml:mo>if</mml:mo>
261 <mml:mspace width="1ex"></mml:mspace>
262 </mml:mrow>
263 <mml:msub>
264 <mml:mi mathvariant="italic">c</mml:mi>
265 <mml:mi mathvariant="italic">s</mml:mi>
266 </mml:msub>
267 <mml:mo>&gt;</mml:mo>
268 <mml:mn>0.04045</mml:mn>
269 </mml:mtd>
270 </mml:mtr>
271 </mml:mtable>
272 </mml:mrow>
273 </mml:mrow>
274 </mml:math>
275 </p><p>
276 Assume
277 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
278 <mml:msub><mml:mi mathvariant="italic">c</mml:mi>
279 <mml:mi mathvariant="italic">s</mml:mi>
280 </mml:msub>
281 </mml:math>
282 is the sRGB component in the range [0,1].
283 </p><p>
284 Use the <code class="constant">GL_PROXY_TEXTURE_1D</code> target to try out a resolution and
285 format. The implementation will
286 update and recompute its best match for the requested storage resolution
287 and format. To then query this state, call <a href="glGetTexLevelParameter.xml"><span class="citerefentry"><span class="refentrytitle">glGetTexLevelParameter</span></span></a>.
288 If the texture cannot be accommodated, texture state is set to 0.
289 </p><p>
290 A one-component texture image uses only the red component of the RGBA
291 color from <em class="parameter"><code>data</code></em>.
292 A two-component image uses the R and A values.
293 A three-component image uses the R, G, and B values.
294 A four-component image uses all of the RGBA components.
295 </p><p>
296 Image-based shadowing can be enabled by comparing texture r coordinates to depth texture values to generate a boolean result. See <a href="glTexParameter.xml"><span class="citerefentry"><span class="refentrytitle">glTexParameter</span></span></a> for details on texture comparison.
297 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="notes"></a><h2>Notes</h2><p>
298 <a href="glPixelStore.xml"><span class="citerefentry"><span class="refentrytitle">glPixelStore</span></span></a> modes affect texture images.
299 </p><p>
300 <em class="parameter"><code>data</code></em> may be a null pointer. In this case texture memory is
301 allocated to accommodate a texture of width <em class="parameter"><code>width</code></em>.
302 You can then download subtextures to initialize the
303 texture memory. The image is undefined if the program tries to apply
304 an uninitialized portion of the texture image to a primitive.
305 </p><p>
306 <code class="function">glTexImage1D</code> specifies the one-dimensional texture for the current texture unit,
307 specified with <a href="glActiveTexture.xml"><span class="citerefentry"><span class="refentrytitle">glActiveTexture</span></span></a>.
308 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="errors"></a><h2>Errors</h2><p>
309 <code class="constant">GL_INVALID_ENUM</code> is generated if <em class="parameter"><code>target</code></em> is not <code class="constant">GL_TEXTURE_1D</code>
310 or <code class="constant">GL_PROXY_TEXTURE_1D</code>.
311 </p><p>
312 <code class="constant">GL_INVALID_ENUM</code> is generated if <em class="parameter"><code>format</code></em> is not an accepted
313 format constant. Format constants other than <code class="constant">GL_STENCIL_INDEX</code>
314 are accepted.
315 </p><p>
316 <code class="constant">GL_INVALID_ENUM</code> is generated if <em class="parameter"><code>type</code></em> is not a type constant.
317 </p><p>
318 <code class="constant">GL_INVALID_VALUE</code> is generated if <em class="parameter"><code>level</code></em> is less than 0.
319 </p><p>
320 <code class="constant">GL_INVALID_VALUE</code> may be generated if <em class="parameter"><code>level</code></em> is greater than
321 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
322
323 <mml:mrow>
324 <mml:msub><mml:mi mathvariant="italic">log</mml:mi>
325 <mml:mn>2</mml:mn>
326 </mml:msub>
327 <mml:mo></mml:mo>
328 <mml:mfenced open="(" close=")">
329 <mml:mi mathvariant="italic">max</mml:mi>
330 </mml:mfenced>
331 </mml:mrow>
332 </mml:math>,
333 where <span class="emphasis"><em>max</em></span> is the returned value of <code class="constant">GL_MAX_TEXTURE_SIZE</code>.
334 </p><p>
335 <code class="constant">GL_INVALID_VALUE</code> is generated if <em class="parameter"><code>internalFormat</code></em> is not
336 one of the accepted resolution and format symbolic constants.
337 </p><p>
338 <code class="constant">GL_INVALID_VALUE</code> is generated if <em class="parameter"><code>width</code></em> is less than 0
339 or greater than <code class="constant">GL_MAX_TEXTURE_SIZE</code>.
340 </p><p>
341 <code class="constant">GL_INVALID_VALUE</code> is generated if non-power-of-two textures are not supported and the <em class="parameter"><code>width</code></em> cannot be represented as
342 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
343
344 <mml:mrow>
345 <mml:msup><mml:mn>2</mml:mn>
346 <mml:mi mathvariant="italic">n</mml:mi>
347 </mml:msup>
348 <mml:mo>+</mml:mo>
349 <mml:mrow>
350 <mml:mn>2</mml:mn>
351 <mml:mo></mml:mo>
352 <mml:mfenced open="(" close=")">
353 <mml:mi mathvariant="italic">border</mml:mi>
354 </mml:mfenced>
355 </mml:mrow>
356 </mml:mrow>
357 </mml:math>
358 for some integer value of <span class="emphasis"><em>n</em></span>.
359 </p><p>
360 <code class="constant">GL_INVALID_VALUE</code> is generated if <em class="parameter"><code>border</code></em> is not 0 or 1.
361 </p><p>
362 <code class="constant">GL_INVALID_OPERATION</code> is generated if <em class="parameter"><code>type</code></em> is one of
363 <code class="constant">GL_UNSIGNED_BYTE_3_3_2</code>,
364 <code class="constant">GL_UNSIGNED_BYTE_2_3_3_REV</code>,
365 <code class="constant">GL_UNSIGNED_SHORT_5_6_5</code>, or
366 <code class="constant">GL_UNSIGNED_SHORT_5_6_5_REV</code>
367 and <em class="parameter"><code>format</code></em> is not <code class="constant">GL_RGB</code>.
368 </p><p>
369 <code class="constant">GL_INVALID_OPERATION</code> is generated if <em class="parameter"><code>type</code></em> is one of
370 <code class="constant">GL_UNSIGNED_SHORT_4_4_4_4</code>,
371 <code class="constant">GL_UNSIGNED_SHORT_4_4_4_4_REV</code>,
372 <code class="constant">GL_UNSIGNED_SHORT_5_5_5_1</code>,
373 <code class="constant">GL_UNSIGNED_SHORT_1_5_5_5_REV</code>,
374 <code class="constant">GL_UNSIGNED_INT_8_8_8_8</code>,
375 <code class="constant">GL_UNSIGNED_INT_8_8_8_8_REV</code>,
376 <code class="constant">GL_UNSIGNED_INT_10_10_10_2</code>, or
377 <code class="constant">GL_UNSIGNED_INT_2_10_10_10_REV</code>
378 and <em class="parameter"><code>format</code></em> is neither <code class="constant">GL_RGBA</code> nor <code class="constant">GL_BGRA</code>.
379 </p><p>
380 <code class="constant">GL_INVALID_OPERATION</code> is generated if <em class="parameter"><code>format</code></em> is
381 <code class="constant">GL_DEPTH_COMPONENT</code> and <em class="parameter"><code>internalFormat</code></em> is not
382 <code class="constant">GL_DEPTH_COMPONENT</code>, <code class="constant">GL_DEPTH_COMPONENT16</code>,
383 <code class="constant">GL_DEPTH_COMPONENT24</code>, or <code class="constant">GL_DEPTH_COMPONENT32</code>.
384 </p><p>
385 <code class="constant">GL_INVALID_OPERATION</code> is generated if <em class="parameter"><code>internalFormat</code></em> is
386 <code class="constant">GL_DEPTH_COMPONENT</code>, <code class="constant">GL_DEPTH_COMPONENT16</code>,
387 <code class="constant">GL_DEPTH_COMPONENT24</code>, or <code class="constant">GL_DEPTH_COMPONENT32</code>, and <em class="parameter"><code>format</code></em> is
388 not <code class="constant">GL_DEPTH_COMPONENT</code>.
389 </p><p>
390 <code class="constant">GL_INVALID_OPERATION</code> is generated if a non-zero buffer object name is bound to the
391 <code class="constant">GL_PIXEL_UNPACK_BUFFER</code> target and the buffer object's data store is currently mapped.
392 </p><p>
393 <code class="constant">GL_INVALID_OPERATION</code> is generated if a non-zero buffer object name is bound to the
394 <code class="constant">GL_PIXEL_UNPACK_BUFFER</code> target and the data would be unpacked from the buffer
395 object such that the memory reads required would exceed the data store size.
396 </p><p>
397 <code class="constant">GL_INVALID_OPERATION</code> is generated if a non-zero buffer object name is bound to the
398 <code class="constant">GL_PIXEL_UNPACK_BUFFER</code> target and <em class="parameter"><code>data</code></em> is not evenly divisible
399 into the number of bytes needed to store in memory a datum indicated by <em class="parameter"><code>type</code></em>.
400 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="associatedgets"></a><h2>Associated Gets</h2><p>
401 <a href="glGetTexImage.xml"><span class="citerefentry"><span class="refentrytitle">glGetTexImage</span></span></a>
402 </p><p>
403 <a href="glGet.xml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with argument <code class="constant">GL_PIXEL_UNPACK_BUFFER_BINDING</code>
404 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p>
405 <a href="glActiveTexture.xml"><span class="citerefentry"><span class="refentrytitle">glActiveTexture</span></span></a>,
406 <a href="glCompressedTexImage1D.xml"><span class="citerefentry"><span class="refentrytitle">glCompressedTexImage1D</span></span></a>,
407 <a href="glCompressedTexSubImage1D.xml"><span class="citerefentry"><span class="refentrytitle">glCompressedTexSubImage1D</span></span></a>,
408 <a href="glCopyTexImage1D.xml"><span class="citerefentry"><span class="refentrytitle">glCopyTexImage1D</span></span></a>,
409 <a href="glCopyTexSubImage1D.xml"><span class="citerefentry"><span class="refentrytitle">glCopyTexSubImage1D</span></span></a>,
410 <a href="glGetCompressedTexImage.xml"><span class="citerefentry"><span class="refentrytitle">glGetCompressedTexImage</span></span></a>,
411 <a href="glPixelStore.xml"><span class="citerefentry"><span class="refentrytitle">glPixelStore</span></span></a>,
412 <a href="glTexImage2D.xml"><span class="citerefentry"><span class="refentrytitle">glTexImage2D</span></span></a>,
413 <a href="glTexImage3D.xml"><span class="citerefentry"><span class="refentrytitle">glTexImage3D</span></span></a>,
414 <a href="glTexSubImage1D.xml"><span class="citerefentry"><span class="refentrytitle">glTexSubImage1D</span></span></a>,
415 <a href="glTexSubImage2D.xml"><span class="citerefentry"><span class="refentrytitle">glTexSubImage2D</span></span></a>,
416 <a href="glTexSubImage3D.xml"><span class="citerefentry"><span class="refentrytitle">glTexSubImage3D</span></span></a>,
417 <a href="glTexParameter.xml"><span class="citerefentry"><span class="refentrytitle">glTexParameter</span></span></a>
418 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="Copyright"></a><h2>Copyright</h2><p>
419 Copyright <span class="trademark"></span>© 1991-2006
420 Silicon Graphics, Inc. This document is licensed under the SGI
421 Free Software B License. For details, see
422 <a href="http://oss.sgi.com/projects/FreeB/" target="_top">http://oss.sgi.com/projects/FreeB/</a>.
423 </p></div></div></body></html>