mirror of
https://github.com/lisk77/comet.git
synced 2025-12-15 18:18:50 +00:00
feat: added Color trait to the comet_colors crate to make parameters simpler
This commit is contained in:
parent
b2578f7673
commit
7dc17fb435
13 changed files with 100 additions and 132 deletions
|
|
@ -1,10 +1,10 @@
|
|||
use std::sync::Arc;
|
||||
use winit::dpi::PhysicalSize;
|
||||
use winit::window::Window;
|
||||
use comet_colors::LinearRgba;
|
||||
use comet_colors::Color;
|
||||
|
||||
pub trait Renderer: Sized + Send + Sync {
|
||||
async fn new(window: Arc<Window>, clear_color: Option<LinearRgba>) -> Self;
|
||||
async fn new(window: Arc<Window>, clear_color: Option<impl Color>) -> Self;
|
||||
fn size(&self) -> PhysicalSize<u32>;
|
||||
fn resize(&mut self, new_size: winit::dpi::PhysicalSize<u32>);
|
||||
fn update(&mut self) -> f32;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue