From ec80d8ef3d8a350840e9b04a37c6b1ee09270a05 Mon Sep 17 00:00:00 2001 From: Ash Tyndall Date: Fri, 21 Oct 2011 08:26:57 +0800 Subject: [PATCH] --- scene.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/scene.c b/scene.c index d06dd3c..3c25623 100644 --- a/scene.c +++ b/scene.c @@ -297,7 +297,7 @@ void display() { glLoadIdentity(); gluLookAt( - 0.0, 8.0, 30.0, /* eye is at (x,y,z) */ + 30.0, 30.0, 30.0, /* eye is at (x,y,z) */ 0.0, 0.0, 0.0, /* center is at (x,y,z) */ 0.0, 1.0, 0.0 /* up is in postivie Y direction */ ); @@ -347,9 +347,6 @@ void display() { * init function; sets initial OpenGL state */ void init() { - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glLightfv(GL_LIGHT0, GL_POSITION, light0_pos); glLightfv(GL_LIGHT0, GL_AMBIENT, ambient0); glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuse0); @@ -405,15 +402,6 @@ int main(int argc, char **argv) { glEnable(GL_TEXTURE_2D); glLineWidth(1.0); - // **NOTE: Currently the perspective and look-at code is static, for testing purposes - //glMatrixMode(GL_PROJECTION); - //gluPerspective( - // 40.0, /* field of view in degree */ - // 1.0, /* aspect ratio */ - // 1.0, /* Z near */ // **NOTE: Seems to be issue with near < 0 causing invisible everything - // 100.0 /* Z far */ - // ); - glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); glutReshapeFunc(windowReshape); -- 2.20.1