1GLTEXSUBIMAGE3D(3G) [FIXME: manual] GLTEXSUBIMAGE3D(3G)
2
3
4
6 glTexSubImage3D, glTextureSubImage3D - specify a three-dimensional
7 texture subimage
8
10 void glTexSubImage3D(GLenum target, GLint level, GLint xoffset,
11 GLint yoffset, GLint zoffset, GLsizei width,
12 GLsizei height, GLsizei depth, GLenum format,
13 GLenum type, const GLvoid * pixels);
14
15 void glTextureSubImage3D(GLuint texture, GLint level, GLint xoffset,
16 GLint yoffset, GLint zoffset, GLsizei width,
17 GLsizei height, GLsizei depth, GLenum format,
18 GLenum type, const void *pixels);
19
21 target
22 Specifies the target to which the texture is bound for
23 glTexSubImage3D. Must be GL_TEXTURE_3D or GL_TEXTURE_2D_ARRAY.
24
25 texture
26 Specifies the texture object name for glTextureSubImage3D. The
27 effective target of texture must be one of the valid target values
28 above.
29
30 level
31 Specifies the level-of-detail number. Level 0 is the base image
32 level. Level n is the nth mipmap reduction image.
33
34 xoffset
35 Specifies a texel offset in the x direction within the texture
36 array.
37
38 yoffset
39 Specifies a texel offset in the y direction within the texture
40 array.
41
42 zoffset
43 Specifies a texel offset in the z direction within the texture
44 array.
45
46 width
47 Specifies the width of the texture subimage.
48
49 height
50 Specifies the height of the texture subimage.
51
52 depth
53 Specifies the depth of the texture subimage.
54
55 format
56 Specifies the format of the pixel data. The following symbolic
57 values are accepted: GL_RED, GL_RG, GL_RGB, GL_BGR, GL_RGBA,
58 GL_DEPTH_COMPONENT, and GL_STENCIL_INDEX.
59
60 type
61 Specifies the data type of the pixel data. The following symbolic
62 values are accepted: GL_UNSIGNED_BYTE, GL_BYTE, GL_UNSIGNED_SHORT,
63 GL_SHORT, GL_UNSIGNED_INT, GL_INT, GL_FLOAT,
64 GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV,
65 GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_5_6_5_REV,
66 GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV,
67 GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV,
68 GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV,
69 GL_UNSIGNED_INT_10_10_10_2, and GL_UNSIGNED_INT_2_10_10_10_REV.
70
71 pixels
72 Specifies a pointer to the image data in memory.
73
75 Texturing maps a portion of a specified texture image onto each
76 graphical primitive for which texturing is enabled.
77
78 glTexSubImage3D and glTextureSubImage3D redefine a contiguous subregion
79 of an existing three-dimensional or two-dimensioanl array texture
80 image. The texels referenced by pixels replace the portion of the
81 existing texture array with x indices xoffset and xoffset + width - 1,
82 inclusive, y indices yoffset and yoffset + height - 1, inclusive, and z
83 indices zoffset and zoffset + depth - 1, inclusive. For
84 three-dimensional textures, the z index refers to the third dimension.
85 For two-dimensional array textures, the z index refers to the slice
86 index. This region may not include any texels outside the range of the
87 texture array as it was originally specified. It is not an error to
88 specify a subtexture with zero width, height, or depth but such a
89 specification has no effect.
90
91 If a non-zero named buffer object is bound to the
92 GL_PIXEL_UNPACK_BUFFER target (see glBindBuffer()) while a texture
93 image is specified, pixels is treated as a byte offset into the buffer
94 object's data store.
95
97 The glPixelStore() modes affect texture images.
98
99 glTexSubImage3D and glTextureSubImage3D specify a three-dimensional or
100 two-dimensional array subtexture for the current texture unit,
101 specified with glActiveTexture().
102
103 GL_STENCIL_INDEX is accepted for format only if the GL version is 4.4
104 or higher.
105
107 GL_INVALID_ENUM is generated if target or the effective target of
108 texture is not GL_TEXTURE_3D or GL_TEXTURE_2D_ARRAY.
109
110 GL_INVALID_OPERATION is generated by glTextureSubImage3D if texture is
111 not the name of an existing texture object.
112
113 GL_INVALID_ENUM is generated if format is not an accepted format
114 constant.
115
116 GL_INVALID_ENUM is generated if type is not a type constant.
117
118 GL_INVALID_VALUE is generated if level is less than 0.
119
120 GL_INVALID_VALUE may be generated if level is greater than log 2 max,
121 where max is the returned value of GL_MAX_TEXTURE_SIZE.
122
123 GL_INVALID_VALUE is generated if xoffset < - b, xoffset + width > w -
124 b, yoffset < - b, or yoffset + height > h - b, or zoffset < - b, or
125 zoffset + depth > d - b, where w is the GL_TEXTURE_WIDTH, h is the
126 GL_TEXTURE_HEIGHT, d is the GL_TEXTURE_DEPTH and b is the border width
127 of the texture image being modified. Note that w, h, and d include
128 twice the border width.
129
130 GL_INVALID_VALUE is generated if width, height, or depth is less than
131 0.
132
133 GL_INVALID_OPERATION is generated if the texture array has not been
134 defined by a previous glTexImage3D() or glTexStorage3D() operation.
135
136 GL_INVALID_OPERATION is generated if type is one of
137 GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV,
138 GL_UNSIGNED_SHORT_5_6_5, or GL_UNSIGNED_SHORT_5_6_5_REV and format is
139 not GL_RGB.
140
141 GL_INVALID_OPERATION is generated if type is one of
142 GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV,
143 GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV,
144 GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV,
145 GL_UNSIGNED_INT_10_10_10_2, or GL_UNSIGNED_INT_2_10_10_10_REV and
146 format is neither GL_RGBA nor GL_BGRA.
147
148 GL_INVALID_OPERATION is generated if format is GL_STENCIL_INDEX and the
149 base internal format is not GL_STENCIL_INDEX.
150
151 GL_INVALID_OPERATION is generated if a non-zero buffer object name is
152 bound to the GL_PIXEL_UNPACK_BUFFER target and the buffer object's data
153 store is currently mapped.
154
155 GL_INVALID_OPERATION is generated if a non-zero buffer object name is
156 bound to the GL_PIXEL_UNPACK_BUFFER target and the data would be
157 unpacked from the buffer object such that the memory reads required
158 would exceed the data store size.
159
160 GL_INVALID_OPERATION is generated if a non-zero buffer object name is
161 bound to the GL_PIXEL_UNPACK_BUFFER target and pixels is not evenly
162 divisible into the number of bytes needed to store in memory a datum
163 indicated by type.
164
166 glGetTexImage()
167
168 glGet() with argument GL_PIXEL_UNPACK_BUFFER_BINDING
169
171 ┌────────────────────┬───────────────────────────────────────────────────────────────────────┐
172 │ │ OpenGL Version │
173 ├────────────────────┼─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┤
174 │Function │ 2.0 │ 2.1 │ 3.0 │ 3.1 │ 3.2 │ 3.3 │ 4.0 │ 4.1 │ 4.2 │ 4.3 │ 4.4 │ 4.5 │
175 │/ │ │ │ │ │ │ │ │ │ │ │ │ │
176 │Feature │ │ │ │ │ │ │ │ │ │ │ │ │
177 │Name │ │ │ │ │ │ │ │ │ │ │ │ │
178 ├────────────────────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
179 │glTexSubImage3D │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │
180 ├────────────────────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
181 │glTextureSubImage3D │ - │ - │ - │ - │ - │ - │ - │ - │ - │ - │ - │ ✔ │
182 └────────────────────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
183
185 glActiveTexture(), glCopyTexImage1D(), glCopyTexImage2D(),
186 glCopyTexSubImage1D(), glCopyTexSubImage2D(), glCopyTexSubImage3D(),
187 glPixelStore(), glTexImage1D(), glTexImage2D(), glTexImage3D(),
188 glTexSubImage1D(), glTexSubImage2D(), glTexParameter()
189
191 Copyright © 1991-2006 Silicon Graphics, Inc. Copyright © 2010-2014
192 Khronos Group. This document is licensed under the SGI Free Software B
193 License. For details, see http://oss.sgi.com/projects/FreeB/.
194
196 Copyright © 1991-2006 Silicon Graphics, Inc.
197 Copyright © 2010-2014 Khronos Group
198
199
200
201[FIXME: source] 07/13/2018 GLTEXSUBIMAGE3D(3G)