From cfd0ffd7f638163a7d14625e009084665495a876 Mon Sep 17 00:00:00 2001 From: Isse Date: Sat, 27 Jan 2024 20:58:48 +0100 Subject: [PATCH] don't create view in `draw_egui` --- voxygen/src/render/renderer/drawer.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/voxygen/src/render/renderer/drawer.rs b/voxygen/src/render/renderer/drawer.rs index 7b36ae580c..f0a59fa5da 100644 --- a/voxygen/src/render/renderer/drawer.rs +++ b/voxygen/src/render/renderer/drawer.rs @@ -574,20 +574,13 @@ impl<'frame> Drawer<'frame> { &screen_descriptor, ); - let view = self.surface_texture.as_ref().unwrap().texture.create_view( - &wgpu::TextureViewDescriptor { - label: Some("Surface texture view"), - ..Default::default() - }, - ); - self.borrow .egui_render_pass .execute( self.encoder.as_mut().unwrap(), self.taking_screenshot .as_ref() - .map_or(&view, |s| s.texture_view()), + .map_or(&self.view, |s| s.texture_view()), &paint_jobs, &screen_descriptor, None,