summaryrefslogtreecommitdiff
path: root/src/cube.h
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2025-12-04 13:16:21 -0500
committerFreya Murphy <freya@freyacat.org>2025-12-04 13:18:33 -0500
commitba2f810f0752bdecf8253b34bd245c7939f23534 (patch)
tree23a5fa60afb7f9f5d0ff1b51d11bb8dd24f46e04 /src/cube.h
downloadvoxel-ba2f810f0752bdecf8253b34bd245c7939f23534.tar.gz
voxel-ba2f810f0752bdecf8253b34bd245c7939f23534.tar.bz2
voxel-ba2f810f0752bdecf8253b34bd245c7939f23534.zip
initial chunk rendering
Diffstat (limited to 'src/cube.h')
-rw-r--r--src/cube.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/src/cube.h b/src/cube.h
new file mode 100644
index 0000000..fd071d0
--- /dev/null
+++ b/src/cube.h
@@ -0,0 +1,60 @@
+#pragma once
+
+#include <cglm/cglm.h>
+
+static const vec3 CUBE[6][6] = {
+ {
+ // PX
+ { 1, 1, 1 },
+ { 1, 0, 1 },
+ { 1, 0, 0 },
+ { 1, 0, 0 },
+ { 1, 1, 0 },
+ { 1, 1, 1 },
+ },
+ {
+ // NX
+ { 0, 1, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 1 },
+ { 0, 0, 1 },
+ { 0, 1, 1 },
+ { 0, 1, 0 },
+ },
+ {
+ // PY
+ { 1, 1, 0 },
+ { 0, 1, 0 },
+ { 0, 1, 1 },
+ { 0, 1, 1 },
+ { 1, 1, 1 },
+ { 1, 1, 0 },
+ },
+ {
+ // NY
+ { 0, 0, 1 },
+ { 0, 0, 0 },
+ { 1, 0, 0 },
+ { 1, 0, 0 },
+ { 1, 0, 1 },
+ { 0, 0, 1 },
+ },
+ {
+ // PZ
+ { 0, 1, 1 },
+ { 0, 0, 1 },
+ { 1, 0, 1 },
+ { 1, 0, 1 },
+ { 1, 1, 1 },
+ { 0, 1, 1 },
+ },
+ {
+ // NZ
+ { 1, 1, 0 },
+ { 1, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 1, 0 },
+ { 1, 1, 0 },
+ },
+};