dsuse
Although, would you say the renderer you wrote and the game dll are tightly coupled? How difficult would it be do replace it with a direct3d renderer?
I would say that the coupling between platform and renderer is stronger than the coupling between game and renderer, due to the necessary platform-specific initialization. There are about 1.5 contact points between game code and render code. Half a contact point when reserving memory for the renderer from the game's own memory. I only count it as half because the game doesn't care what this memory will contain, it just needs to know the minimum size.
The other contact point is the render function itself. If I wanted to switch to a DirectX renderer, I'd need to write this function (plus all the initialization stuff in the platform) and change my build to compile "dx_renderer.cpp" instead of the current "ogl_renderer.cpp". That's it. If I wanted the option to switch renderers at application startup without recompiling, I would change "render" to be a function pointer, compile both ogl_renderer.cpp and dx_renderer.cpp, and then set this function pointer appropriately, probably in the platform layer. For switching renderers at runtime, I'd have to figure out clean ways to handle the initialization, but that's a problem of the platform layer again, the game code doesn't need to know about it. It just calls its supplied render function.