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>).
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">
37 <mml:mi mathvariant=
"italic">xoffset
</mml:mi>
39 <mml:mi mathvariant=
"italic">width
</mml:mi>
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">
48 <mml:mi mathvariant=
"italic">yoffset
</mml:mi>
50 <mml:mi mathvariant=
"italic">height
</mml:mi>
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>.
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
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">
63 <mml:mfenced open=
"[" close=
"]">
68 and then converted to the texture's internal format for storage in the texel
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.
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.
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>.
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.
91 <code class=
"constant">GL_INVALID_VALUE
</code> is generated if
<em class=
"parameter"><code>level
</code></em> is less than
0.
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">
97 <mml:mi mathvariant=
"italic">level
</mml:mi>
100 <mml:msub><mml:mi mathvariant=
"italic">log
</mml:mi>
104 <mml:mfenced open=
"(" close=
")">
105 <mml:mi mathvariant=
"italic">max
</mml:mi>
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>.
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">
119 <mml:mi mathvariant=
"italic">xoffset
</mml:mi>
120 <mml:mo><</mml:mo>
123 <mml:mi mathvariant=
"italic">b
</mml:mi>
127 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
130 <mml:mfenced open=
"(" close=
")">
132 <mml:mi mathvariant=
"italic">xoffset
</mml:mi>
134 <mml:mi mathvariant=
"italic">width
</mml:mi>
137 <mml:mo>></mml:mo>
138 <mml:mfenced open=
"(" close=
")">
140 <mml:mi mathvariant=
"italic">w
</mml:mi>
142 <mml:mi mathvariant=
"italic">b
</mml:mi>
147 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
150 <mml:mi mathvariant=
"italic">yoffset
</mml:mi>
151 <mml:mo><</mml:mo>
154 <mml:mi mathvariant=
"italic">b
</mml:mi>
158 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
161 <mml:mfenced open=
"(" close=
")">
163 <mml:mi mathvariant=
"italic">yoffset
</mml:mi>
165 <mml:mi mathvariant=
"italic">height
</mml:mi>
168 <mml:mo>></mml:mo>
169 <mml:mfenced open=
"(" close=
")">
171 <mml:mi mathvariant=
"italic">h
</mml:mi>
173 <mml:mi mathvariant=
"italic">b
</mml:mi>
178 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
181 <mml:mi mathvariant=
"italic">zoffset
</mml:mi>
182 <mml:mo><</mml:mo>
185 <mml:mi mathvariant=
"italic">b
</mml:mi>
190 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
193 <mml:mfenced open=
"(" close=
")">
195 <mml:mi mathvariant=
"italic">zoffset
</mml:mi>
200 <mml:mo>></mml:mo>
201 <mml:mfenced open=
"(" close=
")">
203 <mml:mi mathvariant=
"italic">d
</mml:mi>
205 <mml:mi mathvariant=
"italic">b
</mml:mi>
211 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">w
</mml:mi></mml:math>
212 is the
<code class=
"constant">GL_TEXTURE_WIDTH
</code>,
213 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">h
</mml:mi></mml:math>
214 is the
<code class=
"constant">GL_TEXTURE_HEIGHT
</code>,
215 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">d
</mml:mi></mml:math>
216 is the
<code class=
"constant">GL_TEXTURE_DEPTH
</code>,
218 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">b
</mml:mi></mml:math>
219 is the
<code class=
"constant">GL_TEXTURE_BORDER
</code>
220 of the texture image being modified.
222 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">w
</mml:mi></mml:math>,
223 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">h
</mml:mi></mml:math>,
225 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll"><mml:mi mathvariant=
"italic">d
</mml:mi></mml:math>
226 include twice the border width.
227 </p></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"associatedgets"></a><h2>Associated Gets
</h2><p>
228 <a href=
"glGetTexImage.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glGetTexImage
</span></span></a>
229 </p></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"seealso"></a><h2>See Also
</h2><p>
230 <a href=
"glCopyTexImage1D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glCopyTexImage1D
</span></span></a>,
231 <a href=
"glCopyTexImage2D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glCopyTexImage2D
</span></span></a>,
232 <a href=
"glCopyTexSubImage1D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glCopyTexSubImage1D
</span></span></a>,
233 <a href=
"glCopyTexSubImage2D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glCopyTexSubImage2D
</span></span></a>,
234 <a href=
"glPixelStore.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glPixelStore
</span></span></a>,
235 <a href=
"glReadBuffer.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glReadBuffer
</span></span></a>,
236 <a href=
"glTexImage1D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexImage1D
</span></span></a>,
237 <a href=
"glTexImage2D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexImage2D
</span></span></a>,
238 <a href=
"glTexImage3D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexImage3D
</span></span></a>,
239 <a href=
"glTexParameter.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexParameter
</span></span></a>,
240 <a href=
"glTexSubImage1D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexSubImage1D
</span></span></a>,
241 <a href=
"glTexSubImage2D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexSubImage2D
</span></span></a>,
242 <a href=
"glTexSubImage3D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexSubImage3D
</span></span></a>
243 </p></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"Copyright"></a><h2>Copyright
</h2><p>
244 Copyright
<span class=
"trademark"></span>©
1991-
2006
245 Silicon Graphics, Inc. This document is licensed under the SGI
246 Free Software B License. For details, see
247 <a href=
"http://oss.sgi.com/projects/FreeB/" target=
"_top">http://oss.sgi.com/projects/FreeB/
</a>.
248 </p></div></div></body></html>