From: Ash Tyndall Date: Wed, 19 Oct 2011 12:15:15 +0000 (+0800) Subject: (no commit message) X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=c52f0027f7fccb18818dae96c021a4baacdc1f48;p=atyndall%2Fcits2231.git --- diff --git a/scene.c b/scene.c index 9fb79f8..60fde81 100644 --- a/scene.c +++ b/scene.c @@ -607,6 +607,24 @@ void drawFloor() { drawSquare(0, -floorSize, -floorSize, floorSize, floorSize); } +/** + * Draw x, z axis on floor + */ +void drawLine() { + glDisable(GL_TEXTURE_2D); + glEnable(GL_BLEND); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glColor4ub( 0.0, 0.0, 0.0, 0.0 ); + + glBegin(GL_LINES); + glVertex3i( 10.0, 0, 0.0); + glVertex3i( -10.0, 0, 0.0); + glEnd(); + + glDisable(GL_BLEND); + glEnable(GL_TEXTURE_2D); +} + /** * Display function */ @@ -639,6 +657,7 @@ void display() { drawFloor(); + // Draw teapot for a test object glPushMatrix(); glTranslatef(0.0, 1.0, 0.0); // **NOTE: Teapot does not rest on surface