Before I investigate myself on the subject, I wanted to know if people knew if loading attribute parameters value with VertexAttribPointer() is faster than using VertexAttrib().
Is it graphics hardware dependent or is there a general tendency that makes one of these functions faster than the others ?
You’re comparing vertex arrays with immediate mode drawing.
Normally vertex arrays are faster because they have less API overhead and can batch many primitives in one single call.
With extensions like vertex buffer objects underneath you might use the full hardware potential, which you never will with immediate mode.
So, with the simplest case, if you use glVertexPointer and glNormalPointer, and use glDrawElement, then for each vertex, you only make one function call to get both the position and the normal to the GPU.
The the savings go up from there if you make your indices into arrays or keep the data on the graphics card.
This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.