From: Ash Tyndall Date: Sat, 22 Oct 2011 06:09:47 +0000 (+0800) Subject: (no commit message) X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=78ee002d22bec0b0084d791e6f5146be4400bac0;p=atyndall%2Fcits2231.git --- diff --git a/globals.c b/globals.c index 5f622ff..cfc021f 100644 --- a/globals.c +++ b/globals.c @@ -89,6 +89,8 @@ GLfloat shine = 100.0; GLfloat glightmodel[] = {0.2,0.2,0.2,1}; GLfloat emission[] = {0.0, 0.3, 0.3, 1.0}; +GLfloat lightBallSize = 0.2; + /* Zoom and rotate tracking */ GLfloat zoom = 0.0, rotate = 0.0, camAngle = 40.0; GLfloat zoomFactor = 0.2, camRotateFactor = 0.5, camAngleFactor = 0.5; diff --git a/globals.h b/globals.h index fe6d362..f2cdd0d 100644 --- a/globals.h +++ b/globals.h @@ -82,6 +82,8 @@ extern GLfloat shine; extern GLfloat glightmodel[]; extern GLfloat emission[]; +extern GLfloat lightBallSize + /* Beginning width, height */ extern int width, height; diff --git a/scene.c b/scene.c index a2fbea6..9a803cb 100644 --- a/scene.c +++ b/scene.c @@ -466,12 +466,12 @@ void display() { glPushMatrix(); glTranslatef(lightPosition0[0], lightPosition0[1], lightPosition0[2]); - glutSolidSphere(0.5, 50, 50); + glutSolidSphere(lightBallSize, 20, 20); glPopMatrix(); glPushMatrix(); glTranslatef(lightPosition1[0], lightPosition1[1], lightPosition1[2]); - glutSolidSphere(0.5, 50, 50); + glutSolidSphere(lightBallSize, 20, 20); glPopMatrix(); glEnable(GL_LIGHTING);