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