diff options
author | Brian Paul <[email protected]> | 2008-04-30 16:05:01 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2008-04-30 16:07:33 -0600 |
commit | 5f0fa82f68e3f4f7086ed6cf5616ef94820e19ee (patch) | |
tree | 8db704f7b1b09806a4f7adcaa4519c5b4aae630f /src/mesa | |
parent | 7154d661a667681828efb75b3547c97484455d9e (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.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c index 288b334eaf6..626c2648631 100644 --- a/src/mesa/main/texstate.c +++ b/src/mesa/main/texstate.c @@ -213,6 +213,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: @@ -315,7 +318,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 || |