summaryrefslogtreecommitdiff
path: root/src/gltf_render/types.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/gltf_render/types.zig')
-rw-r--r--src/gltf_render/types.zig13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gltf_render/types.zig b/src/gltf_render/types.zig
new file mode 100644
index 0000000..29b784f
--- /dev/null
+++ b/src/gltf_render/types.zig
@@ -0,0 +1,13 @@
+//! These types generate the GLSL vertex and uniform declarations.
+pub const Vertex = extern struct {
+ position: [3]f32,
+ normal: [3]f32,
+ color: [4]f32 = .{ 1, 1, 1, 1 },
+ pub const glsl = .vertex;
+};
+pub const Transform = extern struct {
+ model: [4][4]f32,
+ view_projection: [4][4]f32,
+ color: [4]f32,
+ pub const glsl = .{ .uniform = .{ .set = 1, .instance = "transform" } };
+};