summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/context.c
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2000-10-30 13:31:59 +0000
committerKeith Whitwell <[email protected]>2000-10-30 13:31:59 +0000
commita96308c37db0bc0086a017d318bc3504aa5f0b1a (patch)
tree0010de3aa19901acf13b57e57e7ba465abffa95e /src/mesa/main/context.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/context.c')
-rw-r--r--src/mesa/main/context.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 6f46041887a..3268f55070c 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -1,4 +1,4 @@
-/* $Id: context.c,v 1.98 2000/10/29 19:02:23 brianp Exp $ */
+/* $Id: context.c,v 1.99 2000/10/30 13:32:00 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -825,8 +825,6 @@ init_attrib_groups( GLcontext *ctx )
gl_matrix_alloc_inv( &ctx->ProjectionMatrix );
gl_matrix_ctr( &ctx->ModelProjectMatrix );
- gl_matrix_ctr( &ctx->ModelProjectWinMatrix );
- ctx->ModelProjectWinMatrixUptodate = GL_FALSE;
ctx->ProjectionStackDepth = 0;
ctx->NearFarStack[0][0] = 1.0; /* These values seem weird by make */
@@ -1338,7 +1336,7 @@ init_attrib_groups( GLcontext *ctx )
_mesa_init_colortable(&ctx->ProxyPostColorMatrixColorTable);
/* Miscellaneous */
- ctx->NewState = NEW_ALL;
+ ctx->NewState = _NEW_ALL;
ctx->RenderMode = GL_RENDER;
ctx->StippleCounter = 0;
ctx->NeedNormals = GL_FALSE;
@@ -1836,6 +1834,9 @@ _mesa_copy_context( const GLcontext *src, GLcontext *dst, GLuint mask )
if (mask & GL_VIEWPORT_BIT) {
MEMCPY( &dst->Viewport, &src->Viewport, sizeof(struct gl_viewport_attrib) );
}
+ /* XXX FIXME: Call callbacks?
+ */
+ dst->NewState = _NEW_ALL;
}
@@ -1896,7 +1897,7 @@ _mesa_make_current2( GLcontext *newCtx, GLframebuffer *drawBuffer,
/* TODO: check if newCtx and buffer's visual match??? */
newCtx->DrawBuffer = drawBuffer;
newCtx->ReadBuffer = readBuffer;
- newCtx->NewState = NEW_ALL; /* just to be safe */
+ newCtx->NewState |= _NEW_BUFFERS;
gl_update_state( newCtx );
}