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 --- src/light.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/light.c (limited to 'src/light.c') diff --git a/src/light.c b/src/light.c new file mode 100644 index 0000000..08da8e6 --- /dev/null +++ b/src/light.c @@ -0,0 +1,20 @@ +#include "../include/light.h" + +void honey_point_light_new(honey_point_light* light, + float x, float y, float z, + float r, float g, float b, + float constant, + float linear, + float quadratic) { + light->position[0] = x; + light->position[1] = y; + light->position[2] = z; + + light->color[0] = r; + light->color[1] = g; + light->color[2] = b; + + light->constant = constant; + light->linear = linear; + light->quadratic = quadratic; +} -- cgit v1.2.1