1GLTEXSUBIMAGE1D(3G)              OpenGL Manual             GLTEXSUBIMAGE1D(3G)
2
3
4

NAME

6       glTexSubImage1D - specify a one-dimensional texture subimage
7

C SPECIFICATION

9       void glTexSubImage1D(GLenum target, GLint level, GLint xoffset,
10                            GLsizei width, GLenum format, GLenum type,
11                            const GLvoid * data);
12

PARAMETERS

14       target
15           Specifies the target texture. Must be GL_TEXTURE_1D.
16
17       level
18           Specifies the level-of-detail number. Level 0 is the base image
19           level. Level n is the nth mipmap reduction image.
20
21       xoffset
22           Specifies a texel offset in the x direction within the texture
23           array.
24
25       width
26           Specifies the width of the texture subimage.
27
28       format
29           Specifies the format of the pixel data. The following symbolic
30           values are accepted: GL_RED, GL_RG, GL_RGB, GL_BGR, GL_RGBA, and
31           GL_BGRA.
32
33       type
34           Specifies the data type of the pixel data. The following symbolic
35           values are accepted: GL_UNSIGNED_BYTE, GL_BYTE, GL_UNSIGNED_SHORT,
36           GL_SHORT, GL_UNSIGNED_INT, GL_INT, GL_FLOAT,
37           GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV,
38           GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_5_6_5_REV,
39           GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV,
40           GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV,
41           GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV,
42           GL_UNSIGNED_INT_10_10_10_2, and GL_UNSIGNED_INT_2_10_10_10_REV.
43
44       data
45           Specifies a pointer to the image data in memory.
46

DESCRIPTION

48       Texturing maps a portion of a specified texture image onto each
49       graphical primitive for which texturing is enabled. To enable or
50       disable one-dimensional texturing, call glEnable() and glDisable() with
51       argument GL_TEXTURE_1D.
52
53       glTexSubImage1D redefines a contiguous subregion of an existing
54       one-dimensional texture image. The texels referenced by data replace
55       the portion of the existing texture array with x indices xoffset and
56       xoffset + width - 1, inclusive. This region may not include any texels
57       outside the range of the texture array as it was originally specified.
58       It is not an error to specify a subtexture with width of 0, but such a
59       specification has no effect.
60
61       If a non-zero named buffer object is bound to the
62       GL_PIXEL_UNPACK_BUFFER target (see glBindBuffer()) while a texture
63       image is specified, data is treated as a byte offset into the buffer
64       object's data store.
65

NOTES

67       glPixelStore() modes affect texture images.
68
69       glTexSubImage1D specifies a one-dimensional subtexture for the current
70       texture unit, specified with glActiveTexture().
71

ERRORS

73       GL_INVALID_ENUM is generated if target is not one of the allowable
74       values.
75
76       GL_INVALID_ENUM is generated if format is not an accepted format
77       constant.
78
79       GL_INVALID_ENUM is generated if type is not a type constant.
80
81       GL_INVALID_VALUE is generated if level is less than 0.
82
83       GL_INVALID_VALUE may be generated if level is greater than log 2max,
84       where max is the returned value of GL_MAX_TEXTURE_SIZE.
85
86       GL_INVALID_VALUE is generated if xoffset < - b, or if xoffset + width >
87       w - b, where w is the GL_TEXTURE_WIDTH, and b is the width of the
88       GL_TEXTURE_BORDER of the texture image being modified. Note that w
89       includes twice the border width.
90
91       GL_INVALID_VALUE is generated if width is less than 0.
92
93       GL_INVALID_OPERATION is generated if the texture array has not been
94       defined by a previous glTexImage1D() operation.
95
96       GL_INVALID_OPERATION is generated if type is one of
97       GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV,
98       GL_UNSIGNED_SHORT_5_6_5, or GL_UNSIGNED_SHORT_5_6_5_REV and format is
99       not GL_RGB.
100
101       GL_INVALID_OPERATION is generated if type is one of
102       GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV,
103       GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV,
104       GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV,
105       GL_UNSIGNED_INT_10_10_10_2, or GL_UNSIGNED_INT_2_10_10_10_REV and
106       format is neither GL_RGBA nor GL_BGRA.
107
108       GL_INVALID_OPERATION is generated if a non-zero buffer object name is
109       bound to the GL_PIXEL_UNPACK_BUFFER target and the buffer object's data
110       store is currently mapped.
111
112       GL_INVALID_OPERATION is generated if a non-zero buffer object name is
113       bound to the GL_PIXEL_UNPACK_BUFFER target and the data would be
114       unpacked from the buffer object such that the memory reads required
115       would exceed the data store size.
116
117       GL_INVALID_OPERATION is generated if a non-zero buffer object name is
118       bound to the GL_PIXEL_UNPACK_BUFFER target and data is not evenly
119       divisible into the number of bytes needed to store in memory a datum
120       indicated by type.
121

ASSOCIATED GETS

123       glGetTexImage()
124
125       glGet() with argument GL_PIXEL_UNPACK_BUFFER_BINDING
126

SEE ALSO

128       glActiveTexture(), glCopyTexImage1D(), glCopyTexImage2D(),
129       glCopyTexSubImage1D(), glCopyTexSubImage2D(), glCopyTexSubImage3D(),
130       glPixelStore(), glTexImage1D(), glTexImage2D(), glTexImage3D(),
131       glTexParameter(), glTexSubImage2D(), glTexSubImage3D()
132
134       Copyright © 1991-2006 Silicon Graphics, Inc. This document is licensed
135       under the SGI Free Software B License. For details, see
136       http://oss.sgi.com/projects/FreeB/.
137

AUTHORS

139       opengl.org
140
141
142
143opengl.org                        06/10/2014               GLTEXSUBIMAGE1D(3G)
Impressum