From 1ec46bead3cf87971a2329f9ef4ddde5a0c48325 Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Fri, 4 Jul 2025 10:27:06 -0700 Subject: Clarify doc --- src/scene/light.c | 42 ------------------------------------------ 1 file changed, 42 deletions(-) delete mode 100644 src/scene/light.c (limited to 'src/scene/light.c') diff --git a/src/scene/light.c b/src/scene/light.c deleted file mode 100644 index adbec8d..0000000 --- a/src/scene/light.c +++ /dev/null @@ -1,42 +0,0 @@ -#include "light_impl.h" - -#include "node_impl.h" -#include "scene_memory.h" - -#include - -static void make_environment_light( - Light* light, const EnvironmentLightDesc* desc) { - assert(light); - assert(desc); - light->type = EnvironmentLightType; - light->environment.environment_map = desc->environment_map; -} - -Light* gfx_make_light(const LightDesc* desc) { - assert(desc); - - Light* light = mem_alloc_light(); - - switch (desc->type) { - case EnvironmentLightType: - make_environment_light(light, &desc->light.environment); - break; - default: - log_error("Unhandled light type"); - gfx_destroy_light(&light); - return 0; - } - - return light; -} - -void gfx_destroy_light(Light** light) { - assert(light); - if (*light) { - if ((*light)->parent.val) { - gfx_del_node((*light)->parent); - } - mem_free_light(light); - } -} -- cgit v1.2.3