fix some float/ubyte mistakes (Daniel Borca)
[mesa.git] / src / mesa / drivers / glide / fxdd.c
index 9b98cdd106a50f2ee0ce56a4a63c32f5bdc56265..fd099e7e1153c25896cb9067a38808b42353b13c 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: fxdd.c,v 1.92 2002/10/04 19:10:10 brianp Exp $ */
+/* $Id: fxdd.c,v 1.95 2003/01/08 21:32:36 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -45,6 +45,7 @@
 #include "fxdrv.h"
 #include "enums.h"
 #include "extensions.h"
+#include "mmath.h"
 #include "texstore.h"
 #include "swrast/swrast.h"
 #include "swrast_setup/swrast_setup.h"
@@ -141,7 +142,7 @@ fxDDClearColor(GLcontext * ctx, const GLfloat color[4])
    CLAMPED_FLOAT_TO_UBYTE(col[3], color[3]);
 
    fxMesa->clearC = FXCOLOR4(col);
-   fxMesa->clearA = color[3];
+   fxMesa->clearA = col[3];
 }
 
 
@@ -698,7 +699,7 @@ fxDDInitFxMesaContext(fxMesaContext fxMesa)
 
    fxMesa->unitsState.alphaTestEnabled = GL_FALSE;
    fxMesa->unitsState.alphaTestFunc = GR_CMP_ALWAYS;
-   fxMesa->unitsState.alphaTestRefValue = 0;
+   fxMesa->unitsState.alphaTestRefValue = 0.0;
 
    fxMesa->unitsState.blendEnabled = GL_FALSE;
    fxMesa->unitsState.blendSrcFuncRGB = GR_BLEND_ONE;
@@ -721,7 +722,7 @@ fxDDInitFxMesaContext(fxMesaContext fxMesa)
    }
 
    fxMesa->state = malloc(FX_grGetInteger(FX_GLIDE_STATE_SIZE));
-   fxMesa->fogTable = malloc(FX_grGetInteger(FX_FOG_TABLE_ENTRIES) *
+   fxMesa->fogTable = (GrFog_t *) malloc(FX_grGetInteger(FX_FOG_TABLE_ENTRIES) *
                             sizeof(GrFog_t));
 
    if (!fxMesa->state || !fxMesa->fogTable) {