init. copying other work

This commit is contained in:
Jack Mac 2022-02-21 18:01:27 -05:00 committed by Jonathan Spira
parent 396512a982
commit 8dea2edcfa
5 changed files with 15 additions and 13 deletions

View File

@ -11,7 +11,7 @@ publish = false
[dev-dependencies]
clipboard = "0.5"
glium = { version = "0.30", default-features = true }
glium = { version = "0.31", default-features = true }
image = "0.23"
imgui = { path = "../imgui", features = ["tables-api"] }
imgui-glium-renderer = { path = "../imgui-glium-renderer" }

View File

@ -10,5 +10,5 @@ license = "MIT/Apache-2.0"
categories = ["gui", "rendering"]
[dependencies]
glium = { version = "0.30", default-features = false }
glium = { version = "0.31", default-features = false }
imgui = { version = "0.8.1-alpha.0", path = "../imgui" }

View File

@ -15,7 +15,7 @@ glow = "0.10.0"
memoffset = "0.6.4"
[dev-dependencies]
glutin = "0.27.0"
glutin = "0.28.0"
imgui-winit-support = { version = "0.8.1-alpha.0", path = "../imgui-winit-support" }
image = "0.23"

View File

@ -20,7 +20,7 @@ winit-25 = { version = "0.25", package = "winit", default-features = false, opti
winit-26 = { version = "0.26", package = "winit", default-features = false, optional = true }
[features]
default = ["winit-25/default"]
default = ["winit-26/default"]
test = ["winit-23/default", "winit-24/default", "winit-25/default", "winit-26/default"]
# This is phrased as a negative (unlike most features) so that it needs to be

View File

@ -79,9 +79,10 @@
//!
//! The following versions are supported, controlled by the listed feature.
//!
//! - The `winit-25` feature uses winit versions compatible with `0.25`. This is
//! - The `winit-26` feature uses winit versions compatible with `0.26`. This is
//! on by default, so to use any other version you need to disable this crates
//! default features.
//! - The `winit-25` feature supports winit versions `0.25`.
//! - The `winit-24` feature supports winit versions `0.24`.
//! - The `winit-23` feature uses winit versions compatible with `0.23`.
//! - The `winit-22` feature uses winit versions compatible with `0.22`.
@ -95,7 +96,7 @@
//! feature, fixing the configuration, or disabling `debug_assertions`.
//!
//! Conversely, if no `winit-*` features are enabled, we will fail to compile.
//! This is not an issue generally, as by default we turn on `winit-25`.
//! This is not an issue generally, as by default we turn on `winit-26`.
//!
//! All of this is in attempt to preserve the additive nature of features (while
//! still helping users notice project configuration issues), however it's done
@ -245,7 +246,8 @@ fn check_multiple_winits() {
if cfg!(any(not(debug_assertions), feature = "no-warn-on-multiple")) {
return;
}
let winits_enabled = cfg!(feature = "winit-25") as usize
let winits_enabled = cfg!(feature = "winit-26") as usize
+ cfg!(feature = "winit-25") as usize
+ cfg!(feature = "winit-24") as usize
+ cfg!(feature = "winit-23") as usize
+ cfg!(feature = "winit-22") as usize
@ -274,8 +276,8 @@ fn check_multiple_winits() {
(this likely indicates misconfiguration, see documentation for details)."
);
let feats = [
("winit-26", cfg!(feature = "winit-26"), ""),
("winit-25", cfg!(feature = "winit-25"), " (default)"),
("winit-26", cfg!(feature = "winit-26"), " (default)"),
("winit-25", cfg!(feature = "winit-25"), ""),
("winit-24", cfg!(feature = "winit-24"), ""),
("winit-23", cfg!(feature = "winit-23"), ""),
("winit-22", cfg!(feature = "winit-22"), ""),
@ -535,7 +537,7 @@ impl WinitPlatform {
self.hidpi_mode = hidpi_mode;
self.hidpi_factor = hidpi_factor;
io.display_framebuffer_scale = [hidpi_factor as f32, hidpi_factor as f32];
let logical_size = window.inner_size().to_logical(window.scale_factor());
let logical_size = window.inner_size().to_logical(hidpi_factor);
let logical_size = self.scale_size_from_winit(window, logical_size);
io.display_size = [logical_size.width as f32, logical_size.height as f32];
}
@ -976,7 +978,7 @@ impl WinitPlatform {
self.hidpi_factor = hidpi_factor;
io.display_framebuffer_scale = [hidpi_factor as f32, hidpi_factor as f32];
// Window size might change too if we are using DPI rounding
let logical_size = window.inner_size().to_logical(window.scale_factor());
let logical_size = window.inner_size().to_logical(scale_factor);
let logical_size = self.scale_size_from_winit(window, logical_size);
io.display_size = [logical_size.width as f32, logical_size.height as f32];
}
@ -1084,7 +1086,7 @@ impl WinitPlatform {
self.hidpi_factor = hidpi_factor;
io.display_framebuffer_scale = [hidpi_factor as f32, hidpi_factor as f32];
// Window size might change too if we are using DPI rounding
let logical_size = window.inner_size().to_logical(window.scale_factor());
let logical_size = window.inner_size().to_logical(scale_factor);
let logical_size = self.scale_size_from_winit(window, logical_size);
io.display_size = [logical_size.width as f32, logical_size.height as f32];
}
@ -1246,4 +1248,4 @@ impl WinitPlatform {
}
}
}
}
}