1GLCOPYTEXSUBIMAGE3D(3G) OpenGL Manual GLCOPYTEXSUBIMAGE3D(3G)
2
3
4
6 glCopyTexSubImage3D - copy a three-dimensional texture subimage
7
9 void glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset,
10 GLint yoffset, GLint zoffset, GLint x,
11 GLint y, GLsizei width, GLsizei height);
12
14 target
15 Specifies the target texture. Must be GL_TEXTURE_3D or
16 GL_TEXTURE_2D_ARRAY.
17
18 level
19 Specifies the level-of-detail number. Level 0 is the base image
20 level. Level n is the nth mipmap reduction image.
21
22 xoffset
23 Specifies a texel offset in the x direction within the texture
24 array.
25
26 yoffset
27 Specifies a texel offset in the y direction within the texture
28 array.
29
30 zoffset
31 Specifies a texel offset in the z direction within the texture
32 array.
33
34 x, y
35 Specify the window coordinates of the lower left corner of the
36 rectangular region of pixels to be copied.
37
38 width
39 Specifies the width of the texture subimage.
40
41 height
42 Specifies the height of the texture subimage.
43
45 glCopyTexSubImage3D replaces a rectangular portion of a
46 three-dimensional or two-dimensional array texture image with pixels
47 from the current GL_READ_BUFFER (rather than from main memory, as is
48 the case for glTexSubImage3D()).
49
50 The screen-aligned pixel rectangle with lower left corner at (x, y) and
51 with width width and height height replaces the portion of the texture
52 array with x indices xoffset through xoffset + width - 1, inclusive,
53 and y indices yoffset through yoffset + height - 1, inclusive, at z
54 index zoffset and at the mipmap level specified by level.
55
56 The pixels in the rectangle are processed exactly as if glReadPixels()
57 had been called, but the process stops just before final conversion. At
58 this point, all pixel component values are clamped to the range 0 1 and
59 then converted to the texture's internal format for storage in the
60 texel array.
61
62 The destination rectangle in the texture array may not include any
63 texels outside the texture array as it was originally specified. It is
64 not an error to specify a subtexture with zero width or height, but
65 such a specification has no effect.
66
67 If any of the pixels within the specified rectangle of the current
68 GL_READ_BUFFER are outside the read window associated with the current
69 rendering context, then the values obtained for those pixels are
70 undefined.
71
72 No change is made to the internalformat, width, height, depth, or
73 border parameters of the specified texture array or to texel values
74 outside the specified subregion.
75
77 glPixelStore() modes affect texture images.
78
80 GL_INVALID_ENUM is generated if /target is not GL_TEXTURE_3D.
81
82 GL_INVALID_OPERATION is generated if the texture array has not been
83 defined by a previous glTexImage3D() operation.
84
85 GL_INVALID_VALUE is generated if level is less than 0.
86
87 GL_INVALID_VALUE may be generated if level > log 2 max, where max is
88 the returned value of GL_MAX_3D_TEXTURE_SIZE if target is GL_TEXTURE_3D
89 or the returned value of GL_MAX_ARRAY_TEXTURE_LAYERS if target is
90 GL_TEXTURE_2D_ARRAY.
91
92 GL_INVALID_VALUE is generated if xoffset < - b, xoffset + width > w -
93 b, yoffset < - b, yoffset + height > h - b, zoffset < - b, or zoffset +
94 1 > d - b, where w is the GL_TEXTURE_WIDTH, h is the GL_TEXTURE_HEIGHT,
95 d is the GL_TEXTURE_DEPTH, and b is the GL_TEXTURE_BORDER of the
96 texture image being modified. Note that w, h, and d include twice the
97 border width.
98
100 glGetTexImage()
101
103 glCopyTexImage1D(), glCopyTexImage2D(), glCopyTexSubImage1D(),
104 glCopyTexSubImage2D(), glPixelStore(), glReadBuffer(), glTexImage1D(),
105 glTexImage2D(), glTexImage3D(), glTexParameter(), glTexSubImage1D(),
106 glTexSubImage2D(), glTexSubImage3D()
107
109 Copyright © 1991-2006 Silicon Graphics, Inc. This document is licensed
110 under the SGI Free Software B License. For details, see
111 http://oss.sgi.com/projects/FreeB/.
112
114 opengl.org
115
116
117
118opengl.org 06/10/2014 GLCOPYTEXSUBIMAGE3D(3G)