From bd97c1d4698e9c83fe1e2b927c1af344bf84a9c0 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Tue, 25 Oct 2022 09:40:56 +0200 Subject: [PATCH] Remove unused argument --- crates/fj-viewer/src/graphics/renderer.rs | 4 ++-- crates/fj-viewer/src/gui.rs | 1 - crates/fj-viewer/src/viewer.rs | 7 ++----- crates/fj-window/src/run.rs | 3 +-- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/crates/fj-viewer/src/graphics/renderer.rs b/crates/fj-viewer/src/graphics/renderer.rs index 6f112f9b69..8cf46d9cb6 100644 --- a/crates/fj-viewer/src/graphics/renderer.rs +++ b/crates/fj-viewer/src/graphics/renderer.rs @@ -156,8 +156,8 @@ impl Renderer { }) } - pub(crate) fn init_gui(&self, pixels_per_point: f32) -> Gui { - Gui::new(&self.device, self.surface_config.format, pixels_per_point) + pub(crate) fn init_gui(&self) -> Gui { + Gui::new(&self.device, self.surface_config.format) } /// Updates the geometry of the model being rendered. diff --git a/crates/fj-viewer/src/gui.rs b/crates/fj-viewer/src/gui.rs index 681f18e4a0..a01fab7fdb 100644 --- a/crates/fj-viewer/src/gui.rs +++ b/crates/fj-viewer/src/gui.rs @@ -30,7 +30,6 @@ impl Gui { pub(crate) fn new( device: &wgpu::Device, texture_format: wgpu::TextureFormat, - _: f32, ) -> Self { // The implementation of the integration with `egui` is likely to need // to change "significantly" depending on what architecture approach is diff --git a/crates/fj-viewer/src/viewer.rs b/crates/fj-viewer/src/viewer.rs index ce55c4e2d9..7f53e9d5cc 100644 --- a/crates/fj-viewer/src/viewer.rs +++ b/crates/fj-viewer/src/viewer.rs @@ -38,12 +38,9 @@ pub struct Viewer { impl Viewer { /// Construct a new instance of `Viewer` - pub async fn new( - screen: &impl Screen, - pixels_per_point: f32, - ) -> Result { + pub async fn new(screen: &impl Screen) -> Result { let renderer = Renderer::new(screen).await?; - let gui = renderer.init_gui(pixels_per_point); + let gui = renderer.init_gui(); Ok(Self { camera: Camera::default(), diff --git a/crates/fj-window/src/run.rs b/crates/fj-window/src/run.rs index 29dd8d5132..08a432763c 100644 --- a/crates/fj-window/src/run.rs +++ b/crates/fj-window/src/run.rs @@ -36,8 +36,7 @@ pub fn run( let event_loop = EventLoop::new(); let window = Window::new(&event_loop)?; - let mut viewer = - block_on(Viewer::new(&window, window.window().scale_factor() as f32))?; + let mut viewer = block_on(Viewer::new(&window))?; let events = watcher.events();