mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Regenerate the swapchain if the frame is outdated
This commit is contained in:
parent
f574015c39
commit
36c28af46d
@ -857,7 +857,8 @@ impl Renderer {
|
||||
return Ok(None);
|
||||
},
|
||||
Err(err @ wgpu::SwapChainError::Outdated) => {
|
||||
warn!("{}. This will probably be resolved on the next frame", err);
|
||||
warn!("{}. Recreating the swapchain", err);
|
||||
self.swap_chain = self.device.create_swap_chain(&self.surface, &self.sc_desc);
|
||||
return Ok(None);
|
||||
},
|
||||
Err(err @ wgpu::SwapChainError::OutOfMemory) => return Err(err.into()),
|
||||
|
Loading…
Reference in New Issue
Block a user