Original Post
My design towards my graphics/other engines is naturally modular - I think best like that, I guess. However, I am a little unsure of my implementation, so I turn to you to critique :). I divided my things into three (at the moment) main "libraries":
- A OS wrapper
- A graphics API wrapper, which uses the OS wrapper
- The actual graphics engine, which uses both of those
NOTE: silk is a macro: #define silk ISilk::getSingleton()
ITexture * texture = silk.createTexture("dropship.jpg", ...);The question is really this: Should I instead put the functions in the namespaces (above code would be in a .cpp file with namespace declared) for something like:silk::createTexture(...); The only thing is that ISilk and the other singleton classes store information - Silk for example stores textures and the number of references to them. Is there a better way of doing this?