I'm a bit new to XNA, but I'll try and explain my issue as best as I can.
I want to change resolution in-game, by setting the graphics.PreferredBackBufferHeight and graphics.PreferredBackBufferWidth.
By starting off with graphics.PreferredBackBufferWidth set to 1920, and graphics.PreferredBackBufferHeight set to 1080, the game initializes fine.
However, by the press of a button, I want graphics.PreferredBackBufferWidth set to 1280, and graphics.PreferredBackBufferHeight set to 720. (Both resolutions are 16:9)
However, initializing graphics.PreferredBackBufferWidth and graphics.PreferredBackBufferHeight in the Initialize method works fine, as you'd expect.
But by changing both values, followed by graphics.ApplyChanges(), OUTSIDE Initialize, the screen either stretches in weird ways, or do not display properly at all.
- How can I change the BackBuffer Width/Height outside Initialize?
- Why does it not go the same, if I set these in the Initialize?
- Do I have to call Initialize again?
ApplyChanges. If you can, post some code (I know it's hard to trim down xna code, but please don't post all your code). - gunr2171