diff options
author | Brian Paul <[email protected]> | 2002-03-23 16:33:53 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2002-03-23 16:33:53 +0000 |
commit | 636b2801d981872d3111be0cd11aa79b4cc8643b (patch) | |
tree | ab7122796a842806af56f5059db5c28ba8c80ca9 /src/mesa/main | |
parent | 25b85bf02a7b8c0c689b7505a1e4dae7f445a8f2 (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')
-rw-r--r-- | src/mesa/main/extensions.c | 4 | ||||
-rw-r--r-- | src/mesa/main/mtypes.h | 3 | ||||
-rw-r--r-- | src/mesa/main/texstate.c | 12 |
3 files changed, 16 insertions, 3 deletions
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c index 9f0542395c8..f9cdf071681 100644 --- a/src/mesa/main/extensions.c +++ b/src/mesa/main/extensions.c @@ -1,4 +1,4 @@ -/* $Id: extensions.c,v 1.70 2002/03/13 04:33:16 brianp Exp $ */ +/* $Id: extensions.c,v 1.71 2002/03/23 16:33:53 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -90,6 +90,7 @@ static struct { { ON, "GL_EXT_polygon_offset", F(EXT_polygon_offset) }, { ON, "GL_EXT_rescale_normal", F(EXT_rescale_normal) }, { OFF, "GL_EXT_secondary_color", F(EXT_secondary_color) }, + { OFF, "GL_EXT_shadow_funcs", F(EXT_shadow_funcs) }, { OFF, "GL_EXT_shared_texture_palette", F(EXT_shared_texture_palette) }, { OFF, "GL_EXT_stencil_wrap", F(EXT_stencil_wrap) }, { ON, "GL_EXT_texture3D", F(EXT_texture3D) }, @@ -159,6 +160,7 @@ _mesa_enable_sw_extensions(GLcontext *ctx) "GL_EXT_histogram", "GL_EXT_paletted_texture", "GL_EXT_point_parameters", + "GL_EXT_shadow_funcs", "GL_EXT_secondary_color", "GL_EXT_shared_texture_palette", "GL_EXT_stencil_wrap", diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 807a7b24ccd..a47b472c280 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -1,4 +1,4 @@ -/* $Id: mtypes.h,v 1.67 2002/03/16 00:53:15 brianp Exp $ */ +/* $Id: mtypes.h,v 1.68 2002/03/23 16:33:53 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -1408,6 +1408,7 @@ struct gl_extensions { GLboolean EXT_point_parameters; GLboolean EXT_polygon_offset; GLboolean EXT_rescale_normal; + GLboolean EXT_shadow_funcs; GLboolean EXT_secondary_color; GLboolean EXT_shared_texture_palette; GLboolean EXT_stencil_wrap; 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)"); |