(no commit message)
[atyndall/cits2231.git] / scene.c
diff --git a/scene.c b/scene.c
index e42c48c..9f8d21f 100644 (file)
--- a/scene.c
+++ b/scene.c
@@ -500,7 +500,7 @@ void makeMenu() {
  */\r
 void windowReshape(int w, int h) {\r
   glViewport(0, 0, (GLsizei) w, (GLsizei) h);\r
-  glMatrixMode(GL_PROJECTION);\r
+  /*glMatrixMode(GL_PROJECTION);\r
   glLoadIdentity();\r
   if (w <= h) \r
     glOrtho(near, far, near*(GLfloat)h/(GLfloat)w,\r
@@ -509,7 +509,7 @@ void windowReshape(int w, int h) {
     glOrtho(near*(GLfloat)w/(GLfloat)h,\r
              far*(GLfloat)w/(GLfloat)h, near, far, near, far);\r
    glMatrixMode(GL_MODELVIEW); \r
-   glLoadIdentity();\r
+   glLoadIdentity();*/\r
 }\r
 \r
 /**\r
@@ -606,7 +606,13 @@ void drawSquare(int recurseLevel, float x1, float z1, float x2, float z2) {
  * Draw a floor by calling the drawSquare recursion\r
  */\r
 void drawFloor() {\r
-  drawSquare(0, -floorSize, -floorSize, floorSize, floorSize);\r
+  //drawSquare(0, -floorSize, -floorSize, floorSize, floorSize);\r
+  glBegin(GL_QUADS);\r
+    glVertex3f(-18.0, 0.0, 27.0);\r
+    glVertex3f(27.0, 0.0, 27.0);\r
+    glVertex3f(27.0, 0.0, -18.0);\r
+    glVertex3f(-18.0, 0.0, -18.0);\r
+  glEnd();\r
 }\r
 \r
 /**\r
@@ -694,9 +700,9 @@ void init() {
   gluPerspective(\r
     60.0,  /* field of view in degree */\r
      1.0,  /* aspect ratio */\r
-    -10,  /* Z near */\r
-     10   /* Z far */\r
-    );    \r
+    near,  /* Z near */\r
+     far   /* Z far */\r
+    );\r
 \r
   \r
   glLightfv(GL_LIGHT0, GL_POSITION, light0_pos);\r

UCC git Repository :: git.ucc.asn.au