Documentation
From my personal library, The Internet

man page:




C SPECIFICATION

       void glTexEnvf( GLenum target,
                       GLenum pname,
                       GLfloat param )
       void glTexEnvi( GLenum target,
                       GLenum pname,
                       GLint param )



PARAMETERS

       target  Specifies a texture environment.  Must be GL_TEXTURE_ENV.

       pname   Specifies the symbolic name of a single-valued texture environ-
               ment parameter.  Must be GL_TEXTURE_ENV_MODE.

       param   Specifies  a  single  symbolic  constant,  one  of GL_MODULATE,
               GL_DECAL, GL_BLEND, or GL_REPLACE.


C SPECIFICATION

       void glTexEnvfv( GLenum target,
                        GLenum pname,
                        const GLfloat *params )
       void glTexEnviv( GLenum target,
                        GLenum pname,
                        const GLint *params )



PARAMETERS

       target Specifies a texture environment.  Must be GL_TEXTURE_ENV.

       pname  Specifies the symbolic name of a texture environment  parameter.
              Accepted       values      are      GL_TEXTURE_ENV_MODE      and
              GL_TEXTURE_ENV_COLOR.

       params Specifies a pointer to a parameter array that contains either  a
              single symbolic constant or an RGBA color.


DESCRIPTION

       A texture environment specifies how texture values are interpreted when
       a fragment is textured.  target must be GL_TEXTURE_ENV.  pname  can  be
       either GL_TEXTURE_ENV_MODE or GL_TEXTURE_ENV_COLOR.

       If pname is GL_TEXTURE_ENV_MODE, then params is (or points to) the sym-
       bolic name of a texture function.  Four texture functions may be speci-
       fied: GL_MODULATE, GL_DECAL, GL_BLEND, and GL_REPLACE.

       A  texture  function acts on the fragment to be textured using the tex-
       ture image value that applies to the fragment (see glTexParameter)  and
       produces  an  RGBA  color for that fragment.  The following table shows
       how the RGBA color is produced for each of the three texture  functions

        +---------------+--------------+---------------+
        | Base Internal |  GL_REPLACE  | GL_MODULATE   |
        |     Format    |              |               |
        +---------------+--------------+---------------+
        | GL_ALPHA      |C=Cf          |C=Cf           |
        |               |A=At          |A=Af At        |
        +---------------+--------------+---------------+
        | GL_LUMINANCE  |C=Lt          |C=CfLt         |
        |               |A=Af          |A=Af           |
        +---------------+--------------+---------------+
        | GL_LUMINANCE_ |C=Lt          |C=CfLt         |
        | ALPHA         |A=At          |A=AfAt         |
        +---------------+--------------+---------------+
        | GL_INTENSITY  |C=It          |C=CfIt         |
        |               |A=It          |A=AfIt         |
        +---------------+--------------+---------------+
        | GL_RGB        |C=Ct          |C=CfCt         |
        |               |A=Af          |A=Af           |
        +---------------+--------------+---------------+
        | GL_RGBA       |C=Ct          |C=CfCt         |
        |               |A=At          |A=AfAt         |
        +---------------+--------------+---------------+


        +---------------+--------------+---------------+
        | Base Internal |   GL_DECAL   |   GL_BLEND    |
        |     Format    |              |               |
        +---------------+--------------+---------------+
        | GL_ALPHA      |undefined     |C=Cf           |
        |               |              |A=AfAt         |
        +---------------+--------------+---------------+
        | GL_LUMINANCE  |undefined     |C=Cf(1-Lt) +   |
        |               |              |CcLt           |
        |               |              |A=Af           |
        +---------------+--------------+---------------+
        | GL_LUMINANCE_ |undefined     |C=Cf(1-Lt) +   |
        | ALPHA         |              |CcLt           |
        |               |              |A=AfAt         |
        +---------------+--------------+---------------+
        | GL_INTENSITY  |undefined     |C=Cf(1-It) +   |
        |               |              |CcIt           |
        |               |              |A=Af(1-It) +   |
        |               |              |AcIt           |
        +---------------+--------------+---------------+
        | GL_RGB        |C=Ct          |C=Cf(1-Ct) +   |
        |               |A=Af          |CcCt           |
        |               |              |A=Af           |
        +---------------+--------------+---------------+
        | GL_RGBA       |C=C(1-At) +   |C=Cf(1-Ct) +   |
        |               |CtAt          |CcCt           |
        |               |A=Af          |A=AfAt         |

       Internal  formats  other  than 1, 2, 3, or 4 may only be used if the GL
       version is 1.1 or greater.

       When the GL_ARB_multitexture extension is supported, glTexEnv  controls
       the  texture  environment for the current active texture unit, selected
       by glActiveTextureARB.  GL_INVALID_ENUM is  generated  when  target  or
       pname  is not one of the accepted defined values, or when params should
       have a defined constant value (based on the value of  pname)  and  does
       not.

       GL_INVALID_OPERATION  is  generated if glTexEnv is executed between the
       execution of glBegin and the corresponding execution of glEnd.


ASSOCIATED GETS

       glGetTexEnv


SEE ALSO

       glActiveTextureARB, glCopyPixels,  glCopyTexImage1D,  glCopyTexImage2D,
       glCopyTexSubImage1D,      glCopyTexSubImage2D,     glCopyTexSubImage3D,
       glTexImage1D,     glTexImage2D,      glTexImage3D,      glTexParameter,
       glTexSubImage1D, glTexSubImage2D, glTexSubImage3D




                                                                  GLTEXENV(3G)

Man(1) output converted with man2html