summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-04-30 16:05:01 -0600
committerBrian Paul <[email protected]>2008-04-30 16:08:19 -0600
commitc32477742facd06c22befcd300e9fdfeafb6995b (patch)
tree7da75cb3e38145bf796c6cf743413bcd1c994643 /src/mesa
parent07b551f7cfc02cb16225298414b145b306b360b4 (diff)
Add support for GL_REPLACE_EXT texture env mode.
GL_REPLACE_EXT comes from the ancient GL_EXT_texture extension. Found an old demo that actually uses it. The values of the GL_REPLACE and GL_REPLACE_EXT tokens is different, unfortunately.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/texstate.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c
index cb7da39b512..84acfbd92cb 100644
--- a/src/mesa/main/texstate.c
+++ b/src/mesa/main/texstate.c
@@ -238,6 +238,9 @@ calculate_derived_texenv( struct gl_tex_env_combine_state *state,
return;
}
+ if (mode == GL_REPLACE_EXT)
+ mode = GL_REPLACE;
+
switch (mode) {
case GL_REPLACE:
case GL_MODULATE:
@@ -340,7 +343,9 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param )
switch (pname) {
case GL_TEXTURE_ENV_MODE:
{
- const GLenum mode = (GLenum) (GLint) *param;
+ GLenum mode = (GLenum) (GLint) *param;
+ if (mode == GL_REPLACE_EXT)
+ mode = GL_REPLACE;
if (texUnit->EnvMode == mode)
return;
if (mode == GL_MODULATE ||