/*
* Mesa 3-D graphics library
- * Version: 6.5
*
* Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
*
*/
-
+#include "c99_math.h"
#include "main/glheader.h"
-#include "main/colormac.h"
#include "main/light.h"
#include "main/macros.h"
#include "main/imports.h"
-#include "main/simple_list.h"
+#include "util/simple_list.h"
#include "main/mtypes.h"
#include "math/m_translate.h"
struct tnl_shine_tab *list = tnl->_ShineTabList;
struct tnl_shine_tab *s;
- ASSERT(side < 2);
+ assert(side < 2);
foreach(s, list)
if ( s->shininess == shininess )
break;
m = s->tab;
- m[0] = 0.0;
- if (shininess == 0.0) {
+ m[0] = 0.0F;
+ if (shininess == 0.0F) {
for (j = 1 ; j <= SHINE_TABLE_SIZE ; j++)
- m[j] = 1.0;
+ m[j] = 1.0F;
}
else {
for (j = 1 ; j < SHINE_TABLE_SIZE ; j++) {
- GLdouble t, x = j / (GLfloat) (SHINE_TABLE_SIZE - 1);
- if (x < 0.005) /* underflow check */
- x = 0.005;
- t = pow(x, shininess);
- if (t > 1e-20)
- m[j] = (GLfloat) t;
+ GLfloat t, x = j / (GLfloat) (SHINE_TABLE_SIZE - 1);
+ if (x < 0.005F) /* underflow check */
+ x = 0.005F;
+ t = powf(x, shininess);
+ if (t > 1e-20F)
+ m[j] = t;
else
- m[j] = 0.0;
+ m[j] = 0.0F;
}
- m[SHINE_TABLE_SIZE] = 1.0;
+ m[SHINE_TABLE_SIZE] = 1.0F;
}
s->shininess = shininess;