summaryrefslogtreecommitdiffstats
path: root/src/render/renderers/opengl/graphicshelpers/submissioncontext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/renderers/opengl/graphicshelpers/submissioncontext.cpp')
-rw-r--r--src/render/renderers/opengl/graphicshelpers/submissioncontext.cpp17
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 71bd6aa9c..d1ac853ea 100644
--- a/src/render/renderers/opengl/graphicshelpers/submissioncontext.cpp
+++ b/src/render/renderers/opengl/graphicshelpers/submissioncontext.cpp
@@ -1312,14 +1312,15 @@ bool SubmissionContext::setParameters(ShaderParameterPack &parameterPack)
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;
+ }
}
}
}