T
glTexEnv
Chapter 18
429
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. C
c
takes these
four values.
GL_TEXTURE_ENV_MODE defaults to GL_MODULATE and
GL_TEXTURE_ENV_COLOR defaults to (0, 0, 0, 0). GL_TEXTURE_LIGHTING_hp
defaults to GL_TEXTURE_POST_SPECULAR_hp.
Notes
GL_REPLACE may only be used if the GL version is 1.1 or greater.
GL_TEXTURE_LIGHTING_MODE_hp may only be used if the GL_hp_texture_lighting
extension is supported.
Internal formats other than 1, 2, 3, or 4 may only be used if the GL version is 1.1 or
greater.
Errors
• 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
glCopyPixels,
glCopyTexImage1D,
glCopyTexImage2D,
glCopyTexSubImage1D,
GL_RGB
3
C
v
= C
t
C
f
A
v
= A
f
C
v
= C
t
A
v
= A
f
C
v
=(1-C
t
)
C
f
+ C
t
C
c
A
v
= A
f
C
v
= C
t
A
v
= A
f
GL_RGBA
4
C
v
= C
t
C
f
A
v
= A
t
A
f
C
v
= (1 - A
t
)
C
f
+At C
t
A
v
= A
f
C
v
= (1 - C
t
)
C
f
+ C
t
C
c
A
v
= A
t
A
f
C
v
= C
t
A
v
= A
t
Base Internal Format
Texture Functions
GL_MODULATE GL_DECAL GL_BLEND GL_REPLACE