GLShader: fix return value of create_shader()
This commit is contained in:
parent
e600ec871f
commit
9824ef9373
@ -33,11 +33,8 @@ static GLuint create_shader(GLenum shader_type, const char *source, size_t size)
|
||||
glCompileShader(id);
|
||||
|
||||
glGetShaderiv(id, GL_COMPILE_STATUS, &status);
|
||||
if (status == GL_TRUE)
|
||||
if (status != GL_TRUE)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
GLint log_length;
|
||||
glGetShaderiv(id, GL_INFO_LOG_LENGTH, &log_length);
|
||||
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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return id;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user