From 30fcb8bce7b60b6754a0d35f2f15b627d0fba4cb Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 1 Apr 2026 20:21:23 +0100 Subject: Have Renderable manage all instance lights Spot and point lights now existing in Renderable, the vertex data contains the owning parent object's index in CommonLocationData, the render step is just a single draw call. --- gfx/models/lights.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 gfx/models/lights.cpp (limited to 'gfx/models/lights.cpp') diff --git a/gfx/models/lights.cpp b/gfx/models/lights.cpp new file mode 100644 index 0000000..8c0e9e6 --- /dev/null +++ b/gfx/models/lights.cpp @@ -0,0 +1,11 @@ +#include "lights.h" + +SpotLightVertex::SpotLightVertex(const SpotLightDef & light, uint32_t parentObjectIdx) : + SpotLightDef {light}, LightCommonVertex {parentObjectIdx} +{ +} + +PointLightVertex::PointLightVertex(const PointLightDef & light, uint32_t parentObjectIdx) : + PointLightDef {light}, LightCommonVertex {parentObjectIdx} +{ +} -- cgit v1.3