summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texstate.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2002-03-23 16:33:53 +0000
committerBrian Paul <[email protected]>2002-03-23 16:33:53 +0000
commit636b2801d981872d3111be0cd11aa79b4cc8643b (patch)
treeab7122796a842806af56f5059db5c28ba8c80ca9 /src/mesa/main/texstate.c
parent25b85bf02a7b8c0c689b7505a1e4dae7f445a8f2 (diff)
Test implementation of proposed GL_EXT_shadow_funcs extension. This just
generalizes the R/texture comparision operators to include all eight of the depth test comparisons.
Diffstat (limited to 'src/mesa/main/texstate.c')
-rw-r--r--src/mesa/main/texstate.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c
index 373cfdcce2f..3eadc53e735 100644
--- a/src/mesa/main/texstate.c
+++ b/src/mesa/main/texstate.c
@@ -1,4 +1,4 @@
-/* $Id: texstate.c,v 1.65 2002/03/23 01:48:18 brianp Exp $ */
+/* $Id: texstate.c,v 1.66 2002/03/23 16:33:53 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -1125,6 +1125,16 @@ _mesa_TexParameterfv( GLenum target, GLenum pname, const GLfloat *params )
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
texObj->CompareFunc = params[0];
}
+ else if (ctx->Extensions.EXT_shadow_funcs &&
+ (func == GL_EQUAL ||
+ func == GL_NOTEQUAL ||
+ func == GL_LESS ||
+ func == GL_GREATER ||
+ func == GL_ALWAYS ||
+ func == GL_NEVER)) {
+ FLUSH_VERTICES(ctx, _NEW_TEXTURE);
+ texObj->CompareFunc = params[0];
+ }
else {
_mesa_error(ctx, GL_INVALID_ENUM,
"glTexParameter(bad GL_TEXTURE_COMPARE_FUNC_ARB)");