Files
HydraV3/HydraEngine/source/ecs/systems/HydraDirectionalShadowSourceSystem.h
T

30 lines
971 B
C++
Raw Normal View History

2026-08-04 18:32:37 +01:00
#ifndef HYDRADIRECTIONALSHADOWSOURCESYSTEM
#define HYDRADIRECTIONALSHADOWSOURCESYSTEM
2026-07-25 16:40:34 +01:00
#include "../../engine/HydraObject.h"
#include "../HydraSystem.h"
2026-08-04 18:32:37 +01:00
#include "../components/HydraDirectionalShadowSourceComponent.h"
2026-07-25 16:40:34 +01:00
#include <GLMIncludes.h>
#include <queue>
2026-08-03 22:34:52 +01:00
#include <vector>
#include <mutex>
2026-07-25 16:40:34 +01:00
2026-08-04 18:32:37 +01:00
class HydraDirectionalShadowSourceSystem : public HydraSystem
2026-07-25 16:40:34 +01:00
{
public:
virtual void Initialise() override;
protected:
2026-07-28 00:26:04 +01:00
void InitialiseComponent(HydraID entity_id) override;
void UpdateSystem(float delta_t_seconds) override;
private:
void _UpdateDirectionalLight(HydraID entity_id);
void _InitialiseDirectionalLight(HydraID entity_id);
2026-08-03 22:34:52 +01:00
void _WriteToGPU();
HydraID m_shadow_buffer_id = INVALID_HYDRA_ID;
std::queue<HydraID> m_available_shadows;
2026-08-04 18:32:37 +01:00
std::vector<HydraDirectionalShadowSourceComponent> m_shadows;
2026-08-03 22:34:52 +01:00
std::mutex m_mutex;
2026-07-28 00:26:04 +01:00
2026-07-25 16:40:34 +01:00
};
#endif /* HYDRASHADOWCASTERSYSTEM */