summaryrefslogtreecommitdiff
path: root/src/qglview.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/qglview.cc')
-rw-r--r--src/qglview.cc22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/qglview.cc b/src/qglview.cc
index c80d155..0afaa4b 100644
--- a/src/qglview.cc
+++ b/src/qglview.cc
@@ -340,18 +340,28 @@ void QGLView::resizeGL(int w, int h)
glViewport(0, 0, w, h);
w_h_ratio = sqrt((double)w / (double)h);
- setupPerspective();
+ setupGimbalPerspective();
}
void QGLView::setupPerspective()
{
+ fprintf(stderr,"non-gimbal camera not implemented for qglview\n");
+}
+
+void QGLView::setupOrtho(bool offset)
+{
+ fprintf(stderr,"non-gimbal camera not implemented for qglview\n");
+}
+
+void QGLView::setupGimbalPerspective()
+{
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glFrustum(-w_h_ratio, +w_h_ratio, -(1/w_h_ratio), +(1/w_h_ratio), +10.0, +FAR_FAR_AWAY);
gluLookAt(0.0, -viewer_distance, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0);
}
-void QGLView::setupOrtho(double distance, bool offset)
+void QGLView::setupGimbalOrtho(double distance, bool offset)
{
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
@@ -368,8 +378,8 @@ void QGLView::paintGL()
{
glEnable(GL_LIGHTING);
- if (orthomode) setupOrtho(viewer_distance);
- else setupPerspective();
+ if (orthomode) setupGimbalOrtho(viewer_distance);
+ else setupGimbalPerspective();
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
@@ -439,7 +449,7 @@ void QGLView::paintGL()
{
glDepthFunc(GL_ALWAYS);
- setupOrtho(1000,true);
+ setupGimbalOrtho(1000,true);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
@@ -508,7 +518,7 @@ void QGLView::paintGL()
//Restore perspective for next paint
if(!orthomode)
- setupPerspective();
+ setupGimbalPerspective();
}
if (statusLabel) {
contact: Jan Huwald // Impressum