diff --git a/comfy-wgpu/src/bloom.rs b/comfy-wgpu/src/bloom.rs index 32c7cc2..9471756 100644 --- a/comfy-wgpu/src/bloom.rs +++ b/comfy-wgpu/src/bloom.rs @@ -263,7 +263,6 @@ impl Bloom { threshold, mipmap_generator, // mipmaps, mipmaps_bind_group, - blur_texture, mip_blur_pipeline, diff --git a/comfy/src/game.rs b/comfy/src/game.rs index ba80f39..a50f1eb 100644 --- a/comfy/src/game.rs +++ b/comfy/src/game.rs @@ -1,7 +1,5 @@ use crate::*; -// pub type StateBuilder = fn(&mut EngineContext) -> T; - pub struct SimpleGame { pub engine: EngineState, pub state_builder: StateBuilder, @@ -34,55 +32,4 @@ impl SimpleGame { } } -// pub type ContextBuilder<'a, 'b: 'a, S, C> = -// fn(&'a mut S, &'b mut EngineContext<'b>) -> C; - -// pub type ContextBuilder = fn(&mut S, &mut EngineState) -> C; - pub type StateBuilder = fn(&mut EngineContext) -> T; - -// TODO: ... once someone smart figures out how to pass in `context_builder` things can get a bit -// nicer. - -// pub struct ComfyGame { -// pub engine: EngineState, -// pub state_builder: StateBuilder, -// pub state: Option, -// pub setup: fn(&mut S, &mut EngineContext), -// pub update: fn(&mut C), -// } -// -// impl ComfyGame { -// pub fn new( -// engine: EngineState, -// state_builder: StateBuilder, -// setup: fn(&mut S, &mut EngineContext), -// update: fn(&mut C), -// ) -> Self { -// Self { state_builder, state: None, engine, setup, update } -// } -// -// pub fn update(&mut self, context_builder: ???) { -// let mut c = self.engine.make_context(); -// -// if self.state.is_none() { -// let mut state = (self.state_builder)(&mut c); -// (self.setup)(&mut state, &mut c); -// -// self.state = Some(state); -// } -// -// if let Some(state) = self.state.as_mut() { -// run_early_update_stages(&mut c); -// // TODO: early update -// run_mid_update_stages(&mut c); -// -// let mut game_c = -// (context_builder)(state, &mut self.engine); -// -// (self.update)(&mut game_c); -// -// run_late_update_stages(&mut c); -// } -// } -// }