rename upstream-man-pages to upstream-doc
[clinton/guile-figl.git] / upstream-doc / man3 / glCopyTexSubImage3D.xml
CommitLineData
7faf1d71
AW
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="glCopyTexSubImage3D">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>1991-2006</year>
9 <holder>Silicon Graphics, Inc.</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>glCopyTexSubImage3D</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>glCopyTexSubImage3D</refname>
17 <refpurpose>copy a three-dimensional texture subimage</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>C Specification</title>
20 <funcsynopsis>
21 <funcprototype>
22 <funcdef>void <function>glCopyTexSubImage3D</function></funcdef>
23 <paramdef>GLenum <parameter>target</parameter></paramdef>
24 <paramdef>GLint <parameter>level</parameter></paramdef>
25 <paramdef>GLint <parameter>xoffset</parameter></paramdef>
26 <paramdef>GLint <parameter>yoffset</parameter></paramdef>
27 <paramdef>GLint <parameter>zoffset</parameter></paramdef>
28 <paramdef>GLint <parameter>x</parameter></paramdef>
29 <paramdef>GLint <parameter>y</parameter></paramdef>
30 <paramdef>GLsizei <parameter>width</parameter></paramdef>
31 <paramdef>GLsizei <parameter>height</parameter></paramdef>
32 </funcprototype>
33 </funcsynopsis>
34 </refsynopsisdiv>
35 <!-- eqn: ignoring delim $$ -->
36 <para>
37 </para>
38 <refsect1 id="parameters"><title>Parameters</title>
39 <variablelist>
40 <varlistentry>
41 <term><parameter>target</parameter></term>
42 <listitem>
43 <para>
44 Specifies the target texture.
45 Must be <constant>GL_TEXTURE_3D</constant> or <constant>GL_TEXTURE_2D_ARRAY</constant>.
46 </para>
47 </listitem>
48 </varlistentry>
49 <varlistentry>
50 <term><parameter>level</parameter></term>
51 <listitem>
52 <para>
53 Specifies the level-of-detail number.
54 Level 0 is the base image level.
55 Level <emphasis>n</emphasis> is the <emphasis>n</emphasis>th mipmap reduction image.
56 </para>
57 </listitem>
58 </varlistentry>
59 <varlistentry>
60 <term><parameter>xoffset</parameter></term>
61 <listitem>
62 <para>
63 Specifies a texel offset in the x direction within the texture array.
64 </para>
65 </listitem>
66 </varlistentry>
67 <varlistentry>
68 <term><parameter>yoffset</parameter></term>
69 <listitem>
70 <para>
71 Specifies a texel offset in the y direction within the texture array.
72 </para>
73 </listitem>
74 </varlistentry>
75 <varlistentry>
76 <term><parameter>zoffset</parameter></term>
77 <listitem>
78 <para>
79 Specifies a texel offset in the z direction within the texture array.
80 </para>
81 </listitem>
82 </varlistentry>
83 <varlistentry>
84 <term><parameter>x</parameter></term>
85 <term><parameter>y</parameter></term>
86 <listitem>
87 <para>
88 Specify the window coordinates of the lower left corner
89 of the rectangular region of pixels to be copied.
90 </para>
91 </listitem>
92 </varlistentry>
93 <varlistentry>
94 <term><parameter>width</parameter></term>
95 <listitem>
96 <para>
97 Specifies the width of the texture subimage.
98 </para>
99 </listitem>
100 </varlistentry>
101 <varlistentry>
102 <term><parameter>height</parameter></term>
103 <listitem>
104 <para>
105 Specifies the height of the texture subimage.
106 </para>
107 </listitem>
108 </varlistentry>
109 </variablelist>
110 </refsect1>
111 <refsect1 id="description"><title>Description</title>
112 <para>
113 <function>glCopyTexSubImage3D</function> replaces a rectangular portion of a three-dimensional
114 or two-dimensional array texture image with pixels from the current <constant>GL_READ_BUFFER</constant> (rather
115 than from main memory, as is the case for <citerefentry><refentrytitle>glTexSubImage3D</refentrytitle></citerefentry>).
116 </para>
117 <para>
118 The screen-aligned pixel rectangle with lower left corner at
119 (<parameter>x</parameter>, <parameter>y</parameter>) and with
120 width <parameter>width</parameter> and height <parameter>height</parameter> replaces the portion of the
121 texture array with x indices <parameter>xoffset</parameter> through
122 <inlineequation><mml:math>
123 <!-- eqn: xoffset + width - 1: -->
124 <mml:mrow>
125 <mml:mi mathvariant="italic">xoffset</mml:mi>
126 <mml:mo>+</mml:mo>
127 <mml:mi mathvariant="italic">width</mml:mi>
128 <mml:mo>-</mml:mo>
129 <mml:mn>1</mml:mn>
130 </mml:mrow>
131 </mml:math></inlineequation>,
132 inclusive, and y indices <parameter>yoffset</parameter> through
133 <inlineequation><mml:math>
134 <!-- eqn: yoffset + height - 1: -->
135 <mml:mrow>
136 <mml:mi mathvariant="italic">yoffset</mml:mi>
137 <mml:mo>+</mml:mo>
138 <mml:mi mathvariant="italic">height</mml:mi>
139 <mml:mo>-</mml:mo>
140 <mml:mn>1</mml:mn>
141 </mml:mrow>
142 </mml:math></inlineequation>,
143 inclusive, at z index <parameter>zoffset</parameter> and at the mipmap level specified by <parameter>level</parameter>.
144 </para>
145 <para>
146 The pixels in the rectangle are processed exactly as if
147 <citerefentry><refentrytitle>glReadPixels</refentrytitle></citerefentry> had been called, but the process stops just before
148 final conversion.
149 At this point, all pixel component values are clamped to the range
150 <inlineequation><mml:math>
151 <!-- eqn: [0,1]: -->
152 <mml:mfenced open="[" close="]">
153 <mml:mn>0</mml:mn>
154 <mml:mn>1</mml:mn>
155 </mml:mfenced>
156 </mml:math></inlineequation>
157 and then converted to the texture's internal format for storage in the texel
158 array.
159 </para>
160 <para>
161 The destination rectangle in the texture array may not include any texels
162 outside the texture array as it was originally specified.
163 It is not an error to specify a subtexture with zero width or height, but
164 such a specification has no effect.
165 </para>
166 <para>
167 If any of the pixels within the specified rectangle of the current
168 <constant>GL_READ_BUFFER</constant> are outside the read window associated with the current
169 rendering context, then the values obtained for those pixels are undefined.
170 </para>
171 <para>
172 No change is made to the <emphasis>internalformat</emphasis>, <emphasis>width</emphasis>,
173 <emphasis>height</emphasis>, <emphasis>depth</emphasis>, or <emphasis>border</emphasis> parameters of the specified texture
174 array or to texel values outside the specified subregion.
175 </para>
176 </refsect1>
177 <refsect1 id="notes"><title>Notes</title>
178 <para>
179 <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry> modes affect texture images.
180 </para>
181 </refsect1>
182 <refsect1 id="errors"><title>Errors</title>
183 <para>
184 <constant>GL_INVALID_ENUM</constant> is generated if /<parameter>target</parameter> is not <constant>GL_TEXTURE_3D</constant>.
185 </para>
186 <para>
187 <constant>GL_INVALID_OPERATION</constant> is generated if the texture array has not
188 been defined by a previous <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry> operation.
189 </para>
190 <para>
191 <constant>GL_INVALID_VALUE</constant> is generated if <parameter>level</parameter> is less than 0.
192 </para>
193 <para>
194 <constant>GL_INVALID_VALUE</constant> may be generated if
195 <inlineequation><mml:math>
196 <!-- eqn: level > log sub 2(max): -->
197 <mml:mrow>
198 <mml:mi mathvariant="italic">level</mml:mi>
199 <mml:mo>&gt;</mml:mo>
200 <mml:mrow>
201 <mml:msub><mml:mi mathvariant="italic">log</mml:mi>
202 <mml:mn>2</mml:mn>
203 </mml:msub>
204 <mml:mo>&af;</mml:mo>
205 <mml:mfenced open="(" close=")">
206 <mml:mi mathvariant="italic">max</mml:mi>
207 </mml:mfenced>
208 </mml:mrow>
209 </mml:mrow>
210 </mml:math></inlineequation>,
211 where
212 is the returned value of <constant>GL_MAX_3D_TEXTURE_SIZE</constant> if <parameter>target</parameter>
213 is <constant>GL_TEXTURE_3D</constant> or the returned value of <constant>GL_MAX_ARRAY_TEXTURE_LAYERS</constant>
214 if <parameter>target</parameter> is <constant>GL_TEXTURE_2D_ARRAY</constant>.
215 </para>
216 <para>
217 <constant>GL_INVALID_VALUE</constant> is generated if
218 <inlineequation><mml:math>
219 <!-- eqn: xoffset < -b: -->
220 <mml:mrow>
221 <mml:mi mathvariant="italic">xoffset</mml:mi>
222 <mml:mo>&lt;</mml:mo>
223 <mml:mrow>
224 <mml:mo>-</mml:mo>
225 <mml:mi mathvariant="italic">b</mml:mi>
226 </mml:mrow>
227 </mml:mrow>
228 </mml:math></inlineequation>,
229 <inlineequation><mml:math>
230 <!-- eqn: (xoffset + width) > (w - b): -->
231 <mml:mrow>
232 <mml:mfenced open="(" close=")">
233 <mml:mrow>
234 <mml:mi mathvariant="italic">xoffset</mml:mi>
235 <mml:mo>+</mml:mo>
236 <mml:mi mathvariant="italic">width</mml:mi>
237 </mml:mrow>
238 </mml:mfenced>
239 <mml:mo>&gt;</mml:mo>
240 <mml:mfenced open="(" close=")">
241 <mml:mrow>
242 <mml:mi mathvariant="italic">w</mml:mi>
243 <mml:mo>-</mml:mo>
244 <mml:mi mathvariant="italic">b</mml:mi>
245 </mml:mrow>
246 </mml:mfenced>
247 </mml:mrow>
248 </mml:math></inlineequation>,
249 <inlineequation><mml:math>
250 <!-- eqn: yoffset < -b: -->
251 <mml:mrow>
252 <mml:mi mathvariant="italic">yoffset</mml:mi>
253 <mml:mo>&lt;</mml:mo>
254 <mml:mrow>
255 <mml:mo>-</mml:mo>
256 <mml:mi mathvariant="italic">b</mml:mi>
257 </mml:mrow>
258 </mml:mrow>
259 </mml:math></inlineequation>,
260 <inlineequation><mml:math>
261 <!-- eqn: (yoffset + height) > (h - b): -->
262 <mml:mrow>
263 <mml:mfenced open="(" close=")">
264 <mml:mrow>
265 <mml:mi mathvariant="italic">yoffset</mml:mi>
266 <mml:mo>+</mml:mo>
267 <mml:mi mathvariant="italic">height</mml:mi>
268 </mml:mrow>
269 </mml:mfenced>
270 <mml:mo>&gt;</mml:mo>
271 <mml:mfenced open="(" close=")">
272 <mml:mrow>
273 <mml:mi mathvariant="italic">h</mml:mi>
274 <mml:mo>-</mml:mo>
275 <mml:mi mathvariant="italic">b</mml:mi>
276 </mml:mrow>
277 </mml:mfenced>
278 </mml:mrow>
279 </mml:math></inlineequation>,
280 <inlineequation><mml:math>
281 <!-- eqn: zoffset < -b: -->
282 <mml:mrow>
283 <mml:mi mathvariant="italic">zoffset</mml:mi>
284 <mml:mo>&lt;</mml:mo>
285 <mml:mrow>
286 <mml:mo>-</mml:mo>
287 <mml:mi mathvariant="italic">b</mml:mi>
288 </mml:mrow>
289 </mml:mrow>
290 </mml:math></inlineequation>,
291 or
292 <inlineequation><mml:math>
293 <!-- eqn: (zoffset + 1) > (d - b): -->
294 <mml:mrow>
295 <mml:mfenced open="(" close=")">
296 <mml:mrow>
297 <mml:mi mathvariant="italic">zoffset</mml:mi>
298 <mml:mo>+</mml:mo>
299 <mml:mn>1</mml:mn>
300 </mml:mrow>
301 </mml:mfenced>
302 <mml:mo>&gt;</mml:mo>
303 <mml:mfenced open="(" close=")">
304 <mml:mrow>
305 <mml:mi mathvariant="italic">d</mml:mi>
306 <mml:mo>-</mml:mo>
307 <mml:mi mathvariant="italic">b</mml:mi>
308 </mml:mrow>
309 </mml:mfenced>
310 </mml:mrow>
311 </mml:math></inlineequation>,
312 where
313 <inlineequation><mml:math><mml:mi mathvariant="italic">w</mml:mi></mml:math></inlineequation>
314 is the <constant>GL_TEXTURE_WIDTH</constant>,
315 <inlineequation><mml:math><mml:mi mathvariant="italic">h</mml:mi></mml:math></inlineequation>
316 is the <constant>GL_TEXTURE_HEIGHT</constant>,
317 <inlineequation><mml:math><mml:mi mathvariant="italic">d</mml:mi></mml:math></inlineequation>
318 is the <constant>GL_TEXTURE_DEPTH</constant>,
319 and
320 <inlineequation><mml:math><mml:mi mathvariant="italic">b</mml:mi></mml:math></inlineequation>
321 is the <constant>GL_TEXTURE_BORDER</constant>
322 of the texture image being modified.
323 Note that
324 <inlineequation><mml:math><mml:mi mathvariant="italic">w</mml:mi></mml:math></inlineequation>,
325 <inlineequation><mml:math><mml:mi mathvariant="italic">h</mml:mi></mml:math></inlineequation>,
326 and
327 <inlineequation><mml:math><mml:mi mathvariant="italic">d</mml:mi></mml:math></inlineequation>
328 include twice the border width.
329 </para>
330 </refsect1>
331 <refsect1 id="associatedgets"><title>Associated Gets</title>
332 <para>
333 <citerefentry><refentrytitle>glGetTexImage</refentrytitle></citerefentry>
334 </para>
335 </refsect1>
336 <refsect1 id="seealso"><title>See Also</title>
337 <para>
338 <citerefentry><refentrytitle>glCopyTexImage1D</refentrytitle></citerefentry>,
339 <citerefentry><refentrytitle>glCopyTexImage2D</refentrytitle></citerefentry>,
340 <citerefentry><refentrytitle>glCopyTexSubImage1D</refentrytitle></citerefentry>,
341 <citerefentry><refentrytitle>glCopyTexSubImage2D</refentrytitle></citerefentry>,
342 <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry>,
343 <citerefentry><refentrytitle>glReadBuffer</refentrytitle></citerefentry>,
344 <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>,
345 <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>,
346 <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>,
347 <citerefentry><refentrytitle>glTexParameter</refentrytitle></citerefentry>,
348 <citerefentry><refentrytitle>glTexSubImage1D</refentrytitle></citerefentry>,
349 <citerefentry><refentrytitle>glTexSubImage2D</refentrytitle></citerefentry>,
350 <citerefentry><refentrytitle>glTexSubImage3D</refentrytitle></citerefentry>
351 </para>
352 </refsect1>
353 <refsect1 id="Copyright"><title>Copyright</title>
354 <para>
355 Copyright <trademark class="copyright"></trademark> 1991-2006
356 Silicon Graphics, Inc. This document is licensed under the SGI
357 Free Software B License. For details, see
358 <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>.
359 </para>
360 </refsect1>
361</refentry>