feat: moved the ECS related functions to the App to remove unnecessary calling of the World struct inside App.

This commit is contained in:
lisk77 2025-02-23 16:51:31 +01:00
parent f07b829b7d
commit ee3d0bdb9e
7 changed files with 258 additions and 81 deletions

View file

@ -3,7 +3,7 @@ use winit::dpi::PhysicalSize;
use winit::window::Window;
use comet_colors::LinearRgba;
pub trait Renderer: Sized {
pub trait Renderer: Sized + Send + Sync {
async fn new(window: Arc<Window>, clear_color: Option<LinearRgba>) -> Self;
fn size(&self) -> PhysicalSize<u32>;
fn resize(&mut self, new_size: winit::dpi::PhysicalSize<u32>);