Resizing the window causes the swapchain to become outdated (specifically, gfx_hal::window::OutOfDate is the underlying error message).
I'm assuming that, sometime after you attempt to draw to the resized window, the event loop receives a WindowEvent::Resized, which causes the renderer to recreate the swapchain, and thus resolves the invalidation.
Once you remove that call to resize in response to the window resize vent, the Outdated error shows up every frame.
Hello (I'm Derg on Discord),
I see what's going on with the error message:
Resizing the window causes the swapchain to become outdated (specifically,
gfx_hal::window::OutOfDate
is the underlying error message).I'm assuming that, sometime after you attempt to draw to the resized window, the event loop receives a
WindowEvent::Resized
, which causes the renderer to recreate the swapchain, and thus resolves the invalidation.Once you remove that call to
resize
in response to the window resize vent, theOutdated
error shows up every frame.