From 741e1b28cd622388927419ba40da12a6e066fae3 Mon Sep 17 00:00:00 2001 From: Ash Tyndall Date: Tue, 18 Oct 2011 20:35:47 +0800 Subject: [PATCH] --- scene.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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); -- 2.20.1