diff --git a/src/graphics/sp/sp_shader.cpp b/src/graphics/sp/sp_shader.cpp index 027d84a70..c39b33784 100644 --- a/src/graphics/sp/sp_shader.cpp +++ b/src/graphics/sp/sp_shader.cpp @@ -227,22 +227,27 @@ void SPShader::addAllUniforms(RenderPass rp) GLenum type; char name[100] = {}; glGetActiveUniform(m_program[rp], i, 99, NULL, &size, &type, name); - if (size != 1 && m_sp_shader_debug) + if (size != 1) { - Log::debug("SPShader", "Array of uniforms is not supported in" - " shader %s for %s.", m_name.c_str(), name); + if (m_sp_shader_debug) + { + Log::debug("SPShader", "Array of uniforms is not supported in" + " shader %s for %s.", m_name.c_str(), name); + } continue; } auto ret = supported_types.find(type); - if (ret == supported_types.end() && m_sp_shader_debug) + if (ret == supported_types.end()) { - Log::debug("SPShader", "%d type not supported", (unsigned)type); + if (m_sp_shader_debug) + Log::debug("SPShader", "%d type not supported", (unsigned)type); continue; } GLuint location = glGetUniformLocation(m_program[rp], name); - if (location == GL_INVALID_INDEX && m_sp_shader_debug) + if (location == GL_INVALID_INDEX) { - Log::debug("SPShader", "%s uniform not found", name); + if (m_sp_shader_debug) + Log::debug("SPShader", "%s uniform not found", name); continue; } m_uniforms[rp][name] = new SPUniformAssigner(ret->second, location);