opengl/eglcontext: tell Qt when the OpenGL context gets changed
Otherwise, Qt thinks the old context is still current and will do things like destroying VAOs with KWin's context, which ends up destroying the VAO of the context and breaks rendering. BUG: 479094
This commit is contained in:
parent
564bfafb57
commit
8c3332f619
1 changed files with 4 additions and 0 deletions
|
@ -66,6 +66,10 @@ EglContext::~EglContext()
|
|||
|
||||
bool EglContext::makeCurrent(EGLSurface surface) const
|
||||
{
|
||||
if (QOpenGLContext *context = QOpenGLContext::currentContext()) {
|
||||
// Workaround to tell Qt that no QOpenGLContext is current
|
||||
context->doneCurrent();
|
||||
}
|
||||
return eglMakeCurrent(m_display->handle(), surface, surface, m_handle) == EGL_TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue