X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=scene.c;h=4615b6383c1f2ea6d576a82f36ae5e23488d6c02;hb=cc59a82104f5650c0c8cc9496335de890f21d731;hp=d1429415842e1868c8a7803faab92e684998bf47;hpb=dc65ca1020fbda1ad57d1a3d30cfe4d37323bf64;p=atyndall%2Fcits2231.git diff --git a/scene.c b/scene.c index d142941..4615b63 100644 --- a/scene.c +++ b/scene.c @@ -327,8 +327,8 @@ void display() { // Draw teapot for a test object glPushMatrix(); - glTranslatef(0.0, 1.0, 0.0); // **NOTE: Teapot does not rest on surface - glColor3f(0.5, 0.5, 0.5); + glTranslatef(0.0, 0.5, 0.0); // **NOTE: Teapot does not rest on surface + glColor3f(0.0, 0.0, 0.0); glutSolidTeapot(1); glPopMatrix(); @@ -407,6 +407,7 @@ int main(int argc, char **argv) { glShadeModel(GL_SMOOTH); // Enables Smooth Shading glClearColor(0.0f, 0.0f, 0.0f, 0.0f); // Black Background glClearDepth(1.0f); // Depth Buffer Setup + glDepthRange(0,1); glEnable(GL_DEPTH_TEST); // Enables Depth Testing glDepthFunc(GL_LEQUAL); // the type glEnable(GL_CULL_FACE); @@ -417,7 +418,7 @@ int main(int argc, char **argv) { gluPerspective( 40.0, /* field of view in degree */ 1.0, /* aspect ratio */ - 10.0, /* Z near */ + 0.0, /* Z near */ 1000.0 /* Z far */ );