(no commit message)
authorAsh Tyndall <git@atyndall.net>
Thu, 20 Oct 2011 12:57:30 +0000 (20:57 +0800)
committerAsh Tyndall <git@atyndall.net>
Thu, 20 Oct 2011 12:57:30 +0000 (20:57 +0800)
scene.c

diff --git a/scene.c b/scene.c
index 2cce6e4..8982882 100644 (file)
--- a/scene.c
+++ b/scene.c
@@ -369,7 +369,9 @@ void init() {
   glLightfv(GL_LIGHT0, GL_AMBIENT, ambient0);\r
   glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuse0);\r
   glLightfv(GL_LIGHT0, GL_SPECULAR, specular0);\r
-  glLighti(GL_LIGHT0, GL_SPOT_CUTOFF, 60);\r
+  GLfloat direction0[] = {0.0, 0.0, 0.0};\r
+  glLightfv(GL_LIGHT0, GL_SPOT_DIRECTION, direction0);\r
+  glLightf(GL_LIGHT0, GL_SPOT_CUTOFF, 60.0);\r
   glLightModelfv(GL_LIGHT_MODEL_AMBIENT, glightmodel);\r
 \r
   GLfloat ambient[] = {0.2, 0.2, 0.2, 1.0};\r

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