geometry: rewrite Coordinates trait into a concrete struct, pass coords by reference to shaders, and add a Rectangle type

This commit is contained in:
2024-11-16 11:31:45 +01:00
parent a23b2e8e94
commit e329a56c90
4 changed files with 89 additions and 32 deletions

View File

@@ -14,7 +14,7 @@ use std::marker::PhantomData;
use std::fmt::Debug;
pub trait Shader: Send + Debug {
fn draw(&self, surface_coords: VirtualCoordinates) -> RGB8;
fn draw(&self, surface_coords: &VirtualCoordinates) -> RGB8;
}
pub trait Surface: Default + Clone + Debug {