1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-10-01 13:58:20 +00:00

Switches enable_vertex_attribute_with_pointer to silent failure (versus glGetError).

This commit is contained in:
Thomas Harte 2018-11-12 22:51:44 -05:00
parent 2adf3d353e
commit ecb5504bd1

View File

@ -104,9 +104,11 @@ GLint Shader::get_uniform_location(const std::string &name) {
void Shader::enable_vertex_attribute_with_pointer(const std::string &name, GLint size, GLenum type, GLboolean normalised, GLsizei stride, const GLvoid *pointer, GLuint divisor) {
GLint location = get_attrib_location(name);
glEnableVertexAttribArray((GLuint)location);
glVertexAttribPointer((GLuint)location, size, type, normalised, stride, pointer);
glVertexAttribDivisor((GLuint)location, divisor);
if(location >= 0) {
glEnableVertexAttribArray((GLuint)location);
glVertexAttribPointer((GLuint)location, size, type, normalised, stride, pointer);
glVertexAttribDivisor((GLuint)location, divisor);
}
}
// The various set_uniforms...