summaryrefslogtreecommitdiff
path: root/src/GLView.cc
diff options
context:
space:
mode:
authordon bright <hugh.m.bright@gmail.com>2013-03-06 03:10:10 (GMT)
committerdon bright <hugh.m.bright@gmail.com>2013-03-06 03:10:10 (GMT)
commit974abf13049d5e73227418e3990af8a9bbf9db09 (patch)
treee1161129a3a05c63344cd009bd2d2705c3fa3e2c /src/GLView.cc
parent51be86ad29fe3012d46e81e279a66c76d79a052a (diff)
fix strecthing with --imgsize per bug rept from Marius Kintel
Diffstat (limited to 'src/GLView.cc')
-rw-r--r--src/GLView.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/GLView.cc b/src/GLView.cc
index f21e044..b4fb8d6 100644
--- a/src/GLView.cc
+++ b/src/GLView.cc
@@ -74,7 +74,7 @@ void GLView::setupVectorCamPerspective()
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
double dist = (cam.center - cam.eye).norm();
- gluPerspective(45, w_h_ratio, 0.1*dist, 100*dist);
+ gluPerspective(45, pow(w_h_ratio,2), 0.1*dist, 100*dist);
}
void GLView::setupVectorCamOrtho(bool offset)
@@ -83,8 +83,8 @@ void GLView::setupVectorCamOrtho(bool offset)
glLoadIdentity();
if (offset) glTranslated(-0.8, -0.8, 0);
double l = (cam.center - cam.eye).norm() / 10;
- glOrtho(-w_h_ratio*l, +w_h_ratio*l,
- -(1/w_h_ratio)*l, +(1/w_h_ratio)*l,
+ glOrtho(-pow(w_h_ratio,2)*l, +pow(w_h_ratio,2)*l,
+ -(1/pow(w_h_ratio,2))*l, +(1/pow(w_h_ratio,2))*l,
-far_far_away, +far_far_away);
}
contact: Jan Huwald // Impressum