bugfix: Make lighting work the same way as in earlier versions. Bug reported by nop head.

felipesanches-svg
Marius Kintel 2012-01-11 22:54:07 +01:00
parent eab74d1fbe
commit de4d1e4b85
1 changed files with 1 additions and 2 deletions

View File

@ -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);