summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2011-02-09 21:32:42 -0800
committerKenneth Graunke <kenneth@whitecape.org>2011-02-09 21:32:42 -0800
commit00a1a013acff250d59c66be1e2184897bd0e8dbc (patch)
tree35ce54ea72c27a0dac6cf21b6fe4343444f77924
parent6ab820583152d9c12f031c9fda1b8fcedad39353 (diff)
Actually scale/translate the z component.
Fix suggested by idr.
-rwxr-xr-xsrc/scene.cpp6
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, &current_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: