From: Ash Tyndall Date: Fri, 21 Oct 2011 03:42:24 +0000 (+0800) Subject: (no commit message) X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=2d7a16e7d0297d354fcc98be4626ec8a8331fb0d;p=atyndall%2Fcits2231.git --- 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();