render: force surfaces to implement default+clone, for now

This commit is contained in:
2024-10-28 23:30:26 +01:00
parent e475d66842
commit f264964ebb
2 changed files with 6 additions and 6 deletions

View File

@@ -10,7 +10,7 @@ pub trait Shader: Send {
fn draw(&self, surface_coords: VirtualCoordinates) -> RGB8;
}
pub trait Surface {
pub trait Surface: Default + Clone {
fn with_shader<F: FnMut(&dyn Shader)>(&self, f: F);
fn set_shader(&mut self, shader: Box<dyn Shader>);
fn clear_shader(&mut self);