X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;ds=sidebyside;f=scene.c;h=0841edd9dbc2ae1b0143199c8180500d16bc20a4;hb=741e1b28cd622388927419ba40da12a6e066fae3;hp=5e492e5e786cbeb31a9e0eb8965d164132a3bf04;hpb=664a6aa10f9219f5e8c52ae9f05f68615a548457;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);