From 0b7778f964107436748db020c0e4ee6f09cc6c67 Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Fri, 5 Oct 2018 14:38:20 +0100 Subject: [PATCH] [plugins/qpa] Add explanatory comment --- plugins/qpa/sharingplatformcontext.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/qpa/sharingplatformcontext.cpp b/plugins/qpa/sharingplatformcontext.cpp index a318bf0795..a6e4b2bd83 100644 --- a/plugins/qpa/sharingplatformcontext.cpp +++ b/plugins/qpa/sharingplatformcontext.cpp @@ -50,6 +50,8 @@ bool SharingPlatformContext::makeCurrent(QPlatformSurface *surface) { Window *window = static_cast(surface); + // QOpenGLContext::makeCurrent in Qt5.12 calls platfrom->setContext before setCurrentContext + // but binding the content FBO looks up the format from the current context, so we need // to make sure sure Qt knows what the correct one is already QOpenGLContextPrivate::setCurrentContext(context()); if (eglMakeCurrent(eglDisplay(), m_surface, m_surface, eglContext())) { window->bindContentFBO();