summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/shader.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/shader.c b/src/shader.c
index e9d79a6..cba83f7 100644
--- a/src/shader.c
+++ b/src/shader.c
@@ -119,6 +119,16 @@ void honey_shader_set_vec3(honey_shader shader,
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
+void honey_shader_set_mat3(honey_shader shader,
+ char* matrix_name,
+ mat3 value) {
+ glUseProgram(shader);
+ unsigned int matrix_location = glGetUniformLocation(shader, matrix_name);
+ glUniformMatrix3fv(matrix_location, 1, GL_FALSE, (float*) value);
+}
+
+/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
+
void honey_shader_set_mat4(honey_shader shader,
char* matrix_name,
mat4 value) {