summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/main/light.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c
index 0b79afa415e..6a0619c62c9 100644
--- a/src/mesa/main/light.c
+++ b/src/mesa/main/light.c
@@ -1,4 +1,4 @@
-/* $Id: light.c,v 1.43 2001/04/28 08:39:17 keithw Exp $ */
+/* $Id: light.c,v 1.44 2001/05/09 12:24:51 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -664,7 +664,7 @@ void _mesa_update_material( GLcontext *ctx,
foreach (light, list) {
SCALE_3V( light->_MatDiffuse[0], light->Diffuse, mat->Diffuse );
}
- UNCLAMPED_FLOAT_TO_CHAN(ctx->Light._BaseAlpha[0], mat->Diffuse[3]);
+ ctx->Light._BaseAlpha[0] = CLAMP( mat->Diffuse[3], 0.0, 1.0 );
}
if (bitmask & BACK_DIFFUSE_BIT) {
struct gl_material *mat = &ctx->Light.Material[1];
@@ -672,7 +672,7 @@ void _mesa_update_material( GLcontext *ctx,
foreach (light, list) {
SCALE_3V( light->_MatDiffuse[1], light->Diffuse, mat->Diffuse );
}
- UNCLAMPED_FLOAT_TO_CHAN(ctx->Light._BaseAlpha[1], mat->Diffuse[3]);
+ ctx->Light._BaseAlpha[1] = CLAMP( mat->Diffuse[3], 0.0, 1.0 );
}
/* update material specular values */
@@ -801,7 +801,7 @@ void _mesa_update_color_material( GLcontext *ctx,
foreach (light, list) {
SCALE_3V( light->_MatDiffuse[0], light->Diffuse, mat->Diffuse );
}
- UNCLAMPED_FLOAT_TO_CHAN(ctx->Light._BaseAlpha[0], mat->Diffuse[3]);
+ ctx->Light._BaseAlpha[0] = CLAMP( mat->Diffuse[3], 0.0, 1.0 );
}
if (bitmask & BACK_DIFFUSE_BIT) {
@@ -810,7 +810,7 @@ void _mesa_update_color_material( GLcontext *ctx,
foreach (light, list) {
SCALE_3V( light->_MatDiffuse[1], light->Diffuse, mat->Diffuse );
}
- UNCLAMPED_FLOAT_TO_CHAN(ctx->Light._BaseAlpha[1], mat->Diffuse[3]);
+ ctx->Light._BaseAlpha[1] = CLAMP( mat->Diffuse[3], 0.0, 1.0 );
}
/* update light->_MatSpecular = light's specular * material's specular */
@@ -1217,8 +1217,8 @@ _mesa_update_lighting( GLcontext *ctx )
ctx->Light.Model.Ambient,
mat->Ambient);
- UNCLAMPED_FLOAT_TO_CHAN(ctx->Light._BaseAlpha[side],
- ctx->Light.Material[side].Diffuse[3] );
+ ctx->Light._BaseAlpha[side] =
+ CLAMP( ctx->Light.Material[side].Diffuse[3], 0.0, 1.0 );
}
foreach (light, &ctx->Light.EnabledList) {