From 70784cdb24628e758df27cbe1965ff83102decb0 Mon Sep 17 00:00:00 2001 From: sanine-a Date: Wed, 3 Jun 2020 00:34:36 -0500 Subject: add multiple lights to shaders --- include/shader.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'include/shader.h') diff --git a/include/shader.h b/include/shader.h index 9a567f5..b502137 100644 --- a/include/shader.h +++ b/include/shader.h @@ -7,6 +7,7 @@ #define HONEY_SHADER_H #include "common.h" +#include "light.h" typedef int honey_shader; @@ -85,6 +86,26 @@ void honey_shader_set_mat4(honey_shader shader, char* matrix_name, mat4 value); +/** @brief Set a point_light uniform. + * + * @param[in] shader The shader to which the uniform belongs + * @param[in] point_light_index The index of the light to set + * @param[in] light The honey_point_light to set + */ +void honey_shader_set_point_light(honey_shader shader, + int point_light_index, + honey_point_light light); + +/** @brief Set a directional_light uniform. + * + * @param[in] shader The shader to which the uniform belongs + * @param[in] directional_light_index The index of the light to set + * @param[in] light The honey_directional_light to set + */ +void honey_shader_set_directional_light(honey_shader shader, + int directional_light_index, + honey_directional_light light); + /** @brief Use a shader. */ #define honey_shader_use glUseProgram -- cgit v1.2.1