diff options
author | Daniel Borca <[email protected]> | 2004-11-12 10:23:10 +0000 |
---|---|---|
committer | Daniel Borca <[email protected]> | 2004-11-12 10:23:10 +0000 |
commit | 885f10706a096037eea815803dbf4b4d28c3bd27 (patch) | |
tree | c5af8ac686584af75a5f272fb09f5fec4df2a530 /src | |
parent | f37383c1c6a9cf83c556f2131fab1adef0efc17e (diff) |
added DD_TRI_TWOSTENCIL to ease EXT_stencil_two_side in device drivers
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/debug.c | 3 | ||||
-rw-r--r-- | src/mesa/main/enable.c | 5 | ||||
-rw-r--r-- | src/mesa/main/mtypes.h | 1 |
3 files changed, 8 insertions, 1 deletions
diff --git a/src/mesa/main/debug.c b/src/mesa/main/debug.c index 7ce6cceed8f..6c6bfea8e55 100644 --- a/src/mesa/main/debug.c +++ b/src/mesa/main/debug.c @@ -86,12 +86,13 @@ void _mesa_print_tri_caps( const char *name, GLuint flags ) { _mesa_debug(NULL, - "%s: (0x%x) %s%s%s%s%s%s%s%s%s%s%s%s%s%s\n", + "%s: (0x%x) %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n", name, flags, (flags & DD_FLATSHADE) ? "flat-shade, " : "", (flags & DD_SEPARATE_SPECULAR) ? "separate-specular, " : "", (flags & DD_TRI_LIGHT_TWOSIDE) ? "tri-light-twoside, " : "", + (flags & DD_TRI_TWOSTENCIL) ? "tri-twostencil, " : "", (flags & DD_TRI_UNFILLED) ? "tri-unfilled, " : "", (flags & DD_TRI_STIPPLE) ? "tri-stipple, " : "", (flags & DD_TRI_OFFSET) ? "tri-offset, " : "", diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index 8d244e02e5b..f1ed98d4bb1 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -955,6 +955,11 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state ) return; FLUSH_VERTICES(ctx, _NEW_STENCIL); ctx->Stencil.TestTwoSide = state; + if (state) { + ctx->_TriangleCaps |= DD_TRI_TWOSTENCIL; + } else { + ctx->_TriangleCaps &= ~DD_TRI_TWOSTENCIL; + } break; #if FEATURE_ARB_fragment_program diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 5626fe6fcf3..739ec5f15bd 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2179,6 +2179,7 @@ struct matrix_stack #define DD_POINT_SMOOTH 0x800 #define DD_POINT_SIZE 0x1000 #define DD_POINT_ATTEN 0x2000 +#define DD_TRI_TWOSTENCIL 0x4000 /*@}*/ |