Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update glium and winit backends #1443

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions backends/conrod_glium/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ path = "./src/lib.rs"

[dependencies]
conrod_core = { path = "../../conrod_core", version = "0.76" }
glium = "0.28"
glium = "0.30"

[dev-dependencies]
conrod_example_shared = { path = "../conrod_example_shared", version = "0.76" }
conrod_winit = { path = "../conrod_winit", version = "0.76" }
find_folder = "0.3.0"
image = "0.22"
image = "0.23"
petgraph = "0.4"
rand = "0.7"
winit = "0.23"
winit = "0.25"
2 changes: 1 addition & 1 deletion backends/conrod_glium/examples/all_winit_glium.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ fn main() {
.for_folder("assets")
.unwrap();
let path = assets.join("images/rust.png");
let rgba_image = image::open(&std::path::Path::new(&path)).unwrap().to_rgba();
let rgba_image = image::open(&std::path::Path::new(&path)).unwrap().to_rgba8();
let image_dimensions = rgba_image.dimensions();
let raw_image = glium::texture::RawImage2d::from_raw_rgba_reversed(
&rgba_image.into_raw(),
Expand Down
2 changes: 1 addition & 1 deletion backends/conrod_glium/examples/all_winit_glium_threaded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ fn main() {
.for_folder("assets")
.unwrap();
let path = assets.join("images/rust.png");
let rgba_image = image::open(&std::path::Path::new(&path)).unwrap().to_rgba();
let rgba_image = image::open(&std::path::Path::new(&path)).unwrap().to_rgba8();
let image_dimensions = rgba_image.dimensions();
let raw_image = glium::texture::RawImage2d::from_raw_rgba_reversed(
&rgba_image.into_raw(),
Expand Down
2 changes: 1 addition & 1 deletion backends/conrod_glium/examples/image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ fn load_rust_logo(display: &glium::Display) -> glium::texture::Texture2d {
.for_folder("assets")
.unwrap();
let path = assets.join("images/rust.png");
let rgba_image = image::open(&std::path::Path::new(&path)).unwrap().to_rgba();
let rgba_image = image::open(&std::path::Path::new(&path)).unwrap().to_rgba8();
let image_dimensions = rgba_image.dimensions();
let raw_image = glium::texture::RawImage2d::from_raw_rgba_reversed(
&rgba_image.into_raw(),
Expand Down
2 changes: 1 addition & 1 deletion backends/conrod_glium/examples/image_button.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ where
P: AsRef<std::path::Path>,
{
let path = path.as_ref();
let rgba_image = image::open(&std::path::Path::new(&path)).unwrap().to_rgba();
let rgba_image = image::open(&std::path::Path::new(&path)).unwrap().to_rgba8();
let image_dimensions = rgba_image.dimensions();
let raw_image = glium::texture::RawImage2d::from_raw_rgba_reversed(
&rgba_image.into_raw(),
Expand Down
2 changes: 1 addition & 1 deletion backends/conrod_glium/examples/support/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,4 @@ where

// Conversion functions for converting between types from glium's version of `winit` and
// `conrod_core`.
conrod_winit::v023_conversion_fns!();
conrod_winit::v025_conversion_fns!();
2 changes: 2 additions & 0 deletions backends/conrod_winit/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ pub mod v020;
pub mod v021;
pub mod v022;
pub mod v023;
pub mod v024;
pub mod v025;

/// Types that have access to a `winit::Window` and can provide the necessary dimensions and hidpi
/// factor for converting `winit::Event`s to `conrod::event::Input`, as well as set the mouse
Expand Down
326 changes: 326 additions & 0 deletions backends/conrod_winit/src/v024.rs

Large diffs are not rendered by default.

326 changes: 326 additions & 0 deletions backends/conrod_winit/src/v025.rs

Large diffs are not rendered by default.