diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2011-02-09 21:32:42 -0800 |
---|---|---|
committer | Kenneth Graunke <kenneth@whitecape.org> | 2011-02-09 21:32:42 -0800 |
commit | 00a1a013acff250d59c66be1e2184897bd0e8dbc (patch) | |
tree | 35ce54ea72c27a0dac6cf21b6fe4343444f77924 | |
parent | 6ab820583152d9c12f031c9fda1b8fcedad39353 (diff) |
Actually scale/translate the z component.
Fix suggested by idr.
-rwxr-xr-x | src/scene.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/scene.cpp b/src/scene.cpp index e1628b8..f955c3a 100755 --- a/src/scene.cpp +++ b/src/scene.cpp @@ -158,7 +158,7 @@ Render(const GLUvec4 &look_at) const GLUmat4 m(gluTranslate(sphere_locations[i]) * model); const GLUmat4 mv(view * m); const GLUmat4 mvp(projection_matrix * mv); - const GLUmat4 mlp(gluTranslate(0.5, 0.5, 0.0) * gluScale(0.5, 0.5, 1.0) * projection_matrix * lightview * m); + const GLUmat4 mlp(gluTranslate(0.5, 0.5, 0.5) * gluScale(0.5, 0.5, 0.5) * projection_matrix * lightview * m); GLint current_program; glGetIntegerv(GL_CURRENT_PROGRAM, ¤t_program); @@ -221,8 +221,8 @@ static void update_camera(float total_t) { /* Move the light in a circle */ - //const float light_t = 0.628318530717959f /* 2pi/10 */ * total_t; - //light = GLUvec4(10.0*cos(light_t), 11.0, 10.0*sin(light_t), 0.0); + const float light_t = 0.628318530717959f /* 2pi/10 */ * total_t; + light = GLUvec4(10.0*cos(light_t), 11.0, 10.0*sin(light_t), 0.0); /* Figure out which segment is active based on the * following rules: |