diff options
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/light.c | 9 | ||||
-rw-r--r-- | src/mesa/main/mtypes.h | 3 | ||||
-rw-r--r-- | src/mesa/main/rastpos.c | 5 |
3 files changed, 4 insertions, 13 deletions
diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c index 6a0619c62c9..8f4c607af5a 100644 --- a/src/mesa/main/light.c +++ b/src/mesa/main/light.c @@ -1,4 +1,4 @@ -/* $Id: light.c,v 1.44 2001/05/09 12:24:51 keithw Exp $ */ +/* $Id: light.c,v 1.45 2001/07/28 19:28:49 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -664,7 +664,6 @@ void _mesa_update_material( GLcontext *ctx, foreach (light, list) { SCALE_3V( light->_MatDiffuse[0], light->Diffuse, mat->Diffuse ); } - 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 +671,6 @@ void _mesa_update_material( GLcontext *ctx, foreach (light, list) { SCALE_3V( light->_MatDiffuse[1], light->Diffuse, mat->Diffuse ); } - ctx->Light._BaseAlpha[1] = CLAMP( mat->Diffuse[3], 0.0, 1.0 ); } /* update material specular values */ @@ -801,7 +799,6 @@ void _mesa_update_color_material( GLcontext *ctx, foreach (light, list) { SCALE_3V( light->_MatDiffuse[0], light->Diffuse, mat->Diffuse ); } - ctx->Light._BaseAlpha[0] = CLAMP( mat->Diffuse[3], 0.0, 1.0 ); } if (bitmask & BACK_DIFFUSE_BIT) { @@ -810,7 +807,6 @@ void _mesa_update_color_material( GLcontext *ctx, foreach (light, list) { SCALE_3V( light->_MatDiffuse[1], light->Diffuse, mat->Diffuse ); } - ctx->Light._BaseAlpha[1] = CLAMP( mat->Diffuse[3], 0.0, 1.0 ); } /* update light->_MatSpecular = light's specular * material's specular */ @@ -1216,9 +1212,6 @@ _mesa_update_lighting( GLcontext *ctx ) ACC_SCALE_3V(ctx->Light._BaseColor[side], ctx->Light.Model.Ambient, mat->Ambient); - - ctx->Light._BaseAlpha[side] = - CLAMP( ctx->Light.Material[side].Diffuse[3], 0.0, 1.0 ); } foreach (light, &ctx->Light.EnabledList) { diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 9bf185f7f39..9325934a070 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -1,4 +1,4 @@ -/* $Id: mtypes.h,v 1.49 2001/07/13 20:07:37 brianp Exp $ */ +/* $Id: mtypes.h,v 1.50 2001/07/28 19:28:49 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -496,7 +496,6 @@ struct gl_light_attrib { GLboolean _NeedVertices; /* Use fast shader? */ GLuint _Flags; /* LIGHT_* flags, see below */ GLfloat _BaseColor[2][3]; - GLfloat _BaseAlpha[2]; }; diff --git a/src/mesa/main/rastpos.c b/src/mesa/main/rastpos.c index 83f84683141..841e539a6a9 100644 --- a/src/mesa/main/rastpos.c +++ b/src/mesa/main/rastpos.c @@ -1,4 +1,4 @@ -/* $Id: rastpos.c,v 1.29 2001/07/05 15:31:21 brianp Exp $ */ +/* $Id: rastpos.c,v 1.30 2001/07/28 19:28:49 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -126,7 +126,6 @@ shade_rastpos(GLcontext *ctx, GLuint *Rindex) { GLfloat (*base)[3] = ctx->Light._BaseColor; - const GLfloat *sumA = ctx->Light._BaseAlpha; struct gl_light *light; GLfloat diffuseColor[4], specularColor[4]; GLfloat diffuse = 0, specular = 0; @@ -135,7 +134,7 @@ shade_rastpos(GLcontext *ctx, _mesa_validate_all_lighting_tables( ctx ); COPY_3V(diffuseColor, base[0]); - diffuseColor[3] = sumA[0]; + diffuseColor[3] = CLAMP( ctx->Light.Material[0].Diffuse[3], 0.0, 1.0 ); ASSIGN_4V(specularColor, 0.0, 0.0, 0.0, 0.0); foreach (light, &ctx->Light.EnabledList) { |