From: Ash Tyndall Date: Fri, 21 Oct 2011 00:18:10 +0000 (+0800) Subject: (no commit message) X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=765d3843d11aef036fc03ee614d3ec737929dc70;p=atyndall%2Fcits2231.git --- diff --git a/scene.c b/scene.c index 8a209b9..8ea0985 100644 --- a/scene.c +++ b/scene.c @@ -187,11 +187,11 @@ void windowReshape(int w, int h) { glMatrixMode(GL_PROJECTION); glLoadIdentity(); if (w <= h) - glFrustum(-1.0, 1.0, -1.0*(GLfloat) h / (GLfloat) w, - 1.0*(GLfloat) h / (GLfloat) w, nearClip, farClip); + glFrustum(-nearClip, farClip, -nearClip*(GLfloat) h / (GLfloat) w, + farClip*(GLfloat) h / (GLfloat) w, nearClip, farClip); else - glFrustum(-1.0*(GLfloat) w / (GLfloat) h, - 1.0*(GLfloat) w / (GLfloat) h, -1.0, 1.0, nearClip, farClip); + glFrustum(-nearClip*(GLfloat) w / (GLfloat) h, + farClip*(GLfloat) w / (GLfloat) h, nearClip, farClip, nearClip, farClip); glMatrixMode(GL_MODELVIEW); }