This commit is contained in:
griffi-gh 2023-01-15 16:48:18 +01:00
parent 242a733cf7
commit dba53e4ceb
3 changed files with 8 additions and 5 deletions

View file

@ -5,7 +5,6 @@ edition = "2021"
[dependencies]
glium = "0.32"
glutin = "*"
image = { version = "0.24", default_features = false, features = ["png"] }
log = "0.4"
env_logger = "0.10"

View file

@ -1,5 +1,5 @@
use glium::{Surface, uniform};
use glutin::{
use glium::glutin::{
event::{Event, WindowEvent},
event_loop::{EventLoop, ControlFlow},
};

View file

@ -1,8 +1,12 @@
use glium::Display;
use glutin::event_loop::EventLoop;
use glium::glutin::{
ContextBuilder,
window::WindowBuilder,
event_loop::EventLoop
};
pub fn init_display(event_loop: &EventLoop<()>) -> Display {
let wb = glutin::window::WindowBuilder::new();
let cb = glutin::ContextBuilder::new().with_depth_buffer(24);
let wb = WindowBuilder::new();
let cb = ContextBuilder::new().with_depth_buffer(24);
Display::new(wb, cb, &event_loop).unwrap()
}