glBindAttribLocationARB should allow to reserve attribute locations before you link the program object. Unfortunately some fixed-functionality attributes are mapped to fixed locations. For example - normal is mapped to location #2.
If I got everything right, vertex coordinates should be mapped to location #0, but other locations shouldn’t be reserved.
Now I use glGetAttribLocationARB after I link the program object adn everything works fine.
“Double trouble” in topic suggests there is another problem - I’ve noticed that every call to this functions consumes some memory. Just make a loop, and try bind the same attribute to the same location many times.
I hope this little info will help someone to avoid eventual trouble. Anyway, this is just a small deviation - I just tried to run my GeForce compatible app on Radeon x850 and failed miserably. I’ll write two more posts on this topic in just a minute.
Hmm, memory leaks with nvidia drivers, I remember…
I found some too, 1-2 years ago, with display lists.
Deleting display Lists didn’t free the complete memory (except: disabling all lists, memory was freed in most cases, but this wasn’t a option for me).
glBindAttribLocationARB should allow to reserve attribute locations before you link the program object. Unfortunately some fixed-functionality attributes are mapped to fixed locations. For example - normal is mapped to location #2.
Have a look at section 6.1.2 of this document: http://download.nvidia.com/developer/Papers/2005/OpenGL_2.0/NVIDIA_OpenGL_2.0_Support.pdf
I came across this looking for some more info on vertex textures. It’s got the goods on some potential gotchas with nvidia boards, including vertex attribute aliasing