diff options
author | sanine-a <sanine.not@pm.me> | 2020-05-23 11:50:54 -0500 |
---|---|---|
committer | sanine-a <sanine.not@pm.me> | 2020-05-23 11:50:54 -0500 |
commit | a247c0adac7b3e50c72fde9b197ef6eabfd38b0b (patch) | |
tree | ea0c49821dca6bcc7829051724f5ad7df6f26020 /src | |
parent | 86568ae07c04da1bfc2edbd029c677a73328c099 (diff) |
add honey_shader_set_vec3()
Diffstat (limited to 'src')
-rw-r--r-- | src/shader.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/shader.c b/src/shader.c index d726523..530cc8f 100644 --- a/src/shader.c +++ b/src/shader.c @@ -99,6 +99,16 @@ void honey_shader_set_int(honey_shader shader, /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ +void honey_shader_set_vec3(honey_shader shader, + char* vector_name, + vec3 vector) { + honey_shader_use(shader); + unsigned int vector_location = glGetUniformLocation(shader, vector_name); + glUniform3fv(vector_location, 1, (float*) vector); +} + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + void honey_shader_set_mat4(honey_shader shader, char* matrix_name, mat4 matrix) { |