From 765d3843d11aef036fc03ee614d3ec737929dc70 Mon Sep 17 00:00:00 2001 From: Ash Tyndall Date: Fri, 21 Oct 2011 08:18:10 +0800 Subject: [PATCH] --- scene.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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); } -- 2.20.1