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();