From a96308c37db0bc0086a017d318bc3504aa5f0b1a Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Mon, 30 Oct 2000 13:31:59 +0000 Subject: 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. --- src/mesa/main/eval.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/mesa/main/eval.c') diff --git a/src/mesa/main/eval.c b/src/mesa/main/eval.c index 658fa0cbd6..1c779eb5e3 100644 --- a/src/mesa/main/eval.c +++ b/src/mesa/main/eval.c @@ -1,4 +1,4 @@ -/* $Id: eval.c,v 1.13 2000/10/29 18:12:15 brianp Exp $ */ +/* $Id: eval.c,v 1.14 2000/10/30 13:32:00 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -938,6 +938,8 @@ map1(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, default: gl_error( ctx, GL_INVALID_ENUM, "glMap1(target)" ); } + + ctx->NewState |= _NEW_EVAL; } @@ -1132,6 +1134,8 @@ map2( GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, default: gl_error( ctx, GL_INVALID_ENUM, "glMap2(target)" ); } + + ctx->NewState |= _NEW_EVAL; } @@ -2642,6 +2646,8 @@ _mesa_MapGrid1f( GLint un, GLfloat u1, GLfloat u2 ) ctx->Eval.MapGrid1u1 = u1; ctx->Eval.MapGrid1u2 = u2; ctx->Eval.MapGrid1du = (u2 - u1) / (GLfloat) un; + + ctx->NewState |= _NEW_EVAL; } @@ -2674,6 +2680,8 @@ _mesa_MapGrid2f( GLint un, GLfloat u1, GLfloat u2, ctx->Eval.MapGrid2v1 = v1; ctx->Eval.MapGrid2v2 = v2; ctx->Eval.MapGrid2dv = (v2 - v1) / (GLfloat) vn; + + ctx->NewState |= _NEW_EVAL; } @@ -2686,7 +2694,6 @@ _mesa_MapGrid2d( GLint un, GLdouble u1, GLdouble u2, - /* KW: If are compiling, we don't know whether eval will produce a * vertex when it is run in the future. If this is pure immediate * mode, eval is a noop if neither vertex map is enabled. @@ -2853,7 +2860,6 @@ _mesa_EvalPoint2( GLint i, GLint j ) - void _mesa_EvalMesh1( GLenum mode, GLint i1, GLint i2 ) { -- cgit v1.2.3