3 ms·
>but that's distinct from the overall windowing system, graphics state, etc. which would be stored in `World`. That'd be pretty odd naming, usually 'World' wou
by pingyong 7y ago
>but that's distinct from the overall windowing system, graphics state, etc. which would be stored in `World`.
That'd be pretty odd naming, usually 'World' would own all your game objects and scene, but have no relation to the windowing system or swap chain.
Regardless though, I wouldn't make the windowing system or swap chain or d3dcontext global either, I mean all of that is literally designed to be wrapped into some object. (Well, the window requires some trickery, but it's still prettier than a global handle in the end.) There's really no reason for a game to have actually global state, even if most games are only going to need one window.