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/drivers/x11/xm_api.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'src/mesa/drivers/x11/xm_api.c') diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c index 4434fbfa2b..b8ba18316a 100644 --- a/src/mesa/drivers/x11/xm_api.c +++ b/src/mesa/drivers/x11/xm_api.c @@ -1,4 +1,4 @@ -/* $Id: xm_api.c,v 1.3 2000/10/30 08:39:38 joukj Exp $ */ +/* $Id: xm_api.c,v 1.4 2000/10/30 13:32:03 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -1655,6 +1655,22 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list ) c->gl_ctx->Driver.UpdateState = xmesa_update_state; + /* These flags cover all the tests made in UpdateState, plus what + * the software rasterizer needs to choose line,point and triangle + * functions. + */ + c->gl_ctx->Driver.UpdateStateNotify = (_NEW_POINT| + _NEW_TEXTURE| + _NEW_LINE| + _NEW_LIGHT| + _NEW_DEPTH| + _NEW_POLYGON| + _NEW_TEXTURE| + _SWRAST_NEW_RASTERMASK| + _SWRAST_NEW_TRIANGLE| + _SWRAST_NEW_LINE| + _SWRAST_NEW_POINT); + #if defined(GLX_DIRECT_RENDERING) && !defined(XFree86Server) c->driContextPriv = driContextPriv; #endif -- cgit v1.2.3