From: Ash Tyndall Date: Tue, 18 Oct 2011 07:29:14 +0000 (+0800) Subject: (no commit message) X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=e313127fd60026808c2343504b6069f3734d4f8b;p=atyndall%2Fcits2231.git --- diff --git a/scene.c b/scene.c index 4c0dede..9da9a5c 100644 --- a/scene.c +++ b/scene.c @@ -535,8 +535,6 @@ void drawFloor() { */ void display() { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - glMatrixMode(GL_MODELVIEW); glLoadIdentity(); gluLookAt( 0.0, 8.0, 60.0, /* eye is at (0,8,60) */ @@ -581,7 +579,7 @@ void display() { */ void init() { glMatrixMode(GL_PROJECTION); - glLoadIdentity(); + gluPerspective( 60.0, /* field of view in degree */ 1.0, /* aspect ratio */ @@ -595,6 +593,8 @@ void init() { glLightf(GL_LIGHT0, GL_LINEAR_ATTENUATION, 0.05); glEnable(GL_LIGHT0); glEnable(GL_LIGHTING); + + glMatrixMode(GL_MODELVIEW); } /**