So, I can render everything just fine, but whenever I resize the window, or change the resolution, everything just stops rendering. For example (using CS:S in this example because it's already open but I've always had the same issue with WoW):
1360x768:
|
v
1280x720
I've tried setting an event handler to things like Device.DeviceReset and Device.DeviceResizing but neither seem to even get called. I've also tried some hackish ways of getting around it, like
But unfortunately the viewport gets changed after the resizing is done (seems weird to me, but apparently that's the way it works), so it still tries to render everything. I'm pretty sure that this is what's breaking everything. I'm wondering if there are any ways to get around this problem. Any hackish solutions would also be appreciated.Code:if (internalViewport.Width != Globals.Device.Viewport.Width || internalViewport.Height != Globals.Device.Viewport.Height) { internalViewport = Globals.Device.Viewport; } else { EndScene.Pulse(); //Render everything }
Thanks.