Add idea
This commit is contained in:
parent
c2a32a3be6
commit
5e22cf2310
2 changed files with 11 additions and 0 deletions
|
@ -19,6 +19,8 @@ pub use mesh::Mesh;
|
|||
mod window;
|
||||
pub use window::Window;
|
||||
|
||||
mod pipelines;
|
||||
|
||||
pub trait Renderable {
|
||||
fn initialize(&mut self, device: &Device);
|
||||
fn update_instances(&mut self, queue: &Queue);
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
use wgpu::{Device, Queue};
|
||||
|
||||
use super::Renderable;
|
||||
|
||||
pub trait Processable {
|
||||
fn initialize(&mut self, device: &Device, queue: &Queue, renderable_entities: Vec<Box<dyn Renderable>>);
|
||||
fn resize(&mut self, new_size: winit::dpi::PhysicalSize<u32>, renderable_entities: Vec<Box<dyn Renderable>>);
|
||||
fn render(&mut self, renderable_entities: Vec<Box<dyn Renderable>>) -> Result<(), wgpu::SurfaceError>;
|
||||
}
|
Loading…
Reference in a new issue