Commit 87203f92 authored by Christian Schulte zu Berge's avatar Christian Schulte zu Berge
Browse files

Fixed GeometryTransferFunctionEditors trying to initialize their OpenGL...

Fixed GeometryTransferFunctionEditors trying to initialize their OpenGL contexts from non OpenGL thread.
parent 5cc8edba
......@@ -243,9 +243,9 @@ namespace campvis {
_layout->addWidget(lblOpacityBottom, 3, 0, 1, 1, Qt::AlignRight);
_canvas = new tgt::QtThreadedCanvas("", tgt::ivec2(256, 128), tgt::GLCanvas::RGBA_BUFFER, 0, false);
tgt::GlContextManager::getRef().registerContextAndInitGlew(_canvas);
GLJobProc.registerContext(_canvas);
GLJobProc.enqueueJob(_canvas, makeJobOnHeap<tgt::GlContextManager, tgt::GLCanvas*>(tgt::GlContextManager::getPtr(), &tgt::GlContextManager::registerContextAndInitGlew, _canvas), OpenGLJobProcessor::SerialJob);
_canvas->setPainter(this, false);
_layout->addWidget(_canvas, 1, 1, 3, 3);
......@@ -256,7 +256,7 @@ namespace campvis {
_lblIntensityRight = new QLabel(QString::number(gtf->getIntensityDomain().y), this);
_layout->addWidget(_lblIntensityRight, 4, 3, 1, 1, Qt::AlignRight);
QVBoxLayout* buttonLayout = new QVBoxLayout(); // TODO: check whether buttonLayout will be deleted by Qt's GC!
QVBoxLayout* buttonLayout = new QVBoxLayout();
_layout->addLayout(buttonLayout, 1, 4, 1, 3, Qt::AlignTop);
_btnAddGeometry = new QPushButton(tr("Add Geometry"), this);
......
......@@ -227,9 +227,9 @@ namespace campvis {
_layout->addWidget(lblOpacityBottom, 3, 0, 1, 1, Qt::AlignRight);
_canvas = new tgt::QtThreadedCanvas("", tgt::ivec2(256, 128), tgt::GLCanvas::RGBA_BUFFER, 0, false);
tgt::GlContextManager::getRef().registerContextAndInitGlew(_canvas);
GLJobProc.registerContext(_canvas);
GLJobProc.enqueueJob(_canvas, makeJobOnHeap<tgt::GlContextManager, tgt::GLCanvas*>(tgt::GlContextManager::getPtr(), &tgt::GlContextManager::registerContextAndInitGlew, _canvas), OpenGLJobProcessor::SerialJob);
_canvas->setPainter(this, false);
_layout->addWidget(_canvas, 1, 1, 3, 3);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment