summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/GLView.h9
-rw-r--r--src/glview.cc2
-rw-r--r--src/mainwin.cc6
3 files changed, 10 insertions, 7 deletions
diff --git a/src/GLView.h b/src/GLView.h
index dd896fc..7516894 100644
--- a/src/GLView.h
+++ b/src/GLView.h
@@ -39,6 +39,11 @@ public:
double object_trans_z;
GLint shaderinfo[11];
+#ifdef ENABLE_OPENCSG
+ bool opencsg_support;
+ int opencsg_id;
+#endif
+
private:
void (*renderfunc)(void*);
void *renderfunc_vp;
@@ -51,10 +56,6 @@ private:
double w_h_ratio;
-#ifdef ENABLE_OPENCSG
- bool opencsg_support;
-#endif
-
bool mouse_drag_active;
int last_mouse_x;
int last_mouse_y;
diff --git a/src/glview.cc b/src/glview.cc
index dc42a7f..29046e0 100644
--- a/src/glview.cc
+++ b/src/glview.cc
@@ -65,6 +65,8 @@ GLView::GLView(QWidget *parent) : QGLWidget(parent)
setMouseTracking(true);
#ifdef ENABLE_OPENCSG
opencsg_support = true;
+ static int sId = 0;
+ opencsg_id = sId++;
#endif
}
diff --git a/src/mainwin.cc b/src/mainwin.cc
index 296c417..e9bbdaa 100644
--- a/src/mainwin.cc
+++ b/src/mainwin.cc
@@ -1323,6 +1323,9 @@ static void renderGLviaOpenCSG(void *vp)
glew_initialized = 1;
glewInit();
}
+#ifdef ENABLE_MDI
+ OpenCSG::setContext(m->screen->opencsg_id);
+#endif
if (m->root_chain) {
GLint *shaderinfo = m->screen->shaderinfo;
if (!shaderinfo[0])
@@ -1335,9 +1338,6 @@ static void renderGLviaOpenCSG(void *vp)
renderCSGChainviaOpenCSG(m->highlights_chain, m->viewActionShowEdges->isChecked() ? shaderinfo : NULL, true, false);
}
}
-#ifdef ENABLE_MDI
- OpenCSG::reset();
-#endif
}
/*!
contact: Jan Huwald // Impressum