From: Ash Tyndall Date: Tue, 18 Oct 2011 07:15:18 +0000 (+0800) Subject: (no commit message) X-Git-Url: https://git.ucc.asn.au/?p=atyndall%2Fcits2231.git;a=commitdiff_plain;h=b360766b6e3bf3808ff1991780e9e25828cee213;ds=sidebyside --- diff --git a/scene.c b/scene.c index bad6fa2..7ea99c8 100644 --- a/scene.c +++ b/scene.c @@ -575,10 +575,6 @@ void display() { * init function; sets initial OpenGL state */ void init() { - glEnable(GL_CULL_FACE); - glEnable(GL_DEPTH_TEST); - glEnable(GL_TEXTURE_2D); - glLineWidth(3.0); glMatrixMode(GL_PROJECTION); gluPerspective( @@ -588,7 +584,7 @@ void init() { 900.0 /* Z far */ ); - //glMatrixMode(GL_MODELVIEW); + glMatrixMode(GL_MODELVIEW); gluLookAt( 0.0, 8.0, 60.0, /* eye is at (0,8,60) */ 0.0, 8.0, 0.0, /* center is at (0,8,0) */ @@ -633,6 +629,9 @@ int main(int argc, char **argv) { glClearDepth(1.0f); // Depth Buffer Setup glEnable(GL_DEPTH_TEST); // Enables Depth Testing glDepthFunc(GL_LEQUAL); // the type + glEnable(GL_CULL_FACE); + glEnable(GL_TEXTURE_2D); + glLineWidth(3.0); glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);