X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=scene.c;h=e1dbe146f5afc4f4caf275c9f0a1d660539bcaf7;hb=1ab820e2cf1b498ff7c88a4480ec85fa2dc4a45a;hp=9698963d371e361faf6cdcabc52f14a3c254447b;hpb=73e131681643c5c9b3ddd3ca10bf0c19011f3a28;p=atyndall%2Fcits2231.git diff --git a/scene.c b/scene.c index 9698963..e1dbe14 100644 --- a/scene.c +++ b/scene.c @@ -535,6 +535,7 @@ void drawFloor() { */ void display() { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + glMatrixMode(GL_MODELVIEW); glLoadIdentity(); gluLookAt( 0.0, 90.0, 60.0, /* eye is at (x,y,z) */ @@ -557,8 +558,8 @@ void display() { glDisable(GL_BLEND); glPushMatrix(); - glLoadIdentity(); - glTranslatef(0.0, -90.0, -60.0); + + glTranslatef(0.0, 0.0, 0.0); glutSolidTeapot(5); // Draw teapot for test glPopMatrix(); @@ -599,8 +600,6 @@ void init() { glLightf(GL_LIGHT0, GL_LINEAR_ATTENUATION, 0.05); glEnable(GL_LIGHT0); glEnable(GL_LIGHTING); - - glMatrixMode(GL_MODELVIEW); } /**