summaryrefslogtreecommitdiffstats
path: root/src/plugins/renderers/opengl/graphicshelpers/submissioncontext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/renderers/opengl/graphicshelpers/submissioncontext.cpp')
-rw-r--r--src/plugins/renderers/opengl/graphicshelpers/submissioncontext.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/plugins/renderers/opengl/graphicshelpers/submissioncontext.cpp b/src/plugins/renderers/opengl/graphicshelpers/submissioncontext.cpp
index ab5948e49..7ba67fed9 100644
--- a/src/plugins/renderers/opengl/graphicshelpers/submissioncontext.cpp
+++ b/src/plugins/renderers/opengl/graphicshelpers/submissioncontext.cpp
@@ -481,6 +481,10 @@ bool SubmissionContext::beginDrawing(QSurface *surface)
}
m_boundArrayBuffer = nullptr;
+
+ // Record the default FBO value as there's no guarantee it remains constant over time
+ m_defaultFBO = m_gl->defaultFramebufferObject();
+
return true;
}
@@ -1226,6 +1230,10 @@ bool SubmissionContext::setParameters(ShaderParameterPack &parameterPack, GLShad
}
}
+ // Set the pinned images of the previous material
+ // to pinable so that we should easily find an available image unit
+ m_imageContext.deactivateImages();
+
// Fill Image Uniform Value with proper image units
// so that they can be applied as regular uniforms in a second step
for (int i = 0; i < parameterPack.images().size(); ++i) {
@@ -1598,7 +1606,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);
}