From 892a5bee9691e9566a5cf6b996f55c0b6ab14747 Mon Sep 17 00:00:00 2001 From: Ash Tyndall Date: Fri, 21 Oct 2011 10:59:02 +0800 Subject: [PATCH] --- scene.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 */ ); -- 2.20.1