I´m trying to use
glVertexAttribPointerARB(9,stream.num_components,stream.type,GL_FALSE,stream.stride,vbuffer->m_pointer+stream.offset);
glEnableVertexAttribArrayARB(9);
instead of the clumsy:
glClientActiveTextureARB(GL_TEXTURE1_ARB);
glTexCoordPointer(stream.num_components,stream.type,stream.stride,vbuffer->m_pointer+stream.offset);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glClientActiveTextureARB(GL_TEXTURE0_ARB);
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