X-Git-Url: https://git.ucc.asn.au/?p=atyndall%2Fcits2231.git;a=blobdiff_plain;f=scene.c;h=9f8d21f3c375b0b6cfe812418613d8c00939a9a5;hp=e42c48c8fb9e9d9c5c4f567562a52c0731eca9cb;hb=a37cd47b96e5b61c6241bd9709920f3b39594769;hpb=ffb95814b6e8d3ef616722cd64e07a7af0defd74 diff --git a/scene.c b/scene.c index e42c48c..9f8d21f 100644 --- a/scene.c +++ b/scene.c @@ -500,7 +500,7 @@ void makeMenu() { */ void windowReshape(int w, int h) { glViewport(0, 0, (GLsizei) w, (GLsizei) h); - glMatrixMode(GL_PROJECTION); + /*glMatrixMode(GL_PROJECTION); glLoadIdentity(); if (w <= h) glOrtho(near, far, near*(GLfloat)h/(GLfloat)w, @@ -509,7 +509,7 @@ void windowReshape(int w, int h) { glOrtho(near*(GLfloat)w/(GLfloat)h, far*(GLfloat)w/(GLfloat)h, near, far, near, far); glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); + glLoadIdentity();*/ } /** @@ -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(); } /** @@ -694,9 +700,9 @@ void init() { gluPerspective( 60.0, /* field of view in degree */ 1.0, /* aspect ratio */ - -10, /* Z near */ - 10 /* Z far */ - ); + near, /* Z near */ + far /* Z far */ + ); glLightfv(GL_LIGHT0, GL_POSITION, light0_pos);