From: Ash Tyndall Date: Fri, 21 Oct 2011 02:59:02 +0000 (+0800) Subject: (no commit message) X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=892a5bee9691e9566a5cf6b996f55c0b6ab14747;p=atyndall%2Fcits2231.git --- diff --git a/scene.c b/scene.c index 7d45bbf..34b7462 100644 --- a/scene.c +++ b/scene.c @@ -298,8 +298,13 @@ void display() { glMatrixMode(GL_MODELVIEW); glLoadIdentity(); + GLfloat zcoord = 5.0 + (zoomFactor*0.2); + if ( zcoord < 0.0 ) { + zcoord = 0.0; + } + gluLookAt( - 0.0, 0.0, 5.0 + (zoomFactor*0.2), /* eye is at (x,y,z) */ + 0.0, 0.0, zcoord, /* eye is at (x,y,z) */ 0.0, 0.0, 0.0, /* center is at (x,y,z) */ 0.0, 1.0, 0.0 /* up is in postivie Y direction */ );