From 180b0dab8b87ef7987b9f2c44068d1eea3f54939 Mon Sep 17 00:00:00 2001 From: Jouk Jansen Date: Wed, 29 Mar 2006 12:09:08 +0000 Subject: Committing in . Removing Modified Files: Mesa/src/mesa/main/fog.c Mesa/src/mesa/main/hint.c Mesa/src/mesa/main/mtypes.h ---------------------------------------------------------------------- --- src/mesa/main/fog.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/mesa/main/fog.c') diff --git a/src/mesa/main/fog.c b/src/mesa/main/fog.c index df99c6519f..50a61bd84b 100644 --- a/src/mesa/main/fog.c +++ b/src/mesa/main/fog.c @@ -70,14 +70,14 @@ _mesa_Fogiv(GLenum pname, const GLint *params ) ; } _mesa_Fogfv(pname, p); -} - - -#define UPDATE_FOG_SCALE(ctx) do {\ - if (ctx->Fog.End == ctx->Fog.Start)\ - ctx->Fog._Scale = 1.0f;\ - else\ - ctx->Fog._Scale = 1.0f / (ctx->Fog.End - ctx->Fog.Start);\ +} + + +#define UPDATE_FOG_SCALE(ctx) do {\ + if (ctx->Fog.End == ctx->Fog.Start)\ + ctx->Fog._Scale = 1.0f;\ + else\ + ctx->Fog._Scale = 1.0f / (ctx->Fog.End - ctx->Fog.Start);\ } while(0) @@ -119,14 +119,14 @@ _mesa_Fogfv( GLenum pname, const GLfloat *params ) if (ctx->Fog.Start == *params) return; FLUSH_VERTICES(ctx, _NEW_FOG); - ctx->Fog.Start = *params; + ctx->Fog.Start = *params; UPDATE_FOG_SCALE(ctx); break; case GL_FOG_END: if (ctx->Fog.End == *params) return; - FLUSH_VERTICES(ctx, _NEW_FOG); - ctx->Fog.End = *params; + FLUSH_VERTICES(ctx, _NEW_FOG); + ctx->Fog.End = *params; UPDATE_FOG_SCALE(ctx); break; case GL_FOG_INDEX: @@ -183,6 +183,6 @@ void _mesa_init_fog( GLcontext * ctx ) ctx->Fog.Start = 0.0; ctx->Fog.End = 1.0; ctx->Fog.ColorSumEnabled = GL_FALSE; - ctx->Fog.FogCoordinateSource = GL_FRAGMENT_DEPTH_EXT; + ctx->Fog.FogCoordinateSource = GL_FRAGMENT_DEPTH_EXT; ctx->Fog._Scale = 1.0f; } -- cgit v1.2.3