From: Keith Whitwell Date: Tue, 22 Nov 2005 10:58:05 +0000 (+0000) Subject: Make sure tnl->_DoVertexFog is kept uptodate. Fixes fog in i915 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5a771857d9069773e5a6ede9694b0e5b8a03ff67;p=mesa.git Make sure tnl->_DoVertexFog is kept uptodate. Fixes fog in i915 driver. --- 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; }