Skip to content

Commit

Permalink
client: let rend3 acquire the window surface (fix Nvidia Wayland)
Browse files Browse the repository at this point in the history
  • Loading branch information
marceline-cramer committed Nov 19, 2023
1 parent 6da2029 commit 680d58e
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions main/client/src/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,22 +206,8 @@ impl Window {
self.notify_event(WindowEvent::Redraw { dt });
self.last_redraw = now;

let frame = match self.surface.get_current_texture() {
Ok(frame) => frame,
Err(wgpu::SurfaceError::Outdated) => {
let size = self.window.inner_size();
self.on_resize(size);
return;
}
Err(err) => {
tracing::error!("Surface error: {:?}", err);
return;
}
};

let output_frame = rend3::util::output::OutputFrame::SurfaceAcquired {
view: frame.texture.create_view(&Default::default()),
surface_tex: frame,
let output_frame = rend3::util::output::OutputFrame::Surface {
surface: self.surface.to_owned(),
};

let resolution = glam::UVec2::new(self.config.width, self.config.height);
Expand Down

0 comments on commit 680d58e

Please sign in to comment.