diff options
author | Brian Paul <brianp@vmware.com> | 2009-04-03 10:08:20 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-04-03 10:09:28 -0600 |
commit | 7391ba1e9d81f15465059db25d1279eefdbeb1a9 (patch) | |
tree | 1dfac07d6d676a6a1618bb3cb80d53d5ab123d56 /src/mesa/main/light.c | |
parent | 650d147289014e8a98f65fbbcd1855b2a4f19d2f (diff) |
mesa: rename some gl_light fields to be clearer
EyeDirection -> SpotDirection
_NormDirection -> _NormSpotDirection
Diffstat (limited to 'src/mesa/main/light.c')
-rw-r--r-- | src/mesa/main/light.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c index f72841b8cc..ac604fd12c 100644 --- a/src/mesa/main/light.c +++ b/src/mesa/main/light.c @@ -110,10 +110,10 @@ _mesa_light(GLcontext *ctx, GLuint lnum, GLenum pname, const GLfloat *params) break; case GL_SPOT_DIRECTION: /* NOTE: Direction already transformed by inverse ModelView! */ - if (TEST_EQ_3V(light->EyeDirection, params)) + if (TEST_EQ_3V(light->SpotDirection, params)) return; FLUSH_VERTICES(ctx, _NEW_LIGHT); - COPY_3V(light->EyeDirection, params); + COPY_3V(light->SpotDirection, params); break; case GL_SPOT_EXPONENT: ASSERT(params[0] >= 0.0); @@ -325,7 +325,7 @@ _mesa_GetLightfv( GLenum light, GLenum pname, GLfloat *params ) COPY_4V( params, ctx->Light.Light[l].EyePosition ); break; case GL_SPOT_DIRECTION: - COPY_3V( params, ctx->Light.Light[l].EyeDirection ); + COPY_3V( params, ctx->Light.Light[l].SpotDirection ); break; case GL_SPOT_EXPONENT: params[0] = ctx->Light.Light[l].SpotExponent; @@ -387,9 +387,9 @@ _mesa_GetLightiv( GLenum light, GLenum pname, GLint *params ) params[3] = (GLint) ctx->Light.Light[l].EyePosition[3]; break; case GL_SPOT_DIRECTION: - params[0] = (GLint) ctx->Light.Light[l].EyeDirection[0]; - params[1] = (GLint) ctx->Light.Light[l].EyeDirection[1]; - params[2] = (GLint) ctx->Light.Light[l].EyeDirection[2]; + params[0] = (GLint) ctx->Light.Light[l].SpotDirection[0]; + params[1] = (GLint) ctx->Light.Light[l].SpotDirection[1]; + params[2] = (GLint) ctx->Light.Light[l].SpotDirection[2]; break; case GL_SPOT_EXPONENT: params[0] = (GLint) ctx->Light.Light[l].SpotExponent; @@ -1139,23 +1139,23 @@ compute_light_positions( GLcontext *ctx ) /* Note: we normalize the spot direction now */ if (ctx->_NeedEyeCoords) { - COPY_3V( light->_NormDirection, light->EyeDirection ); - NORMALIZE_3FV( light->_NormDirection ); + COPY_3V( light->_NormSpotDirection, light->SpotDirection ); + NORMALIZE_3FV( light->_NormSpotDirection ); } else { GLfloat spotDir[3]; - COPY_3V(spotDir, light->EyeDirection); + COPY_3V(spotDir, light->SpotDirection); NORMALIZE_3FV(spotDir); - TRANSFORM_NORMAL( light->_NormDirection, + TRANSFORM_NORMAL( light->_NormSpotDirection, spotDir, ctx->ModelviewMatrixStack.Top->m); } - NORMALIZE_3FV( light->_NormDirection ); + NORMALIZE_3FV( light->_NormSpotDirection ); if (!(light->_Flags & LIGHT_POSITIONAL)) { GLfloat PV_dot_dir = - DOT3(light->_VP_inf_norm, - light->_NormDirection); + light->_NormSpotDirection); if (PV_dot_dir > light->_CosCutoff) { double x = PV_dot_dir * (EXP_TABLE_SIZE-1); @@ -1279,7 +1279,7 @@ init_light( struct gl_light *l, GLuint n ) ASSIGN_4V( l->Specular, 0.0, 0.0, 0.0, 1.0 ); } ASSIGN_4V( l->EyePosition, 0.0, 0.0, 1.0, 0.0 ); - ASSIGN_3V( l->EyeDirection, 0.0, 0.0, -1.0 ); + ASSIGN_3V( l->SpotDirection, 0.0, 0.0, -1.0 ); l->SpotExponent = 0.0; _mesa_invalidate_spot_exp_table( l ); l->SpotCutoff = 180.0; |