blob: 203021851dcf14a33b4c168d6399617629806a6f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
use luminance_derive::{Semantics, Vertex};
#[derive(Vertex)]
#[vertex(sem = "VertexSemantics")]
pub struct Vertex {
pub position: VertexPosition,
#[vertex(normalized = "true")]
pub color: VertexRGB,
}
#[derive(Copy, Clone, Debug, Semantics)]
pub enum VertexSemantics {
#[sem(name = "position", repr = "[f32; 2]", wrapper = "VertexPosition")]
Position,
#[sem(name = "color", repr = "[u8; 3]", wrapper = "VertexRGB")]
Color,
}
|