glCopyColorTable loads a color table with pixels from the current GL_READ_BUFFER (rather than from main memory, as is the case for glColorTable ). The screen-aligned pixel rectangle with lower-left corner at ( x,\ y ) having width width and height 1 is loaded into the color table. If any pixels within this region are outside the window that is associated with the GL context, the values obtained for those pixels are undefined. The pixels in the rectangle are processed just as if glReadPixels were called, with internalformat set to RGBA, but processing stops after the final conversion to RGBA. The four scale parameters and the four bias parameters that are defined for the table are then used to scale and bias the R, G, B, and A components of each pixel. The scale and bias parameters are set by calling glColorTableParameter. Next, the R, G, B, and A values are clamped to the range 0 1. Each pixel is then converted to the internal format specified by internalformat. This conversion simply maps the component values of the pixel (R, G, B, and A) to the values included in the internal format (red, green, blue, alpha, luminance, and intensity). The mapping is as follows: Internal FormatRedGreenBlueAlphaLuminanceIntensityGL_ALPHA A GL_LUMINANCE R GL_LUMINANCE_ALPHA A R GL_INTENSITY R GL_RGB R G B GL_RGBA R G B A Finally, the red, green, blue, alpha, luminance, and/or intensity components of the resulting pixels are stored in the color table. They form a one-dimensional table with indices in the range 0 width - 1.
glCopyColorTable is available only if ARB_imaging is returned from calling glGetString with an argument of GL_EXTENSIONS.
Copyright 1991-2006 Silicon Graphics, Inc. This document is licensed under the SGI Free Software B License. For details, see http://oss.sgi.com/projects/FreeB/.
glCopyColorTable: man2/glCopyColorTable.xml
glCopyColorTable loads a color table with pixels from the current GL_READ_BUFFER (rather than from main memory, as is the case for glColorTable ). The screen-aligned pixel rectangle with lower-left corner at ( x,\ y ) having width width and height 1 is loaded into the color table. If any pixels within this region are outside the window that is associated with the GL context, the values obtained for those pixels are undefined. The pixels in the rectangle are processed just as if glReadPixels were called, with internalformat set to RGBA, but processing stops after the final conversion to RGBA. The four scale parameters and the four bias parameters that are defined for the table are then used to scale and bias the R, G, B, and A components of each pixel. The scale and bias parameters are set by calling glColorTableParameter. Next, the R, G, B, and A values are clamped to the range 0 1. Each pixel is then converted to the internal format specified by internalformat. This conversion simply maps the component values of the pixel (R, G, B, and A) to the values included in the internal format (red, green, blue, alpha, luminance, and intensity). The mapping is as follows: Internal Format Red Green Blue Alpha Luminance Intensity GL_ALPHA A GL_LUMINANCE R GL_LUMINANCE_ALPHA A R GL_INTENSITY R GL_RGB R G B GL_RGBA R G B A Finally, the red, green, blue, alpha, luminance, and/or intensity components of the resulting pixels are stored in the color table. They form a one-dimensional table with indices in the range 0 width - 1.
glCopyColorTable is available only if ARB_imaging is returned from calling glGetString with an argument of GL_EXTENSIONS.