From: Ash Tyndall Date: Fri, 21 Oct 2011 07:55:44 +0000 (+0800) Subject: (no commit message) X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=732047b86f9fca77cec1c110eca712997894808a;p=atyndall%2Fcits2231.git --- diff --git a/scene.c b/scene.c index 705c2d1..74b15ca 100644 --- a/scene.c +++ b/scene.c @@ -339,12 +339,18 @@ void display() { lightPosition0[2] = 12*sin(lightAngle0); lightPosition0[3] = 0.0; + direction0[0] = lightPosition0[0]; + direction0[2] = lightPosition0[2]; + /* Reposition the light source 1. */ lightPosition1[0] = 12*cos(lightAngle1); lightPosition1[1] = lightHeight1; lightPosition1[2] = 12*sin(lightAngle1); lightPosition1[3] = 0.0; + direction1[0] = lightPosition1[0]; + direction1[2] = lightPosition1[2]; + glPushMatrix(); /* Perform scene rotations based on user mouse/keyboard input. */