From 24929909f28df24461e62f36e80f0a60675facd3 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Tue, 14 May 2019 17:30:32 -0700 Subject: [PATCH] Qt: Reload GL context on main thread after shutting down painter --- src/platform/qt/DisplayGL.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/platform/qt/DisplayGL.cpp b/src/platform/qt/DisplayGL.cpp index 6a3afecd6..a5f4129e9 100644 --- a/src/platform/qt/DisplayGL.cpp +++ b/src/platform/qt/DisplayGL.cpp @@ -99,6 +99,11 @@ void DisplayGL::stopDrawing() { QMetaObject::invokeMethod(m_painter, "stop", Qt::BlockingQueuedConnection); m_drawThread->exit(); m_drawThread = nullptr; + + m_gl->context()->makeCurrent(); +#if defined(_WIN32) && defined(USE_EPOXY) + epoxy_handle_external_wglMakeCurrent(); +#endif } m_context.reset(); }