aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/enable.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/enable.c')
-rw-r--r--src/mesa/main/enable.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index 52dd63f2cef..ba4972b1674 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -364,6 +364,10 @@ _mesa_set_enable(GLcontext *ctx, GLenum cap, GLboolean state)
case GL_LIGHTING:
if (ctx->Light.Enabled == state)
return;
+ if (ctx->Light.Enabled && ctx->Light.Model.TwoSide)
+ ctx->_TriangleCaps |= DD_TRI_LIGHT_TWOSIDE;
+ else
+ ctx->_TriangleCaps &= ~DD_TRI_LIGHT_TWOSIDE;
FLUSH_VERTICES(ctx, _NEW_LIGHT);
ctx->Light.Enabled = state;
break;
@@ -372,12 +376,14 @@ _mesa_set_enable(GLcontext *ctx, GLenum cap, GLboolean state)
return;
FLUSH_VERTICES(ctx, _NEW_LINE);
ctx->Line.SmoothFlag = state;
+ ctx->_TriangleCaps ^= DD_LINE_SMOOTH;
break;
case GL_LINE_STIPPLE:
if (ctx->Line.StippleFlag == state)
return;
FLUSH_VERTICES(ctx, _NEW_LINE);
ctx->Line.StippleFlag = state;
+ ctx->_TriangleCaps ^= DD_LINE_STIPPLE;
break;
case GL_INDEX_LOGIC_OP:
if (ctx->Color.IndexLogicOpEnabled == state)
@@ -516,18 +522,21 @@ _mesa_set_enable(GLcontext *ctx, GLenum cap, GLboolean state)
return;
FLUSH_VERTICES(ctx, _NEW_POINT);
ctx->Point.SmoothFlag = state;
+ ctx->_TriangleCaps ^= DD_POINT_SMOOTH;
break;
case GL_POLYGON_SMOOTH:
if (ctx->Polygon.SmoothFlag == state)
return;
FLUSH_VERTICES(ctx, _NEW_POLYGON);
ctx->Polygon.SmoothFlag = state;
+ ctx->_TriangleCaps ^= DD_TRI_SMOOTH;
break;
case GL_POLYGON_STIPPLE:
if (ctx->Polygon.StippleFlag == state)
return;
FLUSH_VERTICES(ctx, _NEW_POLYGON);
ctx->Polygon.StippleFlag = state;
+ ctx->_TriangleCaps ^= DD_TRI_STIPPLE;
break;
case GL_POLYGON_OFFSET_POINT:
if (ctx->Polygon.OffsetPoint == state)
@@ -877,6 +886,10 @@ _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