don't create view in draw_egui

This commit is contained in:
Isse 2024-01-27 20:58:48 +01:00 committed by Marcel Märtens
parent 25c4d65b5d
commit cfd0ffd7f6

View File

@ -574,20 +574,13 @@ impl<'frame> Drawer<'frame> {
&screen_descriptor, &screen_descriptor,
); );
let view = self.surface_texture.as_ref().unwrap().texture.create_view(
&wgpu::TextureViewDescriptor {
label: Some("Surface texture view"),
..Default::default()
},
);
self.borrow self.borrow
.egui_render_pass .egui_render_pass
.execute( .execute(
self.encoder.as_mut().unwrap(), self.encoder.as_mut().unwrap(),
self.taking_screenshot self.taking_screenshot
.as_ref() .as_ref()
.map_or(&view, |s| s.texture_view()), .map_or(&self.view, |s| s.texture_view()),
&paint_jobs, &paint_jobs,
&screen_descriptor, &screen_descriptor,
None, None,