home *** CD-ROM | disk | FTP | other *** search
- Name
-
- SGIX_pixel_texture
-
- Name Strings
-
- GL_SGIX_pixel_texture
-
- Version
-
- $Date: 1996/04/02 00:08:29 $ $Revision: 1.2 $
-
- Number
-
- 15
-
- Dependencies
-
- None
-
- Overview
-
- This extension allows the color components of pixel groups to be used as
- texture coordinates, effectively converting a color image into a texture
- coordinate image. Because texture mapping is essentially a
- multidimensional table lookup, this conversion supports multidimensional
- color lookups for images. Such multidimensional lookups can be used to
- implement very accurate color space conversions.
-
- Issues
-
- * Should LOD be supported?
-
- New Procedures and Functions
-
- void PixelTexGenSGIX(enum mode);
-
- New Tokens
-
- Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
- GetFloatv, and GetDoublev:
-
- PIXEL_TEX_GEN_MODE_SGIX
-
- Additions to Chapter 2 of the 1.0 Specification (OpenGL Operation)
-
- None
-
- Additions to Chapter 3 of the 1.0 Specification (Rasterization)
-
- This extension modifies the "Conversion to Fragments" subsection of
- section 3.6.3 (Rasterization of Pixel Rectangles) of the GL
- Specification. The paragraph beginning with "A fragment arising from a
- group consisting of color data ..." is replaced by the following:
-
- A fragment arising from a group consisting of color index data takes on
- the color index of the group; the depth and texture coordinates are
- taken from the current raster position's associated data. Likewise, a
- fragment arising from a depth component takes the component's depth
- value; the color and texture coordinates are given by those associated
- with the current raster position. Groups arising from DrawPixels with a
- <format> of STENCIL_INDEX are treated specially and are described in
- section 4.3.1.
-
- The treatment of fragments arising from groups consisting of RGBA color
- data is determined by the PIXEL_TEX_GEN_MODE_SGIX value. PixelTexGenSGIX
- is used to set this value to one of NONE, RGB, or RGBA. (It is NONE by
- default.) In all cases a fragment arising from a group consisting of
- RGBA color data takes its depth component from the current raster
- position's associated data. The assignment of color and texture
- coordinate values to such a fragment is defined by the following table:
-
- PIXEL_TEX_GEN_MODE_SGIX PIXEL_TEX_GEN_MODE_SGIX PIXEL_TEX_GEN_MODE_SGIX
- Fragment value is NONE is RGB is RGBA
- -------------- ---------------------- ---------------------- ----------------------
- red pixel group's red CRP's red CRP's red
- green pixel group's green CRP's green CRP's green
- blue pixel group's blue CRP's blue CRP's blue
- alpha pixel group's alpha pixel group's alpha CRP's alpha
-
- S texture coordinate CRP's S texture coordinate pixel group's red pixel group's red
- T texture coordinate CRP's T texture coordinate pixel group's green pixel group's green
- R texture coordinate CRP's R texture coordinate pixel group's blue pixel group's blue
- Q texture coordinate CRP's Q texture coordinate CRP's Q texture coordinate pixel group's alpha
-
- Assignment of pixel group and current raster position associated
- data to a fragment arising from an RGBA color pixel group. CRP is
- an abbreviation of "current raster position". The fragment value in
- the left-most column is assigned the value in the second, third, or
- fourth column, depending on the PixelTexGenSGIX mode value.
-
- When a pixel group color component is assigned to a fragment texture
- coordinate, it is as if that color component had undergone only clamping
- to [0,1] during final conversion, rather than the clamping and scaling
- to framebuffer resolution that is defined by the specification. (See
- the "Final Conversion" subsection that immediately precedes the
- "Conversion to Fragments" subsection.)
-
- Additions to Chapter 4 of the 1.0 Specification (Per-Fragment Operations
- and the Framebuffer)
-
- The operation of PixelTexGenSGIX during pixel copy operations is
- identical to the operation during pixel drawing. Because PixelTexGenSGIX
- defines the rasterization of pixel groups, it has no effect on texture
- definitions or on pixel query (ReadPixels) operations.
-
- 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
-
- Errors
-
- INVALID_OPERATION is generated if PixelTexGenSGIX parameter <mode> is not
- NONE, RGB, or RGBA.
-
- INVALID_OPERATION is generated if PixelTexGenSGIX is called between
- execution of Begin and the corresponding execution of End.
-
- New State
-
- Get Value Get Command Type Initial Value Attrib
- --------- ----------- ---- ------------- ------
- PIXEL_TEX_GEN_MODE_SGIX GetIntegerv Z3 NONE pixel
-
- New Implementation Dependent State
-
- None
-