summaryrefslogtreecommitdiffstats
path: root/src/render/graphicshelpers/graphicscontext.cpp
diff options
context:
space:
mode:
authorMäättä Antti <antti.maatta@qt.io>2017-06-19 11:21:09 +0300
committerAntti Määttä <antti.maatta@qt.io>2017-06-20 09:58:58 +0000
commit920e9ecef384058e8f44eea09dfafda03a9ec435 (patch)
treef809919cc19b79a2fddb2780a1d46246cc04337d /src/render/graphicshelpers/graphicscontext.cpp
parentc07aaf56c1fe8e8f07cf695e0d8a1b3337a320af (diff)
Add warnings to readFramebuffer
This allows detecting problems with the render capture if the capture fails. Change-Id: I20f630eb9a1adb677513ff225d21c7e338c57809 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/render/graphicshelpers/graphicscontext.cpp')
-rw-r--r--src/render/graphicshelpers/graphicscontext.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/render/graphicshelpers/graphicscontext.cpp b/src/render/graphicshelpers/graphicscontext.cpp
index c5440e45e..3bd5cdb4a 100644
--- a/src/render/graphicshelpers/graphicscontext.cpp
+++ b/src/render/graphicshelpers/graphicscontext.cpp
@@ -1812,8 +1812,11 @@ QImage GraphicsContext::readFramebuffer(QSize size)
GLint samples = 0;
m_gl->functions()->glGetIntegerv(GL_SAMPLES, &samples);
- if (samples > 0 && !m_glHelper->supportsFeature(GraphicsHelperInterface::BlitFramebuffer))
+ if (samples > 0 && !m_glHelper->supportsFeature(GraphicsHelperInterface::BlitFramebuffer)) {
+ qWarning () << Q_FUNC_INFO << "Unable to capture multisampled framebuffer; "
+ "Required feature BlitFramebuffer is missing.";
return img;
+ }
img = QImage(size.width(), size.height(), imageFormat);
@@ -1834,6 +1837,7 @@ QImage GraphicsContext::readFramebuffer(QSize size)
if (status != GL_FRAMEBUFFER_COMPLETE) {
gl->glDeleteRenderbuffers(1, &rb);
gl->glDeleteFramebuffers(1, &fbo);
+ qWarning () << Q_FUNC_INFO << "Copy-framebuffer not complete: " << status;
return img;
}