How to create an OpenGL rendering queue/buffer/cache

Does anyone know of any tutorials or sites that explain how to implement a render queue/cache/buffer for OpenGL? I’m at the point where I want to render my first OpenGL object in my engine (finally!), but I’m thinking that I might get the engine to retrieve render information from each renderable object and insert it into a queue (or cache/buffer). This would include texture and primitive information (i.e. triangle strips and maybe state changes?) Then the queue is emptied and everything is drawn to the screen.

So any pointers or URLs are greatly appreciated.


You’ll need something like shaders, each with its own buffer for meshes. Your objects will push the triangles into certain shader’s buffer.
When whole scene is “pushed” all you need is to flush all buffers, one by one, so the state changes will be relatively small.