Files
HydraV3/HydraEngine/source/ecs/systems/HydraLightSystem.cpp
T

42 lines
1.2 KiB
C++
Raw Normal View History

2026-07-17 15:30:29 +01:00
#include "HydraLightSystem.h"
#include "../../engine/HydraEngine.h"
#include "../HydraECS.h"
#include "../components/HydraLightComponent.h"
#include "../components/HydraPositionComponent.h"
#include "../../buffer/HydraLightBufferManager.h"
2026-08-18 16:23:20 +01:00
2026-07-17 15:30:29 +01:00
#include "../../scheduler/HydraTaskScheduler.h"
#include "../../task/buffer/HydraCreateGPUBufferTask.hpp"
2026-08-17 21:44:00 +01:00
#include "../../task/buffer/HydraDeleteGPUBufferTask.hpp"
2026-07-17 15:30:29 +01:00
#include "../../task/buffer/HydraUpdatePartialGPUBufferTask.hpp"
#include "../../actor/HydraActorManager.h"
#include <GLMIncludes.h>
void HydraLightSystem::Initialise()
{
2026-08-18 16:23:20 +01:00
2026-07-17 15:30:29 +01:00
}
void HydraLightSystem::InitialiseComponent(HydraID entity_id)
{
HydraLightBufferManager *light_man = GetEngine()->LightBufferManager();
HydraECS *ecs = GetEngine()->ECS();
HydraLightComponent &light_comp = ecs->GetComponent<HydraLightComponent>(entity_id);
2026-08-18 16:23:20 +01:00
light_man->AddLight(light_comp);
2026-07-17 15:30:29 +01:00
}
2026-08-18 16:23:20 +01:00
void HydraLightSystem::DestroyComponent(HydraID actor_id)
2026-08-17 21:44:00 +01:00
{
2026-08-18 16:23:20 +01:00
HydraLightBufferManager *light_man = GetEngine()->LightBufferManager();
light_man->RemoveLight(actor_id);
2026-08-17 21:44:00 +01:00
}
2026-07-17 15:30:29 +01:00
void HydraLightSystem::UpdateSystem(float delta_t_seconds)
{
2026-08-18 16:23:20 +01:00
HydraLightBufferManager *light_man = GetEngine()->LightBufferManager();
light_man->UpdateBuffer();
2026-07-17 15:30:29 +01:00
}