summaryrefslogtreecommitdiffstats
path: root/src/gui/rhi/qrhigles2.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2020-11-01 15:44:34 +0100
committerLaszlo Agocs <laszlo.agocs@qt.io>2020-11-02 13:08:57 +0100
commitbe37937614c09449f83b07c4023206f2c225c31b (patch)
tree8dbd52615af6a4dbcd893e51fb53d8241d811b01 /src/gui/rhi/qrhigles2.cpp
parent93f558a0cf6681d722de5f9c91738c6c483ebe7f (diff)
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>
Diffstat (limited to 'src/gui/rhi/qrhigles2.cpp')
-rw-r--r--src/gui/rhi/qrhigles2.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/gui/rhi/qrhigles2.cpp b/src/gui/rhi/qrhigles2.cpp
index 785c341a0f..3ebc0f9182 100644
--- a/src/gui/rhi/qrhigles2.cpp
+++ b/src/gui/rhi/qrhigles2.cpp
@@ -2399,10 +2399,6 @@ void QRhiGles2::executeCommandBuffer(QRhiCommandBuffer *cb)
}
} else {
f->glBindFramebuffer(GL_FRAMEBUFFER, ctx->defaultFramebufferObject());
- if (caps.maxDrawBuffers > 1) {
- GLenum bufs = GL_BACK;
- f->glDrawBuffers(1, &bufs);
- }
}
if (caps.srgbCapableDefaultFramebuffer) {
if (cmd.args.bindFramebuffer.srgb)