glVertexAttrib vs glVertexAttribPointer
glsl, graphics, opengl, performance
Solution
`glVertexAttrib` sets the value of an attribute for a given set of vertices.
`glVertexAttribPointer` sets the location of the attribute for every vertex.
So essentially these two are different functions, and you can't compare them in terms of speed. Anyway, setting the attribute pointer isn't the bottleneck in most rendering appliances.
Problem
I'm reading through and trying to learn shaders, but I suddenly got confused with passing information into the shader. What is the difference between `glVertexAttrib` and `glVertexAttribPointer`? Are there different times to use them? Are they just two different ways to do the same thing? Does one provide better or worse performance?