mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-11 08:30:55 +00:00
Switches enable_vertex_attribute_with_pointer
to silent failure (versus glGetError).
This commit is contained in:
parent
2adf3d353e
commit
ecb5504bd1
@ -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...
|
||||
|
Loading…
x
Reference in New Issue
Block a user