Files
HydraV3/HydraEngine/source/buffer/HydraLightBufferManager.h
T
2026-08-18 16:23:20 +01:00

30 lines
812 B
C++

#ifndef HYDRALIGHTBUFFERMANAGER
#define HYDRALIGHTBUFFERMANAGER
#include "../engine/HydraObject.h"
#include "../ecs/components/HydraLightComponent.h"
#include <vector>
#include <queue>
#include <mutex>
class HydraLightBufferManager : public HydraObject
{
public:
void Initialise();
void Shutdown();
uint32_t GetLightCount();
void UpdateBuffer();
void AddLight(HydraLightComponent light);
void RemoveLight(HydraID entity_id);
private:
std::mutex m_mutex;
uint32_t m_light_count = 0;
std::vector<HydraLightComponent> m_lights;
std::queue<HydraID> m_available_lights;
std::vector<HydraID> m_light_lookup;
HydraID m_light_buffer_id = INVALID_HYDRA_ID;
};
#endif /* HYDRALIGHTBUFFERMANAGER */