X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=scene.c;h=93d2171b159c1407cacb8148006b849f7d2b5bc0;hb=3d74d1a15b8fa011c0a94de16d14120066f22fa4;hp=b869afa1fa1aa7ae0496c3eb3433cb7252e344c3;hpb=0b72379322375642f7d4376d491ae295b8d6fdd9;p=atyndall%2Fcits2231.git diff --git a/scene.c b/scene.c index b869afa..93d2171 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; /** @@ -556,14 +556,14 @@ void display() { glutSolidTeapot(1); // Draw teapot for test glPushMatrix(); - glDisable(GL_LIGHTING); - glColor3f(1.0, 1.0, 0.0); + //glDisable(GL_LIGHTING); + glColor3f(1.0, 1.0, 1.0); /* Draw a yellow ball at the light source. */ glTranslatef(lightPosition[0], lightPosition[1], lightPosition[2]); glutSolidSphere(1.0, 5, 5); - glEnable(GL_LIGHTING); + //glEnable(GL_LIGHTING); glPopMatrix(); glPopMatrix(); @@ -582,10 +582,10 @@ void init() { glMatrixMode(GL_PROJECTION); gluPerspective( - 40.0, /* field of view in degree */ + 60.0, /* field of view in degree */ 1.0, /* aspect ratio */ - 20.0, /* Z near */ - 100.0 /* Z far */ + 0.0, /* Z near */ + 900.0 /* Z far */ ); glMatrixMode(GL_MODELVIEW); @@ -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);