GLShader: fix return value of create_shader()

This commit is contained in:
Josh Holtrop 2014-08-05 20:07:43 -04:00
parent e600ec871f
commit 9824ef9373

View File

@ -33,11 +33,8 @@ static GLuint create_shader(GLenum shader_type, const char *source, size_t size)
glCompileShader(id); glCompileShader(id);
glGetShaderiv(id, GL_COMPILE_STATUS, &status); glGetShaderiv(id, GL_COMPILE_STATUS, &status);
if (status == GL_TRUE) if (status != GL_TRUE)
{ {
return true;
}
GLint log_length; GLint log_length;
glGetShaderiv(id, GL_INFO_LOG_LENGTH, &log_length); glGetShaderiv(id, GL_INFO_LOG_LENGTH, &log_length);
if (log_length > 0) if (log_length > 0)
@ -61,6 +58,7 @@ static GLuint create_shader(GLenum shader_type, const char *source, size_t size)
get_shader_type_name(shader_type)); get_shader_type_name(shader_type));
} }
} }
}
return id; return id;
} }