I have a game engine design written in C++ where a platform-independent game object is contained within a platform-specific Application object.
The problem I'm trying to solve is the case where I need to pass OS-specific data from the Application to the game. In this case, I'd need to pass the main HWND from Windows for DirectX or an OpenGL context for the other platforms to the renderer I'm using. Unfortunately I have little control over the renderer, which can expect platform-specific data.
I realize I could initialize the renderer on the Application side, but I'd rather have the game decide when and where to do it. Generally, I have control over the Application side but not the game side. The game writer might choose to use a different renderer.
I've also entertained the idea of having some kind of "Property Manager" where I can pass data around through strings, but I don't like that idea very much.
Any ideas?