summaryrefslogtreecommitdiff
path: root/src/qglview.cc
diff options
context:
space:
mode:
authordon bright <hugh.m.bright@gmail.com>2013-02-24 01:58:06 (GMT)
committerdon bright <hugh.m.bright@gmail.com>2013-02-24 01:58:06 (GMT)
commit386df69c0f6a893d3f888ae0dd9150fae197514c (patch)
tree3f51d36d0949a18ec3bd4ff20fd2607afd114c9f /src/qglview.cc
parentf07c6b2cb633bcb22acd8b19315911b373934786 (diff)
consolidate resizeGL()
Diffstat (limited to 'src/qglview.cc')
-rw-r--r--src/qglview.cc40
1 files changed, 1 insertions, 39 deletions
diff --git a/src/qglview.cc b/src/qglview.cc
index f303965..d689a96 100644
--- a/src/qglview.cc
+++ b/src/qglview.cc
@@ -324,48 +324,10 @@ void QGLView::display_opencsg_warning()
void QGLView::resizeGL(int w, int h)
{
-#ifdef ENABLE_OPENCSG
- shaderinfo[9] = w;
- shaderinfo[10] = h;
-#endif
- glViewport(0, 0, w, h);
- w_h_ratio = sqrt((double)w / (double)h);
-
+ GLView::resizeGL(w,h);
GLView::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::setupGimbalOrtho(double distance, bool offset)
-{
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- if(offset)
- glTranslated(-0.8, -0.8, 0);
- double l = distance/10;
- glOrtho(-w_h_ratio*l, +w_h_ratio*l,
- -(1/w_h_ratio)*l, +(1/w_h_ratio)*l,
- -FAR_FAR_AWAY, +FAR_FAR_AWAY);
- gluLookAt(0.0, -viewer_distance, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0);
-}
-*/
-
void QGLView::paintGL()
{
glEnable(GL_LIGHTING);
contact: Jan Huwald // Impressum