1GLGETCOLORTABLE(3G)              OpenGL Manual             GLGETCOLORTABLE(3G)
2
3
4

NAME

6       glGetColorTable - retrieve contents of a color lookup table
7

C SPECIFICATION

9       void glGetColorTable(GLenum target, GLenum format, GLenum type,
10                            GLvoid * table);
11

PARAMETERS

13       target
14           Must be GL_COLOR_TABLE, GL_POST_CONVOLUTION_COLOR_TABLE, or
15           GL_POST_COLOR_MATRIX_COLOR_TABLE.
16
17       format
18           The format of the pixel data in table. The possible values are
19           GL_RED, GL_GREEN, GL_BLUE, GL_ALPHA, GL_LUMINANCE,
20           GL_LUMINANCE_ALPHA, GL_RGB, GL_BGR, GL_RGBA, and GL_BGRA.
21
22       type
23           The type of the pixel data in table. Symbolic constants
24           GL_UNSIGNED_BYTE, GL_BYTE, GL_BITMAP, GL_UNSIGNED_SHORT, GL_SHORT,
25           GL_UNSIGNED_INT, GL_INT, GL_FLOAT, GL_UNSIGNED_BYTE_3_3_2,
26           GL_UNSIGNED_BYTE_2_3_3_REV, GL_UNSIGNED_SHORT_5_6_5,
27           GL_UNSIGNED_SHORT_5_6_5_REV, GL_UNSIGNED_SHORT_4_4_4_4,
28           GL_UNSIGNED_SHORT_4_4_4_4_REV, GL_UNSIGNED_SHORT_5_5_5_1,
29           GL_UNSIGNED_SHORT_1_5_5_5_REV, GL_UNSIGNED_INT_8_8_8_8,
30           GL_UNSIGNED_INT_8_8_8_8_REV, GL_UNSIGNED_INT_10_10_10_2, and
31           GL_UNSIGNED_INT_2_10_10_10_REV are accepted.
32
33       table
34           Pointer to a one-dimensional array of pixel data containing the
35           contents of the color table.
36

DESCRIPTION

38       glGetColorTable returns in table the contents of the color table
39       specified by target. No pixel transfer operations are performed, but
40       pixel storage modes that are applicable to glReadPixels() are
41       performed.
42
43       If a non-zero named buffer object is bound to the GL_PIXEL_PACK_BUFFER
44       target (see glBindBuffer()) while a histogram table is requested, table
45       is treated as a byte offset into the buffer object's data store.
46
47       Color components that are requested in the specified format, but which
48       are not included in the internal format of the color lookup table, are
49       returned as zero. The assignments of internal color components to the
50       components requested by format are
51
52       ┌─────────────────────────────────┬───────────────────────────────────┐
53       │                                 │                                   │
54Internal Resulting 
55Component                        Component                         
56       │                                 │                                   │
57       ├─────────────────────────────────┼───────────────────────────────────┤
58       │Red                              │ Red                               │
59       ├─────────────────────────────────┼───────────────────────────────────┤
60       │Green                            │ Green                             │
61       ├─────────────────────────────────┼───────────────────────────────────┤
62       │Blue                             │ Blue                              │
63       ├─────────────────────────────────┼───────────────────────────────────┤
64       │Alpha                            │ Alpha                             │
65       ├─────────────────────────────────┼───────────────────────────────────┤
66       │Luminance                        │ Red                               │
67       ├─────────────────────────────────┼───────────────────────────────────┤
68       │Intensity                        │ Red                               │
69       └─────────────────────────────────┴───────────────────────────────────┘
70

NOTES

72       glGetColorTable is present only if ARB_imaging is returned when
73       glGetString() is called with an argument of GL_EXTENSIONS.
74

ERRORS

76       GL_INVALID_ENUM is generated if target is not one of the allowable
77       values.
78
79       GL_INVALID_ENUM is generated if format is not one of the allowable
80       values.
81
82       GL_INVALID_ENUM is generated if type is not one of the allowable
83       values.
84
85       GL_INVALID_OPERATION is generated if type is one of
86       GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV,
87       GL_UNSIGNED_SHORT_5_6_5, or GL_UNSIGNED_SHORT_5_6_5_REV and format is
88       not GL_RGB.
89
90       GL_INVALID_OPERATION is generated if type is one of
91       GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV,
92       GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV,
93       GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV,
94       GL_UNSIGNED_INT_10_10_10_2, or GL_UNSIGNED_INT_2_10_10_10_REV and
95       format is neither GL_RGBA nor GL_BGRA.
96
97       GL_INVALID_OPERATION is generated if a non-zero buffer object name is
98       bound to the GL_PIXEL_PACK_BUFFER target and the buffer object's data
99       store is currently mapped.
100
101       GL_INVALID_OPERATION is generated if a non-zero buffer object name is
102       bound to the GL_PIXEL_PACK_BUFFER target and the data would be packed
103       to the buffer object such that the memory writes required would exceed
104       the data store size.
105
106       GL_INVALID_OPERATION is generated if a non-zero buffer object name is
107       bound to the GL_PIXEL_PACK_BUFFER target and table is not evenly
108       divisible into the number of bytes needed to store in memory a datum
109       indicated by type.
110
111       GL_INVALID_OPERATION is generated if glGetColorTable is executed
112       between the execution of glBegin() and the corresponding execution of
113       glEnd().
114

ASSOCIATED GETS

116       glGetColorTableParameter()
117
118       glGet() with argument GL_PIXEL_PACK_BUFFER_BINDING
119

SEE ALSO

121       glColorTable(), glColorTableParameter()
122
124       Copyright © 1991-2006 Silicon Graphics, Inc. This document is licensed
125       under the SGI Free Software B License. For details, see
126       http://oss.sgi.com/projects/FreeB/.
127

AUTHORS

129       opengl.org
130
131
132
133opengl.org                        07/13/2018               GLGETCOLORTABLE(3G)
Impressum