Explisit set of backbuffer gives distorted texture

Hello. I’m trying to implement the falling object game. For now, I’m just trying to put some textures on the screen. So, what I have noticed, that if i will use
graphics = new GraphicsDeviceManager(this) { PreferredBackBufferHeight = 1080, PreferredBackBufferWidth = 1920 };
I will get wrong picture on the screen :


To see, what is wrong, look at the original image : (on the previous screen it is not quite regular pentagon, seems a little bit smaller in height)

If i will not set PrefferedBackBufferHeight / Width , the pentagon looks quite good. How can I avoid image distortion?

Did you use graphics.ApplyChanges();

No, I didn’t hear about that, thanks for a tip. But I put that method constructor Game1 and the image is still distorted

Without that lines of code ( Preferred… ) The pentagon renders fine. But I don’t know the screen resolution in that case

EDIT

Seems strange, but changing to higher resolution give right proportions. But how to know, what proportion I need really?

PreferredBackBufferWidth = 3200, PreferredBackBufferHeight = 1600

well really hard to tell, maybe your pentagon depends on screen width/height?

Another small thing: You define height first in the first post, but width first in later posts. Maybe try not setting these things in the constructor? It would be ridiculous if that was the reason, but at this point…

This seems very wierd, I don’t recall such problems.

Yep, I mentioned in the first post, that if i will not specify the Height & Width, everything looks quite smooth. Just rebuild the solution - it seems, that this is the only way to handle the iamge distortion. I will try to construct logic based on Height & Width, that MonoGame provides at box, perhaps that will solve my issue :slightly_smiling: Thanks for the help