Say I have a class Mesh I intend to add to my scene object. My first instinct is to immediately buffer the mesh vertex data in its constructor using for example glBuffer objects in OpenGL, so I dont have to keep it all in my applications memory.
I am also puzzled what to expose to the renderer when I send a batch of meshes to be rendered. The way I imagine it is to simply expose a Render() method from the mesh which internally binds the VAO and draws the primitives... but then again it couples it with the graphics api.
From what I've read a good solution is to send it all in batch jobs to a dedicated rendering class that encapsulates the graphics api, which sounds good but how to structure the vertex data without touching the graphics api is abit unclear to me.
Edited by KaiserJohan, 26 December 2012 - 06:34 PM.