Sign in to follow this  
E3pO

Resizing a DirectX game

Recommended Posts

E3pO    100
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!!

Share this post


Link to post
Share on other sites
Evil Steve    2017
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this