From: Bernie Innocenti Date: Tue, 22 Oct 2019 13:57:54 +0000 (+0900) Subject: Update to glium 0.25.1 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=5a29f2c9665d2d593d70439d51ea7802c9b5d285;p=mandelwow.git Update to glium 0.25.1 --- diff --git a/Cargo.toml b/Cargo.toml index 114864e..42244c2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,7 @@ opt-level = 3 [dependencies] cgmath = "*" #gleam = "*" -glium = "0.23" +glium = "0.25.1" glutin = "0.21" image = { version = "*", features = ["png_codec"], optional = true } libxm = "1.0.0" diff --git a/lib.rs b/lib.rs index c923d08..25e275c 100644 --- a/lib.rs +++ b/lib.rs @@ -13,7 +13,7 @@ pub use crate::shaded_cube::ShadedCube; #[cfg(feature = "image")] pub fn screenshot(display : &glium::Display) { - let image: glium::texture::RawImage2d<'_, u8> = display.read_front_buffer(); + let image: glium::texture::RawImage2d<'_, u8> = display.read_front_buffer().unwrap(); let image = image::ImageBuffer::from_raw(image.width, image.height, image.data.into_owned()).unwrap(); let image = image::DynamicImage::ImageRgba8(image).flipv().to_rgb(); let image = image::DynamicImage::ImageRgb8(image); diff --git a/text.rs b/text.rs index c341959..3d5d73c 100644 --- a/text.rs +++ b/text.rs @@ -22,7 +22,6 @@ where #[cfg(feature = "image")] fn c64_font() -> (u32, u32, Vec) { - use image; let image = image::load_from_memory_with_format( &include_bytes!("textures/c64-font.png")[..], image::PNG,