Commit cc5745db authored by schultz's avatar schultz

fixes #9 by recerating the opengl context after QMainWindow->show was

called
parent 745d2324
......@@ -98,6 +98,18 @@
//== IMPLEMENTATION ==========================================================
namespace {
void recreateContext()
{
QOpenGLContext* ctx = QOpenGLContext::currentContext();
QSurfaceFormat format = QSurfaceFormat::defaultFormat();
ctx->setFormat(format);
ctx->create();
QOffscreenSurface* surface = new QOffscreenSurface();
ctx->makeCurrent(surface);
}
}
/** \brief Constuctor for the Core Widget ( This is stage 1 , call init for stage 2)
*
* Initialization is working the following way:\n
......@@ -653,6 +665,7 @@ Core::init() {
coreWidget_->splitter_->restoreState (windowStates.value("Core/LogSplitter").toByteArray ());
coreWidget_->show();
recreateContext();
applyOptions();
......@@ -671,6 +684,8 @@ Core::init() {
} else {
coreWidget_->show();
recreateContext();
applyOptions();
}
......
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