Qt: Reload GL context on main thread after shutting down painter

This commit is contained in:
Vicki Pfau 2019-05-14 17:30:32 -07:00
parent 945bc8fffe
commit 24929909f2
1 changed files with 5 additions and 0 deletions

View File

@ -99,6 +99,11 @@ void DisplayGL::stopDrawing() {
QMetaObject::invokeMethod(m_painter, "stop", Qt::BlockingQueuedConnection); QMetaObject::invokeMethod(m_painter, "stop", Qt::BlockingQueuedConnection);
m_drawThread->exit(); m_drawThread->exit();
m_drawThread = nullptr; m_drawThread = nullptr;
m_gl->context()->makeCurrent();
#if defined(_WIN32) && defined(USE_EPOXY)
epoxy_handle_external_wglMakeCurrent();
#endif
} }
m_context.reset(); m_context.reset();
} }