mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-17 19:00:33 +01:00
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.
This commit is contained in:
parent
07b551f7cf
commit
c32477742f
1 changed files with 6 additions and 1 deletions
|
|
@ -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 ||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue