I've only written a bare bones engine: all you can do is draw an image from a file (you cannot even specify the coordinates). Here are the interfaces of my classes up until now:
Here are my questions/worries:
• How should I store graphical settings such as resolution, bits-per-pixel, whether or not the window is full-screen, etc? Ideally both Image and GraphicsRenderer should be able to read them. The Renderer for obvious reasons, and Image so it could convert the data to the right bits-per-pixel format.
• I'm not sure whether I should have more than one screen surface in my engine. Currently the only one is the private member in GraphicsRenderer. Should I instead have more screens, so I could more easily (re)draw the screens when I switch game states? Or should I just wait to see if this optimization is in fact necessary and only then modify the engine as appropriate?
• This is more of a request. Could someone describe to me all the base components of a simple 2D graphics engine? I don't need code, only a basic sketch that shows the purpose of each class and interaction with other classes.
This post has been edited by diego_pmc: 24 February 2011 - 11:57 AM