point light

This commit is contained in:
Confideo-IOM
2026-07-17 21:06:44 +01:00
parent 2fc305bc4d
commit b7aa111438
48 changed files with 405 additions and 186 deletions
@@ -1,5 +1,5 @@
#ifndef HYDRALIGHTACTOR
#define HYDRALIGHTACTOR
#ifndef HYDRADIRECTIONALLIGHTACTOR
#define HYDRADIRECTIONALLIGHTACTOR
#include "HydraActor.h"
class CLASS_DEFINE HydraDirectionalLightActor : public HydraActor
@@ -15,4 +15,4 @@ class CLASS_DEFINE HydraDirectionalLightActor : public HydraActor
};
#endif /* HYDRALIGHTACTOR */
#endif /* HYDRADIRECTIONALLIGHTACTOR */
@@ -0,0 +1,37 @@
#include "HydraPointLightActor.h"
#include "../engine/HydraEngine.h"
#include "../actor/HydraActorManager.h"
#include "../task/HydraTask.h"
#include "../ecs/HydraECS.h"
#include "../ecs/components/HydraPositionComponent.h"
#include "../ecs/components/HydraMeshComponent.h"
#include "../ecs/components/HydraRenderableComponent.h"
#include "../ecs/components/HydraMaterialComponent.h"
#include "../ecs/components/HydraLightComponent.h"
#include "../buffer/HydraLightBufferManager.h"
#include "../buffer/HydraLightBuffer.h"
void HydraPointLightActor::InitialiseComponents()
{
HydraLightComponent light_comp = {};
HydraECS *ecs = GetEngine()->ECS();
light_comp.light_colour = glm::vec4(1,1,1,1);
light_comp.light_intensity = 10.0f;
light_comp.light_type = static_cast<uint32_t>(HYDRA_LIGHT_TYPE::HYDRA_LIGHT_POINT);
light_comp.entity_id = GetID();
ecs->AddComponent<HydraLightComponent>(GetID(), light_comp);
HydraPositionComponent position_component;
ecs->AddComponent<HydraPositionComponent>(GetID(), position_component);
}
void HydraPointLightActor::Destroy()
{
}
@@ -0,0 +1,21 @@
#ifndef HYDRAPOINTLIGHTACTOR
#define HYDRAPOINTLIGHTACTOR
#include "HydraActor.h"
class CLASS_DEFINE HydraPointLightActor : public HydraActor
{
private:
protected:
public:
virtual void InitialiseComponents() override;
virtual void Destroy() override;
};
#endif /* HYDRAPOINTLIGHTACTOR */