Use the default fbo in Qt sense in blitFramebuffer
QOpenGLFramebufferObject::blitFramebuffer() passes 0 when no FBO is specified. This goes against the rest of the framework where the default fbo is what QOpenGLContext::defaultFramebufferObject() returns. This becomes significant with QOpenGLWidget and on iOS. Task-number: QTBUG-45328 Change-Id: Iaeb82cd3786ad395116679c9626bdcb10e93b4e3 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>bb10
parent
f041757d7a
commit
a715c6ceb8
|
|
@ -1484,8 +1484,10 @@ void QOpenGLFramebufferObject::blitFramebuffer(QOpenGLFramebufferObject *target,
|
|||
const int ty0 = targetRect.top();
|
||||
const int ty1 = targetRect.top() + targetRect.height();
|
||||
|
||||
extensions.glBindFramebuffer(GL_READ_FRAMEBUFFER, source ? source->handle() : 0);
|
||||
extensions.glBindFramebuffer(GL_DRAW_FRAMEBUFFER, target ? target->handle() : 0);
|
||||
const GLuint defaultFboId = ctx->defaultFramebufferObject();
|
||||
|
||||
extensions.glBindFramebuffer(GL_READ_FRAMEBUFFER, source ? source->handle() : defaultFboId);
|
||||
extensions.glBindFramebuffer(GL_DRAW_FRAMEBUFFER, target ? target->handle() : defaultFboId);
|
||||
|
||||
extensions.glBlitFramebuffer(sx0, sy0, sx1, sy1,
|
||||
tx0, ty0, tx1, ty1,
|
||||
|
|
|
|||
Loading…
Reference in New Issue