summaryrefslogtreecommitdiff
path: root/src/mesa/main/polygon.c
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2000-10-30 13:31:59 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2000-10-30 13:31:59 +0000
commita96308c37db0bc0086a017d318bc3504aa5f0b1a (patch)
tree0010de3aa19901acf13b57e57e7ba465abffa95e /src/mesa/main/polygon.c
parenta4575499679d9d91055a35c7673b81872ec127cb (diff)
Replace the flags Mesa was using for ctx->NewState with a new set
based on the GL attribute groups. Introduced constants describing the circumstances under which some key derived values can change: _SWRAST_NEW_RASTERMASK -- ctx->RasterMask _SWRAST_NEW_TRIANGLE -- The software rasterizer's triangle function _DD_NEW_FEEDBACK -- the 'DD_FEEDBACK' bit in ctx->TriangleCaps These are helpful in deciding whether you need to recalculate state if your recalculation involves reference to a derived value.
Diffstat (limited to 'src/mesa/main/polygon.c')
-rw-r--r--src/mesa/main/polygon.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/mesa/main/polygon.c b/src/mesa/main/polygon.c
index c96d3355b32..b4a7172dbd5 100644
--- a/src/mesa/main/polygon.c
+++ b/src/mesa/main/polygon.c
@@ -1,4 +1,4 @@
-/* $Id: polygon.c,v 1.13 2000/10/21 00:02:47 brianp Exp $ */
+/* $Id: polygon.c,v 1.14 2000/10/30 13:32:01 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -55,7 +55,7 @@ _mesa_CullFace( GLenum mode )
}
ctx->Polygon.CullFaceMode = mode;
- ctx->NewState |= NEW_POLYGON;
+ ctx->NewState |= _NEW_POLYGON;
if (ctx->Driver.CullFace)
ctx->Driver.CullFace( ctx, mode );
@@ -79,7 +79,7 @@ _mesa_FrontFace( GLenum mode )
ctx->Polygon.FrontFace = mode;
ctx->Polygon.FrontBit = (GLboolean) (mode == GL_CW);
- ctx->NewState |= NEW_POLYGON;
+ ctx->NewState |= _NEW_POLYGON;
if (ctx->Driver.FrontFace)
ctx->Driver.FrontFace( ctx, mode );
@@ -123,7 +123,7 @@ _mesa_PolygonMode( GLenum face, GLenum mode )
ctx->TriangleCaps |= DD_TRI_UNFILLED;
}
- ctx->NewState |= (NEW_POLYGON | NEW_RASTER_OPS);
+ ctx->NewState |= _NEW_POLYGON;
if (ctx->Driver.PolygonMode) {
(*ctx->Driver.PolygonMode)( ctx, face, mode );
@@ -143,9 +143,7 @@ _mesa_PolygonStipple( const GLubyte *pattern )
_mesa_unpack_polygon_stipple(pattern, ctx->PolygonStipple, &ctx->Unpack);
- if (ctx->Polygon.StippleFlag) {
- ctx->NewState |= NEW_RASTER_OPS;
- }
+ ctx->NewState |= _NEW_POLYGONSTIPPLE;
if (ctx->Driver.PolygonStipple)
ctx->Driver.PolygonStipple( ctx, (const GLubyte *) ctx->PolygonStipple );
@@ -179,6 +177,7 @@ _mesa_PolygonOffset( GLfloat factor, GLfloat units )
ctx->Polygon.OffsetFactor = factor;
ctx->Polygon.OffsetUnits = units;
ctx->Polygon.OffsetMRD = units * ctx->Visual.MRD;
+ ctx->NewState |= _NEW_POLYGON;
}