k_szczech
02-20-2006, 01:41 PM
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.
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.