summaryrefslogtreecommitdiff
path: root/src/shader.h
diff options
context:
space:
mode:
authorAaditya Dhruv <[email protected]>2026-01-25 18:06:13 -0600
committerAaditya Dhruv <[email protected]>2026-01-25 18:06:13 -0600
commit955ffb0d4a0235532fdb9b808745bcf571735122 (patch)
tree7b6dce22f1af65411ba27cfae88a4e4d9927d862 /src/shader.h
parent118980e02e59ff31871df59dce257075394f3533 (diff)
rotating cube
Diffstat (limited to 'src/shader.h')
-rw-r--r--src/shader.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/shader.h b/src/shader.h
index c613708..78b4a26 100644
--- a/src/shader.h
+++ b/src/shader.h
@@ -1,5 +1,15 @@
+#pragma once
+#include "cglm/types.h"
#include "glad/glad.h"
-//Load a vertex and framgent shader defined in
-//the shaders/ directory.
-GLuint shader_init();
+struct shader {
+ GLuint program;
+};
+/*
+ *Load a vertex and framgent shader defined in the shaders/ directory.
+ @param shader The shader struct to store the compiled program pointer in
+ @return zero on success
+ */
+int shader_init(struct shader* shader);
+
+int set_uniform_mat4(char* var, struct shader* shader, mat4 matrix);