X-Git-Url: https://git.ucc.asn.au/?p=atyndall%2Fcits2231.git;a=blobdiff_plain;f=helper.c;h=441b3c9b22bb4b75bde312ae57a0d321a34c1270;hp=5ebcc094ef6371b9b13d02cf4e35bab584b02ba5;hb=821c28d874f5560d63a57ed73bc77b11337c3280;hpb=cc01320b8824eb601505dc5cdb101cfe8b7d1271;ds=sidebyside diff --git a/helper.c b/helper.c index 5ebcc09..441b3c9 100644 --- a/helper.c +++ b/helper.c @@ -351,6 +351,8 @@ void updateLights() { glLightf(GL_LIGHT0 + i, GL_SPOT_CUTOFF, lightObjs[i].cutoff); glLighti(GL_LIGHT0 + i, GL_SPOT_EXPONENT, (int)lightObjs[i].exponent ); + glEnable(GL_LIGHT0 + i); + // Draw light ball for light glPushMatrix(); glColor3f(1.0, 1.0, 1.0); @@ -358,7 +360,6 @@ void updateLights() { glutSolidSphere(lightBallSize, 20, 20); glPopMatrix(); - glEnable(GL_LIGHT0 + i); } glEnable(GL_LIGHTING);