refactor view/scene to separate modules

This commit is contained in:
2016-09-21 19:38:27 -07:00
parent b8b5bf8ab7
commit 7a9f65115c
10 changed files with 311 additions and 224 deletions

15
src/scene.rs Normal file
View File

@@ -0,0 +1,15 @@
use view;
extern crate gfx;
extern crate gfx_device_gl;
extern crate piston_window;
pub trait Scene<D: gfx::Device,
F: gfx::Factory<D::Resources>> {
fn update(&mut self);
fn render(&self,
factory: &mut F,
encoder: &mut gfx::Encoder<D::Resources, D::CommandBuffer>,
target: &gfx::handle::RenderTargetView<D::Resources, view::ColorFormat>,
depth: &gfx::handle::DepthStencilView<D::Resources, view::DepthFormat>);
}