Merge branch 'Plasma/5.14'
This commit is contained in:
commit
413bd53aac
1 changed files with 5 additions and 0 deletions
|
@ -26,6 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#include <logging.h>
|
#include <logging.h>
|
||||||
|
|
||||||
#include <QOpenGLFramebufferObject>
|
#include <QOpenGLFramebufferObject>
|
||||||
|
#include <private/qopenglcontext_p.h>
|
||||||
|
|
||||||
namespace KWin
|
namespace KWin
|
||||||
{
|
{
|
||||||
|
@ -48,6 +49,10 @@ SharingPlatformContext::SharingPlatformContext(QOpenGLContext *context, const EG
|
||||||
bool SharingPlatformContext::makeCurrent(QPlatformSurface *surface)
|
bool SharingPlatformContext::makeCurrent(QPlatformSurface *surface)
|
||||||
{
|
{
|
||||||
Window *window = static_cast<Window*>(surface);
|
Window *window = static_cast<Window*>(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())) {
|
if (eglMakeCurrent(eglDisplay(), m_surface, m_surface, eglContext())) {
|
||||||
window->bindContentFBO();
|
window->bindContentFBO();
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue