I have the following situation:
I got an object with, say 100 vertices per frame and 10 animation frames.
All this data is located within one vertex buffer, frame 1 starting at index 0, frame 2 at 100 and so on.
Each frame has an entry in the index buffer for its triangles, say 150 indices per frame, so frame 0 starting at index 0, frame 1 at 150 and so on.
So far, so good - rendering each frame is simple.
But now I want to add frame interpolation to that code and can't just find the way to do it. To pass two frames to the shader I'd need two index buffers and that's simply something OpenGL was never designed for.
Is there any solution to this, other than packing each frame into a separate buffer? This is clearly not what I'd like to do because with hundreds of objects I'd end up with a huge amount of buffers that need constant rebinding. I intentionally tried to put all data for all models into one large buffer to simplify management.
Intended target for the implementation is OpenGL 3.x.