(no commit message)
authorAsh Tyndall <[email protected]>
Wed, 19 Oct 2011 12:15:15 +0000 (20:15 +0800)
committerAsh Tyndall <[email protected]>
Wed, 19 Oct 2011 12:15:15 +0000 (20:15 +0800)
scene.c

diff --git a/scene.c b/scene.c
index 9fb79f8..60fde81 100644 (file)
--- a/scene.c
+++ b/scene.c
@@ -607,6 +607,24 @@ void drawFloor() {
   drawSquare(0, -floorSize, -floorSize, floorSize, floorSize);\r
 }\r
 \r
+/**\r
+ * Draw x, z axis on floor\r
+ */\r
+void drawLine() {\r
+    glDisable(GL_TEXTURE_2D);\r
+    glEnable(GL_BLEND);\r
+    glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);\r
+    glColor4ub( 0.0, 0.0, 0.0, 0.0 );\r
+\r
+    glBegin(GL_LINES);\r
+    glVertex3i( 10.0, 0, 0.0);\r
+    glVertex3i( -10.0, 0, 0.0);\r
+    glEnd();\r
+\r
+    glDisable(GL_BLEND);\r
+    glEnable(GL_TEXTURE_2D);\r
+}\r
+\r
 /**\r
  * Display function\r
  */\r
@@ -639,6 +657,7 @@ void display() {
 \r
     drawFloor();\r
 \r
+\r
     // Draw teapot for a test object\r
     glPushMatrix();\r
       glTranslatef(0.0, 1.0, 0.0); // **NOTE: Teapot does not rest on surface\r

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