stride3d / stride

Stride (formerly Xenko), a free and open-source cross-platform C# game engine.
https://stride3d.net
MIT License
6.65k stars 957 forks source link

Cant resize window in OpenGL #2412

Open Doprez opened 3 months ago

Doprez commented 3 months ago

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);