diff options
author | Tom Barrett <tom@tombarrett.xyz> | 2020-03-04 01:26:52 -0600 |
---|---|---|
committer | Tom Barrett <tom@tombarrett.xyz> | 2020-03-04 01:26:52 -0600 |
commit | af5e8f365478f62bc5108217317e70a6ee1accf4 (patch) | |
tree | ecb72e11f3dded73eca3e46c50442008e4290c3f /src/vertex.rs | |
parent | e79499cd864dc64017316ef4512991df68837576 (diff) |
workable viewport structure
Diffstat (limited to 'src/vertex.rs')
-rw-r--r-- | src/vertex.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/vertex.rs b/src/vertex.rs new file mode 100644 index 0000000..2030218 --- /dev/null +++ b/src/vertex.rs @@ -0,0 +1,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, +} |