glInterleavedArrays

Hi …
I have a problem with this command :
glInterleavedArrays(GL_T2F_N3F_V3F, 0, v8f_table)

Actually I use this command in :
glPushClientAttrib(GL_CLIENT_VERTEX_ARRAY_BIT);
glInterleavedArrays(GL_T2F_N3F_V3F, 0, v8f_table);
glDrawElements(GL_TRIANGLES, 36, GL_UNSIGNED_SHORT, indices_table + 24);
glPopClientAttrib();

The problem is run-time error. What should I do ?
Tq.

no clue what push and popclient attrib do but to make use of vertex arrays
you would need to do

glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_NORMAL_ARRAY);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);

draw stuff

then glDisable…

glInterleavedArrays automatically enables all required arrays, so glEnableClientState is not neccessary.

What kind of error do you get? OpenGL error? General protection fault? Something else? It’s hard to tell what’s wrong without knowing more details…

Typically, people tend to avoid InterleavedArrays because it is not very flexible and doesn’t really have any performance benefit. They will still interleave their data, but set up the individual vertex attribute pointers (normal, color, texcoord) to have the appropriate strides and offsets. Maybe this approach will work better for you?

-Won