1GLGETCOLORTABLE(3G) GLGETCOLORTABLE(3G)
2
3
4
6 glGetColorTable - retrieve contents of a color lookup table
7
8
10 void glGetColorTable( GLenum target,
11 GLenum format,
12 GLenum type,
13 GLvoid *table )
14
15
17 target Must be GL_COLOR_TABLE, GL_POST_CONVOLUTION_COLOR_TABLE, or
18 GL_POST_COLOR_MATRIX_COLOR_TABLE.
19
20 format The of the pixel data in table. The possible values are
21 GL_RED, GL_GREEN, GL_BLUE, GL_ALPHA, GL_LUMINANCE,
22 GL_LUMINANCE_ALPHA, GL_RGB, GL_BGR, GL_RGBA, and GL_BGRA.
23
24 type The type of the pixel data in table. Symbolic constants
25 GL_UNSIGNED_BYTE, GL_BYTE, GL_BITMAP, GL_UNSIGNED_SHORT,
26 GL_SHORT, GL_UNSIGNED_INT, GL_INT, GL_FLOAT,
27 GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV,
28 GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_5_6_5_REV,
29 GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV,
30 GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV,
31 GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV,
32 GL_UNSIGNED_INT_10_10_10_2, and GL_UNSIGNED_INT_2_10_10_10_REV
33 are accepted.
34
35 table Pointer to a one-dimensional array of pixel data containing the
36 contents of the color table.
37
39 glGetColorTable returns in table the contents of the color table speci‐
40 fied by target. No pixel transfer operations are performed, but pixel
41 storage modes that are applicable to glReadPixels are performed.
42
43 Color components that are requested in the specified format, but which
44 are not included in the internal
45 of the color lookup table, are returned as zero. The assignments of
46 internal color components to the components requested by format are
47
48 ─────────────────────────────────────────
49 Internal Component Resulting Component
50 ─────────────────────────────────────────
51 red red
52 green green
53 blue blue
54 alpha alpha
55 luminance red
56 intensity red
57 ─────────────────────────────────────────
58
59
61 glGetColorTable is present only if GL_ARB_imaging is returned when
62 glGetString is called with an argument of GL_EXTENSIONS.
63
65 GL_INVALID_ENUM is generated if target is not one of the allowable val‐
66 ues.
67
68 GL_INVALID_ENUM is generated if format is not one of the allowable val‐
69 ues.
70
71 GL_INVALID_ENUM is generated if type is not one of the allowable val‐
72 ues.
73
74 GL_INVALID_OPERATION is generated if type is one of
75 GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV,
76 GL_UNSIGNED_SHORT_5_6_5, or GL_UNSIGNED_SHORT_5_6_5_REV and format is
77 not GL_RGB.
78
79 GL_INVALID_OPERATION is generated if type is one of
80 GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV,
81 GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV,
82 GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV,
83 GL_UNSIGNED_INT_10_10_10_2, or GL_UNSIGNED_INT_2_10_10_10_REV and for‐
84 mat is neither GL_RGBA nor GL_BGRA.
85
86 GL_INVALID_OPERATION is generated if glGetColorTable is executed
87 between the execution of glBegin and the corresponding execution of
88 glEnd.
89
91 glColorTable(3G), glColorTableParameter(3G),
92 glGetColorTableParameter(3G)
93
94
95
96 GLGETCOLORTABLE(3G)