update upstream sources
[clinton/guile-figl.git] / upstream-doc / man3 / 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 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="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>, or <span class="emphasis"><em>depth</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> or <code class="constant">GL_TEXTURE_2D_ARRAY</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 is the returned value of <code class="constant">GL_MAX_3D_TEXTURE_SIZE</code> if <em class="parameter"><code>target</code></em>
112 is <code class="constant">GL_TEXTURE_3D</code> or the returned value of <code class="constant">GL_MAX_ARRAY_TEXTURE_LAYERS</code>
113 if <em class="parameter"><code>target</code></em> is <code class="constant">GL_TEXTURE_2D_ARRAY</code>.
114 </p><p>
115 <code class="constant">GL_INVALID_VALUE</code> is generated if
116 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
117
118 <mml:mrow>
119 <mml:mi mathvariant="italic">xoffset</mml:mi>
120 <mml:mo>&lt;</mml:mo>
121 <mml:mn>0</mml:mn>
122 </mml:mrow>
123 </mml:math>,
124 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
125
126 <mml:mrow>
127 <mml:mfenced open="(" close=")">
128 <mml:mrow>
129 <mml:mi mathvariant="italic">xoffset</mml:mi>
130 <mml:mo>+</mml:mo>
131 <mml:mi mathvariant="italic">width</mml:mi>
132 </mml:mrow>
133 </mml:mfenced>
134 <mml:mo>&gt;</mml:mo>
135 <mml:mi mathvariant="italic">w</mml:mi>
136 </mml:mrow>
137 </mml:math>,
138 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
139
140 <mml:mrow>
141 <mml:mi mathvariant="italic">yoffset</mml:mi>
142 <mml:mo>&lt;</mml:mo>
143 <mml:mn>0</mml:mn>
144 </mml:mrow>
145 </mml:math>,
146 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
147
148 <mml:mrow>
149 <mml:mfenced open="(" close=")">
150 <mml:mrow>
151 <mml:mi mathvariant="italic">yoffset</mml:mi>
152 <mml:mo>+</mml:mo>
153 <mml:mi mathvariant="italic">height</mml:mi>
154 </mml:mrow>
155 </mml:mfenced>
156 <mml:mo>&gt;</mml:mo>
157 <mml:mi mathvariant="italic">h</mml:mi>
158 </mml:mrow>
159 </mml:math>,
160 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
161
162 <mml:mrow>
163 <mml:mi mathvariant="italic">zoffset</mml:mi>
164 <mml:mo>&lt;</mml:mo>
165 <mml:mn>0</mml:mn>
166 </mml:mrow>
167 </mml:math>,
168 or
169 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
170
171 <mml:mrow>
172 <mml:mfenced open="(" close=")">
173 <mml:mrow>
174 <mml:mi mathvariant="italic">zoffset</mml:mi>
175 <mml:mo>+</mml:mo>
176 <mml:mn>1</mml:mn>
177 </mml:mrow>
178 </mml:mfenced>
179 <mml:mo>&gt;</mml:mo>
180 <mml:mi mathvariant="italic">d</mml:mi>
181 </mml:mrow>
182 </mml:math>,
183 where
184 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">w</mml:mi></mml:math>
185 is the <code class="constant">GL_TEXTURE_WIDTH</code>,
186 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">h</mml:mi></mml:math>
187 is the <code class="constant">GL_TEXTURE_HEIGHT</code>, and
188 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">d</mml:mi></mml:math>
189 is the <code class="constant">GL_TEXTURE_DEPTH</code>
190 of the texture image being modified.
191 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="associatedgets"></a><h2>Associated Gets</h2><p>
192 <a href="glGetTexImage.xml"><span class="citerefentry"><span class="refentrytitle">glGetTexImage</span></span></a>
193 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p>
194 <a href="glCopyTexImage1D.xml"><span class="citerefentry"><span class="refentrytitle">glCopyTexImage1D</span></span></a>,
195 <a href="glCopyTexImage2D.xml"><span class="citerefentry"><span class="refentrytitle">glCopyTexImage2D</span></span></a>,
196 <a href="glCopyTexSubImage1D.xml"><span class="citerefentry"><span class="refentrytitle">glCopyTexSubImage1D</span></span></a>,
197 <a href="glCopyTexSubImage2D.xml"><span class="citerefentry"><span class="refentrytitle">glCopyTexSubImage2D</span></span></a>,
198 <a href="glPixelStore.xml"><span class="citerefentry"><span class="refentrytitle">glPixelStore</span></span></a>,
199 <a href="glReadBuffer.xml"><span class="citerefentry"><span class="refentrytitle">glReadBuffer</span></span></a>,
200 <a href="glTexImage1D.xml"><span class="citerefentry"><span class="refentrytitle">glTexImage1D</span></span></a>,
201 <a href="glTexImage2D.xml"><span class="citerefentry"><span class="refentrytitle">glTexImage2D</span></span></a>,
202 <a href="glTexImage3D.xml"><span class="citerefentry"><span class="refentrytitle">glTexImage3D</span></span></a>,
203 <a href="glTexParameter.xml"><span class="citerefentry"><span class="refentrytitle">glTexParameter</span></span></a>,
204 <a href="glTexSubImage1D.xml"><span class="citerefentry"><span class="refentrytitle">glTexSubImage1D</span></span></a>,
205 <a href="glTexSubImage2D.xml"><span class="citerefentry"><span class="refentrytitle">glTexSubImage2D</span></span></a>,
206 <a href="glTexSubImage3D.xml"><span class="citerefentry"><span class="refentrytitle">glTexSubImage3D</span></span></a>
207 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="Copyright"></a><h2>Copyright</h2><p>
208 Copyright <span class="trademark"></span>© 1991-2006
209 Silicon Graphics, Inc. This document is licensed under the SGI
210 Free Software B License. For details, see
211 <a href="http://oss.sgi.com/projects/FreeB/" target="_top">http://oss.sgi.com/projects/FreeB/</a>.
212 </p></div></div></body></html>