stride icon indicating copy to clipboard operation
stride copied to clipboard

Cant resize window in OpenGL

Open Doprez opened this issue 6 months ago • 0 comments

Release Type: Official Release

Version: 4.2.0.2188

Platform(s): Windows

Describe the bug The Depth Buffer seems to be stuck at a resolution of 1280 x 720. When I try to resize the window this will cause a crash saying it does not match the render target.

To Reproduce Steps to reproduce the behavior:

  1. use the OpenGL context
  2. change the screen resolution to anything outside of 1280 x 720
  3. witness crash

Expected behavior It should resize

Screenshots image

Additional context This is the code I used to get the error:

protected override void BeginRun()
{
    Window.PreferredWindowedSize = (new Int2(2880, 1920));
    Window.AllowUserResizing = true;
    Window.Position = new Int2(0, 0);
    Window.SetSize(Window.PreferredWindowedSize);
}

I also tried calling resize on the presenter but it did not seem to have any affect:

GraphicsDevice.Presenter.Resize(2880, 1920, Graphics.PixelFormat.R8G8B8A8_UNorm_SRgb);

Doprez avatar Aug 14 '24 23:08 Doprez