next up previous contents
Next: 13.2.3.3 The Texture Color Up: 13.2.3 Look-Up Tables Previous: 13.2.3.1 Pixel Maps   Contents

13.2.3.2 The Color Table Extension

The color table extension, SGI_color_table, provides additional look-up tables in the OpenGL pixel transfer pipeline. Although the capabilities of color tables and pixel maps are similar, the semantics are different.

The color table extension defines the following look-up tables:

Each table is independently enabled and disabled using the glEnable() and glDisable() commands. One, two, or all three of the tables may be applied during the same operation. Color index images have to be converted to RGBA images using the I to RGBA pixel maps described in the previous section before they can be passed through the RGBA portion of the pixel transfer pipeline.

Color tables are specified using the glColorTableEXT() and glCopyColorTableEXT() commands and are queried using the glGetColorTableEXT() command. The man pages for these commands provide details on their use. Note that unlike the RGBA to RGBA pixel maps, all channels of a color table are specified at the same time.

When a color table is specified, an internal format parameter (for example, GL_ RGB or GL_ LUMINANCE_EXT) gives the channels present in the table. When the color table is applied to an image (which is by definition RGBA), channels of the image which are not present in the color table are left unmodified. In this way, color tables are more flexible than pixel maps, which replace all channels of the input image.

Although color tables provide similar functionality to pixel maps and may prove more useful in certain circumstances, they do not replace pixel maps in the OpenGL pipeline and the tables managed by pixel maps and color tables are independent. It is possible to apply both a pixel map and a color table (or color tables) during the same pixel operation (although the utility of this is questionable). The maximum sizes and relative efficiencies of pixel maps and color tables vary from platform to platform.

The color table extension in OpenGL 1.1 is supported by the following vendors:


next up previous contents
Next: 13.2.3.3 The Texture Color Up: 13.2.3 Look-Up Tables Previous: 13.2.3.1 Pixel Maps   Contents
2001-01-10