Fix total_uniforms uninitialized if missing shader program

This commit is contained in:
Benau 2018-04-19 11:48:27 +08:00
parent c3f2d144b2
commit 63bb6a467b

View File

@ -208,7 +208,7 @@ void SPShader::bindTextures(const std::array<GLuint, 6>& tex,
void SPShader::addAllUniforms(RenderPass rp)
{
#ifndef SERVER_ONLY
GLint total_uniforms;
GLint total_uniforms = 0;
glGetProgramiv(m_program[rp], GL_ACTIVE_UNIFORMS, &total_uniforms);
static const std::map<GLenum, std::type_index> supported_types =
{