summaryrefslogtreecommitdiff
path: root/src/mesa/swrast_setup/ss_context.c
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2001-07-17 19:39:32 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2001-07-17 19:39:32 +0000
commit53560311294814ae0daa8457307a2b25077bf4e9 (patch)
treecffad805f3e213014d055f53609d71dd81aa37fc /src/mesa/swrast_setup/ss_context.c
parent4ae22b9721e4f123354aad9921da1613fd078367 (diff)
Lighting now emits colors as CHAN_TYPE, as it used to. This will require
minor adjustments in the dri drivers for twosided lighting to work again.
Diffstat (limited to 'src/mesa/swrast_setup/ss_context.c')
-rw-r--r--src/mesa/swrast_setup/ss_context.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/mesa/swrast_setup/ss_context.c b/src/mesa/swrast_setup/ss_context.c
index 2e92342e07..4b8c003c2e 100644
--- a/src/mesa/swrast_setup/ss_context.c
+++ b/src/mesa/swrast_setup/ss_context.c
@@ -1,4 +1,4 @@
-/* $Id: ss_context.c,v 1.14 2001/07/12 22:09:21 keithw Exp $ */
+/* $Id: ss_context.c,v 1.15 2001/07/17 19:39:32 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -78,11 +78,19 @@ _swsetup_CreateContext( GLcontext *ctx )
void
_swsetup_DestroyContext( GLcontext *ctx )
{
- if (SWSETUP_CONTEXT(ctx)) {
- if (SWSETUP_CONTEXT(ctx)->verts)
- ALIGN_FREE(SWSETUP_CONTEXT(ctx)->verts);
+ SScontext *swsetup = SWSETUP_CONTEXT(ctx);
+
+ if (swsetup) {
+ if (swsetup->verts)
+ ALIGN_FREE(swsetup->verts);
+
+ if (swsetup->ChanSecondaryColor.Ptr)
+ ALIGN_FREE(swsetup->ChanSecondaryColor.Ptr);
- FREE(SWSETUP_CONTEXT(ctx));
+ if (swsetup->ChanColor.Ptr)
+ ALIGN_FREE(swsetup->ChanColor.Ptr);
+
+ FREE(swsetup);
ctx->swsetup_context = 0;
}
}