rename upstream-man-pages to upstream-doc
[clinton/guile-figl.git] / upstream-doc / man4 / xhtml / glCopyTexSubImage3D.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>glCopyTexSubImage3D - OpenGL 4 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="glCopyTexSubImage3D"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glCopyTexSubImage3D — copy a three-dimensional texture subimage</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">glCopyTexSubImage3D</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">xoffset</var>, </td></tr><tr><td> </td><td>GLint  </td><td><var class="pdparam">yoffset</var>, </td></tr><tr><td> </td><td>GLint  </td><td><var class="pdparam">zoffset</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>GLsizei  </td><td><var class="pdparam">height</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_3D</code> or <code class="constant">GL_TEXTURE_2D_ARRAY</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>xoffset</code></em></span></dt><dd><p>
13 Specifies a texel offset in the x direction within the texture array.
14 </p></dd><dt><span class="term"><em class="parameter"><code>yoffset</code></em></span></dt><dd><p>
15 Specifies a texel offset in the y direction within the texture array.
16 </p></dd><dt><span class="term"><em class="parameter"><code>zoffset</code></em></span></dt><dd><p>
17 Specifies a texel offset in the z direction within the texture array.
18 </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>
19 Specify the window coordinates of the lower left corner
20 of the rectangular region of pixels to be copied.
21 </p></dd><dt><span class="term"><em class="parameter"><code>width</code></em></span></dt><dd><p>
22 Specifies the width of the texture subimage.
23 </p></dd><dt><span class="term"><em class="parameter"><code>height</code></em></span></dt><dd><p>
24 Specifies the height of the texture subimage.
25 </p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="description"></a><h2>Description</h2><p>
26 <code class="function">glCopyTexSubImage3D</code> replaces a rectangular portion of a three-dimensional
27 or two-dimensional array texture image with pixels from the current <code class="constant">GL_READ_BUFFER</code> (rather
28 than from main memory, as is the case for <a href="glTexSubImage3D.xml"><span class="citerefentry"><span class="refentrytitle">glTexSubImage3D</span></span></a>).
29 </p><p>
30 The screen-aligned pixel rectangle with lower left corner at
31 (<em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em>) and with
32 width <em class="parameter"><code>width</code></em> and height <em class="parameter"><code>height</code></em> replaces the portion of the
33 texture array with x indices <em class="parameter"><code>xoffset</code></em> through
34 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
35
36 <mml:mrow>
37 <mml:mi mathvariant="italic">xoffset</mml:mi>
38 <mml:mo>+</mml:mo>
39 <mml:mi mathvariant="italic">width</mml:mi>
40 <mml:mo>-</mml:mo>
41 <mml:mn>1</mml:mn>
42 </mml:mrow>
43 </mml:math>,
44 inclusive, and y indices <em class="parameter"><code>yoffset</code></em> through
45 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
46
47 <mml:mrow>
48 <mml:mi mathvariant="italic">yoffset</mml:mi>
49 <mml:mo>+</mml:mo>
50 <mml:mi mathvariant="italic">height</mml:mi>
51 <mml:mo>-</mml:mo>
52 <mml:mn>1</mml:mn>
53 </mml:mrow>
54 </mml:math>,
55 inclusive, at z index <em class="parameter"><code>zoffset</code></em> and at the mipmap level specified by <em class="parameter"><code>level</code></em>.
56 </p><p>
57 The pixels in the rectangle are processed exactly as if
58 <a href="glReadPixels.xml"><span class="citerefentry"><span class="refentrytitle">glReadPixels</span></span></a> had been called, but the process stops just before
59 final conversion.
60 At this point, all pixel component values are clamped to the range
61 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
62
63 <mml:mfenced open="[" close="]">
64 <mml:mn>0</mml:mn>
65 <mml:mn>1</mml:mn>
66 </mml:mfenced>
67 </mml:math>
68 and then converted to the texture's internal format for storage in the texel
69 array.
70 </p><p>
71 The destination rectangle in the texture array may not include any texels
72 outside the texture array as it was originally specified.
73 It is not an error to specify a subtexture with zero width or height, but
74 such a specification has no effect.
75 </p><p>
76 If any of the pixels within the specified rectangle of the current
77 <code class="constant">GL_READ_BUFFER</code> are outside the read window associated with the current
78 rendering context, then the values obtained for those pixels are undefined.
79 </p><p>
80 No change is made to the <span class="emphasis"><em>internalformat</em></span>, <span class="emphasis"><em>width</em></span>,
81 <span class="emphasis"><em>height</em></span>, <span class="emphasis"><em>depth</em></span>, or <span class="emphasis"><em>border</em></span> parameters of the specified texture
82 array or to texel values outside the specified subregion.
83 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="notes"></a><h2>Notes</h2><p>
84 <a href="glPixelStore.xml"><span class="citerefentry"><span class="refentrytitle">glPixelStore</span></span></a> modes affect texture images.
85 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="errors"></a><h2>Errors</h2><p>
86 <code class="constant">GL_INVALID_ENUM</code> is generated if /<em class="parameter"><code>target</code></em> is not <code class="constant">GL_TEXTURE_3D</code>.
87 </p><p>
88 <code class="constant">GL_INVALID_OPERATION</code> is generated if the texture array has not
89 been defined by a previous <a href="glTexImage3D.xml"><span class="citerefentry"><span class="refentrytitle">glTexImage3D</span></span></a> operation.
90 </p><p>
91 <code class="constant">GL_INVALID_VALUE</code> is generated if <em class="parameter"><code>level</code></em> is less than 0.
92 </p><p>
93 <code class="constant">GL_INVALID_VALUE</code> may be generated if
94 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
95
96 <mml:mrow>
97 <mml:mi mathvariant="italic">level</mml:mi>
98 <mml:mo>&gt;</mml:mo>
99 <mml:mrow>
100 <mml:msub><mml:mi mathvariant="italic">log</mml:mi>
101 <mml:mn>2</mml:mn>
102 </mml:msub>
103 <mml:mo></mml:mo>
104 <mml:mfenced open="(" close=")">
105 <mml:mi mathvariant="italic">max</mml:mi>
106 </mml:mfenced>
107 </mml:mrow>
108 </mml:mrow>
109 </mml:math>,
110 where
111 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">max</mml:mi></mml:math>
112 is the returned value of <code class="constant">GL_MAX_3D_TEXTURE_SIZE</code> if <em class="parameter"><code>target</code></em>
113 is <code class="constant">GL_TEXTURE_3D</code> or the returned value of <code class="constant">GL_MAX_ARRAY_TEXTURE_LAYERS</code>
114 if <em class="parameter"><code>target</code></em> is <code class="constant">GL_TEXTURE_2D_ARRAY</code>.
115 </p><p>
116 <code class="constant">GL_INVALID_VALUE</code> is generated if
117 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
118
119 <mml:mrow>
120 <mml:mi mathvariant="italic">xoffset</mml:mi>
121 <mml:mo>&lt;</mml:mo>
122 <mml:mrow>
123 <mml:mo>-</mml:mo>
124 <mml:mi mathvariant="italic">b</mml:mi>
125 </mml:mrow>
126 </mml:mrow>
127 </mml:math>,
128 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
129
130 <mml:mrow>
131 <mml:mfenced open="(" close=")">
132 <mml:mrow>
133 <mml:mi mathvariant="italic">xoffset</mml:mi>
134 <mml:mo>+</mml:mo>
135 <mml:mi mathvariant="italic">width</mml:mi>
136 </mml:mrow>
137 </mml:mfenced>
138 <mml:mo>&gt;</mml:mo>
139 <mml:mfenced open="(" close=")">
140 <mml:mrow>
141 <mml:mi mathvariant="italic">w</mml:mi>
142 <mml:mo>-</mml:mo>
143 <mml:mi mathvariant="italic">b</mml:mi>
144 </mml:mrow>
145 </mml:mfenced>
146 </mml:mrow>
147 </mml:math>,
148 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
149
150 <mml:mrow>
151 <mml:mi mathvariant="italic">yoffset</mml:mi>
152 <mml:mo>&lt;</mml:mo>
153 <mml:mrow>
154 <mml:mo>-</mml:mo>
155 <mml:mi mathvariant="italic">b</mml:mi>
156 </mml:mrow>
157 </mml:mrow>
158 </mml:math>,
159 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
160
161 <mml:mrow>
162 <mml:mfenced open="(" close=")">
163 <mml:mrow>
164 <mml:mi mathvariant="italic">yoffset</mml:mi>
165 <mml:mo>+</mml:mo>
166 <mml:mi mathvariant="italic">height</mml:mi>
167 </mml:mrow>
168 </mml:mfenced>
169 <mml:mo>&gt;</mml:mo>
170 <mml:mfenced open="(" close=")">
171 <mml:mrow>
172 <mml:mi mathvariant="italic">h</mml:mi>
173 <mml:mo>-</mml:mo>
174 <mml:mi mathvariant="italic">b</mml:mi>
175 </mml:mrow>
176 </mml:mfenced>
177 </mml:mrow>
178 </mml:math>,
179 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
180
181 <mml:mrow>
182 <mml:mi mathvariant="italic">zoffset</mml:mi>
183 <mml:mo>&lt;</mml:mo>
184 <mml:mrow>
185 <mml:mo>-</mml:mo>
186 <mml:mi mathvariant="italic">b</mml:mi>
187 </mml:mrow>
188 </mml:mrow>
189 </mml:math>,
190 or
191 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
192
193 <mml:mrow>
194 <mml:mfenced open="(" close=")">
195 <mml:mrow>
196 <mml:mi mathvariant="italic">zoffset</mml:mi>
197 <mml:mo>+</mml:mo>
198 <mml:mn>1</mml:mn>
199 </mml:mrow>
200 </mml:mfenced>
201 <mml:mo>&gt;</mml:mo>
202 <mml:mfenced open="(" close=")">
203 <mml:mrow>
204 <mml:mi mathvariant="italic">d</mml:mi>
205 <mml:mo>-</mml:mo>
206 <mml:mi mathvariant="italic">b</mml:mi>
207 </mml:mrow>
208 </mml:mfenced>
209 </mml:mrow>
210 </mml:math>,
211 where
212 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">w</mml:mi></mml:math>
213 is the <code class="constant">GL_TEXTURE_WIDTH</code>,
214 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">h</mml:mi></mml:math>
215 is the <code class="constant">GL_TEXTURE_HEIGHT</code>,
216 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">d</mml:mi></mml:math>
217 is the <code class="constant">GL_TEXTURE_DEPTH</code>,
218 and
219 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">b</mml:mi></mml:math>
220 is the <code class="constant">GL_TEXTURE_BORDER</code>
221 of the texture image being modified.
222 Note that
223 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">w</mml:mi></mml:math>,
224 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">h</mml:mi></mml:math>,
225 and
226 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">d</mml:mi></mml:math>
227 include twice the border width.
228 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="associatedgets"></a><h2>Associated Gets</h2><p>
229 <a href="glGetTexImage.xml"><span class="citerefentry"><span class="refentrytitle">glGetTexImage</span></span></a>
230 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p>
231 <a href="glCopyTexImage1D.xml"><span class="citerefentry"><span class="refentrytitle">glCopyTexImage1D</span></span></a>,
232 <a href="glCopyTexImage2D.xml"><span class="citerefentry"><span class="refentrytitle">glCopyTexImage2D</span></span></a>,
233 <a href="glCopyTexSubImage1D.xml"><span class="citerefentry"><span class="refentrytitle">glCopyTexSubImage1D</span></span></a>,
234 <a href="glCopyTexSubImage2D.xml"><span class="citerefentry"><span class="refentrytitle">glCopyTexSubImage2D</span></span></a>,
235 <a href="glPixelStore.xml"><span class="citerefentry"><span class="refentrytitle">glPixelStore</span></span></a>,
236 <a href="glReadBuffer.xml"><span class="citerefentry"><span class="refentrytitle">glReadBuffer</span></span></a>,
237 <a href="glTexImage1D.xml"><span class="citerefentry"><span class="refentrytitle">glTexImage1D</span></span></a>,
238 <a href="glTexImage2D.xml"><span class="citerefentry"><span class="refentrytitle">glTexImage2D</span></span></a>,
239 <a href="glTexImage3D.xml"><span class="citerefentry"><span class="refentrytitle">glTexImage3D</span></span></a>,
240 <a href="glTexParameter.xml"><span class="citerefentry"><span class="refentrytitle">glTexParameter</span></span></a>,
241 <a href="glTexSubImage1D.xml"><span class="citerefentry"><span class="refentrytitle">glTexSubImage1D</span></span></a>,
242 <a href="glTexSubImage2D.xml"><span class="citerefentry"><span class="refentrytitle">glTexSubImage2D</span></span></a>,
243 <a href="glTexSubImage3D.xml"><span class="citerefentry"><span class="refentrytitle">glTexSubImage3D</span></span></a>
244 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="Copyright"></a><h2>Copyright</h2><p>
245 Copyright <span class="trademark"></span>© 1991-2006
246 Silicon Graphics, Inc. This document is licensed under the SGI
247 Free Software B License. For details, see
248 <a href="http://oss.sgi.com/projects/FreeB/" target="_top">http://oss.sgi.com/projects/FreeB/</a>.
249 </p></div></div></body></html>