rhi: gl: Do not bother with glDrawBuffers(GL_BACK)
It's per framebuffer and the color target for the default fbo is never altered. So no need for this call. This is useful because it avoids having to deal with the controversy around GL_BACK (where the GL, but not the ES, spec claims some quite nonsensical things about GL_BACK not being accepted by glDrawBuffers (in the name of stereo support?), nevermind GL_BACK being the default value...), and while what we have in place now seems to be ok with many implementations, it may generate a GL error with others - so just remove the call in order not have to think about this legacy nonsense) Task-number: QTBUG-88070 Change-Id: I051c60a3041865a3434801b57da2b7acb518b8fe Reviewed-by: Andy Nichols <andy.nichols@qt.io>
This commit is contained in:
parent
93f558a0cf
commit
be37937614
@ -2399,10 +2399,6 @@ void QRhiGles2::executeCommandBuffer(QRhiCommandBuffer *cb)
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
f->glBindFramebuffer(GL_FRAMEBUFFER, ctx->defaultFramebufferObject());
|
f->glBindFramebuffer(GL_FRAMEBUFFER, ctx->defaultFramebufferObject());
|
||||||
if (caps.maxDrawBuffers > 1) {
|
|
||||||
GLenum bufs = GL_BACK;
|
|
||||||
f->glDrawBuffers(1, &bufs);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (caps.srgbCapableDefaultFramebuffer) {
|
if (caps.srgbCapableDefaultFramebuffer) {
|
||||||
if (cmd.args.bindFramebuffer.srgb)
|
if (cmd.args.bindFramebuffer.srgb)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user