From 18a5edcdc3e2cc158a8be70bcea3531428358a25 Mon Sep 17 00:00:00 2001 From: Arjun Nair Date: Mon, 23 Oct 2023 08:22:42 +0530 Subject: [PATCH] Minor cleanup --- src/lib.rs | 4 ++-- src/painter.rs | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 483866a..3c7312d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -97,12 +97,12 @@ pub fn with_sdl2( let dpi_scale = standard_dpi / display_dpi.0; let normalized_scale = 1.0 / dpi_scale; let default_scale = dpi_scale * normalized_scale; - println!("Display DPI detected: {:?}", display_dpi); + //println!("Display DPI detected: {:?}", display_dpi); let scale = match scale { DpiScaling::Default => default_scale, DpiScaling::Custom(custom) => default_scale * custom, }; - println!("Scaling display to {}", scale); + //println!("Scaling display to {}", scale); let painter = painter::Painter::new(window, scale, shader_ver); EguiStateHandler::new(painter) } diff --git a/src/painter.rs b/src/painter.rs index 103c27f..2481fc2 100644 --- a/src/painter.rs +++ b/src/painter.rs @@ -514,8 +514,11 @@ impl Painter { { match primitive { Primitive::Mesh(mesh) => { - if let Some(Texture {gl_id: Some(texture_gl_id), .. }) = self.textures.get(&mesh.texture_id) { - //if let Some(texture_gl_id) = gl_id + if let Some(Texture { + gl_id: Some(texture_gl_id), + .. + }) = self.textures.get(&mesh.texture_id) + { { gl::BindTexture(gl::TEXTURE_2D, *texture_gl_id);