diff options
Diffstat (limited to 'src/render/renderers/opengl/graphicshelpers/submissioncontext.cpp')
-rw-r--r-- | src/render/renderers/opengl/graphicshelpers/submissioncontext.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/render/renderers/opengl/graphicshelpers/submissioncontext.cpp b/src/render/renderers/opengl/graphicshelpers/submissioncontext.cpp index d9077976c..dc1e85b8e 100644 --- a/src/render/renderers/opengl/graphicshelpers/submissioncontext.cpp +++ b/src/render/renderers/opengl/graphicshelpers/submissioncontext.cpp @@ -1273,14 +1273,15 @@ bool SubmissionContext::setParameters(ShaderParameterPack ¶meterPack) GLTexture *t = manager->glTextureManager()->lookupResource(namedTex.texId); if (t != nullptr) { UniformValue &texUniform = uniformValues[namedTex.glslNameId]; - Q_ASSERT(texUniform.valueType() == UniformValue::TextureValue); - const int texUnit = activateTexture(TextureScopeMaterial, t); - texUniform.data<int>()[namedTex.uniformArrayIndex] = texUnit; - if (texUnit == -1) { - if (namedTex.glslNameId != irradianceId && - namedTex.glslNameId != specularId) { - // Only return false if we are not dealing with env light textures - return false; + if (texUniform.valueType() == UniformValue::TextureValue) { + const int texUnit = activateTexture(TextureScopeMaterial, t); + texUniform.data<int>()[namedTex.uniformArrayIndex] = texUnit; + if (texUnit == -1) { + if (namedTex.glslNameId != irradianceId && + namedTex.glslNameId != specularId) { + // Only return false if we are not dealing with env light textures + return false; + } } } } |