X-Git-Url: https://git.ucc.asn.au/?p=atyndall%2Fcits2231.git;a=blobdiff_plain;f=scene.c;h=b66be6f64e289b35db0e48695704f7a3e0879409;hp=9698963d371e361faf6cdcabc52f14a3c254447b;hb=e870d5eada14c45367e8bbd872dc5f9095f8393f;hpb=73e131681643c5c9b3ddd3ca10bf0c19011f3a28 diff --git a/scene.c b/scene.c index 9698963..b66be6f 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); + glLoadIdentity(); + 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); } /**