summaryrefslogtreecommitdiff
path: root/src/gltf_render/types.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-16 18:04:21 -0300
committerGabriel Schneider <[email protected]>2026-11-16 18:04:21 -0300
commite77b01d4b5504cea08a3f88cf8502897d868a1d3 (patch)
treec8e643d234dd26d920cbc563bfa7f740febf1fc7 /src/gltf_render/types.zig
parentd3074636fff0fbcd5fd9b71c0c3b1c1f5c0c1285 (diff)
downloadsketchbook-e77b01d4b5504cea08a3f88cf8502897d868a1d3.tar.gz
sketchbook-e77b01d4b5504cea08a3f88cf8502897d868a1d3.zip
Add glTF scene rendering, resource setup and 9P controls
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" } };
+};