X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=scene.c;h=736d5e655cc02129b82a1927bf7bd36fc4ceb55a;hb=0400887e2592bc89a03ed29b105cb3c5f26e02ac;hp=67baaa4c0c0374b719c9246305124d90c52d71a7;hpb=7aefab9090614501742fe496b628ffe5121d5d75;p=atyndall%2Fcits2231.git diff --git a/scene.c b/scene.c index 67baaa4..736d5e6 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]); @@ -584,7 +584,7 @@ void init() { gluPerspective( 60.0, /* field of view in degree */ 1.0, /* aspect ratio */ - -10.0, /* Z near */ + 0.0, /* Z near */ 900.0 /* Z far */ ); @@ -595,12 +595,14 @@ void init() { 0.0, 1.0, 0.0 /* up is in postivie Y direction */ ); - glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, 1); + 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); glLightf(GL_LIGHT0, GL_LINEAR_ATTENUATION, 0.05); glEnable(GL_LIGHT0); - glEnable(GL_LIGHTING); + glEnable(GL_LIGHTING);*/ } /**