aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/tnl/t_vb_fog.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2001-09-14 21:30:31 +0000
committerBrian Paul <[email protected]>2001-09-14 21:30:31 +0000
commitedf8c06270a0e62f33e3f45e1f0307acfeff3b5d (patch)
tree6da442d6083e6948895479866c884d60392bb7e5 /src/mesa/tnl/t_vb_fog.c
parent7cc49c2dc84ce17a9b4cc1a376da74515a724c92 (diff)
more warning fixes (Karl Schultz)
Diffstat (limited to 'src/mesa/tnl/t_vb_fog.c')
-rw-r--r--src/mesa/tnl/t_vb_fog.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/tnl/t_vb_fog.c b/src/mesa/tnl/t_vb_fog.c
index a4164f8072e..6fad9528cda 100644
--- a/src/mesa/tnl/t_vb_fog.c
+++ b/src/mesa/tnl/t_vb_fog.c
@@ -1,4 +1,4 @@
-/* $Id: t_vb_fog.c,v 1.11 2001/05/15 20:52:51 brianp Exp $ */
+/* $Id: t_vb_fog.c,v 1.12 2001/09/14 21:30:31 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -59,10 +59,10 @@ static GLfloat inited = 0;
#if 1
#define NEG_EXP( result, narg ) \
do { \
- float f = (narg * (1.0/FOG_INCR)); \
- int k = (int) f; \
+ GLfloat f = (GLfloat) (narg * (1.0/FOG_INCR)); \
+ GLint k = (GLint) f; \
if (k > FOG_EXP_TABLE_SIZE-2) \
- result = EXP_FOG_MAX; \
+ result = (GLfloat) EXP_FOG_MAX; \
else \
result = exp_table[k] + (f-k)*(exp_table[k+1]-exp_table[k]); \
} while (0)
@@ -76,10 +76,10 @@ do { \
static void init_static_data( void )
{
- float f = 0;
- int i = 0;
+ GLfloat f = 0.0F;
+ GLint i = 0;
for ( ; i < FOG_EXP_TABLE_SIZE ; i++, f += FOG_INCR) {
- exp_table[i] = exp(-f);
+ exp_table[i] = (GLfloat) exp(-f);
}
inited = 1;
}