added DD_TRI_TWOSTENCIL to ease EXT_stencil_two_side in device drivers
authorDaniel Borca <dborca@users.sourceforge.net>
Fri, 12 Nov 2004 10:23:10 +0000 (10:23 +0000)
committerDaniel Borca <dborca@users.sourceforge.net>
Fri, 12 Nov 2004 10:23:10 +0000 (10:23 +0000)
src/mesa/main/debug.c
src/mesa/main/enable.c
src/mesa/main/mtypes.h

index 7ce6cceed8f70485f080fea674840f0020213327..6c6bfea8e55231d4853913b087355bae24435423 100644 (file)
@@ -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, " : "",
index 8d244e02e5b936f123f5fd48ec1f1e11de643636..f1ed98d4bb145a92e81d2720be3310da26467f94 100644 (file)
@@ -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
index 5626fe6fcf3f46df715ec311047bb92fe97ad9f6..739ec5f15bdc94c237d4f0300e9334cabfdedee8 100644 (file)
@@ -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
 /*@}*/