glBindAttribLocationARB questions

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?

I would recommend just calling glGetAttribLocationARB unless your data must go to a specific attribute location.

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.