(no commit message)
authorAsh Tyndall <[email protected]>
Sat, 22 Oct 2011 06:09:47 +0000 (14:09 +0800)
committerAsh Tyndall <[email protected]>
Sat, 22 Oct 2011 06:09:47 +0000 (14:09 +0800)
globals.c
globals.h
scene.c

index 5f622ff..cfc021f 100644 (file)
--- 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;
index fe6d362..f2cdd0d 100644 (file)
--- 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 (file)
--- a/scene.c
+++ b/scene.c
@@ -466,12 +466,12 @@ void display() {
 \r
     glPushMatrix();\r
       glTranslatef(lightPosition0[0], lightPosition0[1], lightPosition0[2]);\r
-      glutSolidSphere(0.5, 50, 50);\r
+      glutSolidSphere(lightBallSize, 20, 20);\r
     glPopMatrix();\r
 \r
     glPushMatrix();\r
       glTranslatef(lightPosition1[0], lightPosition1[1], lightPosition1[2]);\r
-      glutSolidSphere(0.5, 50, 50);\r
+      glutSolidSphere(lightBallSize, 20, 20);\r
     glPopMatrix();\r
 \r
     glEnable(GL_LIGHTING);\r

UCC git Repository :: git.ucc.asn.au