Files
HydraV3/HydraEngine/source/buffer/HydraLightBufferManager.h
T

30 lines
812 B
C++
Raw Normal View History

2026-07-17 15:30:29 +01:00
#ifndef HYDRALIGHTBUFFERMANAGER
#define HYDRALIGHTBUFFERMANAGER
#include "../engine/HydraObject.h"
2026-08-18 16:23:20 +01:00
#include "../ecs/components/HydraLightComponent.h"
2026-07-17 15:30:29 +01:00
#include <vector>
#include <queue>
#include <mutex>
class HydraLightBufferManager : public HydraObject
{
public:
void Initialise();
2026-08-18 16:23:20 +01:00
void Shutdown();
2026-07-17 15:30:29 +01:00
uint32_t GetLightCount();
2026-08-18 16:23:20 +01:00
void UpdateBuffer();
void AddLight(HydraLightComponent light);
void RemoveLight(HydraID entity_id);
2026-07-17 15:30:29 +01:00
private:
std::mutex m_mutex;
uint32_t m_light_count = 0;
2026-08-18 16:23:20 +01:00
std::vector<HydraLightComponent> m_lights;
2026-07-17 15:30:29 +01:00
std::queue<HydraID> m_available_lights;
std::vector<HydraID> m_light_lookup;
2026-08-18 16:23:20 +01:00
HydraID m_light_buffer_id = INVALID_HYDRA_ID;
2026-07-17 15:30:29 +01:00
};
#endif /* HYDRALIGHTBUFFERMANAGER */