diff options
author | Brian Paul <[email protected]> | 2001-03-22 04:54:58 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2001-03-22 04:54:58 +0000 |
commit | 1a59875367b4e38710b37422143efb702b0b1420 (patch) | |
tree | c11419a3105822a6587bed95918dd5e1eac28523 /src/mesa/main | |
parent | e9313a64c182701d22a5c6d2a82863c658e7424f (diff) |
added GL_ARB_texture_env_combine, GL_ARB_texture_env_dot3
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/extensions.c | 4 | ||||
-rw-r--r-- | src/mesa/main/texstate.c | 16 |
2 files changed, 18 insertions, 2 deletions
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c index 6a7d25fe201..e3b9592b89e 100644 --- a/src/mesa/main/extensions.c +++ b/src/mesa/main/extensions.c @@ -1,4 +1,4 @@ -/* $Id: extensions.c,v 1.53 2001/03/18 08:53:49 gareth Exp $ */ +/* $Id: extensions.c,v 1.54 2001/03/22 04:54:58 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -61,6 +61,8 @@ static struct { { OFF, "GL_ARB_texture_compression", F(ARB_texture_compression) }, { OFF, "GL_ARB_texture_cube_map", F(ARB_texture_cube_map) }, { OFF, "GL_ARB_texture_env_add", F(EXT_texture_env_add) }, + { OFF, "GL_ARB_texture_env_combine", F(EXT_texture_env_combine) }, + { OFF, "GL_ARB_texture_env_dot3", F(EXT_texture_env_dot3) }, { ON, "GL_ARB_tranpose_matrix", 0 }, { ON, "GL_EXT_abgr", 0 }, { ON, "GL_EXT_bgra", 0 }, diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c index 1a6a42a85c9..438ba6f142f 100644 --- a/src/mesa/main/texstate.c +++ b/src/mesa/main/texstate.c @@ -1,4 +1,4 @@ -/* $Id: texstate.c,v 1.37 2001/03/18 08:53:50 gareth Exp $ */ +/* $Id: texstate.c,v 1.38 2001/03/22 04:54:58 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -55,6 +55,14 @@ #endif +/* XXX this is temporary, until GL/glext.h is updated. */ +#ifndef GL_DOT3_RGB_ARB +#define GL_DOT3_RGB_ARB 0x86AE +#endif +#ifndef GL_DOT3_RGBA_ARB +#define GL_DOT3_RGBA_ARB 0x86AF +#endif + /**********************************************************************/ @@ -127,6 +135,8 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param ) break; case GL_DOT3_RGB_EXT: case GL_DOT3_RGBA_EXT: + case GL_DOT3_RGB_ARB: + case GL_DOT3_RGBA_ARB: if (!ctx->Extensions.EXT_texture_env_dot3) { _mesa_error(ctx, GL_INVALID_ENUM, "glTexEnv(param)"); return; @@ -272,7 +282,10 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param ) if (ctx->Extensions.EXT_texture_env_combine) { GLenum operand = (GLenum) (GLint) *param; switch (operand) { + case GL_SRC_COLOR: /* ARB combine only */ + case GL_ONE_MINUS_SRC_COLOR: /* ARB combine only */ case GL_SRC_ALPHA: + case GL_ONE_MINUS_SRC_ALPHA: /* ARB combine only */ if (texUnit->CombineOperandRGB[2] == operand) return; FLUSH_VERTICES(ctx, _NEW_TEXTURE); @@ -292,6 +305,7 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param ) GLenum operand = (GLenum) (GLint) *param; switch (operand) { case GL_SRC_ALPHA: + case GL_ONE_MINUS_SRC_ALPHA: /* ARB combine only */ if (texUnit->CombineOperandA[2] == operand) return; FLUSH_VERTICES(ctx, _NEW_TEXTURE); |