From 720ef16d559e5ed7eb9055808558d010ee0aa2f0 Mon Sep 17 00:00:00 2001 From: Mike Krus Date: Thu, 24 Oct 2019 11:32:44 +0100 Subject: Fix crash in Scene3DView Also fix warnings in SubmissionContext Change-Id: I7c8fe353547c6819d7a0a64f4bf49ea0b005f7dc Reviewed-by: Paul Lemire --- .../opengl/graphicshelpers/submissioncontext.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/render/renderers') diff --git a/src/render/renderers/opengl/graphicshelpers/submissioncontext.cpp b/src/render/renderers/opengl/graphicshelpers/submissioncontext.cpp index 4d42b6291..991a8533d 100644 --- a/src/render/renderers/opengl/graphicshelpers/submissioncontext.cpp +++ b/src/render/renderers/opengl/graphicshelpers/submissioncontext.cpp @@ -687,8 +687,8 @@ QImage SubmissionContext::readFramebuffer(const QRect &rect) GLint samples = 0; m_gl->functions()->glGetIntegerv(GL_SAMPLES, &samples); if (samples > 0 && !m_glHelper->supportsFeature(GraphicsHelperInterface::BlitFramebuffer)) { - qWarning () << Q_FUNC_INFO << "Unable to capture multisampled framebuffer; " - "Required feature BlitFramebuffer is missing."; + qCWarning(Backend) << Q_FUNC_INFO << "Unable to capture multisampled framebuffer; " + "Required feature BlitFramebuffer is missing."; return img; } @@ -711,7 +711,7 @@ QImage SubmissionContext::readFramebuffer(const QRect &rect) if (status != GL_FRAMEBUFFER_COMPLETE) { gl->glDeleteRenderbuffers(1, &rb); gl->glDeleteFramebuffers(1, &fbo); - qWarning () << Q_FUNC_INFO << "Copy-framebuffer not complete: " << status; + qCWarning(Backend) << Q_FUNC_INFO << "Copy-framebuffer not complete: " << status; return img; } @@ -797,7 +797,7 @@ bool SubmissionContext::activateShader(ProgramDNA shaderDNA) m_activeShaderDNA = shaderDNA; } else { m_glHelper->useProgram(0); - qWarning() << "No shader program found for DNA"; + qCWarning(Backend) << "No shader program found for DNA"; m_activeShaderDNA = 0; return false; } @@ -855,7 +855,7 @@ void SubmissionContext::activateDrawBuffers(const AttachmentPack &attachments) } } } else { - qWarning() << "FBO incomplete"; + qCWarning(Backend) << "FBO incomplete"; } } @@ -1179,7 +1179,7 @@ bool SubmissionContext::setParameters(ShaderParameterPack ¶meterPack) if (namedTex.glslNameId != irradianceId && namedTex.glslNameId != specularId) { // Only return false if we are not dealing with env light textures - qWarning() << "Unable to find suitable Texture Unit"; + qCWarning(Backend) << "Unable to find suitable Texture Unit"; return false; } } @@ -1198,7 +1198,7 @@ bool SubmissionContext::setParameters(ShaderParameterPack ¶meterPack) if (img != nullptr) { GLTexture *t = manager->glTextureManager()->lookupResource(img->textureId()); if (t == nullptr) { - qWarning() << "Shader Image referencing invalid texture"; + qCWarning(Backend) << "Shader Image referencing invalid texture"; continue; } else { UniformValue &imgUniform = uniformValues[namedTex.glslNameId]; @@ -1206,7 +1206,7 @@ bool SubmissionContext::setParameters(ShaderParameterPack ¶meterPack) const int imgUnit = m_imageContext.activateImage(img, t); imgUniform.data()[namedTex.uniformArrayIndex] = imgUnit; if (imgUnit == -1) { - qWarning() << "Unable to bind Image to Texture"; + qCWarning(Backend) << "Unable to bind Image to Texture"; return false; } } -- cgit v1.2.3