1
0
Fork 0
wgpu-rs/src/render/mod.rs

23 lines
434 B
Rust
Raw Normal View History

2022-06-14 22:39:48 +02:00
mod vertex;
pub use vertex::Vertex;
mod camera;
2022-06-16 14:06:21 +02:00
pub use camera::Camera;
2022-06-14 22:39:48 +02:00
mod texture;
2022-06-15 23:08:52 +02:00
pub use texture::{Texture, TextureManager};
2022-06-14 22:39:48 +02:00
mod instance;
pub use instance::{
Instance, InstanceRaw
2022-06-15 14:04:10 +02:00
};
use wgpu::{Device, Queue};
mod mesh;
2022-06-15 21:17:45 +02:00
pub use mesh::Mesh;
2022-06-15 14:04:10 +02:00
pub trait Renderable {
fn prepare(&mut self, device: &Device);
2022-06-16 14:06:21 +02:00
fn update_instances(&mut self, queue: &Queue);
2022-06-15 14:04:10 +02:00
fn render<'a>(&'a self, render_pass: &mut wgpu::RenderPass<'a>);
}