diff options
author | Marius Kintel <marius@kintel.net> | 2012-01-11 21:54:07 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2012-01-11 21:54:07 (GMT) |
commit | de4d1e4b85ca13d17e9c722ea34cb0d636406272 (patch) | |
tree | 2469aa3ed935e132e8b6a758606dedc47987f094 /src | |
parent | eab74d1fbee87f516e9e667a1457b6bbb6a4862c (diff) |
bugfix: Make lighting work the same way as in earlier versions. Bug reported by nop head.
Diffstat (limited to 'src')
-rw-r--r-- | src/glview.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/glview.cc b/src/glview.cc index 63573e3..65432c8 100644 --- a/src/glview.cc +++ b/src/glview.cc @@ -358,6 +358,7 @@ void GLView::setupPerspective() glMatrixMode(GL_PROJECTION); glLoadIdentity(); glFrustum(-w_h_ratio, +w_h_ratio, -(1/w_h_ratio), +(1/w_h_ratio), +10.0, +FAR_FAR_AWAY); + gluLookAt(0.0, -viewer_distance, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0); } void GLView::setupOrtho(double distance, bool offset) @@ -387,8 +388,6 @@ void GLView::paintGL() glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); - gluLookAt(0.0, -viewer_distance, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0); - glRotated(object_rot_x, 1.0, 0.0, 0.0); glRotated(object_rot_y, 0.0, 1.0, 0.0); glRotated(object_rot_z, 0.0, 0.0, 1.0); |