Skip to main content
GameDev.net gamedev.net
🔒 Locked

Resizing a DirectX game

Started by E3pO Mar 21, 2010 at 11:01 PM 0 replies 600+ views
Original Post
E3pO
E3pO
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!!
Evil Steve
Evil Steve
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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.