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>glTexImage1D - 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="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> |
7faf1d71 AW |
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. | |
c7b31271 | 142 | Each component is clamped to the range [0,1]. |
7faf1d71 AW |
143 | </p></dd><dt><span class="term"><code class="constant">GL_RG</code></span></dt><dd><p> |
144 | Each element is a single red/green double | |
145 | The GL converts it to floating point and assembles it into an RGBA element | |
146 | by attaching 0 for blue, and 1 for alpha. | |
c7b31271 | 147 | Each component is clamped to the range [0,1]. |
7faf1d71 AW |
148 | </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> |
149 | Each element is an RGB triple. | |
150 | The GL converts it to floating point and assembles it into an RGBA element | |
151 | by attaching 1 for alpha. | |
c7b31271 | 152 | Each component is clamped to the range [0,1]. |
7faf1d71 AW |
153 | </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> |
154 | Each element contains all four components. | |
c7b31271 | 155 | Each component is clamped to the range [0,1]. |
7faf1d71 AW |
156 | </p></dd><dt><span class="term"><code class="constant">GL_DEPTH_COMPONENT</code></span></dt><dd><p> |
157 | Each element is a single depth value. | |
c7b31271 | 158 | The GL converts it to floating point |
7faf1d71 AW |
159 | and clamps to the range [0,1]. |
160 | </p></dd></dl></div><p> | |
161 | If an application wants to store the texture at a certain | |
162 | resolution or in a certain format, it can request the resolution | |
163 | and format with <em class="parameter"><code>internalFormat</code></em>. The GL will choose an internal | |
164 | representation that closely approximates that requested by <em class="parameter"><code>internalFormat</code></em>, but | |
165 | it may not match exactly. | |
166 | (The representations specified by <code class="constant">GL_RED</code>, <code class="constant">GL_RG</code>, | |
167 | <code class="constant">GL_RGB</code> and <code class="constant">GL_RGBA</code> must match exactly.) | |
168 | </p><p> | |
169 | If the <em class="parameter"><code>internalFormat</code></em> parameter is one of the generic compressed formats, | |
170 | <code class="constant">GL_COMPRESSED_RED</code>, <code class="constant">GL_COMPRESSED_RG</code>, | |
171 | <code class="constant">GL_COMPRESSED_RGB</code>, or | |
172 | <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. | |
173 | </p><p> | |
174 | If the <em class="parameter"><code>internalFormat</code></em> parameter is | |
175 | <code class="constant">GL_SRGB</code>, | |
176 | <code class="constant">GL_SRGB8</code>, | |
177 | <code class="constant">GL_SRGB_ALPHA</code>or | |
178 | <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 | |
179 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
180 | <mml:msub><mml:mi mathvariant="italic">c</mml:mi> | |
181 | <mml:mi mathvariant="italic">s</mml:mi> | |
182 | </mml:msub> | |
183 | </mml:math> | |
184 | to a linear component | |
185 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
186 | <mml:msub><mml:mi mathvariant="italic">c</mml:mi> | |
187 | <mml:mi mathvariant="italic">l</mml:mi> | |
188 | </mml:msub> | |
189 | </mml:math> | |
190 | is: | |
191 | </p><p> | |
192 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
193 | <mml:mrow> | |
194 | <mml:msub> | |
195 | <mml:mi mathvariant="italic">c</mml:mi> | |
196 | <mml:mi mathvariant="italic">l</mml:mi> | |
197 | </mml:msub> | |
198 | <mml:mo>=</mml:mo> | |
199 | <mml:mrow> | |
200 | <mml:mo>{</mml:mo> | |
201 | ||
202 | <mml:mtable columnalign="left"> | |
203 | <mml:mtr> | |
204 | <mml:mtd columnalign="left"> | |
205 | <mml:mfrac> | |
206 | <mml:msub> | |
207 | <mml:mi mathvariant="italic">c</mml:mi> | |
208 | <mml:mi mathvariant="italic">s</mml:mi> | |
209 | </mml:msub> | |
210 | <mml:mn>12.92</mml:mn> | |
211 | </mml:mfrac> | |
212 | </mml:mtd> | |
213 | <mml:mtd columnalign="left"> | |
214 | <mml:mrow> | |
215 | <mml:mspace width="1ex"></mml:mspace> | |
216 | <mml:mo>if</mml:mo> | |
217 | <mml:mspace width="1ex"></mml:mspace> | |
218 | </mml:mrow> | |
219 | <mml:msub> | |
220 | <mml:mi mathvariant="italic">c</mml:mi> | |
221 | <mml:mi mathvariant="italic">s</mml:mi> | |
222 | </mml:msub> | |
223 | <mml:mo>≤</mml:mo> | |
224 | <mml:mn>0.04045</mml:mn> | |
225 | </mml:mtd> | |
226 | </mml:mtr> | |
227 | <mml:mtr> | |
228 | <mml:mtd columnalign="left"> | |
229 | <mml:msup> | |
230 | <mml:mrow> | |
231 | <mml:mo>(</mml:mo> | |
232 | <mml:mfrac> | |
233 | <mml:mrow> | |
234 | <mml:msub> | |
235 | <mml:mi>c</mml:mi> | |
236 | <mml:mi>s</mml:mi> | |
237 | </mml:msub> | |
238 | <mml:mo>+</mml:mo> | |
239 | <mml:mn>0.055</mml:mn> | |
240 | </mml:mrow> | |
241 | <mml:mn>1.055</mml:mn> | |
242 | </mml:mfrac> | |
243 | <mml:mo>)</mml:mo> | |
244 | </mml:mrow> | |
245 | <mml:mn>2.4</mml:mn> | |
246 | </mml:msup> | |
247 | </mml:mtd> | |
248 | <mml:mtd columnalign="left"> | |
249 | <mml:mrow> | |
250 | <mml:mspace width="1ex"></mml:mspace> | |
251 | <mml:mo>if</mml:mo> | |
252 | <mml:mspace width="1ex"></mml:mspace> | |
253 | </mml:mrow> | |
254 | <mml:msub> | |
255 | <mml:mi mathvariant="italic">c</mml:mi> | |
256 | <mml:mi mathvariant="italic">s</mml:mi> | |
257 | </mml:msub> | |
258 | <mml:mo>></mml:mo> | |
259 | <mml:mn>0.04045</mml:mn> | |
260 | </mml:mtd> | |
261 | </mml:mtr> | |
262 | </mml:mtable> | |
263 | </mml:mrow> | |
264 | </mml:mrow> | |
265 | </mml:math> | |
266 | </p><p> | |
267 | Assume | |
268 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
269 | <mml:msub><mml:mi mathvariant="italic">c</mml:mi> | |
270 | <mml:mi mathvariant="italic">s</mml:mi> | |
271 | </mml:msub> | |
272 | </mml:math> | |
273 | is the sRGB component in the range [0,1]. | |
274 | </p><p> | |
275 | Use the <code class="constant">GL_PROXY_TEXTURE_1D</code> target to try out a resolution and | |
276 | format. The implementation will | |
277 | update and recompute its best match for the requested storage resolution | |
278 | and format. To then query this state, call <a href="glGetTexLevelParameter.xml"><span class="citerefentry"><span class="refentrytitle">glGetTexLevelParameter</span></span></a>. | |
279 | If the texture cannot be accommodated, texture state is set to 0. | |
280 | </p><p> | |
281 | A one-component texture image uses only the red component of the RGBA | |
282 | color from <em class="parameter"><code>data</code></em>. | |
283 | A two-component image uses the R and A values. | |
284 | A three-component image uses the R, G, and B values. | |
285 | A four-component image uses all of the RGBA components. | |
286 | </p><p> | |
287 | 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. | |
288 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="notes"></a><h2>Notes</h2><p> | |
289 | <a href="glPixelStore.xml"><span class="citerefentry"><span class="refentrytitle">glPixelStore</span></span></a> modes affect texture images. | |
290 | </p><p> | |
291 | <em class="parameter"><code>data</code></em> may be a null pointer. In this case texture memory is | |
292 | allocated to accommodate a texture of width <em class="parameter"><code>width</code></em>. | |
293 | You can then download subtextures to initialize the | |
294 | texture memory. The image is undefined if the program tries to apply | |
295 | an uninitialized portion of the texture image to a primitive. | |
296 | </p><p> | |
297 | <code class="function">glTexImage1D</code> specifies the one-dimensional texture for the current texture unit, | |
298 | specified with <a href="glActiveTexture.xml"><span class="citerefentry"><span class="refentrytitle">glActiveTexture</span></span></a>. | |
299 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="errors"></a><h2>Errors</h2><p> | |
300 | <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> | |
301 | or <code class="constant">GL_PROXY_TEXTURE_1D</code>. | |
302 | </p><p> | |
303 | <code class="constant">GL_INVALID_ENUM</code> is generated if <em class="parameter"><code>format</code></em> is not an accepted | |
304 | format constant. Format constants other than <code class="constant">GL_STENCIL_INDEX</code> | |
305 | are accepted. | |
306 | </p><p> | |
307 | <code class="constant">GL_INVALID_ENUM</code> is generated if <em class="parameter"><code>type</code></em> is not a type constant. | |
308 | </p><p> | |
309 | <code class="constant">GL_INVALID_VALUE</code> is generated if <em class="parameter"><code>level</code></em> is less than 0. | |
310 | </p><p> | |
311 | <code class="constant">GL_INVALID_VALUE</code> may be generated if <em class="parameter"><code>level</code></em> is greater than | |
312 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
313 | ||
314 | <mml:mrow> | |
315 | <mml:msub><mml:mi mathvariant="italic">log</mml:mi> | |
316 | <mml:mn>2</mml:mn> | |
317 | </mml:msub> | |
318 | <mml:mo></mml:mo> | |
319 | <mml:mfenced open="(" close=")"> | |
320 | <mml:mi mathvariant="italic">max</mml:mi> | |
321 | </mml:mfenced> | |
322 | </mml:mrow> | |
323 | </mml:math>, | |
324 | where <span class="emphasis"><em>max</em></span> is the returned value of <code class="constant">GL_MAX_TEXTURE_SIZE</code>. | |
325 | </p><p> | |
326 | <code class="constant">GL_INVALID_VALUE</code> is generated if <em class="parameter"><code>internalFormat</code></em> is not | |
327 | one of the accepted resolution and format symbolic constants. | |
328 | </p><p> | |
329 | <code class="constant">GL_INVALID_VALUE</code> is generated if <em class="parameter"><code>width</code></em> is less than 0 | |
330 | or greater than <code class="constant">GL_MAX_TEXTURE_SIZE</code>. | |
331 | </p><p> | |
332 | <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 | |
333 | <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"> | |
334 | ||
335 | <mml:mrow> | |
336 | <mml:msup><mml:mn>2</mml:mn> | |
337 | <mml:mi mathvariant="italic">n</mml:mi> | |
338 | </mml:msup> | |
339 | <mml:mo>+</mml:mo> | |
340 | <mml:mrow> | |
341 | <mml:mn>2</mml:mn> | |
342 | <mml:mo></mml:mo> | |
343 | <mml:mfenced open="(" close=")"> | |
344 | <mml:mi mathvariant="italic">border</mml:mi> | |
345 | </mml:mfenced> | |
346 | </mml:mrow> | |
347 | </mml:mrow> | |
348 | </mml:math> | |
349 | for some integer value of <span class="emphasis"><em>n</em></span>. | |
350 | </p><p> | |
351 | <code class="constant">GL_INVALID_VALUE</code> is generated if <em class="parameter"><code>border</code></em> is not 0 or 1. | |
352 | </p><p> | |
353 | <code class="constant">GL_INVALID_OPERATION</code> is generated if <em class="parameter"><code>type</code></em> is one of | |
354 | <code class="constant">GL_UNSIGNED_BYTE_3_3_2</code>, | |
355 | <code class="constant">GL_UNSIGNED_BYTE_2_3_3_REV</code>, | |
356 | <code class="constant">GL_UNSIGNED_SHORT_5_6_5</code>, or | |
357 | <code class="constant">GL_UNSIGNED_SHORT_5_6_5_REV</code> | |
358 | and <em class="parameter"><code>format</code></em> is not <code class="constant">GL_RGB</code>. | |
359 | </p><p> | |
360 | <code class="constant">GL_INVALID_OPERATION</code> is generated if <em class="parameter"><code>type</code></em> is one of | |
361 | <code class="constant">GL_UNSIGNED_SHORT_4_4_4_4</code>, | |
362 | <code class="constant">GL_UNSIGNED_SHORT_4_4_4_4_REV</code>, | |
363 | <code class="constant">GL_UNSIGNED_SHORT_5_5_5_1</code>, | |
364 | <code class="constant">GL_UNSIGNED_SHORT_1_5_5_5_REV</code>, | |
365 | <code class="constant">GL_UNSIGNED_INT_8_8_8_8</code>, | |
366 | <code class="constant">GL_UNSIGNED_INT_8_8_8_8_REV</code>, | |
367 | <code class="constant">GL_UNSIGNED_INT_10_10_10_2</code>, or | |
368 | <code class="constant">GL_UNSIGNED_INT_2_10_10_10_REV</code> | |
369 | and <em class="parameter"><code>format</code></em> is neither <code class="constant">GL_RGBA</code> nor <code class="constant">GL_BGRA</code>. | |
370 | </p><p> | |
371 | <code class="constant">GL_INVALID_OPERATION</code> is generated if <em class="parameter"><code>format</code></em> is | |
372 | <code class="constant">GL_DEPTH_COMPONENT</code> and <em class="parameter"><code>internalFormat</code></em> is not | |
373 | <code class="constant">GL_DEPTH_COMPONENT</code>, <code class="constant">GL_DEPTH_COMPONENT16</code>, | |
374 | <code class="constant">GL_DEPTH_COMPONENT24</code>, or <code class="constant">GL_DEPTH_COMPONENT32</code>. | |
375 | </p><p> | |
376 | <code class="constant">GL_INVALID_OPERATION</code> is generated if <em class="parameter"><code>internalFormat</code></em> is | |
377 | <code class="constant">GL_DEPTH_COMPONENT</code>, <code class="constant">GL_DEPTH_COMPONENT16</code>, | |
378 | <code class="constant">GL_DEPTH_COMPONENT24</code>, or <code class="constant">GL_DEPTH_COMPONENT32</code>, and <em class="parameter"><code>format</code></em> is | |
379 | not <code class="constant">GL_DEPTH_COMPONENT</code>. | |
380 | </p><p> | |
381 | <code class="constant">GL_INVALID_OPERATION</code> is generated if a non-zero buffer object name is bound to the | |
382 | <code class="constant">GL_PIXEL_UNPACK_BUFFER</code> target and the buffer object's data store is currently mapped. | |
383 | </p><p> | |
384 | <code class="constant">GL_INVALID_OPERATION</code> is generated if a non-zero buffer object name is bound to the | |
385 | <code class="constant">GL_PIXEL_UNPACK_BUFFER</code> target and the data would be unpacked from the buffer | |
386 | object such that the memory reads required would exceed the data store size. | |
387 | </p><p> | |
388 | <code class="constant">GL_INVALID_OPERATION</code> is generated if a non-zero buffer object name is bound to the | |
389 | <code class="constant">GL_PIXEL_UNPACK_BUFFER</code> target and <em class="parameter"><code>data</code></em> is not evenly divisible | |
390 | into the number of bytes needed to store in memory a datum indicated by <em class="parameter"><code>type</code></em>. | |
391 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="associatedgets"></a><h2>Associated Gets</h2><p> | |
392 | <a href="glGetTexImage.xml"><span class="citerefentry"><span class="refentrytitle">glGetTexImage</span></span></a> | |
393 | </p><p> | |
394 | <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> | |
395 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p> | |
396 | <a href="glActiveTexture.xml"><span class="citerefentry"><span class="refentrytitle">glActiveTexture</span></span></a>, | |
397 | <a href="glCompressedTexImage1D.xml"><span class="citerefentry"><span class="refentrytitle">glCompressedTexImage1D</span></span></a>, | |
398 | <a href="glCompressedTexSubImage1D.xml"><span class="citerefentry"><span class="refentrytitle">glCompressedTexSubImage1D</span></span></a>, | |
399 | <a href="glCopyTexImage1D.xml"><span class="citerefentry"><span class="refentrytitle">glCopyTexImage1D</span></span></a>, | |
400 | <a href="glCopyTexSubImage1D.xml"><span class="citerefentry"><span class="refentrytitle">glCopyTexSubImage1D</span></span></a>, | |
401 | <a href="glGetCompressedTexImage.xml"><span class="citerefentry"><span class="refentrytitle">glGetCompressedTexImage</span></span></a>, | |
402 | <a href="glPixelStore.xml"><span class="citerefentry"><span class="refentrytitle">glPixelStore</span></span></a>, | |
403 | <a href="glTexImage2D.xml"><span class="citerefentry"><span class="refentrytitle">glTexImage2D</span></span></a>, | |
404 | <a href="glTexImage3D.xml"><span class="citerefentry"><span class="refentrytitle">glTexImage3D</span></span></a>, | |
405 | <a href="glTexSubImage1D.xml"><span class="citerefentry"><span class="refentrytitle">glTexSubImage1D</span></span></a>, | |
406 | <a href="glTexSubImage2D.xml"><span class="citerefentry"><span class="refentrytitle">glTexSubImage2D</span></span></a>, | |
407 | <a href="glTexSubImage3D.xml"><span class="citerefentry"><span class="refentrytitle">glTexSubImage3D</span></span></a>, | |
408 | <a href="glTexParameter.xml"><span class="citerefentry"><span class="refentrytitle">glTexParameter</span></span></a> | |
409 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="Copyright"></a><h2>Copyright</h2><p> | |
410 | Copyright <span class="trademark"></span>© 1991-2006 | |
411 | Silicon Graphics, Inc. This document is licensed under the SGI | |
412 | Free Software B License. For details, see | |
413 | <a href="http://oss.sgi.com/projects/FreeB/" target="_top">http://oss.sgi.com/projects/FreeB/</a>. | |
414 | </p></div></div></body></html> |