X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;ds=sidebyside;f=scene.c;h=d1f88e0f28de4824c8e89e600198bea575b2152b;hb=6cd85448e1a2ea468c5dde1e450a94d067b6e12d;hp=cfb80c084521b23c751fe8bffb9a2173c5fdf6e2;hpb=91ab47db2c22378c5607e3fb5499a008edfb0289;p=atyndall%2Fcits2231.git diff --git a/scene.c b/scene.c index cfb80c0..d1f88e0 100644 --- a/scene.c +++ b/scene.c @@ -110,10 +110,10 @@ char *dirDefault2 = "/cslinux/examples/CITS2231/project-files/models-textures"; char dataDir[200]; // Stores the directory name for the meshes and textures. static GLfloat floorVertices[4][3] = { - { -20.0, 0.0, 20.0 }, - { 20.0, 0.0, 20.0 }, - { 20.0, 0.0, -20.0 }, - { -20.0, 0.0, -20.0 }, + { -1000.0, 0.0, 1000.0 }, + { 1000.0, 0.0, 1000.0 }, + { 1000.0, 0.0, -1000.0 }, + { -1000.0, 0.0, -1000.0 }, }; static GLfloat lightColor[] = {1.0, 1.0, 1.0, 1.0}; // White light @@ -557,18 +557,16 @@ void display() { glDisable(GL_BLEND); glPushMatrix(); - glDisable(GL_LIGHTING); - + glLoadIdentity(); glColor3f(1.0, 0.0, 1.0); - glTranslatef(0.0, 8.0, 0.0); + glTranslatef(-8.0, 0.0, -1.0); glutSolidTeapot(1); // Draw teapot for test - - glEnable(GL_LIGHTING); glPopMatrix(); glPushMatrix(); glDisable(GL_LIGHTING); + glLoadIdentity(); glColor3f(1.0, 1.0, 1.0); /* Draw a yellow ball at the light source. */