24 using ID =
unsigned int;
static constexpr int slotCount
number of slots managed by this class
Definition: lightmanager.h:29
void setUniforms(Program &program) const
sets the lights managed by this class as a uniform array
Definition: lightmanager.cpp:34
ID getFreeSlot()
Definition: lightmanager.cpp:39
unsigned int ID
Definition: lightmanager.h:24
Light m_lights[slotCount]
Definition: lightmanager.h:68
The LightManager class manages slots that can be filled with Light instances and is able to set those...
Definition: lightmanager.h:21
ID add(const Light &light)
Inserts a light in the next free slot.
Definition: lightmanager.cpp:15
The program class implements the basic functionality used for binding programs to openGL...
Definition: program.h:18
Definition: eventhandler.cpp:18
The Light class represents a light source with a packed, shader compatible memory layout...
Definition: light.h:15
std::set< ID > m_usedSlots
Definition: lightmanager.h:70
int freeSlots() const
Definition: lightmanager.cpp:10