From a247c0adac7b3e50c72fde9b197ef6eabfd38b0b Mon Sep 17 00:00:00 2001 From: sanine-a Date: Sat, 23 May 2020 11:50:54 -0500 Subject: add honey_shader_set_vec3() --- src/shader.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src') 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) { -- cgit v1.2.1