X-Git-Url: https://git.ucc.asn.au/?p=atyndall%2Fcits2231.git;a=blobdiff_plain;f=scene.c;h=0a186f84fdeea4566c0720e9e4112cf407305ff1;hp=164d1001eb6f8d01d86635b8edeef31b56c4ed7d;hb=e204dbdc0e5925daec44037f7b26c9e5984cfdb3;hpb=05f50c2a687dbe49b89e730d8636b12d5d8543c9 diff --git a/scene.c b/scene.c index 164d100..0a186f8 100644 --- a/scene.c +++ b/scene.c @@ -123,8 +123,8 @@ GLfloat angle = -150; /* in degrees */ GLfloat angle2 = 30; /* in degrees */ /* Near and far parameters */ -GLfloat near = -10; -GLfloat far = 20; +GLfloat near = -100; +GLfloat far = 100; /* Zoom factor for mouse movements */ GLfloat zoomFactor = 1.0; @@ -606,7 +606,13 @@ void drawSquare(int recurseLevel, float x1, float z1, float x2, float z2) { * Draw a floor by calling the drawSquare recursion */ void drawFloor() { - drawSquare(0, -floorSize, -floorSize, floorSize, floorSize); + //drawSquare(0, -floorSize, -floorSize, floorSize, floorSize); + glBegin(GL_QUADS); + glVertex3f(-18.0, 0.0, 27.0); + glVertex3f(27.0, 0.0, 27.0); + glVertex3f(27.0, 0.0, -18.0); + glVertex3f(-18.0, 0.0, -18.0); + glEnd(); } /** @@ -665,7 +671,7 @@ void display() { // Draw teapot for a test object glPushMatrix(); - glTranslatef(0.0, 0.0, 0.0); // **NOTE: Teapot does not rest on surface + glTranslatef(0.0, 0.5, 0.0); // **NOTE: Teapot does not rest on surface glColor3f(0.5, 0.5, 0.5); glutSolidTeapot(1); glPopMatrix(); @@ -696,7 +702,7 @@ void init() { 1.0, /* aspect ratio */ near, /* Z near */ far /* Z far */ - ); + ); glLightfv(GL_LIGHT0, GL_POSITION, light0_pos);