aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/tnl/t_rasterpos.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-02-13 08:50:32 +0100
committermarha <marha@users.sourceforge.net>2012-02-13 08:50:32 +0100
commit179ebdfaf7fe0a0017054c052b76210eeff084a9 (patch)
tree5daa6e5583ced6a6b12b03e12c16ef2acedb5b5c /mesalib/src/mesa/tnl/t_rasterpos.c
parent535951cba015f2a2b63292e0ca983d0d6e736b71 (diff)
parenteaa70945cb3f1a432b8c505ecede9ebc7769f36d (diff)
downloadvcxsrv-179ebdfaf7fe0a0017054c052b76210eeff084a9.tar.gz
vcxsrv-179ebdfaf7fe0a0017054c052b76210eeff084a9.tar.bz2
vcxsrv-179ebdfaf7fe0a0017054c052b76210eeff084a9.zip
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/mesa/tnl/t_rasterpos.c')
-rw-r--r--mesalib/src/mesa/tnl/t_rasterpos.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/mesalib/src/mesa/tnl/t_rasterpos.c b/mesalib/src/mesa/tnl/t_rasterpos.c
index a7e4397b6..17611cd21 100644
--- a/mesalib/src/mesa/tnl/t_rasterpos.c
+++ b/mesalib/src/mesa/tnl/t_rasterpos.c
@@ -167,10 +167,7 @@ shade_rastpos(struct gl_context *ctx,
continue;
}
else {
- double x = PV_dot_dir * (EXP_TABLE_SIZE-1);
- int k = (int) x;
- GLfloat spot = (GLfloat) (light->_SpotExpTable[k][0]
- + (x-k)*light->_SpotExpTable[k][1]);
+ GLfloat spot = powf(PV_dot_dir, light->SpotExponent);
attenuation *= spot;
}
}
@@ -217,8 +214,7 @@ shade_rastpos(struct gl_context *ctx,
n_dot_h = DOT3(normal, h);
if (n_dot_h > 0.0F) {
- GLfloat spec_coef;
- GET_SHINE_TAB_ENTRY( ctx->_ShineTable[0], n_dot_h, spec_coef );
+ GLfloat spec_coef = _mesa_lookup_shininess(ctx, 0, n_dot_h);
if (spec_coef > 1.0e-10) {
if (ctx->Light.Model.ColorControl==GL_SEPARATE_SPECULAR_COLOR) {