fglPixelTexGenSGIX man page on IRIX

Man page or keyword search:  
man Server   31559 pages
apropos Keyword Search (all sections)
Output format
IRIX logo
[printable version]



fglPixelTexGenSGIX(3G)	       OpenGL Reference		fglPixelTexGenSGIX(3G)

NAME
     fglPixelTexGenSGIX - affects the generation of texture coordinates from
     pixel groups

FORTRAN SPECIFICATION
     SUBROUTINE fglPixelTexGenSGIX( INTEGER*4 mode )

PARAMETERS
     mode  Specifies a mode of generating texture coordinates from pixel
	   groups.  Must be one of the following:  GL_NONE, GL_RGBA, GL_RGB,
	   GL_ALPHA. GL_PIXEL_TEX_GEN_ALPHA_REPLACE_SGIX,
	   GL_PIXEL_TEX_GEN_ALPHA_NO_REPLACE_SGIX,
	   GL_PIXEL_TEX_GEN_ALPHA_MS_SGIX, or GL_PIXEL_TEX_GEN_ALPHA_LS_SGIX.
	   The default value is GL_NONE.

DESCRIPTION
     The pixel texgen function is enabled by calling fglEnable and disabled by
     calling fglDisable with GL_PIXEL_TEX_GEN_SGIX.  Pixel texgen affects the
     result of the fglDrawPixels and fglCopyPixels commands.  It 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.

     When pixel texgen is enabled, the red, green, blue, and alpha components
     are used to generate s, t, r, and q texture coordinates, respectively. If
     a valid texture has been defined, and texture-mapping enabled, these
     texture coordinates will produce, in effect, a function of the color
     components, which can then be blended with the original color components,
     according to the texture environment blend function.

     Alternatively, this mode command can be used to replace the fragment
     color with the current raster position's color values. For example,
     calling fglPixelTexGenSGIX with GL_ALPHA will cause the fragment alpha to
     be the alpha of the current raster position.

     A useful mode of pixel texture is to have a pixel group with the external
     format GL_RGBA index into a 3D texture, and have the alpha component
     combined with the texel output. In this case the internal format of the
     texture must have alpha, and that alpha can be replaced by the "incoming"
     alpha by calling fglPixelTexGenSGIX with the parameter
     GL_PIXEL_TEX_GEN_ALPHA_REPLACE_SGIX. The "alpha replace" mode can be
     turned off by calling fglPixelTexGenSGIX with the parameter
     GL_PIXEL_TEX_GEN_ALPHA_NO_REPLACE_SGIX, the default.

									Page 1

fglPixelTexGenSGIX(3G)	       OpenGL Reference		fglPixelTexGenSGIX(3G)

     Currently Silicon Graphics machines that support fglPixelTexGenSGIX in
     hardware do not have quad-linear interpolation. So the fourth dimension
     of interpolation, q, defaults to nearest-neighbor mode (the other
     dimensions may still be linear, depending on the fglTexParameter call).

     In order to achieve a true quad-linearly interpolated result, a two-pass
     operation is required, which uses the frame buffer blend for the last
     interpolation. For this purpose special ceiling/floor functions for the q
     dimension have been supplied, which can be referenced in the man pages
     for fglTexParameter. These are

     GL_PIXEL_TEX_GEN_Q_CEILING_SGIX

     GL_PIXEL_TEX_GEN_Q_FLOOR_SGIX

     GL_PIXEL_TEX_GEN_Q_ROUND_SGIX

     On the second pass, use the "alpha replace" mode (described above) to
     combine the incoming alpha with the output (as well as using it in the
     fourth dimensional texture lookup). The original alpha, however, is not
     usable as a fractional interpolation value until it gets left-shifted by
     the number of bits corresponding to the logarithm (base 2) of the q size
     of 4D texture. The alpha can be effectively left-shifted using the
     texture color table. Since the table has limited precision, a mode is
     supplied which will left-shift the alpha by 4 bits before combining it
     with the output. To use it call fglPixelTexGenSGIX with the parameter
     GL_PIXEL_TEX_GEN_ALPHA_LS_SGIX. The default, with no left shift, is
     GL_PIXEL_TEX_GEN_ALPHA_MS_SGIX (MS and LS refer to "most significant" and
     "least significant"). This produces excellent results for 8 and 12 bit
     components, for different texture q sizes.

ERRORS
     GL_INVALID_ENUM is generated when mode is not an accepted defined value.

MACHINE DEPENDENCIES
     fglPixelTexGenSGIX is supported only on High Impact and Maximum Impact
     systems; however, only 3D and 4D textures can be used.

     On High Impact and Maximum Impact systems, the effect of the current
     raster position's color is not taken into account, as if the color is
     white, with full alpha.  Also, the default and only supported mode is
     GL_RGBA, meaning that the fragment color is limited to this constant
     color. Additional functionality is provided in the
     SGIX_impact_pixel_texture extension on High Impact and Maximum Impact
     systems.

     On High Impact and Maximum Impact systems, fglPixelTexGenSGIX for
     fglCopyPixels is not supported.

									Page 2

fglPixelTexGenSGIX(3G)	       OpenGL Reference		fglPixelTexGenSGIX(3G)

SEE ALSO
     fglTexEnv, fglTexImage1D, fglTexImage2D, fglTexImage3DEXT,
     fglTexImage4DSGIS, fglTexParameter

									Page 3

[top]

List of man pages available for IRIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net