summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/osmesa/osmesa.c
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2000-11-16 21:05:34 +0000
committerKeith Whitwell <[email protected]>2000-11-16 21:05:34 +0000
commit23caf20169ac38436ee9c13914f1d6aa7cf6bb5e (patch)
tree21307f7bbcaf9ee1e841d7e7bee130570a7b5b95 /src/mesa/drivers/osmesa/osmesa.c
parent179516673211a2350e479d5321840291f339f5dd (diff)
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.
Diffstat (limited to 'src/mesa/drivers/osmesa/osmesa.c')
-rw-r--r--src/mesa/drivers/osmesa/osmesa.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c
index 39d256a77f3..74850556a76 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 );
}