From 5a771857d9069773e5a6ede9694b0e5b8a03ff67 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Tue, 22 Nov 2005 10:58:05 +0000 Subject: [PATCH] Make sure tnl->_DoVertexFog is kept uptodate. Fixes fog in i915 driver. --- src/mesa/tnl/t_context.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mesa/tnl/t_context.c b/src/mesa/tnl/t_context.c index 5aea2d16281..30b2947323a 100644 --- a/src/mesa/tnl/t_context.c +++ b/src/mesa/tnl/t_context.c @@ -273,6 +273,9 @@ _tnl_allow_vertex_fog( GLcontext *ctx, GLboolean value ) { TNLcontext *tnl = TNL_CONTEXT(ctx); tnl->AllowVertexFog = value; + tnl->_DoVertexFog = (tnl->AllowVertexFog && (ctx->Hint.Fog != GL_NICEST)) + || !tnl->AllowPixelFog; + } void @@ -280,5 +283,7 @@ _tnl_allow_pixel_fog( GLcontext *ctx, GLboolean value ) { TNLcontext *tnl = TNL_CONTEXT(ctx); tnl->AllowPixelFog = value; + tnl->_DoVertexFog = (tnl->AllowVertexFog && (ctx->Hint.Fog != GL_NICEST)) + || !tnl->AllowPixelFog; } -- 2.30.2