From 78ee002d22bec0b0084d791e6f5146be4400bac0 Mon Sep 17 00:00:00 2001 From: Ash Tyndall Date: Sat, 22 Oct 2011 14:09:47 +0800 Subject: [PATCH 1/1] --- globals.c | 2 ++ globals.h | 2 ++ scene.c | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) 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); -- 2.20.1