texture_color_table
Specification
Name
SGI_texture_color_table
Name Strings
GL_SGI_texture_color_table
Version
$Date: 1996/09/09 01:00:12 $ $Revision: 1.2 $
Number
17
Dependencies
EXT_abgr affects the definition of this extension
EXT_texture is required
EXT_copy_texture affects the definition of this extension
Overview
This extension adds a color lookup table to the texture mechanism.
The table is applied to the filtered result of a texture lookup,
before that result is used in the texture environment equations.
The definition and application of the texture color table are
similar to those of the color tables defined in SGI_color_table,
though it is not necessary for that extension to be implemented.
Texture color tables can be used to expand luminance or intensity
textures to full RGBA, and also to linearize the results of color
space conversions implemented by multidimensional texture table
lookup.
Issues
* should the scale, bias, and clamp that is applied to texels
be moved to a separate SGIX extension?
done.
* it should be clarified that this state is NOT part of
EXT_texture_object.
* can the texture format change while passing thru the texture
color table?
this possibility is mentioned in the overview. an example of
when this is useful is an RGBA table applied to a LUMINANCE
texture. this expands LUMINANCE to full RGBA. the table
defined below does not account for this.
A: changed texture spec to map all texture components to Rt,
Gt, Bt, At and now the table is always applied to all 4
components.
* do we want to query MAX_TEXTURE_COLOR_TABLE_WIDTH_SGI in
addition to PROXY method?
A: no, this should be done with PROXY.
New Procedures and Functions
None
New Tokens
Accepted by the < cap > parameter of Enable, Disable, and IsEnabled,
by the < pname > parameter of GetBooleanv, GetIntegerv, GetFloatv,
and GetDoublev, and by the < target > parameter of ColorTableSGI,
CopyColorTableSGI, GetColorTableSGI, ColorTableParameterfvSGI,
ColorTableParameterivSGI, GetColorTableParameterfvSGI,
GetColorTableParameterivSGI:
TEXTURE_COLOR_TABLE_SGI
Accepted by the < target > parameter of ColorTableSGI,
GetColorTableParameterivSGI, and GetColorTableParameterfvSGI:
PROXY_TEXTURE_COLOR_TABLE_SGI
Additions to Chapter 2 of the 1.0 Specification (OpenGL Operation)
None
Additions to Chapter 3 of the 1.0 Specification (Rasterization)
The texture color table is specified in exactly the manner
described for the color tables in SGI_color_table, using
TEXTURE_COLOR_TABLE_SGI as the value for the < target > parameters
of the various commands.
The table size, specified by the < width > parameter of
ColorTableSGI is limited to powers-of-two. Additionally, an
implementation must support a maximum table size of at least 256
entries.
The PROXY_TEXTURE_COLOR_TABLE_SGI target is available for
configuration queries in exactly the manner described for the
other tables in SGI_color_table.
The contents of the table are used to replace a subset of the
components of each texel group, based on the base internal format
of the table.
If the table size is zero, the texture color table
is effectively disabled. The texture color table is applied to
the texture components denoted in the the EXT_texture extension as
Rt, Gt, Bt, and At according to the following table:
Modification of Texture Components
----------------------------------
Base Table
Internal Format Rt Gt Bt At
--------------- -- -- -- --
ALPHA Rt Gt Bt A(At)
LUMINANCE L(Rt) L(Gt) L(Bt) At
LUMINANCE_ALPHA L(Rt) L(Gt) L(Bt) A(At)
INTENSITY I(Rt) I(Gt) I(Bt) I(At)
RGB R(Rt) G(Gt) B(Bt) At
RGBA R(Rt) G(Gt) B(Bt) A(At)
Additions to Chapter 4 of the 1.0 Specification (Per-Fragment
Operations and the Framebuffer)
None
Additions to Chapter 5 of the 1.0 Specification (Special Functions)
None
Additions to Chapter 6 of the 1.0 Specification (State and State Requests)
None
Additions to the GLX Specification
None
Dependencies on EXT_abgr
EXT_abgr affects this extension in exactly the manner that it
affects SGI_color_table.
Dependencies on EXT_texture
EXT_texture is required. This extension builds on the notion of
internal image format, which is defined by EXT_texture.
Dependencies on EXT_copy_texture
EXT_copy_texture affects this extension in exactly the manner that
it affects SGI_color_table.
Dependencies on SGI_color_table
The specification depends heavily on the SGI_color_table
specification, but it is not necessary that SGI_color_table be
implemented for this extension to be implemented.
Errors
TEXTURE_COLOR_TABLE_SGI and PROXY_TEXTURE_COLOR_TABLE_SGI are
added to the list of < target > parameters that are accepted by
color table commands.
New State
Get Value Get Command Type Initial Value Attribute
--------- ----------- ---- ------------- ---------
TEXTURE_COLOR_TABLE_SGI IsEnabled B False texture/enable
COLOR_TABLE GetColorTableSGI 4 x I empty -
COLOR_TABLE_FORMAT_SGI GetColorTableParameterivSGI 2 x 4 x Z38 RGBA -
COLOR_TABLE_WIDTH_SGI GetColorTableParameterivSGI 2 x 4 x Z+ 0 -
COLOR_TABLE_RED_SIZE_SGI GetColorTableParameterivSGI 2 x 4 x Z+ 0 -
COLOR_TABLE_GREEN_SIZE_SGI GetColorTableParameterivSGI 2 x 4 x Z+ 0 -
COLOR_TABLE_BLUE_SIZE_SGI GetColorTableParameterivSGI 2 x 4 x Z+ 0 -
COLOR_TABLE_ALPHA_SIZE_SGI GetColorTableParameterivSGI 2 x 4 x Z+ 0 -
COLOR_TABLE_LUMINANCE_SIZE_SGI GetColorTableParameterivSGI 2 x 4 x Z+ 0 -
COLOR_TABLE_INTENSITY_SIZE_SGI GetColorTableParameterivSGI 2 x 4 x Z+ 0 -
COLOR_TABLE_SCALE_SGI GetColorTableParameterfvSGI 4 x R4 (1,1,1,1) pixel
COLOR_TABLE_BIAS_SGI GetColorTableParameterfvSGI 4 x R4 (0,0,0,0) pixel
New Implementation Dependent State
None.