From 40b3a441ceb9d766a024e85db78bbe3d96f3a896 Mon Sep 17 00:00:00 2001 From: Mauro Persano Date: Fri, 30 Apr 2021 16:37:06 -0300 Subject: Fix call to drawBuffers in SubmissionContext Implementations of GraphicsHelperInterface::drawBuffers expect an array of zero-based attachment point indexes (GL_COLOR_ATTACHMENT0 is added to the indexes internally), so we can't convert the attachment index to an OpenGL enum before calling drawBuffers. Change-Id: Ibc8af9f7c402b055c5391ad673b815c1fb65a40a Reviewed-by: Paul Lemire (cherry picked from commit 0157b93098fb5339cfe8fe99a111cf6e6f047565) Reviewed-by: Qt Cherry-pick Bot --- src/plugins/renderers/opengl/graphicshelpers/submissioncontext.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/renderers/opengl/graphicshelpers/submissioncontext.cpp b/src/plugins/renderers/opengl/graphicshelpers/submissioncontext.cpp index b3cf115ca..7a7da931a 100644 --- a/src/plugins/renderers/opengl/graphicshelpers/submissioncontext.cpp +++ b/src/plugins/renderers/opengl/graphicshelpers/submissioncontext.cpp @@ -1598,7 +1598,7 @@ void SubmissionContext::blitFramebuffer(Qt3DCore::QNodeId inputRenderTargetId, if (!outputBufferIsDefault) { // Note that we use glDrawBuffers, not glDrawBuffer. The // latter is not available with GLES. - const int buf = glAttachmentPoint(outputAttachmentPoint); + const int buf = outputAttachmentPoint; drawBuffers(1, &buf); } -- cgit v1.2.3