🗄️ rust wgpu app 运行环境和 Phong 渲染管线搭建|Terre 开发日志 #0001
2024-12-25

wgpu
noise 库
现在的临时的生命周期系统
rust
pub struct App{
updates: Vec<Box<dyn Fn(&mut Runtime)>>,
starts: Vec<Box<dyn Fn(&mut Runtime)>>,
}
pub struct Runtime {
pub context: GraphicsContext,
pub size: winit::dpi::PhysicalSize<u32>,
pub camera: Camera,
pub camera_controller: CameraController,
pub input: CursorInput,
pub pass: PhongPass,
pub nodes: Vec<Node>,
}
pub async fn run() {
App::new()
.add_system(Stage::Update, render)
.add_system(Stage::Update, update)
.run().await;
}