From: Ash Tyndall Date: Fri, 21 Oct 2011 00:26:57 +0000 (+0800) Subject: (no commit message) X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=ec80d8ef3d8a350840e9b04a37c6b1ee09270a05;p=atyndall%2Fcits2231.git --- 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);