From e313127fd60026808c2343504b6069f3734d4f8b Mon Sep 17 00:00:00 2001 From: Ash Tyndall Date: Tue, 18 Oct 2011 15:29:14 +0800 Subject: [PATCH] --- scene.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); } /** -- 2.20.1