Huge input update, FPS Camera controls system
Long day. I now store winit:🪟:Window in a mutex.
This commit is contained in:
parent
1e9b997aeb
commit
46c8c32819
15 changed files with 307 additions and 39 deletions
|
|
@ -1,6 +1,7 @@
|
|||
use std::path::PathBuf;
|
||||
use std::rc::Rc;
|
||||
use std::cell::RefCell;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use glium::{Display, Program, Surface, VertexBuffer, IndexBuffer, implement_vertex};
|
||||
use glium::glutin::surface::WindowSurface;
|
||||
use glium::index::PrimitiveType;
|
||||
|
|
@ -108,7 +109,7 @@ impl SkyboxRenderingSystem {
|
|||
}
|
||||
|
||||
impl RenderingSystem for SkyboxRenderingSystem {
|
||||
fn initialize(display: &Display<WindowSurface>, _window: &glium::winit::window::Window) -> Self {
|
||||
fn initialize(display: &Display<WindowSurface>, _window: Arc<Mutex<glium::winit::window::Window>>) -> Self {
|
||||
const VERT_SRC: &str = include_shader!("skybox.vert");
|
||||
const FRAG_SRC: &str = include_shader!("skybox.frag");
|
||||
let program = Program::from_source(display, VERT_SRC, FRAG_SRC, None).unwrap();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue