void GLAPIENTRY glTexEnvf( GLenum target,
                                  GLenum pname,
                                  GLfloat param )
       void GLAPIENTRY 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 GLAPIENTRY glTexEnvfv( GLenum target,
                                   GLenum pname,
                                   const GLfloat *params )
       void GLAPIENTRY 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 texture
       image  value  that applies to the fragment (see glTexParameter) and pro‐
       duces an RGBA color for that fragment.  The following  table  shows  how
       the  RGBA color is produced for each of the three texture functions that
       can be chosen.  C is a triple of color values (RGB) and A is the associ‐
       ated alpha value.  RGBA values extracted from a texture image are in the
       range [0,1].  The subscript f refers to the incoming fragment, the  sub‐
       script  t  to the texture image, the subscript c to the texture environ‐
       ment color, and subscript v indicates a value produced  by  the  texture
       function.
        ──────────────────────────────────────────────────────────────────────
        GL_LUMINANCE      Cv=LtCf      undefined    Cv=(1−Lt)Cf      Cv=Lt
                                                       +LtCc
              1            Av=Af                        Av=Af        Av=Af
        ──────────────────────────────────────────────────────────────────────
        GL_LUMINANCE      Cv=LtCf      undefined    Cv=(1−Lt)Cf      Cv=Lt
          \f3_ALPHA                                     +LtCc
              2           Av=AtAf                     Av=AtAf        Av=At
        ──────────────────────────────────────────────────────────────────────
        GL_INTENSITY      Cv=CfIt      undefined    Cv=(1−It)Cf      Cv=It
                                                       +ItCc
             c            Av=AfIt                   Av=(1−It)Af      Av=It
                                                       +ItAc
        ──────────────────────────────────────────────────────────────────────
           GL_RGB         Cv=CtCf        Cv=Ct      Cv=(1−Ct)Cf      Cv=Ct
                                                        +CtCc
              3            Av=Af         Av=Af         Av=Af         Av=Af
        ──────────────────────────────────────────────────────────────────────
           GL_RGBA        Cv=CtCf     Cv=(1−At)Cf   Cv=(1−Ct)Cf      Cv=Ct
                                         +AtCt          +CtCc
              4           Av=AtAf        Av=Af        Av=AtAf        Av=At
        ──────────────────────────────────────────────────────────────────────
       If pname is GL_TEXTURE_ENV_COLOR, params is a pointer to an  array  that
       holds an RGBA color consisting of four values.  Integer color components
       are interpreted linearly such that the most  positive  integer  maps  to
       1.0, and the most negative integer maps to -1.0.  The values are clamped
       to the range [0,1] when they are specified.  Cc takes these four values.

       GL_TEXTURE_ENV_MODE defaults to GL_MODULATE and GL_TEXTURE_ENV_COLOR de‐
       faults to (0, 0, 0, 0).

NOTES
       GL_REPLACE may only be used if the GL version is 1.1 or greater.

       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,

Man(1) output converted with man2html