From: Ash Tyndall Date: Tue, 18 Oct 2011 12:35:47 +0000 (+0800) Subject: (no commit message) X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=741e1b28cd622388927419ba40da12a6e066fae3;p=atyndall%2Fcits2231.git --- diff --git a/scene.c b/scene.c index 5e492e5..0841edd 100644 --- a/scene.c +++ b/scene.c @@ -129,6 +129,9 @@ static float lightAngle = 0.0, lightHeight = 5; GLfloat angle = -150; /* in degrees */ GLfloat angle2 = 30; /* in degrees */ +GLfloat near = -10; +GLfloat far = 10; + /** * Prints out error message when file cannot be read * @param fileName Name of file that could not be read @@ -484,9 +487,6 @@ void makeMenu() { * @param h New height */ void windowReshape(int w, int h) { - GLdouble near = -10.0; - GLdouble far = 10.0; - glViewport(0, 0, (GLsizei) w, (GLsizei) h); glMatrixMode(GL_PROJECTION); glLoadIdentity(); @@ -670,8 +670,8 @@ void init() { gluPerspective( 60.0, /* field of view in degree */ 1.0, /* aspect ratio */ - -100.0, /* Z near */ - 100.0 /* Z far */ + near, /* Z near */ + far /* Z far */ ); glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, 1);