summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texstate.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2001-02-20 16:42:25 +0000
committerBrian Paul <[email protected]>2001-02-20 16:42:25 +0000
commitc499ce31baf820e84d133c2189f88e15a1a36672 (patch)
tree5fa0cc1d10f0e54703c7a0ceb55fcb4aa81c74e3 /src/mesa/main/texstate.c
parent0c75c4c41754a4f66cdc124b4328e92635b473fe (diff)
Implemented GL_SGIX_shadow and GL_SGIX_shadow_texture.
Added some const keywords in the s/w texturing code.
Diffstat (limited to 'src/mesa/main/texstate.c')
-rw-r--r--src/mesa/main/texstate.c32
1 files changed, 30 insertions, 2 deletions
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c
index f55cb5452a0..607f3b77dcf 100644
--- a/src/mesa/main/texstate.c
+++ b/src/mesa/main/texstate.c
@@ -1,4 +1,4 @@
-/* $Id: texstate.c,v 1.32 2001/02/17 18:41:01 brianp Exp $ */
+/* $Id: texstate.c,v 1.33 2001/02/20 16:42:25 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -784,7 +784,7 @@ _mesa_TexParameterfv( GLenum target, GLenum pname, const GLfloat *params )
GLenum op = (GLenum) params[0];
if (op == GL_TEXTURE_LEQUAL_R_SGIX ||
op == GL_TEXTURE_GEQUAL_R_SGIX) {
- texObj->CompareFlag = (GLenum) op;
+ texObj->CompareOperator = op;
}
else {
gl_error(ctx, GL_INVALID_ENUM, "glTexParameter(param)");
@@ -795,6 +795,15 @@ _mesa_TexParameterfv( GLenum target, GLenum pname, const GLfloat *params )
return;
}
break;
+ case GL_SHADOW_AMBIENT_SGIX:
+ if (ctx->Extensions.SGIX_shadow_ambient) {
+ UNCLAMPED_FLOAT_TO_CHAN(texObj->ShadowAmbient, params[0]);
+ }
+ else {
+ gl_error(ctx, GL_INVALID_ENUM, "glTexParameter(pname)");
+ return;
+ }
+ break;
default:
gl_error( ctx, GL_INVALID_ENUM, "glTexParameter(pname)" );
return;
@@ -1064,6 +1073,15 @@ _mesa_GetTexParameterfv( GLenum target, GLenum pname, GLfloat *params )
return;
}
break;
+ case GL_SHADOW_AMBIENT_SGIX:
+ if (ctx->Extensions.SGIX_shadow_ambient) {
+ *params = CHAN_TO_FLOAT(obj->ShadowAmbient);
+ }
+ else {
+ gl_error(ctx, GL_INVALID_ENUM, "glGetTexParameterfv(pname)");
+ return;
+ }
+ break;
default:
gl_error( ctx, GL_INVALID_ENUM, "glGetTexParameterfv(pname)" );
}
@@ -1156,6 +1174,16 @@ _mesa_GetTexParameteriv( GLenum target, GLenum pname, GLint *params )
return;
}
break;
+ case GL_SHADOW_AMBIENT_SGIX:
+ if (ctx->Extensions.SGIX_shadow_ambient) {
+ /* XXX range? */
+ *params = CHAN_TO_FLOAT(obj->ShadowAmbient);
+ }
+ else {
+ gl_error(ctx, GL_INVALID_ENUM, "glGetTexParameteriv(pname)");
+ return;
+ }
+ break;
default:
gl_error( ctx, GL_INVALID_ENUM, "glGetTexParameteriv(pname)" );
}