summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkdx <kikoodx@paranoici.org>2024-01-11 06:35:07 +0100
committerkdx <kikoodx@paranoici.org>2024-01-11 06:35:07 +0100
commite938ccbb5e0d74e97616e70d42ccab8610dc38b7 (patch)
treeae5e0c92caa53367cc39379f40669faeda615b81
parent8e57c2b6fdf17977a2ffeecafb7f58d7cb37c1f3 (diff)
download008-e938ccbb5e0d74e97616e70d42ccab8610dc38b7.tar.gz
store the triple in a single file
-rw-r--r--res/spike.mesh32
-rw-r--r--src/main.c8
2 files changed, 26 insertions, 14 deletions
diff --git a/res/spike.mesh b/res/spike.mesh
index 3390bda..466d30d 100644
--- a/res/spike.mesh
+++ b/res/spike.mesh
@@ -1,12 +1,26 @@
TRIANGLES
- .0 .0 .0
--.5 .5 -.5
- .5 .5 -.5
--.5 .5 .5
- .5 .5 .5
+ 0.0 0.0 0.0
+-0.5 0.5 -0.5
+ 0.5 0.5 -0.5
+-0.5 0.5 0.5
+ 0.5 0.5 0.5
+ 0.0 0.0 -1.0
+-0.5 0.5 -1.5
+ 0.5 0.5 -1.5
+ 0.0 0.0 1.0
+-0.5 0.5 1.5
+ 0.5 0.5 1.5
-0 1 2
-0 3 4
-0 1 3
-0 2 4
+0 1 2
+0 3 4
+0 1 3
+0 2 4
+5 6 7
+5 1 2
+5 6 1
+5 7 2
+8 3 4
+8 10 10
+8 3 9
+8 4 10
diff --git a/src/main.c b/src/main.c
index 3c86d74..dc0d2a4 100644
--- a/src/main.c
+++ b/src/main.c
@@ -57,11 +57,9 @@ _main_loop([[maybe_unused]] void *udata)
repeat (y, 16) {
repeat (x, 16) {
if (y == 14 && x != 0 && x != 15) {
- repeat (i, 3) {
- Mat4 lm = mat4_dot(m_spike,
- mat4_translating(x, y, i * 16 - 16));
- mesh_draw(g_spike, lm);
- }
+ Mat4 lm = mat4_dot(m_spike,
+ mat4_translating(x, y, 0));
+ mesh_draw(g_spike, lm);
}
if (x != 0 && x != 15 && y != 0 && y != 15)
continue;