I have an issue with WebGL shaders.
I have multiple shader programs.
When all of my shaders have 2 attributes (types don’t matter), the polygons are drawn fine.
However, if I add one more attribute to any program, none of the polygons are drawn, and “attribs not set up correctly” error is given when DrawArrays is called.
All vertex attribute arrays are enabled, and an array buffer is bound to all attributes. I can’t find the cause of the error, everything is done the same way as before, just with different attribute index.
I tried both Get and BindAttribLocation, and I get the same result.
How do I use more than 2 attributes in my programs?
Moved
Enable/DisableVertexAttribArrayfrom initialization code to drawing code. Now it’s working!