Update wgpu to 0.5 in iced_wgpu 🎉

This commit is contained in:
Héctor Ramón Jiménez 2020-04-07 05:48:21 +02:00
parent 703beae05e
commit d807ef367e
12 changed files with 313 additions and 268 deletions

View file

@ -32,8 +32,12 @@ impl SwapChain {
///
/// [`SwapChain`]: struct.SwapChain.html
/// [`Viewport`]: ../struct.Viewport.html
pub fn next_frame(&mut self) -> (wgpu::SwapChainOutput<'_>, &Viewport) {
(self.raw.get_next_texture(), &self.viewport)
pub fn next_frame(
&mut self,
) -> Result<(wgpu::SwapChainOutput, &Viewport), wgpu::TimeOut> {
let viewport = &self.viewport;
self.raw.get_next_texture().map(|output| (output, viewport))
}
}
@ -51,7 +55,7 @@ fn new_swap_chain(
format,
width,
height,
present_mode: wgpu::PresentMode::Vsync,
present_mode: wgpu::PresentMode::Mailbox,
},
)
}