From: Ash Tyndall Date: Thu, 20 Oct 2011 12:57:30 +0000 (+0800) Subject: (no commit message) X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=f0ca91aee0613aecddb7b96ca808098e1adf463e;p=atyndall%2Fcits2231.git --- diff --git a/scene.c b/scene.c index 2cce6e4..8982882 100644 --- a/scene.c +++ b/scene.c @@ -369,7 +369,9 @@ void init() { glLightfv(GL_LIGHT0, GL_AMBIENT, ambient0); glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuse0); glLightfv(GL_LIGHT0, GL_SPECULAR, specular0); - glLighti(GL_LIGHT0, GL_SPOT_CUTOFF, 60); + GLfloat direction0[] = {0.0, 0.0, 0.0}; + glLightfv(GL_LIGHT0, GL_SPOT_DIRECTION, direction0); + glLightf(GL_LIGHT0, GL_SPOT_CUTOFF, 60.0); glLightModelfv(GL_LIGHT_MODEL_AMBIENT, glightmodel); GLfloat ambient[] = {0.2, 0.2, 0.2, 1.0};