X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;ds=sidebyside;f=scene.c;h=aa3a80ba7062b4ac66d7c1ed951f7d8582f213f7;hb=a06728bc8ad584aafd216c2a3bfd7b9d9b4305d3;hp=0488bceb17f533a26441be127dead4286df13158;hpb=acad09733179bca04aa9c2c74e6092b072d1ae43;p=atyndall%2Fcits2231.git diff --git a/scene.c b/scene.c index 0488bce..aa3a80b 100644 --- a/scene.c +++ b/scene.c @@ -529,7 +529,7 @@ drawFloor(void) static GLfloat lightColor[] = {1.0, 1.0, 1.0, 1.0}; /* green-tinted */ static GLfloat lightPosition[4]; -static float lightAngle = 0.0, lightHeight = 20; +static float lightAngle = 10.0, lightHeight = 20; /** @@ -557,7 +557,7 @@ void display() { glPushMatrix(); glDisable(GL_LIGHTING); - glColor3f(1.0, 1.0, 0.0); + glColor3f(0.0, 0.0, 0.0); /* Draw a yellow ball at the light source. */ glTranslatef(lightPosition[0], lightPosition[1], lightPosition[2]); @@ -582,7 +582,7 @@ void init() { glMatrixMode(GL_PROJECTION); gluPerspective( - 40.0, /* field of view in degree */ + 60.0, /* field of view in degree */ 1.0, /* aspect ratio */ 0.0, /* Z near */ 900.0 /* Z far */ @@ -590,7 +590,7 @@ void init() { glMatrixMode(GL_MODELVIEW); gluLookAt( - 0.0, 8.0, 60.0, /* eye is at (0,8,60) */ + 0.0, -10.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 */ ); @@ -634,7 +634,7 @@ int main(int argc, char **argv) { glEnable(GL_DEPTH_TEST); // Enables Depth Testing glDepthFunc(GL_LEQUAL); // the type - glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); // Really Nice Perspective Calculations + glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); glutReshapeFunc(windowReshape); glutDisplayFunc(display);