From c52f0027f7fccb18818dae96c021a4baacdc1f48 Mon Sep 17 00:00:00 2001 From: Ash Tyndall Date: Wed, 19 Oct 2011 20:15:15 +0800 Subject: [PATCH] --- scene.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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 -- 2.20.1