From af5e8f365478f62bc5108217317e70a6ee1accf4 Mon Sep 17 00:00:00 2001 From: Tom Barrett Date: Wed, 4 Mar 2020 01:26:52 -0600 Subject: workable viewport structure --- src/vertex.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/vertex.rs (limited to 'src/vertex.rs') 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, +} -- cgit v1.2.3