Removes all those ugly 'extern crate' and 'macro_use' lines...
version = "0.7.0"
authors = ["Bernie Innocenti <bernie@codewiz.org>"]
license = "GPL-3.0+"
-#edition = '2018'
+edition = '2018'
[profile.release]
lto = true
#![feature(test)]
-
-extern crate mandelwow_lib;
-extern crate glutin;
-#[macro_use(uniform)]
-extern crate glium;
extern crate test;
+use glium::uniform;
use mandelwow_lib::Cube;
use mandelwow_lib::bounding_box::*;
#![feature(test)]
-
-extern crate mandelwow_lib;
-#[macro_use(uniform)]
-extern crate glium;
-extern crate glutin;
extern crate test;
+use glium::uniform;
use mandelwow_lib::shaded_cube::*;
#[bench]
use crate::cube::Cube;
use glium;
-use glium::{Display, Program, Surface};
+use glium::{Display, Program, Surface, implement_vertex};
use glium::index::{IndexBuffer, PrimitiveType};
pub fn solid_fill_program(display: &Display) -> Program {
-extern crate cgmath;
-#[macro_use(uniform,implement_vertex)]
-extern crate glium;
-extern crate glutin;
-#[cfg(feature = "image")]
-extern crate image;
-extern crate libxm;
-#[cfg(feature = "editor")]
-extern crate rust_rocket;
-extern crate sdl2;
-
pub mod bounding_box;
pub mod cube;
pub mod mandelwow;
#[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();
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);
-extern crate mandelwow_lib;
-
-extern crate cgmath;
-#[macro_use(uniform)]
-extern crate glium;
-extern crate glutin;
-
use cgmath::conv::array4x4;
use cgmath::{Euler, Matrix4, Rad, SquareMatrix, Vector3, Vector4, Zero};
use glium::glutin::VirtualKeyCode;
use glium::glutin::WindowEvent::KeyboardInput;
-use glium::Surface;
+use glium::{Surface, uniform};
use mandelwow_lib::*;
use std::f32::consts::PI;
use crate::timer::Timer;
use crate::cube::Cube;
use glium;
use glium::index::PrimitiveType;
-use glium::{Display, Program, Surface};
+use glium::{Display, Program, Surface, implement_vertex, uniform};
use crate::support;
/*
use glium;
-use glium::{Display, Program, Surface};
+use glium::{Display, Program, Surface, implement_vertex};
use glium::index::{IndexBuffer, PrimitiveType};
pub fn shaded_program(display: &Display) -> Program {
use cgmath::conv::array4x4;
use cgmath::{Matrix4, Vector3};
use glium;
-use glium::{Display, Program, Surface, texture};
+use glium::{Display, Program, Surface, implement_vertex, texture, uniform};
use std;
fn gamma<T>(x: T) -> f32
}
impl<'a> Text<'a> {
- pub fn new(display: &Display, character: char) -> Text {
+ pub fn new(display: &Display, character: char) -> Text<'_> {
let (w, h, pixels) = c64_font();
let image = glium::texture::RawImage2d {
data: std::borrow::Cow::from(pixels),