I´m trying to use


instead of the clumsy:


inside the vertex program I use

"ATTRIB tangent = vertex.attrib[9];

The program compiles and the call to glVertexAttribPointer() does not produce an error. vbuffer->m_pointer is NULL for VBO objects (which get bound just before). As the ARB_vertex_program specs require, I do not mix the generic attribute and the belonging vertex attribute, but I do mix generic attributes and standard vertex attribute (through glVertexPointer() for instance) in general.

The problem is, as soon as I use a single generic attribute (like shown above) I get a nullpointer exception inside ATIOGLXX.dll (I´m using the latest 3.4 catalyst drivers on a R9700). The exception occures inside a glDrawRangeElements() call. The indices are not stored inside a VBO. The whole thing works as soon as I use standard glTexCoordPointer() calls.

What am I doing wrong? Did I miss something?
Do the specs require to specify all-or-nothing with glVertexAttribPointerARB() ?

thanks in advance

Try using attributes 6 and 7 for your binormals/tangents. These are guarenteed by the spec to always work when using regular vertex arrays.

Using attribute 9 ought to work, as long as you didn’t change texture coordinate 1’s vertex state (ie, call glTexCoordPointer in the context of texture unit 1). Could be an aliasing bug in ATi’s implementation. But 6&7 really should work.

using attrib 6, 7 and the usual normalarray magically works! I wonder if its a bug in the drivers…