When I try to bind an attribute to an index of 0, the shader program fails at linking and the only information the infolog gives is:
Vertex shader(s) failed to link, Fragment shader(s) linked.
According the the opengl docs
This command makes it possible for vertex shaders to use descriptive names for attribute variables rather than generic variables that are numbered from 0 to GL_MAX_VERTEX_ATTRIBS -1.
So binding an attribute to index 0 should work. Though it is not very important, I am curious as to why I cannot bind an attribute to index 0. Any suggestions are welcome.
glBindAttribLocation
before or after attaching the vertex shader to the program object? Also, have you checkedglGetError
immediately afterglBindAttribLocation
? – Damon