summaryrefslogtreecommitdiff
path: root/src/gpu
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-01-27 18:56:59 +0100
committerskal <pascal.massimino@gmail.com>2026-01-27 18:58:50 +0100
commit2f68b86ba403fdae97c00569b6bb9b58ad1f33a6 (patch)
treecd38e2aa13c26fdcfcf3555050a46db63c936efb /src/gpu
initial commit
Diffstat (limited to 'src/gpu')
-rw-r--r--src/gpu/gpu.cpp5
-rw-r--r--src/gpu/gpu.h6
-rw-r--r--src/gpu/shader.wgsl14
3 files changed, 25 insertions, 0 deletions
diff --git a/src/gpu/gpu.cpp b/src/gpu/gpu.cpp
new file mode 100644
index 0000000..4e48887
--- /dev/null
+++ b/src/gpu/gpu.cpp
@@ -0,0 +1,5 @@
+#include "gpu.h"
+
+void gpu_init(GLFWwindow*) {}
+void gpu_draw() {}
+void gpu_shutdown() {}
diff --git a/src/gpu/gpu.h b/src/gpu/gpu.h
new file mode 100644
index 0000000..02204af
--- /dev/null
+++ b/src/gpu/gpu.h
@@ -0,0 +1,6 @@
+#pragma once
+struct GLFWwindow;
+
+void gpu_init(GLFWwindow* window);
+void gpu_draw();
+void gpu_shutdown();
diff --git a/src/gpu/shader.wgsl b/src/gpu/shader.wgsl
new file mode 100644
index 0000000..4e0ec11
--- /dev/null
+++ b/src/gpu/shader.wgsl
@@ -0,0 +1,14 @@
+@vertex
+fn vs_main(@builtin(vertex_index) i: u32) -> @builtin(position) vec4<f32> {
+ var pos = array<vec2<f32>, 3>(
+ vec2<f32>(-1.0, -1.0),
+ vec2<f32>( 3.0, -1.0),
+ vec2<f32>(-1.0, 3.0)
+ );
+ return vec4<f32>(pos[i], 0.0, 1.0);
+}
+
+@fragment
+fn fs_main() -> @location(0) vec4<f32> {
+ return vec4<f32>(0.0, 0.0, 0.0, 1.0);
+}