X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=scene.c;h=fae8cde55a1e20579835269d839baa3cb8d6482c;hb=07c1a3269730a26617d9818677092f3227c83f77;hp=3a7597db39b29325b787063770b73e9346a47d93;hpb=17e3af1a8604dcb5c3cf6fa7f3d9d7d891fe4734;p=atyndall%2Fcits2231.git diff --git a/scene.c b/scene.c index 3a7597d..fae8cde 100644 --- a/scene.c +++ b/scene.c @@ -535,11 +535,12 @@ void drawFloor() { */ void display() { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + glMatrixMode(GL_MODELVIEW); glLoadIdentity(); gluLookAt( 0.0, 0.0, 60.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 */ + 0.0, 100.0, 0.0 /* up is in postivie Y direction */ ); /* Reposition the light source. */ @@ -556,16 +557,14 @@ void display() { drawFloor(); glDisable(GL_BLEND); - glPushMatrix(); - glLoadIdentity(); + //glPushMatrix(); glTranslatef(0.0, 0.0, 0.0); glutSolidTeapot(5); // Draw teapot for test - glPopMatrix(); + // glPopMatrix(); glPushMatrix(); glDisable(GL_LIGHTING); - glLoadIdentity(); glColor3f(1.0, 1.0, 1.0); /* Draw a yellow ball at the light source. */ @@ -599,8 +598,6 @@ void init() { glLightf(GL_LIGHT0, GL_LINEAR_ATTENUATION, 0.05); glEnable(GL_LIGHT0); glEnable(GL_LIGHTING); - - glMatrixMode(GL_MODELVIEW); } /**