diff --git a/src/render.rs b/src/render.rs index f5285ba..727ddf9 100644 --- a/src/render.rs +++ b/src/render.rs @@ -23,19 +23,19 @@ pub trait Sample { fn sample(&mut self, rect: &Rectangle) -> impl PixelView; } -pub trait Shader: Send + Sync { +pub trait Shader: Send { fn draw(&self, surface_coords: &VirtualCoordinates, frame: usize) -> Rgb; } -pub trait Surfaces: Send + Sync { +pub trait Surfaces: Send { type Surface: Surface; type Error: Debug; fn new_surface(&mut self, area: Rectangle) -> Result; fn render_to(&self, output: &mut S, frame: usize); } -pub trait Surface: Send + Sync { - fn set_shader(&mut self, shader: Box); +pub trait Surface: Send { + fn set_shader(&mut self, shader: T); fn clear_shader(&mut self); fn set_rect(&mut self, rect: Rectangle);