|
Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
|
Engine-side 2D light registry — the per-frame LightConstants UBO and its CPU mirror. More...
#include "../rhi/GfxEnums.hpp"#include "./LightConstants.hpp"#include <algorithm>#include <bit>#include <cmath>#include <glm/glm.hpp>

Go to the source code of this file.
Classes | |
| class | esengine::LightStore |
| Holds the per-frame 2D lights and their GPU UBO. Mirrors MaterialStore's UBO lifecycle (lazy create, dirty upload, device-owned free). More... | |
Namespaces | |
| namespace | esengine |
Engine-side 2D light registry — the per-frame LightConstants UBO and its CPU mirror.
The render collect path clears this each frame, then accumulates the scene's enabled Light components into it (point/directional into the lights array, ambient summed into the ambient term). flush() uploads the mirror once and binds it at LIGHT_CONSTANTS_BINDING, so every Lit shader reads the same lighting UBO. Owned by RenderContext so both the render path and any future SDK push reach one store / one UBO.
Definition in file LightStore.hpp.