diff options
author | sanine-a <sanine.not@pm.me> | 2020-06-03 00:34:36 -0500 |
---|---|---|
committer | sanine-a <sanine.not@pm.me> | 2020-06-03 00:34:36 -0500 |
commit | 70784cdb24628e758df27cbe1965ff83102decb0 (patch) | |
tree | 46c4b223f63ff044161216dab9511ec8d8ce2192 /include/shader.h | |
parent | e1935b6f7af6d036eb15c75c2a98bf43805c48fc (diff) |
add multiple lights to shaders
Diffstat (limited to 'include/shader.h')
-rw-r--r-- | include/shader.h | 21 |
1 files changed, 21 insertions, 0 deletions
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 |