summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/light.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2001-01-02 22:02:51 +0000
committerBrian Paul <[email protected]>2001-01-02 22:02:51 +0000
commit3041d05bbcccfddba01a1eeaba01e5da0e1e99af (patch)
treee25361e01fdf7be6d75713235c7e130246be67f1 /src/mesa/main/light.c
parent8446d1bab15ef82b35b8980a0a56072ace6feb04 (diff)
Removed fixed.h (GLfixed now in mtypes.h, fixed-pt macros in mmath.h)
Clean-up of color conversion macros. New mmath.h macros (IROUND, IFLOOR, ICEIL, FRAC) used in various places.
Diffstat (limited to 'src/mesa/main/light.c')
-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 e1a1b96e192..83a3095726e 100644
--- a/src/mesa/main/light.c
+++ b/src/mesa/main/light.c
@@ -1,4 +1,4 @@
-/* $Id: light.c,v 1.31 2000/12/26 05:09:28 keithw Exp $ */
+/* $Id: light.c,v 1.32 2001/01/02 22:02:51 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -616,7 +616,7 @@ void gl_update_material( GLcontext *ctx,
foreach (light, list) {
SCALE_3V( light->_MatDiffuse[0], light->Diffuse, mat->Diffuse );
}
- FLOAT_COLOR_TO_CHAN(ctx->Light._BaseAlpha[0], mat->Diffuse[3]);
+ UNCLAMPED_FLOAT_TO_CHAN(ctx->Light._BaseAlpha[0], mat->Diffuse[3]);
}
if (bitmask & BACK_DIFFUSE_BIT) {
struct gl_material *mat = &ctx->Light.Material[1];
@@ -627,7 +627,7 @@ void gl_update_material( GLcontext *ctx,
foreach (light, list) {
SCALE_3V( light->_MatDiffuse[1], light->Diffuse, mat->Diffuse );
}
- FLOAT_COLOR_TO_CHAN(ctx->Light._BaseAlpha[1], mat->Diffuse[3]);
+ UNCLAMPED_FLOAT_TO_CHAN(ctx->Light._BaseAlpha[1], mat->Diffuse[3]);
}
/* update material specular values */
@@ -760,7 +760,7 @@ void gl_update_color_material( GLcontext *ctx,
foreach (light, list) {
SCALE_3V( light->_MatDiffuse[0], light->Diffuse, mat->Diffuse );
}
- FLOAT_COLOR_TO_CHAN(ctx->Light._BaseAlpha[0], mat->Diffuse[3]);
+ UNCLAMPED_FLOAT_TO_CHAN(ctx->Light._BaseAlpha[0], mat->Diffuse[3]);
}
if (bitmask & BACK_DIFFUSE_BIT) {
@@ -769,7 +769,7 @@ void gl_update_color_material( GLcontext *ctx,
foreach (light, list) {
SCALE_3V( light->_MatDiffuse[1], light->Diffuse, mat->Diffuse );
}
- FLOAT_COLOR_TO_CHAN(ctx->Light._BaseAlpha[1], mat->Diffuse[3]);
+ UNCLAMPED_FLOAT_TO_CHAN(ctx->Light._BaseAlpha[1], mat->Diffuse[3]);
}
/* update light->_MatSpecular = light's specular * material's specular */
@@ -1173,8 +1173,8 @@ gl_update_lighting( GLcontext *ctx )
ctx->Light.Model.Ambient,
mat->Ambient);
- FLOAT_COLOR_TO_CHAN(ctx->Light._BaseAlpha[side],
- ctx->Light.Material[side].Diffuse[3] );
+ UNCLAMPED_FLOAT_TO_CHAN(ctx->Light._BaseAlpha[side],
+ ctx->Light.Material[side].Diffuse[3] );
}
foreach (light, &ctx->Light.EnabledList) {