Original Post
I've started working on a 3D engine and I'd like some comments and suggestions on improving it. I'm not making this into a AAA-quality engine, though I'm trying to have something moderately performant and decent enough. Again, these are just the first stages of the engine - it's a draft at this point. In short, my engine is as a singleton. Among its members, it contains a vector used to store scene data. Typically when rendering a frame, my game clears this vector. Each interface (for example, the window/font manager) then shoots data into it. Typically they cumulate all of their data into an array or vector and shoot it into the engine in one operation. Once the vector has been filled with the render data, I call my engine's render method which renders the data all at once. Ideally I want to abstract everything graphic from the rest of my game. I don't want my game to work with vertices at all, other than generating the data. That way I'd be able to write a different graphic engine and support, say, OpenGL at a later date if I wanted to, or reuse the engine elsewhere with little to no tweaking. The game is just responsible for generating the data - the graphic engine is responsible for doing stuff with it. Also, I'm a little uneasy with refilling the vector every frame. It seems like I could benefit from having some sort of dirty region to identify new data so I don't have to regenerate a large amount of vertices that remain the same from frame to frame (ie, map data.)