summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/prog_statevars.c
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2008-05-31 18:14:09 +0900
committerJosé Fonseca <[email protected]>2008-05-31 18:55:40 +0900
commit53174afeeb68a79e471185cb463c13ff90af698f (patch)
tree9e48b55cda10c585d7a7a5a2423df9c212dfede7 /src/mesa/shader/prog_statevars.c
parent45b2c23d7a2f1bd723d0719b13470125de09c243 (diff)
mesa: Apply MSVC portability fixes from Alan Hourihane.
Diffstat (limited to 'src/mesa/shader/prog_statevars.c')
-rw-r--r--src/mesa/shader/prog_statevars.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mesa/shader/prog_statevars.c b/src/mesa/shader/prog_statevars.c
index 44fbfdcd041..8f481558252 100644
--- a/src/mesa/shader/prog_statevars.c
+++ b/src/mesa/shader/prog_statevars.c
@@ -250,7 +250,7 @@ _mesa_fetch_state(GLcontext *ctx, const gl_state_index state[],
value[1] = ctx->Fog.Start;
value[2] = ctx->Fog.End;
value[3] = (ctx->Fog.End == ctx->Fog.Start)
- ? 1.0 : 1.0F / (ctx->Fog.End - ctx->Fog.Start);
+ ? 1.0 : (GLfloat)(1.0 / (ctx->Fog.End - ctx->Fog.Start));
return;
case STATE_CLIPPLANE:
{
@@ -411,7 +411,7 @@ _mesa_fetch_state(GLcontext *ctx, const gl_state_index state[],
if (texObj) {
struct gl_texture_image *texImage = texObj->Image[0][0];
ASSIGN_4V(value, 1.0 / texImage->Width,
- 1.0 / texImage->Height,
+ (GLfloat)(1.0 / texImage->Height),
0.0, 1.0);
}
}
@@ -426,10 +426,10 @@ _mesa_fetch_state(GLcontext *ctx, const gl_state_index state[],
* exp2: 2^-((density/(ln(2)^2) * fogcoord)^2)
*/
value[0] = (ctx->Fog.End == ctx->Fog.Start)
- ? 1.0 : -1.0F / (ctx->Fog.End - ctx->Fog.Start);
+ ? 1.0 : (GLfloat)(-1.0F / (ctx->Fog.End - ctx->Fog.Start));
value[1] = ctx->Fog.End * -value[0];
- value[2] = ctx->Fog.Density * ONE_DIV_LN2;
- value[3] = ctx->Fog.Density * ONE_DIV_SQRT_LN2;
+ value[2] = (GLfloat)(ctx->Fog.Density * ONE_DIV_LN2);
+ value[3] = (GLfloat)(ctx->Fog.Density * ONE_DIV_SQRT_LN2);
return;
case STATE_LIGHT_SPOT_DIR_NORMALIZED: {