Rendering frames of animation. VertexArrays?

Hi, lets see if you can help me.

The way I’m doing animation in my current project is importing each keyframe from 3DSMax. I’m not sure how should I render each keyframe, right now I’m calling glBegin() glVertex() glEnd(), but I suppose I should create a vertex array for each key frame and then render the current vertex array. Is this correct?

Which is the best way for doing this, performance-wise? (I can’t use display lists, because the models will have animated textures and will be affected by lighting).
Thanks in advance.

As I know 3DS stores some sort of key positions, and your task is to only interpolate it. The best way is to use different vertex arrays for key positions and then blend them using linear interpolation via a vertex program.

“importing each key frame from 3dsmax” can mean many things. Key frames could be for a skeletal pose, and you could be interpolating bone positions/orientations between these key frames. Then, to render the model, you’d write an ARB_vertex_program which does skinning by looking at bone matrices out of a palette.

Or it could mean exporting the entire set of vertices for each key frame, a la good-old MD2 files. In that case, DrawRangeElement() is certainly a better way to get performance than immediate mode Vertex() calls. ARB_vertex_buffer_object storage of the vertex data would ensure optimal vertex transfer speed.