glCopyColorSubTableEXT

NAME

glCopyColorSubTableEXT - define a portion of a color lookup table from the frame buffer

C SPECIFICATION

void glCopyColorSubTableEXT(GLenum target,
                            GLsizei start,
                            GLint x,
                            GLint y,
                            GLsizei width)

PARAMETERS

target Must be one of the following: GL_COLOR_TABLE_EXT, GL_POST_CONVOLUTION_COLOR_TABLE_EXT, GL_POST_COLOR_MATRIX_COLOR_TABLE_EXT, or GL_TEXTURE_COLOR_TABLE_EXT.
start The index of the first entry in the table to load. start must be nonnegative.
x The x coordinate of the lower-left corner of the frame buffer image to be copied.
y The y coordinate of the lower-left corner of the frame buffer image to be copied.
width The number of entries in the table to load. start + width must not be greater than the width of the color table.

DESCRIPTION

glCopyColorSubTableEXT is used to specify a color lookup table in exactly the same manner as glColorSubTableEXT except that the data is obtained from the frame buffer. target must be set to either GL_COLOR_TABLE_EXT, GL_POST_CONVOLUTION_COLOR_TABLE_EXT, or GL_POST_COLOR_MATRIX_COLOR_TABLE_EXT. Entries in the range [start, start + width - 1] are replaced.

The x, y, and width correspond to the x, y, and width arguments of glReadPixels; they specify the image width and the lower-left coordinates in the frame buffer. The image is taken from frame buffer exactly as if these arguments were passed to glReadPixels with argument format set to GL_RGBA and height set to 1, stopping after the final expansion to RGBA. If any pixels defined by the region are outside of the window associated with the GL context, the values obtained for those pixels are undefined. Subsequent processing is identical to that of glColorTableEXT.

EXTENSIONS

Some routines and constants for this function are part of an extension, not part of the core GL command set. The following extension names must be present in the string returned by glGetString when called with argument GL_EXTENSIONS to use these routines and constants.
GL_EXT_color_subtable
glCopyColorSubTableEXT is part of the EXT_color_subtable extension.

GL_EXT_texture_color_table
GL_TEXTURE_COLOR_TABLE_EXT is part of the EXT_texture_color_table extension.

ERRORS

GL_INVALID_ENUM is generated if target is not an accepted value.

GL_INVALID_VALUE is generated if start is less than zero.

GL_INVALID_VALUE is generated if width is less than zero.

GL_INVALID_VALUE is generated if start + width is greater than the width.

GL_INVALID_OPERATION is generated if glCopyColorSubTableEXT is executed between the execution of glEnd.

ASSOCIATED GETS

glGetColorTableEXT
glGetColorTableParameterEXT

SEE ALSO

glBegin, glColorSubTableEXT, glColorTableEXT, glCopyColorTableEXT, glEnd, glGetString, glPixelTransfer, glReadPixels