tnl->LoopbackDListCassettes = GL_FALSE;
tnl->CalcDListNormalLengths = GL_TRUE;
tnl->AllowVertexFog = GL_TRUE;
+ tnl->AllowPixelFog = GL_TRUE;
/* Hook our functions into exec and compile dispatch tables.
*/
TNLcontext *tnl = TNL_CONTEXT(ctx);
if (new_state & (_NEW_HINT)) {
- tnl->_DoVertexFog = tnl->AllowVertexFog && (ctx->Hint.Fog != GL_NICEST);
+ ASSERT(tnl->AllowVertexFog || tnl->AllowPixelFog);
+ tnl->_DoVertexFog = (tnl->AllowVertexFog && (ctx->Hint.Fog != GL_NICEST))
+ || !tnl->AllowPixelFog;
}
if (new_state & _NEW_ARRAY) {
tnl->AllowVertexFog = value;
}
+void
+_tnl_allow_pixel_fog( GLcontext *ctx, GLboolean value )
+{
+ TNLcontext *tnl = TNL_CONTEXT(ctx);
+ tnl->AllowPixelFog = value;
+}
+
GLboolean CalcDListNormalLengths;
GLboolean IsolateMaterials;
GLboolean AllowVertexFog;
+ GLboolean AllowPixelFog;
GLboolean _DoVertexFog; /* eval fog function at each vertex? */