From b3aefd1cfb6aacd1695c52911dd39da50d893ece Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 19 Sep 2005 20:12:32 +0000 Subject: additional wrapper updates, bug 4468 --- src/mesa/swrast/s_fog.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/mesa/swrast/s_fog.c') diff --git a/src/mesa/swrast/s_fog.c b/src/mesa/swrast/s_fog.c index 0af9cd8f28..e3d6274b3f 100644 --- a/src/mesa/swrast/s_fog.c +++ b/src/mesa/swrast/s_fog.c @@ -51,12 +51,12 @@ _swrast_z_to_fogfactor(GLcontext *ctx, GLfloat z) return CLAMP(f, 0.0F, 1.0F); case GL_EXP: d = ctx->Fog.Density; - f = (GLfloat) exp(-d * z); + f = EXPF(-d * z); f = CLAMP(f, 0.0F, 1.0F); return f; case GL_EXP2: d = ctx->Fog.Density; - f = (GLfloat) exp(-(d * d * z * z)); + f = EXPF(-(d * d * z * z)); f = CLAMP(f, 0.0F, 1.0F); return f; default: @@ -130,7 +130,7 @@ _swrast_fog_rgba_span( const GLcontext *ctx, struct sw_span *span ) GLuint i; for (i = 0; i < span->end; i++) { GLfloat f, oneMinusF; - f = (GLfloat) exp(density * FABSF(fogCoord) / w); + f = EXPF(density * FABSF(fogCoord) / w); f = CLAMP(f, 0.0F, 1.0F); oneMinusF = 1.0F - f; rgba[i][RCOMP] = (GLchan) (f * rgba[i][RCOMP] + oneMinusF * rFog); @@ -158,7 +158,7 @@ _swrast_fog_rgba_span( const GLcontext *ctx, struct sw_span *span ) if (tmp < FLT_MIN_10_EXP) tmp = FLT_MIN_10_EXP; #endif - f = (GLfloat) exp(tmp); + f = EXPF(tmp); f = CLAMP(f, 0.0F, 1.0F); oneMinusF = 1.0F - f; rgba[i][RCOMP] = (GLchan) (f * rgba[i][RCOMP] + oneMinusF * rFog); @@ -259,7 +259,7 @@ _swrast_fog_ci_span( const GLcontext *ctx, struct sw_span *span ) GLfloat w = haveW ? span->w : 1.0F; GLuint i; for (i = 0; i < span->end; i++) { - GLfloat f = (GLfloat) exp(density * fogCoord / w); + GLfloat f = EXPF(density * fogCoord / w); f = CLAMP(f, 0.0F, 1.0F); index[i] = (GLuint) ((GLfloat) index[i] + (1.0F - f) * fogIndex); fogCoord += fogStep; @@ -284,7 +284,7 @@ _swrast_fog_ci_span( const GLcontext *ctx, struct sw_span *span ) if (tmp < FLT_MIN_10_EXP) tmp = FLT_MIN_10_EXP; #endif - f = (GLfloat) exp(tmp); + f = EXPF(tmp); f = CLAMP(f, 0.0F, 1.0F); index[i] = (GLuint) ((GLfloat) index[i] + (1.0F - f) * fogIndex); fogCoord += fogStep; -- cgit v1.2.3