wuple 0.4.0

Simple, Performant rendering on WGPU
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use wgpu::BindGroup;

use crate::draw::Color;

pub enum Draw {
    Color(Color),
    Texture { texture: BindGroup, color: Color },
}

impl Draw {
    pub fn get_color(&self) -> &Color {
        match self {
            Draw::Color(color) => color,
            Draw::Texture { color, .. } => color,
        }
    }
}