include more low-level bindings
[clinton/guile-figl.git] / upstream-man-pages / man3 / xhtml / glCopyTexImage1D.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>glCopyTexImage1D</title><meta name="generator" content="DocBook XSL Stylesheets V1.69.1" /></head><body><div class="refentry" lang="en" xml:lang="en"><a id="glCopyTexImage1D"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glCopyTexImage1D — copy pixels into a 1D 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">glCopyTexImage1D</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>GLenum  </td><td><var class="pdparam">internalformat</var>, </td></tr><tr><td> </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>GLint  </td><td><var class="pdparam">border</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>target</code></em></span></dt><dd><p>
5 Specifies the target texture.
6 Must be <code class="constant">GL_TEXTURE_1D</code>.
7 </p></dd><dt><span class="term"><em class="parameter"><code>level</code></em></span></dt><dd><p>
8 Specifies the level-of-detail number.
9 Level 0 is the base image level.
10 Level <span class="emphasis"><em>n</em></span> is the <span class="emphasis"><em>n</em></span>th mipmap reduction image.
11 </p></dd><dt><span class="term"><em class="parameter"><code>internalformat</code></em></span></dt><dd><p>
12 Specifies the internal format of the texture.
13 Must be one of the following symbolic constants:
14 <code class="constant">GL_COMPRESSED_RED</code>,
15 <code class="constant">GL_COMPRESSED_RG</code>,
16 <code class="constant">GL_COMPRESSED_RGB</code>,
17 <code class="constant">GL_COMPRESSED_RGBA</code>.
18 <code class="constant">GL_COMPRESSED_SRGB</code>,
19 <code class="constant">GL_COMPRESSED_SRGB_ALPHA</code>.
20 <code class="constant">GL_DEPTH_COMPONENT</code>,
21 <code class="constant">GL_DEPTH_COMPONENT16</code>,
22 <code class="constant">GL_DEPTH_COMPONENT24</code>,
23 <code class="constant">GL_DEPTH_COMPONENT32</code>,
24 <code class="constant">GL_RED</code>,
25 <code class="constant">GL_RG</code>,
26 <code class="constant">GL_RGB</code>,
27 <code class="constant">GL_R3_G3_B2</code>,
28 <code class="constant">GL_RGB4</code>,
29 <code class="constant">GL_RGB5</code>,
30 <code class="constant">GL_RGB8</code>,
31 <code class="constant">GL_RGB10</code>,
32 <code class="constant">GL_RGB12</code>,
33 <code class="constant">GL_RGB16</code>,
34 <code class="constant">GL_RGBA</code>,
35 <code class="constant">GL_RGBA2</code>,
36 <code class="constant">GL_RGBA4</code>,
37 <code class="constant">GL_RGB5_A1</code>,
38 <code class="constant">GL_RGBA8</code>,
39 <code class="constant">GL_RGB10_A2</code>,
40 <code class="constant">GL_RGBA12</code>,
41 <code class="constant">GL_RGBA16</code>,
42 <code class="constant">GL_SRGB</code>,
43 <code class="constant">GL_SRGB8</code>,
44 <code class="constant">GL_SRGB_ALPHA</code>, or
45 <code class="constant">GL_SRGB8_ALPHA8</code>.
46 </p></dd><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>
47 Specify the window coordinates of the left corner
48 of the row of pixels to be copied.
49 </p></dd><dt><span class="term"><em class="parameter"><code>width</code></em></span></dt><dd><p>
50 Specifies the width of the texture image.
51 Must be 0 or
52 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
53
54 <mml:mrow>
55 <mml:msup><mml:mn>2</mml:mn>
56 <mml:mi mathvariant="italic">n</mml:mi>
57 </mml:msup>
58 <mml:mo>+</mml:mo>
59 <mml:mrow>
60 <mml:mn>2</mml:mn>
61 <mml:mo></mml:mo>
62 <mml:mfenced open="(" close=")">
63 <mml:mi mathvariant="italic">border</mml:mi>
64 </mml:mfenced>
65 </mml:mrow>
66 </mml:mrow>
67 </mml:math>
68 for some integer
69 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">n</mml:mi></mml:math>.
70 The height of the texture image is 1.
71 </p></dd><dt><span class="term"><em class="parameter"><code>border</code></em></span></dt><dd><p>
72 Specifies the width of the border.
73 Must be either 0 or 1.
74 </p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="description"></a><h2>Description</h2><p>
75 <code class="function">glCopyTexImage1D</code> defines a one-dimensional texture image with pixels from the current
76 <code class="constant">GL_READ_BUFFER</code>.
77 </p><p>
78 The screen-aligned pixel row with left corner at
79 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
80
81 <mml:mfenced open="(" close=")">
82 <mml:mi mathvariant="italic">x</mml:mi>
83 <mml:mi mathvariant="italic">y</mml:mi>
84 </mml:mfenced>
85 </mml:math>
86 and with a length of
87 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
88
89 <mml:mrow>
90 <mml:mi mathvariant="italic">width</mml:mi>
91 <mml:mo>+</mml:mo>
92 <mml:mrow>
93 <mml:mn>2</mml:mn>
94 <mml:mo></mml:mo>
95 <mml:mfenced open="(" close=")">
96 <mml:mi mathvariant="italic">border</mml:mi>
97 </mml:mfenced>
98 </mml:mrow>
99 </mml:mrow>
100 </mml:math>
101 defines the texture array
102 at the mipmap level specified by <em class="parameter"><code>level</code></em>.
103 <em class="parameter"><code>internalformat</code></em> specifies the internal format of the texture array.
104 </p><p>
105 The pixels in the row are processed exactly as if
106 <a href="glReadPixels.xml"><span class="citerefentry"><span class="refentrytitle">glReadPixels</span></span></a> had been called, but the process stops just before
107 final conversion.
108 At this point all pixel component values are clamped to the range
109 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
110
111 <mml:mfenced open="[" close="]">
112 <mml:mn>0</mml:mn>
113 <mml:mn>1</mml:mn>
114 </mml:mfenced>
115 </mml:math>
116 and then converted to the texture's internal format for storage in the texel
117 array.
118 </p><p>
119 Pixel ordering is such that lower
120 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">x</mml:mi></mml:math>
121 screen coordinates correspond to
122 lower texture coordinates.
123 </p><p>
124 If any of the pixels within the specified row of the current
125 <code class="constant">GL_READ_BUFFER</code> are outside the window associated with the current
126 rendering context, then the values obtained for those pixels are undefined.
127 </p><p>
128 <code class="function">glCopyTexImage1D</code> defines a one-dimensional texture image with pixels from the current
129 <code class="constant">GL_READ_BUFFER</code>.
130 </p><p>
131 When <em class="parameter"><code>internalformat</code></em> is one of the sRGB types, the GL does not automatically convert the source pixels to the sRGB color space. In this case, the <code class="function">glPixelMap</code> function can be used to accomplish the conversion.
132 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="notes"></a><h2>Notes</h2><p>
133 1, 2, 3, and 4 are not accepted values for <em class="parameter"><code>internalformat</code></em>.
134 </p><p>
135 An image with 0 width indicates a NULL texture.
136 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="errors"></a><h2>Errors</h2><p>
137 <code class="constant">GL_INVALID_ENUM</code> is generated if <em class="parameter"><code>target</code></em> is not one of the allowable values.
138 </p><p>
139 <code class="constant">GL_INVALID_VALUE</code> is generated if <em class="parameter"><code>level</code></em> is less than 0.
140 </p><p>
141 <code class="constant">GL_INVALID_VALUE</code> may be generated if <em class="parameter"><code>level</code></em> is greater
142 than
143 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
144
145 <mml:mrow>
146 <mml:msub><mml:mi mathvariant="italic">log</mml:mi>
147 <mml:mn>2</mml:mn>
148 </mml:msub>
149 <mml:mo></mml:mo>
150 <mml:mi mathvariant="italic">max</mml:mi>
151 </mml:mrow>
152 </mml:math>,
153 where
154 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">max</mml:mi></mml:math>
155 is the returned value of <code class="constant">GL_MAX_TEXTURE_SIZE</code>.
156 </p><p>
157 <code class="constant">GL_INVALID_VALUE</code> is generated if <em class="parameter"><code>internalformat</code></em> is not an allowable value.
158 </p><p>
159 <code class="constant">GL_INVALID_VALUE</code> is generated if <em class="parameter"><code>width</code></em> is less than 0 or greater than
160 <code class="constant">GL_MAX_TEXTURE_SIZE</code>.
161 </p><p>
162 <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
163 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
164
165 <mml:mrow>
166 <mml:msup><mml:mn>2</mml:mn>
167 <mml:mi mathvariant="italic">n</mml:mi>
168 </mml:msup>
169 <mml:mo>+</mml:mo>
170 <mml:mrow>
171 <mml:mn>2</mml:mn>
172 <mml:mo></mml:mo>
173 <mml:mfenced open="(" close=")">
174 <mml:mi mathvariant="italic">border</mml:mi>
175 </mml:mfenced>
176 </mml:mrow>
177 </mml:mrow>
178 </mml:math>
179 for some integer value of <span class="emphasis"><em>n</em></span>.
180 </p><p>
181 <code class="constant">GL_INVALID_VALUE</code> is generated if <em class="parameter"><code>border</code></em> is not 0 or 1.
182 </p><p>
183 <code class="constant">GL_INVALID_OPERATION</code> is generated if <em class="parameter"><code>internalformat</code></em> is
184 <code class="constant">GL_DEPTH_COMPONENT</code>, <code class="constant">GL_DEPTH_COMPONENT16</code>,
185 <code class="constant">GL_DEPTH_COMPONENT24</code>, or <code class="constant">GL_DEPTH_COMPONENT32</code> and there is no depth
186 buffer.
187 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="associatedgets"></a><h2>Associated Gets</h2><p>
188 <a href="glGetTexImage.xml"><span class="citerefentry"><span class="refentrytitle">glGetTexImage</span></span></a>
189 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p>
190 <a href="glCopyTexImage2D.xml"><span class="citerefentry"><span class="refentrytitle">glCopyTexImage2D</span></span></a>,
191 <a href="glCopyTexSubImage1D.xml"><span class="citerefentry"><span class="refentrytitle">glCopyTexSubImage1D</span></span></a>,
192 <a href="glCopyTexSubImage2D.xml"><span class="citerefentry"><span class="refentrytitle">glCopyTexSubImage2D</span></span></a>,
193 <a href="glPixelStore.xml"><span class="citerefentry"><span class="refentrytitle">glPixelStore</span></span></a>,
194 <a href="glTexImage1D.xml"><span class="citerefentry"><span class="refentrytitle">glTexImage1D</span></span></a>,
195 <a href="glTexImage2D.xml"><span class="citerefentry"><span class="refentrytitle">glTexImage2D</span></span></a>,
196 <a href="glTexSubImage1D.xml"><span class="citerefentry"><span class="refentrytitle">glTexSubImage1D</span></span></a>,
197 <a href="glTexSubImage2D.xml"><span class="citerefentry"><span class="refentrytitle">glTexSubImage2D</span></span></a>,
198 <a href="glTexParameter.xml"><span class="citerefentry"><span class="refentrytitle">glTexParameter</span></span></a>
199 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="Copyright"></a><h2>Copyright</h2><p>
200 Copyright <span class="trademark"></span>© 1991-2006
201 Silicon Graphics, Inc. This document is licensed under the SGI
202 Free Software B License. For details, see
203 <a href="http://oss.sgi.com/projects/FreeB/" target="_top">http://oss.sgi.com/projects/FreeB/</a>.
204 </p></div></div></body></html>