Keep the internal state about the bound fbo up to date
When binding an FBO directly via glBindFramebuffer, the QOpenGLContext's internal current_fbo, that is maintained by QOpenGLFramebufferObject, becomes out of sync. This will lead to QOpenGLFramebufferObjects thinking they are still bound. This fix prevents ShaderEffect items in QQuickWidget from complaining about "'recursive' must be set to true when rendering recursively". Ideally the entire tracking of the current fbo should be removed, since it cannot be done robustly enough, but that will likely happen in 5.4 only. Task-number: QTBUG-38994 Change-Id: I39015d90bb2e0985d2a084b79ffe2004a9bc9f07 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
This commit is contained in:
parent
bc59d42e0f
commit
2414f1675e
|
@ -103,7 +103,9 @@ QSGBindableFboId::QSGBindableFboId(GLuint id)
|
|||
|
||||
void QSGBindableFboId::bind() const
|
||||
{
|
||||
QOpenGLContext::currentContext()->functions()->glBindFramebuffer(GL_FRAMEBUFFER, m_id);
|
||||
QOpenGLContext *context = QOpenGLContext::currentContext();
|
||||
context->functions()->glBindFramebuffer(GL_FRAMEBUFFER, m_id);
|
||||
QOpenGLContextPrivate::get(context)->current_fbo = m_id;
|
||||
}
|
||||
|
||||
/*!
|
||||
|
|
Loading…
Reference in New Issue