From da4297b46228ee3f59415da4d8594dec21157ca6 Mon Sep 17 00:00:00 2001 From: SeanOMik Date: Wed, 31 May 2023 23:58:10 -0400 Subject: [PATCH] add transform matrix buffer --- src/render/renderer.rs | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/render/renderer.rs b/src/render/renderer.rs index dc5432d..a00c31e 100755 --- a/src/render/renderer.rs +++ b/src/render/renderer.rs @@ -358,17 +358,6 @@ impl Renderer for BasicRenderer { self.buffer_storage.insert(entity, buffers); } } - - if let Some((_e, (camera,))) = main_world.query_mut::<(&mut CameraComponent,)>().into_iter().next() { - let view_proj = self.inuse_camera.update_view_projection(camera); - self.queue.write_buffer(&self.camera_buffer, 0, bytemuck::cast_slice(&[view_proj.clone()])); - } else { - warn!("Missing camera!"); - } - } - - fn add_render_pipeline(&mut self, shader_id: u32, pipeline: Arc) { - self.render_pipelines.insert(shader_id, pipeline); } async fn render(&mut self) -> Result<(), wgpu::SurfaceError> { @@ -450,4 +439,8 @@ impl Renderer for BasicRenderer { fn surface_size(&self) -> winit::dpi::PhysicalSize { self.size } + + fn add_render_pipeline(&mut self, shader_id: u32, pipeline: Arc) { + self.render_pipelines.insert(shader_id, pipeline); + } } \ No newline at end of file