This commit is contained in:
Confideo-IOM
2026-08-18 16:23:20 +01:00
parent 282243a16b
commit 20c0794d10
66 changed files with 622 additions and 1144 deletions
@@ -2,7 +2,8 @@
#define HYDRALIGHTBUFFERMANAGER
#include "../engine/HydraObject.h"
#include "HydraLightBuffer.h"
#include "../ecs/components/HydraLightComponent.h"
#include <vector>
#include <queue>
#include <mutex>
@@ -11,17 +12,18 @@ class HydraLightBufferManager : public HydraObject
{
public:
void Initialise();
void Shutdown();
HydraID CreateLight(HydraLightBuffer light_buffer);
HydraLightBuffer* const GetLightBufferBase();
HydraLightBuffer& GetLightBuffer(HydraID light_id);
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<HydraLightBuffer> m_lights;
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 */