diff --git a/src/context.rs b/src/context.rs index 979f5a2..1b51a0a 100644 --- a/src/context.rs +++ b/src/context.rs @@ -294,6 +294,8 @@ impl Context { depth_or_array_layers: 1, }, ); + + self.window.request_redraw(); } pub fn render(&mut self) -> Result<(), wgpu::SurfaceError> { diff --git a/src/main.rs b/src/main.rs index cf2f226..9451745 100644 --- a/src/main.rs +++ b/src/main.rs @@ -69,7 +69,6 @@ async fn main() -> Result<(), impl std::error::Error> { cpu.mem.gpu.cycle(); context.lock().unwrap().update(cpu.mem.gpu.frame_buffer.into_iter().flatten().flatten().collect()); - sleep(Duration::from_millis((1000_f64 / 4_194_304_f64 * cycles as f64) as u64)).await; } });