fixed pointer arithmetic error in glCopyPixels
[mesa.git] / src / mesa / main / light.h
index 82b6d74a5521865004795aed712b5d77fbc1f99f..5cd24e83ff41491f515d73736c9d372c86d5e869 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: light.h,v 1.12 2001/03/12 00:48:38 gareth Exp $ */
+/* $Id: light.h,v 1.14 2001/09/14 21:36:43 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -78,6 +78,7 @@ _mesa_GetMaterialiv( GLenum face, GLenum pname, GLint *params );
 /* Lerp between adjacent values in the f(x) lookup table, giving a
  * continuous function, with adequeate overall accuracy.  (Though
  * still pretty good compared to a straight lookup).
+ * Result should be a GLfloat.
  */
 #define GET_SHINE_TAB_ENTRY( table, dp, result )                       \
 do {                                                                   \
@@ -85,7 +86,7 @@ do {                                                                  \
    float f = (dp * (SHINE_TABLE_SIZE-1));                              \
    int k = (int) f;                                                    \
    if (k > SHINE_TABLE_SIZE-2)                                                 \
-      result = pow( dp, _tab->shininess );                             \
+      result = (GLfloat) pow( dp, _tab->shininess );                   \
    else                                                                        \
       result = _tab->tab[k] + (f-k)*(_tab->tab[k+1]-_tab->tab[k]);     \
 } while (0)
@@ -116,7 +117,7 @@ extern void _mesa_copy_material_pairs( struct gl_material dst[2],
                                        GLuint bitmask );
 
 extern void _mesa_update_color_material( GLcontext *ctx,
-                                         const GLchan rgba[4] );
+                                         const GLfloat rgba[4] );
 
 
 #endif