Hey, these are always tricky to solve.
I noticed that your app appears truncated on the bottom after the resize. There could be a few things going on so here’s some ideas.
-
It may be that you didn’t get the requested size at all. Confirm you did by drawing a pixel directly into that region without using your pipeline or camera. If you see the pixel, you know the allocation worked and you can focus on your transform code as the source of the problem.
-
If you cannot see the test pixel, there could be a bug in the resize code in the graphics library (sharpdx or whatever). There have been in the past.
-
Set up a simple test app for.your scenario and strip it to the basics to see if you can resize.
-
The methods for getting buffer sizes are notorious for not always returning what you expect.
-
The viewport could be different than the buffer. Check it or set it manually. It’s a property on graphics device. Viewports can crop so I would look there.
-
Compile monogame in debug and trace the resize. See if any conditions are different between the working one and this.
-
Sprite batch and transforms are a little weird. There is a lot of state going on. And the render order is interesting. Is it possible something is drawing that fills in that space so you can’t draw there? Do you manually set the Spritebatch transform? Try disabling the depth test, stencil test, and alpha blending and see what happens.
Just some thoughts.