summaryrefslogtreecommitdiff
path: root/src/GLView.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/GLView.cc
parentf07c6b2cb633bcb22acd8b19315911b373934786 (diff)
consolidate resizeGL()
Diffstat (limited to 'src/GLView.cc')
-rw-r--r--src/GLView.cc13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/GLView.cc b/src/GLView.cc
index cb1f9c1..c851497 100644
--- a/src/GLView.cc
+++ b/src/GLView.cc
@@ -15,6 +15,18 @@ void GLView::setRenderer(Renderer* r)
this->renderer = r;
}
+void GLView::resizeGL(int w, int h)
+{
+#ifdef ENABLE_OPENCSG
+ shaderinfo[9] = w;
+ shaderinfo[10] = h;
+#endif
+ this->width = w;
+ this->height = h;
+ glViewport(0, 0, w, h);
+ w_h_ratio = sqrt((double)w / (double)h);
+}
+
void GLView::setGimbalCamera(const Eigen::Vector3d &pos, const Eigen::Vector3d &rot, double distance)
{
PRINT("set gimbal camera not implemented");
@@ -68,7 +80,6 @@ void GLView::setupOrtho(bool offset)
/*
void initializeGL(); //
- void resizeGL(int w, int h); //
void paintGL(); //
contact: Jan Huwald // Impressum