summaryrefslogtreecommitdiff
path: root/src/shader.h
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2025-12-04 14:55:24 -0500
committerFreya Murphy <freya@freyacat.org>2025-12-04 14:55:24 -0500
commitb56c621bf7c8689ba4b5d9fd64a6d69387f705df (patch)
treeabaa9aa9e41a04f06a42913472f01a31829a756c /src/shader.h
parentinitial chunk rendering (diff)
downloadvoxel-b56c621bf7c8689ba4b5d9fd64a6d69387f705df.tar.gz
voxel-b56c621bf7c8689ba4b5d9fd64a6d69387f705df.tar.bz2
voxel-b56c621bf7c8689ba4b5d9fd64a6d69387f705df.zip
add ubos
Diffstat (limited to 'src/shader.h')
-rw-r--r--src/shader.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/shader.h b/src/shader.h
index 931dd33..e6f794e 100644
--- a/src/shader.h
+++ b/src/shader.h
@@ -3,6 +3,8 @@
#include <GL/gl.h>
#include <cglm/cglm.h>
+#include "mesh.h"
+
typedef struct {
GLuint program_id;
GLuint vertex_id;
@@ -16,7 +18,8 @@ void shader_unbind(void);
void shader_free(Shader *shader);
GLint shader_uniform_location(Shader *shader, const char *name);
-void shader_loadf(GLint location, float value);
-void shader_loadi(GLint location, int value);
-void shader_loadv3f(GLint location, vec3 value);
-void shader_loadm4f(GLint location, mat4 value);
+void shader_load_float(GLint location, float value);
+void shader_load_int(GLint location, int value);
+void shader_load_vec3(GLint location, vec3 value);
+void shader_load_mat4(GLint location, mat4 value);
+void shader_load_ubo(GLint location, GLuint index, Uniform *uniform);