send events to scene
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
use view;
|
||||
use vr;
|
||||
|
||||
extern crate gfx;
|
||||
extern crate gfx_device_gl;
|
||||
@@ -6,6 +7,7 @@ extern crate piston_window;
|
||||
|
||||
pub trait Scene<D: gfx::Device,
|
||||
F: gfx::Factory<D::Resources>> {
|
||||
fn event(&mut self, event: Event);
|
||||
fn update(&mut self);
|
||||
fn render(&self,
|
||||
factory: &mut F,
|
||||
@@ -14,3 +16,8 @@ pub trait Scene<D: gfx::Device,
|
||||
target: &gfx::handle::RenderTargetView<D::Resources, view::ColorFormat>,
|
||||
depth: &gfx::handle::DepthStencilView<D::Resources, view::DepthFormat>);
|
||||
}
|
||||
|
||||
pub enum Event {
|
||||
Vr(vr::Event),
|
||||
Piston(piston_window::Input),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user