Resizing a DirectX game

Started by
0 comments, last by Evil Steve 14 years, 1 month ago
Problem: I'm trying to resize a game's resolution, but there are no settings to change it (it's a game editor, not the actual game itself, thus there is no hud for changing the resolution). What i know: I can change the window size, but the game just stretches out to ugly pixilated crap. What i need to know: How can I change the rendering size to the larger resized window so it doesn't stretch? Example: Not stretched out: http://screenshots.rd.to/sn/c7945a95ecfcdc99474ef72fb27bb951/df0d24a040f3caf2b95355b9db717767.png Stretched out: http://screenshots.rd.to/sn/c7945a95ecfcdc99474ef72fb27bb951/b8ae27a2c8d59e33a73ea75b4c7741e6.png I'm thinking it will have to be some type of hook or possibly some asm changes? Any help would be greatly appreciated.. Thank you!!
Advertisement
In your WM_SIZE handler, you need to Reset() the device, passing in the new backbuffer width and height (Which is the client area size). You'll also need to update your projection matrix to match the new viewport size.

This topic is closed to new replies.

Advertisement