mirror of
https://github.com/eliasstepanik/imgui-rs.git
synced 2026-01-23 11:28:28 +00:00
init. copying other work
This commit is contained in:
parent
396512a982
commit
8dea2edcfa
@ -11,7 +11,7 @@ publish = false
|
|||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
clipboard = "0.5"
|
clipboard = "0.5"
|
||||||
glium = { version = "0.30", default-features = true }
|
glium = { version = "0.31", default-features = true }
|
||||||
image = "0.23"
|
image = "0.23"
|
||||||
imgui = { path = "../imgui", features = ["tables-api"] }
|
imgui = { path = "../imgui", features = ["tables-api"] }
|
||||||
imgui-glium-renderer = { path = "../imgui-glium-renderer" }
|
imgui-glium-renderer = { path = "../imgui-glium-renderer" }
|
||||||
|
|||||||
@ -10,5 +10,5 @@ license = "MIT/Apache-2.0"
|
|||||||
categories = ["gui", "rendering"]
|
categories = ["gui", "rendering"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
glium = { version = "0.30", default-features = false }
|
glium = { version = "0.31", default-features = false }
|
||||||
imgui = { version = "0.8.1-alpha.0", path = "../imgui" }
|
imgui = { version = "0.8.1-alpha.0", path = "../imgui" }
|
||||||
|
|||||||
@ -15,7 +15,7 @@ glow = "0.10.0"
|
|||||||
memoffset = "0.6.4"
|
memoffset = "0.6.4"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
glutin = "0.27.0"
|
glutin = "0.28.0"
|
||||||
imgui-winit-support = { version = "0.8.1-alpha.0", path = "../imgui-winit-support" }
|
imgui-winit-support = { version = "0.8.1-alpha.0", path = "../imgui-winit-support" }
|
||||||
image = "0.23"
|
image = "0.23"
|
||||||
|
|
||||||
|
|||||||
@ -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 }
|
winit-26 = { version = "0.26", package = "winit", default-features = false, optional = true }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["winit-25/default"]
|
default = ["winit-26/default"]
|
||||||
test = ["winit-23/default", "winit-24/default", "winit-25/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
|
# This is phrased as a negative (unlike most features) so that it needs to be
|
||||||
|
|||||||
@ -79,9 +79,10 @@
|
|||||||
//!
|
//!
|
||||||
//! The following versions are supported, controlled by the listed feature.
|
//! 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
|
//! on by default, so to use any other version you need to disable this crates
|
||||||
//! default features.
|
//! default features.
|
||||||
|
//! - The `winit-25` feature supports winit versions `0.25`.
|
||||||
//! - The `winit-24` feature supports winit versions `0.24`.
|
//! - The `winit-24` feature supports winit versions `0.24`.
|
||||||
//! - The `winit-23` feature uses winit versions compatible with `0.23`.
|
//! - The `winit-23` feature uses winit versions compatible with `0.23`.
|
||||||
//! - The `winit-22` feature uses winit versions compatible with `0.22`.
|
//! - The `winit-22` feature uses winit versions compatible with `0.22`.
|
||||||
@ -95,7 +96,7 @@
|
|||||||
//! feature, fixing the configuration, or disabling `debug_assertions`.
|
//! feature, fixing the configuration, or disabling `debug_assertions`.
|
||||||
//!
|
//!
|
||||||
//! Conversely, if no `winit-*` features are enabled, we will fail to compile.
|
//! 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
|
//! 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
|
//! 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")) {
|
if cfg!(any(not(debug_assertions), feature = "no-warn-on-multiple")) {
|
||||||
return;
|
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-24") as usize
|
||||||
+ cfg!(feature = "winit-23") as usize
|
+ cfg!(feature = "winit-23") as usize
|
||||||
+ cfg!(feature = "winit-22") as usize
|
+ cfg!(feature = "winit-22") as usize
|
||||||
@ -274,8 +276,8 @@ fn check_multiple_winits() {
|
|||||||
(this likely indicates misconfiguration, see documentation for details)."
|
(this likely indicates misconfiguration, see documentation for details)."
|
||||||
);
|
);
|
||||||
let feats = [
|
let feats = [
|
||||||
("winit-26", cfg!(feature = "winit-26"), ""),
|
("winit-26", cfg!(feature = "winit-26"), " (default)"),
|
||||||
("winit-25", cfg!(feature = "winit-25"), " (default)"),
|
("winit-25", cfg!(feature = "winit-25"), ""),
|
||||||
("winit-24", cfg!(feature = "winit-24"), ""),
|
("winit-24", cfg!(feature = "winit-24"), ""),
|
||||||
("winit-23", cfg!(feature = "winit-23"), ""),
|
("winit-23", cfg!(feature = "winit-23"), ""),
|
||||||
("winit-22", cfg!(feature = "winit-22"), ""),
|
("winit-22", cfg!(feature = "winit-22"), ""),
|
||||||
@ -535,7 +537,7 @@ impl WinitPlatform {
|
|||||||
self.hidpi_mode = hidpi_mode;
|
self.hidpi_mode = hidpi_mode;
|
||||||
self.hidpi_factor = hidpi_factor;
|
self.hidpi_factor = hidpi_factor;
|
||||||
io.display_framebuffer_scale = [hidpi_factor as f32, hidpi_factor as f32];
|
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);
|
let logical_size = self.scale_size_from_winit(window, logical_size);
|
||||||
io.display_size = [logical_size.width as f32, logical_size.height as f32];
|
io.display_size = [logical_size.width as f32, logical_size.height as f32];
|
||||||
}
|
}
|
||||||
@ -976,7 +978,7 @@ impl WinitPlatform {
|
|||||||
self.hidpi_factor = hidpi_factor;
|
self.hidpi_factor = hidpi_factor;
|
||||||
io.display_framebuffer_scale = [hidpi_factor as f32, hidpi_factor as f32];
|
io.display_framebuffer_scale = [hidpi_factor as f32, hidpi_factor as f32];
|
||||||
// Window size might change too if we are using DPI rounding
|
// 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);
|
let logical_size = self.scale_size_from_winit(window, logical_size);
|
||||||
io.display_size = [logical_size.width as f32, logical_size.height as f32];
|
io.display_size = [logical_size.width as f32, logical_size.height as f32];
|
||||||
}
|
}
|
||||||
@ -1084,7 +1086,7 @@ impl WinitPlatform {
|
|||||||
self.hidpi_factor = hidpi_factor;
|
self.hidpi_factor = hidpi_factor;
|
||||||
io.display_framebuffer_scale = [hidpi_factor as f32, hidpi_factor as f32];
|
io.display_framebuffer_scale = [hidpi_factor as f32, hidpi_factor as f32];
|
||||||
// Window size might change too if we are using DPI rounding
|
// 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);
|
let logical_size = self.scale_size_from_winit(window, logical_size);
|
||||||
io.display_size = [logical_size.width as f32, logical_size.height as f32];
|
io.display_size = [logical_size.width as f32, logical_size.height as f32];
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user