From: Ash Tyndall Date: Tue, 18 Oct 2011 07:08:57 +0000 (+0800) Subject: (no commit message) X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=05197548c4c303f66cc7cae18d3cc134b0dfae96;p=atyndall%2Fcits2231.git --- diff --git a/scene.c b/scene.c index aa3a80b..d829def 100644 --- a/scene.c +++ b/scene.c @@ -557,7 +557,7 @@ void display() { glPushMatrix(); glDisable(GL_LIGHTING); - glColor3f(0.0, 0.0, 0.0); + glColor3f(1.0, 1.0, 1.0); /* Draw a yellow ball at the light source. */ glTranslatef(lightPosition[0], lightPosition[1], lightPosition[2]); @@ -590,11 +590,13 @@ void init() { glMatrixMode(GL_MODELVIEW); gluLookAt( - 0.0, -10.0, -60.0, /* eye is at (0,8,60) */ + 0.0, 8.0, 60.0, /* eye is at (0,8,60) */ 0.0, 8.0, 0.0, /* center is at (0,8,0) */ 0.0, 1.0, 0.0 /* up is in postivie Y direction */ ); + glTranslatef( 0.0f, 0.0f, -25.0f); // Move into the Screen 10.0 + glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, 1); glLightfv(GL_LIGHT0, GL_DIFFUSE, lightColor); glLightf(GL_LIGHT0, GL_CONSTANT_ATTENUATION, 0.1);