diff --git a/src/programs/viewer.rs b/src/programs/viewer.rs index ac61b08..183f71d 100644 --- a/src/programs/viewer.rs +++ b/src/programs/viewer.rs @@ -168,7 +168,7 @@ fn main() { camera.z_near = 0.0001; - let mut controls: Box = if matches.is_present("first person") { + let mut controls: Box = if matches.is_present("first person") { Box::new(FirstPersonControls::new()) } else { Box::new(OrbitControls::new( diff --git a/src/renderer.rs b/src/renderer.rs index 3bdc004..dc7b7b5 100644 --- a/src/renderer.rs +++ b/src/renderer.rs @@ -8,7 +8,7 @@ use image; use image::{DynamicImage, ImageBuffer, Rgba}; use glium::draw_parameters::{Blend, DepthTest}; -use glium::glutin::{ContextCurrentState, PossiblyCurrent as Pc}; +use glium::glutin::PossiblyCurrent as Pc; use glium::index::{NoIndices, PrimitiveType}; use glium::program::ProgramCreationInput; use glium::texture::{RawImage2d, SrgbTexture2d, Texture2dDataSink}; @@ -138,7 +138,7 @@ impl Renderer { /// Creates a SrgbTexture from a path to an image. pub fn make_texture(&self, path: &str) -> SrgbTexture2d { let image = match image::open(path) { - Ok(r) => r.to_rgba(), + Ok(r) => r.to_rgba8(), Err(e) => panic!("Error while opening file {}: {}", path, e), };