I am drawing an animated model of several frames. Say the model consists of 1000 vertices, and I want to render 5 frames.
I stored the vertex positions of the five frames in a large buffer, the size of which is sizeof(float) * 1000 * 3 * 5. During rendering I do not want to change the model color, so I stored the vertex color in another buffer which is of the size sizeof(float) * 1000 * 3.
But I have run into the problem of rendering it. I once thought of using glDrawElementsBaseVertex() that accepts an offset so I can render vertices of different frames, but the color array is shorter than the position array, so only the first frame has color associated with it. How can I solve this problem?




