X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=scene.c;h=d709f6ba469f02acc457edebdf5a3b2766a2ae5c;hb=a337a7a5514f1346ee5c3d611b1ed14ea434f905;hp=d01535d2529cddf809b5aa79b87c1f330ae8d7ed;hpb=a347efb639093bd2cc136259aabe0ae8153df5eb;p=atyndall%2Fcits2231.git diff --git a/scene.c b/scene.c index d01535d..d709f6b 100644 --- a/scene.c +++ b/scene.c @@ -557,7 +557,7 @@ void display() { glPushMatrix(); glDisable(GL_LIGHTING); - glColor3f(1.0, 1.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]); @@ -595,6 +595,8 @@ void init() { 0.0, 1.0, 0.0 /* up is in postivie Y direction */ ); + glTranslatef( 0.0f, 0.0f, -600.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);