include more low-level bindings
[clinton/guile-figl.git] / upstream-man-pages / man2 / glCopyTexImage1D.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN"
3 "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">
4 <refentry id="glCopyTexImage1D">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>1991-2006</year>
9 <holder>Silicon Graphics, Inc.</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>glCopyTexImage1D</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>glCopyTexImage1D</refname>
17 <refpurpose>copy pixels into a 1D texture image</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>C Specification</title>
20 <funcsynopsis>
21 <funcprototype>
22 <funcdef>void <function>glCopyTexImage1D</function></funcdef>
23 <paramdef>GLenum <parameter>target</parameter></paramdef>
24 <paramdef>GLint <parameter>level</parameter></paramdef>
25 <paramdef>GLenum <parameter>internalformat</parameter></paramdef>
26 <paramdef>GLint <parameter>x</parameter></paramdef>
27 <paramdef>GLint <parameter>y</parameter></paramdef>
28 <paramdef>GLsizei <parameter>width</parameter></paramdef>
29 <paramdef>GLint <parameter>border</parameter></paramdef>
30 </funcprototype>
31 </funcsynopsis>
32 </refsynopsisdiv>
33 <!-- eqn: ignoring delim $$ -->
34 <refsect1 id="parameters"><title>Parameters</title>
35 <variablelist>
36 <varlistentry>
37 <term><parameter>target</parameter></term>
38 <listitem>
39 <para>
40 Specifies the target texture.
41 Must be <constant>GL_TEXTURE_1D</constant>.
42 </para>
43 </listitem>
44 </varlistentry>
45 <varlistentry>
46 <term><parameter>level</parameter></term>
47 <listitem>
48 <para>
49 Specifies the level-of-detail number.
50 Level 0 is the base image level.
51 Level <emphasis>n</emphasis> is the <emphasis>n</emphasis>th mipmap reduction image.
52 </para>
53 </listitem>
54 </varlistentry>
55 <varlistentry>
56 <term><parameter>internalformat</parameter></term>
57 <listitem>
58 <para>
59 Specifies the internal format of the texture.
60 Must be one of the following symbolic constants:
61 <constant>GL_ALPHA</constant>,
62 <constant>GL_ALPHA4</constant>,
63 <constant>GL_ALPHA8</constant>,
64 <constant>GL_ALPHA12</constant>,
65 <constant>GL_ALPHA16</constant>,
66 <constant>GL_COMPRESSED_ALPHA</constant>,
67 <constant>GL_COMPRESSED_LUMINANCE</constant>,
68 <constant>GL_COMPRESSED_LUMINANCE_ALPHA</constant>,
69 <constant>GL_COMPRESSED_INTENSITY</constant>,
70 <constant>GL_COMPRESSED_RGB</constant>,
71 <constant>GL_COMPRESSED_RGBA</constant>,
72 <constant>GL_DEPTH_COMPONENT</constant>,
73 <constant>GL_DEPTH_COMPONENT16</constant>,
74 <constant>GL_DEPTH_COMPONENT24</constant>,
75 <constant>GL_DEPTH_COMPONENT32</constant>,
76 <constant>GL_LUMINANCE</constant>,
77 <constant>GL_LUMINANCE4</constant>,
78 <constant>GL_LUMINANCE8</constant>,
79 <constant>GL_LUMINANCE12</constant>,
80 <constant>GL_LUMINANCE16</constant>,
81 <constant>GL_LUMINANCE_ALPHA</constant>,
82 <constant>GL_LUMINANCE4_ALPHA4</constant>,
83 <constant>GL_LUMINANCE6_ALPHA2</constant>,
84 <constant>GL_LUMINANCE8_ALPHA8</constant>,
85 <constant>GL_LUMINANCE12_ALPHA4</constant>,
86 <constant>GL_LUMINANCE12_ALPHA12</constant>,
87 <constant>GL_LUMINANCE16_ALPHA16</constant>,
88 <constant>GL_INTENSITY</constant>,
89 <constant>GL_INTENSITY4</constant>,
90 <constant>GL_INTENSITY8</constant>,
91 <constant>GL_INTENSITY12</constant>,
92 <constant>GL_INTENSITY16</constant>,
93 <constant>GL_RGB</constant>,
94 <constant>GL_R3_G3_B2</constant>,
95 <constant>GL_RGB4</constant>,
96 <constant>GL_RGB5</constant>,
97 <constant>GL_RGB8</constant>,
98 <constant>GL_RGB10</constant>,
99 <constant>GL_RGB12</constant>,
100 <constant>GL_RGB16</constant>,
101 <constant>GL_RGBA</constant>,
102 <constant>GL_RGBA2</constant>,
103 <constant>GL_RGBA4</constant>,
104 <constant>GL_RGB5_A1</constant>,
105 <constant>GL_RGBA8</constant>,
106 <constant>GL_RGB10_A2</constant>,
107 <constant>GL_RGBA12</constant>,
108 <constant>GL_RGBA16</constant>,
109 <constant>GL_SLUMINANCE</constant>,
110 <constant>GL_SLUMINANCE8</constant>,
111 <constant>GL_SLUMINANCE_ALPHA</constant>,
112 <constant>GL_SLUMINANCE8_ALPHA8</constant>,
113 <constant>GL_SRGB</constant>,
114 <constant>GL_SRGB8</constant>,
115 <constant>GL_SRGB_ALPHA</constant>, or
116 <constant>GL_SRGB8_ALPHA8</constant>.
117 </para>
118 </listitem>
119 </varlistentry>
120 <varlistentry>
121 <term><parameter>x</parameter></term>
122 <term><parameter>y</parameter></term>
123 <listitem>
124 <para>
125 Specify the window coordinates of the left corner
126 of the row of pixels to be copied.
127 </para>
128 </listitem>
129 </varlistentry>
130 <varlistentry>
131 <term><parameter>width</parameter></term>
132 <listitem>
133 <para>
134 Specifies the width of the texture image.
135 Must be 0 or
136 <inlineequation><mml:math>
137 <!-- eqn: 2 sup n + 2 ( border ):-->
138 <mml:mrow>
139 <mml:msup><mml:mn>2</mml:mn>
140 <mml:mi mathvariant="italic">n</mml:mi>
141 </mml:msup>
142 <mml:mo>+</mml:mo>
143 <mml:mrow>
144 <mml:mn>2</mml:mn>
145 <mml:mo>&af;</mml:mo>
146 <mml:mfenced open="(" close=")">
147 <mml:mi mathvariant="italic">border</mml:mi>
148 </mml:mfenced>
149 </mml:mrow>
150 </mml:mrow>
151 </mml:math></inlineequation>
152 for some integer
153 <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>.
154 The height of the texture image is 1.
155 </para>
156 </listitem>
157 </varlistentry>
158 <varlistentry>
159 <term><parameter>border</parameter></term>
160 <listitem>
161 <para>
162 Specifies the width of the border.
163 Must be either 0 or 1.
164 </para>
165 </listitem>
166 </varlistentry>
167 </variablelist>
168 </refsect1>
169 <refsect1 id="description"><title>Description</title>
170 <para>
171 <function>glCopyTexImage1D</function> defines a one-dimensional texture image with pixels from the current
172 <constant>GL_READ_BUFFER</constant>.
173 </para>
174 <para>
175 The screen-aligned pixel row with left corner at
176 <inlineequation><mml:math>
177 <!-- eqn: (x, y):-->
178 <mml:mfenced open="(" close=")">
179 <mml:mi mathvariant="italic">x</mml:mi>
180 <mml:mi mathvariant="italic">y</mml:mi>
181 </mml:mfenced>
182 </mml:math></inlineequation>
183 and with a length of
184 <inlineequation><mml:math>
185 <!-- eqn: width + 2 ( border ):-->
186 <mml:mrow>
187 <mml:mi mathvariant="italic">width</mml:mi>
188 <mml:mo>+</mml:mo>
189 <mml:mrow>
190 <mml:mn>2</mml:mn>
191 <mml:mo>&af;</mml:mo>
192 <mml:mfenced open="(" close=")">
193 <mml:mi mathvariant="italic">border</mml:mi>
194 </mml:mfenced>
195 </mml:mrow>
196 </mml:mrow>
197 </mml:math></inlineequation>
198 defines the texture array
199 at the mipmap level specified by <parameter>level</parameter>.
200 <parameter>internalformat</parameter> specifies the internal format of the texture array.
201 </para>
202 <para>
203 The pixels in the row are processed exactly as if
204 <citerefentry><refentrytitle>glCopyPixels</refentrytitle></citerefentry> had been called, but the process stops just before
205 final conversion.
206 At this point all pixel component values are clamped to the range
207 <inlineequation><mml:math>
208 <!-- eqn: [0,1]:-->
209 <mml:mfenced open="[" close="]">
210 <mml:mn>0</mml:mn>
211 <mml:mn>1</mml:mn>
212 </mml:mfenced>
213 </mml:math></inlineequation>
214 and then converted to the texture's internal format for storage in the texel
215 array.
216 </para>
217 <para>
218 Pixel ordering is such that lower
219 <inlineequation><mml:math><mml:mi mathvariant="italic">x</mml:mi></mml:math></inlineequation>
220 screen coordinates correspond to
221 lower texture coordinates.
222 </para>
223 <para>
224 If any of the pixels within the specified row of the current
225 <constant>GL_READ_BUFFER</constant> are outside the window associated with the current
226 rendering context, then the values obtained for those pixels are undefined.
227 </para>
228 <para>
229 <function>glCopyTexImage1D</function> defines a one-dimensional texture image with pixels from the current
230 <constant>GL_READ_BUFFER</constant>.
231 </para>
232 <para>
233 When <parameter>internalformat</parameter> is one of the sRGB types, the GL does not automatically convert the source pixels to the sRGB color space. In this case, the <function>glPixelMap</function> function can be used to accomplish the conversion.
234 </para>
235 </refsect1>
236 <refsect1 id="notes"><title>Notes</title>
237 <para>
238 <function>glCopyTexImage1D</function> is available only if the GL version is 1.1 or greater.
239 </para>
240 <para>
241 Texturing has no effect in color index mode.
242 </para>
243 <para>
244 1, 2, 3, and 4 are not accepted values for <parameter>internalformat</parameter>.
245 </para>
246 <para>
247 An image with 0 width indicates a NULL texture.
248 </para>
249 <para>
250 When the <code>ARB_imaging</code> extension is supported, the RGBA components copied from the framebuffer may be processed by the imaging pipeline. See <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry> for specific details.
251 </para>
252 <para>
253 <constant>GL_DEPTH_COMPONENT</constant>, <constant>GL_DEPTH_COMPONENT16</constant>,
254 <constant>GL_DEPTH_COMPONENT24</constant>, and <constant>GL_DEPTH_COMPONENT32</constant> are available only
255 if the GL version is 1.4 or greater.
256 </para>
257 <para>
258 Non-power-of-two textures are supported if the GL version is 2.0 or greater, or if the implementation exports the <constant>GL_ARB_texture_non_power_of_two</constant> extension.
259 </para>
260 <para>
261 The
262 <constant>GL_SRGB</constant>,
263 <constant>GL_SRGB8</constant>,
264 <constant>GL_SRGB_ALPHA</constant>,
265 <constant>GL_SRGB8_ALPHA8</constant>,
266 <constant>GL_SLUMINANCE</constant>,
267 <constant>GL_SLUMINANCE8</constant>,
268 <constant>GL_SLUMINANCE_ALPHA</constant>, and
269 <constant>GL_SLUMINANCE8_ALPHA8</constant>
270 internal formats are only available if the GL version is 2.1 or greater. See <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry> for specific details about sRGB conversion.
271 </para>
272 </refsect1>
273 <refsect1 id="errors"><title>Errors</title>
274 <para>
275 <constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> is not one of the allowable values.
276 </para>
277 <para>
278 <constant>GL_INVALID_VALUE</constant> is generated if <parameter>level</parameter> is less than 0.
279 </para>
280 <para>
281 <constant>GL_INVALID_VALUE</constant> may be generated if <parameter>level</parameter> is greater
282 than
283 <inlineequation><mml:math>
284 <!-- eqn: log sub 2 max:-->
285 <mml:mrow>
286 <mml:msub><mml:mi mathvariant="italic">log</mml:mi>
287 <mml:mn>2</mml:mn>
288 </mml:msub>
289 <mml:mo>&it;</mml:mo>
290 <mml:mi mathvariant="italic">max</mml:mi>
291 </mml:mrow>
292 </mml:math></inlineequation>,
293 where
294 <inlineequation><mml:math><mml:mi mathvariant="italic">max</mml:mi></mml:math></inlineequation>
295 is the returned value of <constant>GL_MAX_TEXTURE_SIZE</constant>.
296 </para>
297 <para>
298 <constant>GL_INVALID_VALUE</constant> is generated if <parameter>internalformat</parameter> is not an allowable value.
299 </para>
300 <para>
301 <constant>GL_INVALID_VALUE</constant> is generated if <parameter>width</parameter> is less than 0 or greater than
302 2 + <constant>GL_MAX_TEXTURE_SIZE</constant>.
303 </para>
304 <para>
305 <constant>GL_INVALID_VALUE</constant> is generated if non-power-of-two textures are not supported and the <parameter>width</parameter> cannot be represented as
306 <inlineequation><mml:math>
307 <!-- eqn: 2 sup n + 2 ( border ):-->
308 <mml:mrow>
309 <mml:msup><mml:mn>2</mml:mn>
310 <mml:mi mathvariant="italic">n</mml:mi>
311 </mml:msup>
312 <mml:mo>+</mml:mo>
313 <mml:mrow>
314 <mml:mn>2</mml:mn>
315 <mml:mo>&af;</mml:mo>
316 <mml:mfenced open="(" close=")">
317 <mml:mi mathvariant="italic">border</mml:mi>
318 </mml:mfenced>
319 </mml:mrow>
320 </mml:mrow>
321 </mml:math></inlineequation>
322 for some integer value of <emphasis>n</emphasis>.
323 </para>
324 <para>
325 <constant>GL_INVALID_VALUE</constant> is generated if <parameter>border</parameter> is not 0 or 1.
326 </para>
327 <para>
328 <constant>GL_INVALID_OPERATION</constant> is generated if <function>glCopyTexImage1D</function> is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
329 </para>
330 <para>
331 <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>internalformat</parameter> is
332 <constant>GL_DEPTH_COMPONENT</constant>, <constant>GL_DEPTH_COMPONENT16</constant>,
333 <constant>GL_DEPTH_COMPONENT24</constant>, or <constant>GL_DEPTH_COMPONENT32</constant> and there is no depth
334 buffer.
335 </para>
336 </refsect1>
337 <refsect1 id="associatedgets"><title>Associated Gets</title>
338 <para>
339 <citerefentry><refentrytitle>glGetTexImage</refentrytitle></citerefentry>
340 </para>
341 <para>
342 <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_1D</constant>
343 </para>
344 </refsect1>
345 <refsect1 id="seealso"><title>See Also</title>
346 <para>
347 <citerefentry><refentrytitle>glCopyPixels</refentrytitle></citerefentry>,
348 <citerefentry><refentrytitle>glCopyTexImage2D</refentrytitle></citerefentry>,
349 <citerefentry><refentrytitle>glCopyTexSubImage1D</refentrytitle></citerefentry>,
350 <citerefentry><refentrytitle>glCopyTexSubImage2D</refentrytitle></citerefentry>,
351 <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry>,
352 <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>,
353 <citerefentry><refentrytitle>glTexEnv</refentrytitle></citerefentry>,
354 <citerefentry><refentrytitle>glTexGen</refentrytitle></citerefentry>,
355 <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>,
356 <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>,
357 <citerefentry><refentrytitle>glTexSubImage1D</refentrytitle></citerefentry>,
358 <citerefentry><refentrytitle>glTexSubImage2D</refentrytitle></citerefentry>,
359 <citerefentry><refentrytitle>glTexParameter</refentrytitle></citerefentry>
360 </para>
361 </refsect1>
362 <refsect1 id="Copyright"><title>Copyright</title>
363 <para>
364 Copyright <trademark class="copyright"></trademark> 1991-2006
365 Silicon Graphics, Inc. This document is licensed under the SGI
366 Free Software B License. For details, see
367 <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>.
368 </para>
369 </refsect1>
370 </refentry>