From 23caf20169ac38436ee9c13914f1d6aa7cf6bb5e Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Thu, 16 Nov 2000 21:05:34 +0000 Subject: Move the transform and lighting code to two new directories math: Provides basic matrix and vector functionality that might be useful to multiple software t&l implementations, and is used by core mesa to manage the Model, Project, etc matrices. tnl: The real transform & lighting code from core mesa, including everything from glVertex3f through vertex buffer handling, transformation, clipping, lighting and handoff to a driver for rasterization. The interfaces of these can be further tightened up, but the basic splitting up of state and code move is done. --- src/mesa/drivers/osmesa/osmesa.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/mesa/drivers/osmesa') diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c index 39d256a77f..74850556a7 100644 --- a/src/mesa/drivers/osmesa/osmesa.c +++ b/src/mesa/drivers/osmesa/osmesa.c @@ -1,4 +1,4 @@ -/* $Id: osmesa.c,v 1.30 2000/11/14 17:50:07 brianp Exp $ */ +/* $Id: osmesa.c,v 1.31 2000/11/16 21:05:38 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -311,11 +311,11 @@ OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits, { GLcontext *ctx = &osmesa->gl_ctx; + ctx->Driver.RegisterVB = _swsetup_RegisterVB; + _swrast_CreateContext( ctx ); _swsetup_CreateContext( ctx ); - - if (ctx->VB) - _swsetup_RegisterVB( ctx->VB ); + _tnl_CreateContext( ctx ); osmesa_register_swrast_functions( ctx ); } @@ -1690,7 +1690,6 @@ static void osmesa_update_state( GLcontext *ctx ) ASSERT((void *) osmesa == (void *) ctx->DriverCtx); ctx->Driver.GetString = get_string; - ctx->Driver.UpdateStateNotify = ~0; ctx->Driver.UpdateState = osmesa_update_state; ctx->Driver.SetDrawBuffer = set_draw_buffer; @@ -1747,4 +1746,8 @@ static void osmesa_update_state( GLcontext *ctx ) ctx->Driver.WriteMonoCIPixels = write_monoindex_pixels; ctx->Driver.ReadCI32Span = read_index_span; ctx->Driver.ReadCI32Pixels = read_index_pixels; + + _swrast_InvalidateState( ctx, ctx->NewState ); + _swsetup_InvalidateState( ctx, ctx->NewState ); + _tnl_InvalidateState( ctx, ctx->NewState ); } -- cgit v1.2.3