From 2d7a16e7d0297d354fcc98be4626ec8a8331fb0d Mon Sep 17 00:00:00 2001 From: Ash Tyndall Date: Fri, 21 Oct 2011 11:42:24 +0800 Subject: [PATCH] --- helper.c | 3 ++- helper.h | 2 +- scene.c | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/helper.c b/helper.c index 4040947..460c44a 100644 --- a/helper.c +++ b/helper.c @@ -254,13 +254,14 @@ void drawFloor() { /** * Draw x, z axis on floor */ -void drawLine() { +void drawAxisLines() { // **NOTE: Function does not currently draw arrow-heads glDisable(GL_TEXTURE_2D); glDisable(GL_LIGHTING); glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glEnable(GL_LINE_SMOOTH); glColor3f( 0.0, 0.0, 0.0 ); float arrowLength = 1.0; diff --git a/helper.h b/helper.h index 21eceea..0ed5d21 100644 --- a/helper.h +++ b/helper.h @@ -22,6 +22,6 @@ int makeSubmenuFromArray( const char *menuEntries[], unsigned int menuEntriesSiz void drawSquare(int recurseLevel, float x1, float z1, float x2, float z2); void drawFloor(); -void drawLine(); +void drawAxisLines(); #endif /* HELPER_H */ diff --git a/scene.c b/scene.c index 3bda9b4..96bfb03 100644 --- a/scene.c +++ b/scene.c @@ -355,8 +355,6 @@ void display() { glLightfv(GL_LIGHT1, GL_POSITION, lightPosition1); drawFloor(); - - drawLine(); // Draw teapot for a test object glPushMatrix(); @@ -385,6 +383,8 @@ void display() { glEnable(GL_LIGHTING); glPopMatrix(); + drawAxisLines(); + glPopMatrix(); glutSwapBuffers(); -- 2.20.1