Commit 0bd46583 authored by Martin Schultz's avatar Martin Schultz
Browse files

Merge branch 'fixWindowsDebugContext' into 'unstable'

Fix windows debug context

See merge request !59
parents a45919f8 cc5745db
...@@ -98,6 +98,18 @@ ...@@ -98,6 +98,18 @@
//== IMPLEMENTATION ========================================================== //== 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) /** \brief Constuctor for the Core Widget ( This is stage 1 , call init for stage 2)
* *
* Initialization is working the following way:\n * Initialization is working the following way:\n
...@@ -653,6 +665,7 @@ Core::init() { ...@@ -653,6 +665,7 @@ Core::init() {
coreWidget_->splitter_->restoreState (windowStates.value("Core/LogSplitter").toByteArray ()); coreWidget_->splitter_->restoreState (windowStates.value("Core/LogSplitter").toByteArray ());
coreWidget_->show(); coreWidget_->show();
recreateContext();
applyOptions(); applyOptions();
...@@ -671,6 +684,8 @@ Core::init() { ...@@ -671,6 +684,8 @@ Core::init() {
} else { } else {
coreWidget_->show(); coreWidget_->show();
recreateContext();
applyOptions(); 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