1GLTEXSUBIMAGE1D(3G) GLTEXSUBIMAGE1D(3G)
2
3
4
6 glTexSubImage1D - specify a one-dimensional texture subimage
7
8
10 void glTexSubImage1D( GLenum target,
11 GLint level,
12 GLint xoffset,
13 GLsizei width,
14 GLenum format,
15 GLenum type,
16 const GLvoid *pixels )
17
18
20 target Specifies the target texture. Must be GL_TEXTURE_1D.
21
22 level Specifies the level-of-detail number. Level 0 is the base
23 image level. Level n is the nth mipmap reduction image.
24
25 xoffset Specifies a texel offset in the x direction within the texture
26 array.
27
28 width Specifies the width of the texture subimage.
29
30 format Specifies the of the pixel data. The following symbolic val‐
31 ues are accepted: GL_COLOR_INDEX, GL_RED, GL_GREEN, GL_BLUE,
32 GL_ALPHA, GL_RGB, GL_BGR, GL_RGBA, GL_BGRA, GL_LUMINANCE, and
33 GL_LUMINANCE_ALPHA.
34
35 type Specifies the data type of the pixel data. The following sym‐
36 bolic values are accepted: GL_UNSIGNED_BYTE, GL_BYTE,
37 GL_BITMAP, GL_UNSIGNED_SHORT, GL_SHORT, GL_UNSIGNED_INT,
38 GL_INT, GL_FLOAT, GL_UNSIGNED_BYTE_3_3_2,
39 GL_UNSIGNED_BYTE_2_3_3_REV, GL_UNSIGNED_SHORT_5_6_5,
40 GL_UNSIGNED_SHORT_5_6_5_REV, GL_UNSIGNED_SHORT_4_4_4_4,
41 GL_UNSIGNED_SHORT_4_4_4_4_REV, GL_UNSIGNED_SHORT_5_5_5_1,
42 GL_UNSIGNED_SHORT_1_5_5_5_REV, GL_UNSIGNED_INT_8_8_8_8,
43 GL_UNSIGNED_INT_8_8_8_8_REV, GL_UNSIGNED_INT_10_10_10_2, and
44 GL_UNSIGNED_INT_2_10_10_10_REV.
45
46 pixels Specifies a pointer to the image data in memory.
47
49 Texturing maps a portion of a specified texture image onto each graphi‐
50 cal primitive for which texturing is enabled. To enable or disable
51 one-dimensional texturing, call glEnable and glDisable with argument
52 GL_TEXTURE_1D.
53
54 glTexSubImage1D redefines a contiguous subregion of an existing one-
55 dimensional texture image. The texels referenced by pixels replace the
56 portion of the existing texture array with x indices xoffset and xoff‐
57 set+width−1,inclusive. This region may not include any texels outside
58 the range of the texture array as it was originally specified. It is
59 not an error to specify a subtexture with width of 0, but such a speci‐
60 fication has no effect.
61
63 glTexSubImage1D is available only if the GL version is 1.1 or greater.
64
65 Texturing has no effect in color index mode.
66
67 glPixelStore and glPixelTransfer modes affect texture images in exactly
68 the way they affect glDrawPixels.
69
70 Formats GL_BGR, and GL_BGRA and types GL_UNSIGNED_BYTE_3_3_2,
71 GL_UNSIGNED_BYTE_2_3_3_REV, GL_UNSIGNED_SHORT_5_6_5,
72 GL_UNSIGNED_SHORT_5_6_5_REV, GL_UNSIGNED_SHORT_4_4_4_4,
73 GL_UNSIGNED_SHORT_4_4_4_4_REV, GL_UNSIGNED_SHORT_5_5_5_1,
74 GL_UNSIGNED_SHORT_1_5_5_5_REV, GL_UNSIGNED_INT_8_8_8_8,
75 GL_UNSIGNED_INT_8_8_8_8_REV, GL_UNSIGNED_INT_10_10_10_2, and
76 GL_UNSIGNED_INT_2_10_10_10_REV are available only if the GL version is
77 1.2 or greater.
78
79 When the GL_ARB_multitexture extension is supported, glTexSubImage1D
80 specifies a one-dimensional sub texture for the current texture unit,
81 specified with glActiveTextureARB.
82
83 When the GL_ARB_imaging extension is supported, the RGBA components
84 specified in pixels may be processed by the imaging pipeline. See
85 glTexImage1D for specific details.
86
88 GL_INVALID_ENUM is generated if target is not one of the allowable val‐
89 ues.
90
91 GL_INVALID_OPERATION is generated if the texture array has not been
92 defined by a previous glTexImage1D operation.
93
94 GL_INVALID_VALUE is generated if level is less than 0.
95
96 GL_INVALID_VALUE may be generated if level is greater than log2max,
97 where max is the returned value of GL_MAX_TEXTURE_SIZE.
98
99 GL_INVALID_VALUE is generated if xoffset<−b, or if (xoff‐
100 set+width)>(w−b), where w is the GL_TEXTURE_WIDTH, and b is the width
101 of the GL_TEXTURE_BORDER of the texture image being modified. Note
102 that w includes twice the border width.
103
104 GL_INVALID_VALUE is generated if width is less than 0.
105
106 GL_INVALID_ENUM is generated if format is not an accepted
107 constant.
108
109 GL_INVALID_ENUM is generated if type is not a type constant.
110
111 GL_INVALID_ENUM is generated if type is GL_BITMAP and format is not
112 GL_COLOR_INDEX.
113
114 GL_INVALID_OPERATION is generated if glTexSubImage1D is executed
115 between the execution of glBegin and the corresponding execution of
116 glEnd.
117
118 GL_INVALID_OPERATION is generated if type is one of
119 GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV,
120 GL_UNSIGNED_SHORT_5_6_5, or GL_UNSIGNED_SHORT_5_6_5_REV and format is
121 not GL_RGB.
122
123 GL_INVALID_OPERATION is generated if type is one of
124 GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV,
125 GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV,
126 GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV,
127 GL_UNSIGNED_INT_10_10_10_2, or GL_UNSIGNED_INT_2_10_10_10_REV and for‐
128 mat is neither GL_RGBA nor GL_BGRA.
129
131 glGetTexImage
132 glIsEnabled with argument GL_TEXTURE_1D
133
135 glActiveTextureARB(3G), glCopyTexImage1D(3G), glCopyTexImage2D(3G),
136 glCopyTexSubImage1D(3G), glCopyTexSubImage2D(3G),
137 glCopyTexSubImage3D(3G), glDrawPixels(3G), glPixelStore(3G),
138 glPixelTransfer(3G), glTexEnv(3G), glTexGen(3G), glTexImage1D(3G),
139 glTexImage2D(3G), glTexImage3D(3G), glTexParameter(3G),
140 glTexSubImage2D(3G), glTexSubImage3D(3G)
141
142
143
144
145 GLTEXSUBIMAGE1D(3G)