PDA

View Full Version : glBindAttribLocationARB questions



martinho_
01-26-2005, 10:01 AM
Is it correct to call glBindAttribLocationARB to bind an arbitrary name to an index under GL_MAX_VERTEX_ATTRIBS?

I realized that, at least in my card (a GFFX5600) depending on the shader sometimes I have to change the index of my custom attributes for the shader to work. Sould I use glGetAttribLocationARB istead to retrieve the default index of the attribute?

jra101
01-26-2005, 01:19 PM
I would recommend just calling glGetAttribLocationARB unless your data must go to a specific attribute location.

Humus
01-27-2005, 04:11 AM
I've personally found it to be easier (at least in my situations) to rebind the attributes to the index I prefer. Don't forget that you need to relink the program object after you're done rebinding the indices though.