Cleaning
This commit is contained in:
parent
238f523379
commit
b5167ff79c
|
@ -168,7 +168,7 @@ fn main() {
|
||||||
|
|
||||||
camera.z_near = 0.0001;
|
camera.z_near = 0.0001;
|
||||||
|
|
||||||
let mut controls: Box<Controls> = if matches.is_present("first person") {
|
let mut controls: Box<dyn Controls> = if matches.is_present("first person") {
|
||||||
Box::new(FirstPersonControls::new())
|
Box::new(FirstPersonControls::new())
|
||||||
} else {
|
} else {
|
||||||
Box::new(OrbitControls::new(
|
Box::new(OrbitControls::new(
|
||||||
|
|
|
@ -8,7 +8,7 @@ use image;
|
||||||
use image::{DynamicImage, ImageBuffer, Rgba};
|
use image::{DynamicImage, ImageBuffer, Rgba};
|
||||||
|
|
||||||
use glium::draw_parameters::{Blend, DepthTest};
|
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::index::{NoIndices, PrimitiveType};
|
||||||
use glium::program::ProgramCreationInput;
|
use glium::program::ProgramCreationInput;
|
||||||
use glium::texture::{RawImage2d, SrgbTexture2d, Texture2dDataSink};
|
use glium::texture::{RawImage2d, SrgbTexture2d, Texture2dDataSink};
|
||||||
|
@ -138,7 +138,7 @@ impl Renderer {
|
||||||
/// Creates a SrgbTexture from a path to an image.
|
/// Creates a SrgbTexture from a path to an image.
|
||||||
pub fn make_texture(&self, path: &str) -> SrgbTexture2d {
|
pub fn make_texture(&self, path: &str) -> SrgbTexture2d {
|
||||||
let image = match image::open(path) {
|
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),
|
Err(e) => panic!("Error while opening file {}: {}", path, e),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue