Skip to content

Commit

Permalink
Minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ArjunNair committed Oct 23, 2023
1 parent 44bf8c5 commit 18a5edc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
7 changes: 5 additions & 2 deletions src/painter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 18a5edc

Please sign in to comment.