1GLCOLORSUBTABLE(3G) OpenGL Manual GLCOLORSUBTABLE(3G)
2
3
4
6 glColorSubTable - respecify a portion of a color table
7
9 void glColorSubTable(GLenum target, GLsizei start, GLsizei count,
10 GLenum format, GLenum type, const GLvoid * data);
11
13 target
14 Must be one of GL_COLOR_TABLE, GL_POST_CONVOLUTION_COLOR_TABLE, or
15 GL_POST_COLOR_MATRIX_COLOR_TABLE.
16
17 start
18 The starting index of the portion of the color table to be
19 replaced.
20
21 count
22 The number of table entries to replace.
23
24 format
25 The format of the pixel data in data. The allowable values are
26 GL_RED, GL_GREEN, GL_BLUE, GL_ALPHA, GL_LUMINANCE,
27 GL_LUMINANCE_ALPHA, GL_RGB, GL_BGR, GL_RGBA, and GL_BGRA.
28
29 type
30 The type of the pixel data in data. The allowable values are
31 GL_UNSIGNED_BYTE, GL_BYTE, GL_UNSIGNED_SHORT, GL_SHORT,
32 GL_UNSIGNED_INT, GL_INT, GL_FLOAT, GL_UNSIGNED_BYTE_3_3_2,
33 GL_UNSIGNED_BYTE_2_3_3_REV, GL_UNSIGNED_SHORT_5_6_5,
34 GL_UNSIGNED_SHORT_5_6_5_REV, GL_UNSIGNED_SHORT_4_4_4_4,
35 GL_UNSIGNED_SHORT_4_4_4_4_REV, GL_UNSIGNED_SHORT_5_5_5_1,
36 GL_UNSIGNED_SHORT_1_5_5_5_REV, GL_UNSIGNED_INT_8_8_8_8,
37 GL_UNSIGNED_INT_8_8_8_8_REV, GL_UNSIGNED_INT_10_10_10_2, and
38 GL_UNSIGNED_INT_2_10_10_10_REV.
39
40 data
41 Pointer to a one-dimensional array of pixel data that is processed
42 to replace the specified region of the color table.
43
45 glColorSubTable is used to respecify a contiguous portion of a color
46 table previously defined using glColorTable(). The pixels referenced by
47 data replace the portion of the existing table from indices start to
48 start + count - 1, inclusive. This region may not include any entries
49 outside the range of the color table as it was originally specified. It
50 is not an error to specify a subtexture with width of 0, but such a
51 specification has no effect.
52
53 If a non-zero named buffer object is bound to the
54 GL_PIXEL_UNPACK_BUFFER target (see glBindBuffer()) while a portion of a
55 color table is respecified, data is treated as a byte offset into the
56 buffer object's data store.
57
59 glColorSubTable is present only if ARB_imaging is returned when
60 glGetString() is called with an argument of GL_EXTENSIONS.
61
63 GL_INVALID_ENUM is generated if target is not one of the allowable
64 values.
65
66 GL_INVALID_ENUM is generated if format is not one of the allowable
67 values.
68
69 GL_INVALID_ENUM is generated if type is not one of the allowable
70 values.
71
72 GL_INVALID_VALUE is generated if start + count > width.
73
74 GL_INVALID_OPERATION is generated if a non-zero buffer object name is
75 bound to the GL_PIXEL_UNPACK_BUFFER target and the buffer object's data
76 store is currently mapped.
77
78 GL_INVALID_OPERATION is generated if a non-zero buffer object name is
79 bound to the GL_PIXEL_UNPACK_BUFFER target and the data would be
80 unpacked from the buffer object such that the memory reads required
81 would exceed the data store size.
82
83 GL_INVALID_OPERATION is generated if a non-zero buffer object name is
84 bound to the GL_PIXEL_UNPACK_BUFFER target and data is not evenly
85 divisible into the number of bytes needed to store in memory a datum
86 indicated by type.
87
88 GL_INVALID_OPERATION is generated if glColorSubTable is executed
89 between the execution of glBegin() and the corresponding execution of
90 glEnd().
91
93 glGetColorTable(), glGetColorTableParameter()
94
95 glGet() with argument GL_PIXEL_UNPACK_BUFFER_BINDING
96
98 glColorTable(), glColorTableParameter(), glCopyColorTable(),
99 glCopyColorSubTable(), glGetColorTable()
100
102 Copyright © 1991-2006 Silicon Graphics, Inc. This document is licensed
103 under the SGI Free Software B License. For details, see
104 http://oss.sgi.com/projects/FreeB/.
105
107 opengl.org
108
109
110
111opengl.org 07/13/2018 GLCOLORSUBTABLE(3G)