diff options
author | 2022-01-27 06:02:19 -0300 | |
---|---|---|
committer | 2022-04-26 18:54:01 -0300 | |
commit | 764b424dfc2b2163f21483a6d1f05ea1da62c561 (patch) | |
tree | ea06f9dd64a6d611689114811eade3ab68b361d7 /glutin | |
parent | 1e62fdf069db5687be510e1cc375260bbff318a7 (diff) | |
download | iced-764b424dfc2b2163f21483a6d1f05ea1da62c561.tar.gz iced-764b424dfc2b2163f21483a6d1f05ea1da62c561.tar.bz2 iced-764b424dfc2b2163f21483a6d1f05ea1da62c561.zip |
Add logging to window and context creation
Diffstat (limited to 'glutin')
-rw-r--r-- | glutin/Cargo.toml | 3 | ||||
-rw-r--r-- | glutin/src/application.rs | 9 |
2 files changed, 11 insertions, 1 deletions
diff --git a/glutin/Cargo.toml b/glutin/Cargo.toml index d1b0468d..cd5f2a7a 100644 --- a/glutin/Cargo.toml +++ b/glutin/Cargo.toml @@ -13,6 +13,9 @@ categories = ["gui"] [features] debug = ["iced_winit/debug"] +[dependencies.log] +version = "0.4" + [dependencies.glutin] version = "0.28" git = "https://github.com/iced-rs/glutin" diff --git a/glutin/src/application.rs b/glutin/src/application.rs index 146b234e..148a8e50 100644 --- a/glutin/src/application.rs +++ b/glutin/src/application.rs @@ -61,6 +61,8 @@ where settings.id, ); + log::info!("Window builder: {:#?}", builder); + let opengl_builder = ContextBuilder::new() .with_vsync(true) .with_multisampling(C::sample_count(&compositor_settings) as u16); @@ -75,9 +77,14 @@ where (opengl_builder, opengles_builder) }; + log::info!("Trying first builder: {:#?}", first_builder); + let context = first_builder .build_windowed(builder.clone(), &event_loop) - .or_else(|_| second_builder.build_windowed(builder, &event_loop)) + .or_else(|_| { + log::info!("Trying second builder: {:#?}", second_builder); + second_builder.build_windowed(builder, &event_loop) + }) .map_err(|error| { use glutin::CreationError; use iced_graphics::Error as ContextError; |