OK, I went back to this problem.
After much testing, I found that this works.
//Conventional arrays
glBindBuffer(GL_ARRAY_BUFFER, VBO[2]);
glEnableClientState(GL_VERTEX_ARRAY);
glVertexPointer(3, GL_FLOAT, VertexSize, VBO_VertexAddress);
glEnableClientState(GL_NORMAL_ARRAY);
glNormalPointer(GL_FLOAT, VertexSize, VBO_NormalAddress);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glTexCoordPointer(2, GL_FLOAT, VertexSize, VBO_TexCoordsAddress);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, VBO[3]);
glDrawRangeElements(GL_TRIANGLES, 0, EndVertexDRE, TotalIndex, GL_UNSIGNED_SHORT, 0);
but this doesn’t
glBindBuffer(GL_ARRAY_BUFFER, VBO[2]);
glEnableVertexAttribArray(0);
glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, VertexSize, VBO_VertexAddress);
glEnableVertexAttribArray(2);
glVertexAttribPointer(2, 3, GL_FLOAT, GL_FALSE, VertexSize, VBO_NormalAddress);
glEnableVertexAttribArray(8);
glVertexAttribPointer(8, 2, GL_FLOAT, GL_FALSE, VertexSize, VBO_TexCoordsAddress);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, VBO[3]);
glDrawRangeElements(GL_TRIANGLES, 0, EndVertexDRE, TotalIndex, GL_UNSIGNED_SHORT, 0);
The above 2 codes render the exact same object, using the exact same VBO. The only diff is that conventional vs generic attributes. I check if I’m loading the functions pointers OK and that is fine.
By “not working”, I mean that it is running, but normal and tex coords are screwed up, but the geometry (vertices) seem fine.
Extra info: I tried both interleaved arrays and non-interleaved but this doesn’t make a difference (I think)
Any ideas?