1
0
Fork 0
forked from wry/wry

render: lift non-generic render code out of the gl implementation

This commit is contained in:
Julian Orth 2023-10-23 20:20:23 +02:00
parent 5778c49679
commit 44e9de7c93
6 changed files with 148 additions and 243 deletions

View file

@ -38,6 +38,13 @@ fn to_u8(c: f32) -> u8 {
}
impl Color {
pub const TRANSPARENT: Self = Self {
r: 0.0,
g: 0.0,
b: 0.0,
a: 0.0,
};
pub fn from_gray(g: u8) -> Self {
Self::from_rgb(g, g, g)
}