X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=scene.c;h=0841edd9dbc2ae1b0143199c8180500d16bc20a4;hb=741e1b28cd622388927419ba40da12a6e066fae3;hp=4c6bcf96170f7f557bddec501d0c9903f115d5d9;hpb=82932a758c58a069fcbeca67b17e010f87f48a67;p=atyndall%2Fcits2231.git diff --git a/scene.c b/scene.c index 4c6bcf9..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 */ - -1000.0, /* Z near */ - 1000.0 /* Z far */ + near, /* Z near */ + far /* Z far */ ); glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, 1);