diff options
Diffstat (limited to 'src/mesa/tnl/t_context.c')
-rw-r--r-- | src/mesa/tnl/t_context.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mesa/tnl/t_context.c b/src/mesa/tnl/t_context.c index ec5f88cd96c..626aa5290e6 100644 --- a/src/mesa/tnl/t_context.c +++ b/src/mesa/tnl/t_context.c @@ -102,6 +102,7 @@ _tnl_CreateContext( GLcontext *ctx ) tnl->NeedNdcCoords = GL_TRUE; tnl->LoopbackDListCassettes = GL_FALSE; tnl->CalcDListNormalLengths = GL_TRUE; + tnl->AllowVertexFog = GL_TRUE; /* Hook our functions into exec and compile dispatch tables. */ @@ -144,6 +145,10 @@ _tnl_InvalidateState( GLcontext *ctx, GLuint new_state ) { TNLcontext *tnl = TNL_CONTEXT(ctx); + if (new_state & (_NEW_HINT)) { + tnl->_DoVertexFog = tnl->AllowVertexFog && (ctx->Hint.Fog != GL_NICEST); + } + if (new_state & _NEW_ARRAY) { tnl->pipeline.run_input_changes |= ctx->Array.NewState; /* overkill */ } @@ -259,3 +264,11 @@ _tnl_isolate_materials( GLcontext *ctx, GLboolean mode ) TNLcontext *tnl = TNL_CONTEXT(ctx); tnl->IsolateMaterials = mode; } + +void +_tnl_allow_vertex_fog( GLcontext *ctx, GLboolean value ) +{ + TNLcontext *tnl = TNL_CONTEXT(ctx); + tnl->AllowVertexFog = value; +} + |