diff options
author | Keith Whitwell <[email protected]> | 2000-10-30 13:31:59 +0000 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2000-10-30 13:31:59 +0000 |
commit | a96308c37db0bc0086a017d318bc3504aa5f0b1a (patch) | |
tree | 0010de3aa19901acf13b57e57e7ba465abffa95e /src/mesa/main/eval.c | |
parent | a4575499679d9d91055a35c7673b81872ec127cb (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/eval.c')
-rw-r--r-- | src/mesa/main/eval.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/mesa/main/eval.c b/src/mesa/main/eval.c index 658fa0cbd6f..1c779eb5e32 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 ) { |