1GLTEXSUBIMAGE1D(3G)             [FIXME: manual]            GLTEXSUBIMAGE1D(3G)
2
3
4

NAME

6       glTexSubImage1D, glTextureSubImage1D - specify a one-dimensional
7       texture subimage
8

C SPECIFICATION

10       void glTexSubImage1D(GLenum target, GLint level, GLint xoffset,
11                            GLsizei width, GLenum format, GLenum type,
12                            const GLvoid * pixels);
13
14       void glTextureSubImage1D(GLuint texture, GLint level, GLint xoffset,
15                                GLsizei width, GLenum format, GLenum type,
16                                const void *pixels);
17

PARAMETERS

19       target
20           Specifies the target to which the texture is bound for
21           glTexSubImage1D. Must be GL_TEXTURE_1D.
22
23       texture
24           Specifies the texture object name for glTextureSubImage1D. The
25           effective target of texture must be one of the valid target values
26           above.
27
28       level
29           Specifies the level-of-detail number. Level 0 is the base image
30           level. Level n is the nth mipmap reduction image.
31
32       xoffset
33           Specifies a texel offset in the x direction within the texture
34           array.
35
36       width
37           Specifies the width of the texture subimage.
38
39       format
40           Specifies the format of the pixel data. The following symbolic
41           values are accepted: GL_RED, GL_RG, GL_RGB, GL_BGR, GL_RGBA,
42           GL_DEPTH_COMPONENT, and GL_STENCIL_INDEX.
43
44       type
45           Specifies the data type of the pixel data. The following symbolic
46           values are accepted: GL_UNSIGNED_BYTE, GL_BYTE, GL_UNSIGNED_SHORT,
47           GL_SHORT, GL_UNSIGNED_INT, GL_INT, GL_FLOAT,
48           GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV,
49           GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_5_6_5_REV,
50           GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV,
51           GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV,
52           GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV,
53           GL_UNSIGNED_INT_10_10_10_2, and GL_UNSIGNED_INT_2_10_10_10_REV.
54
55       pixels
56           Specifies a pointer to the image data in memory.
57

DESCRIPTION

59       Texturing maps a portion of a specified texture image onto each
60       graphical primitive for which texturing is enabled. To enable or
61       disable one-dimensional texturing, call glEnable() and
62
63       glDisable with argument GL_TEXTURE_1D.
64
65       glTexSubImage1D and glTextureSubImage1D redefine a contiguous subregion
66       of an existing one-dimensional texture image. The texels referenced by
67       pixels replace the portion of the existing texture array with x indices
68       xoffset and xoffset + width - 1, inclusive. This region may not include
69       any texels outside the range of the texture array as it was originally
70       specified. It is not an error to specify a subtexture with width of 0,
71       but such a specification has no effect.
72
73       If a non-zero named buffer object is bound to the
74       GL_PIXEL_UNPACK_BUFFER target (see glBindBuffer()) while a texture
75       image is specified, pixels is treated as a byte offset into the buffer
76       object's data store.
77

NOTES

79       glPixelStore() modes affect texture images.
80
81       glTexSubImage1D and glTextureSubImage1D specify a one-dimensional
82       subtexture for the current texture unit, specified with
83       glActiveTexture().
84
85       GL_STENCIL_INDEX is accepted for format only if the GL version is 4.4
86       or higher.
87

ERRORS

89       GL_INVALID_ENUM is generated if target or the effective target of
90       texture is not one of the allowable values.
91
92       GL_INVALID_OPERATION is generated by glTextureSubImage1D if texture is
93       not the name of an existing texture object.
94
95       GL_INVALID_ENUM is generated if format is not an accepted format
96       constant.
97
98       GL_INVALID_ENUM is generated if type is not a type constant.
99
100       GL_INVALID_VALUE is generated if level is less than 0.
101
102       GL_INVALID_VALUE may be generated if level is greater than log 2 max,
103       where max is the returned value of GL_MAX_TEXTURE_SIZE.
104
105       GL_INVALID_VALUE is generated if xoffset < - b, or if xoffset + width >
106       w - b, where w is the GL_TEXTURE_WIDTH, and b is the width of the
107       GL_TEXTURE_BORDER of the texture image being modified. Note that w
108       includes twice the border width.
109
110       GL_INVALID_VALUE is generated if width is less than 0.
111
112       GL_INVALID_OPERATION is generated if the texture array has not been
113       defined by a previous glTexImage1D() operation.
114
115       GL_INVALID_OPERATION is generated if type is one of
116       GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV,
117       GL_UNSIGNED_SHORT_5_6_5, or GL_UNSIGNED_SHORT_5_6_5_REV and format is
118       not GL_RGB.
119
120       GL_INVALID_OPERATION is generated if type is one of
121       GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV,
122       GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV,
123       GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV,
124       GL_UNSIGNED_INT_10_10_10_2, or GL_UNSIGNED_INT_2_10_10_10_REV and
125       format is neither GL_RGBA nor GL_BGRA.
126
127       GL_INVALID_OPERATION is generated if format is GL_STENCIL_INDEX and the
128       base internal format is not GL_STENCIL_INDEX.
129
130       GL_INVALID_OPERATION is generated if a non-zero buffer object name is
131       bound to the GL_PIXEL_UNPACK_BUFFER target and the buffer object's data
132       store is currently mapped.
133
134       GL_INVALID_OPERATION is generated if a non-zero buffer object name is
135       bound to the GL_PIXEL_UNPACK_BUFFER target and the data would be
136       unpacked from the buffer object such that the memory reads required
137       would exceed the data store size.
138
139       GL_INVALID_OPERATION is generated if a non-zero buffer object name is
140       bound to the GL_PIXEL_UNPACK_BUFFER target and pixels is not evenly
141       divisible into the number of bytes needed to store in memory a datum
142       indicated by type.
143

ASSOCIATED GETS

145       glGetTexImage()
146
147       glGet() with argument GL_PIXEL_UNPACK_BUFFER_BINDING
148

VERSION SUPPORT

150       ┌────────────────────┬───────────────────────────────────────────────────────────────────────┐
151       │                    │                OpenGL Version                                         
152       ├────────────────────┼─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┤
153Function            2.0 2.1 3.0 3.1 3.2 3.3 4.0 4.1 4.2 4.3 4.4 4.5 
154/                   │     │     │     │     │     │     │     │     │     │     │     │     │
155Feature             │     │     │     │     │     │     │     │     │     │     │     │     │
156Name                │     │     │     │     │     │     │     │     │     │     │     │     │
157       ├────────────────────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
158glTexSubImage1D     │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │
159       ├────────────────────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
160glTextureSubImage1D │  -  │  -  │  -  │  -  │  -  │  -  │  -  │  -  │  -  │  -  │  -  │  ✔  │
161       └────────────────────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
162

SEE ALSO

164       glActiveTexture(), glCopyTexImage1D(), glCopyTexImage2D(),
165       glCopyTexSubImage1D(), glCopyTexSubImage2D(), glCopyTexSubImage3D(),
166       glPixelStore(), glTexImage1D(), glTexImage2D(), glTexImage3D(),
167       glTexParameter(), glTexSubImage2D(), glTexSubImage3D()
168
170       Copyright © 1991-2006 Silicon Graphics, Inc. Copyright © 2010-2014
171       Khronos Group. This document is licensed under the SGI Free Software B
172       License. For details, see http://oss.sgi.com/projects/FreeB/.
173
175       Copyright © 1991-2006 Silicon Graphics, Inc.
176       Copyright © 2010-2014 Khronos Group
177
178
179
180[FIXME: source]                   03/06/2019               GLTEXSUBIMAGE1D(3G)
Impressum