Point lights

This commit is contained in:
Confideo-IOM
2026-08-28 16:36:25 +01:00
parent 30538ae7ab
commit e3d37e3f8a
60 changed files with 458 additions and 184 deletions
@@ -7,6 +7,7 @@
#include "../ecs/components/HydraMeshComponent.h"
#include "../ecs/components/HydraRenderableComponent.h"
#include "../ecs/components/HydraMaterialComponent.h"
#include "../ecs/components/HydraLightComponent.h"
#include "../buffer/HydraMaterialBufferManager.h"
#include "../buffer/HydraTextureBufferManager.h"
#include "../buffer/HydraMaterialBuffer.h"
@@ -23,6 +24,7 @@ void HydraTestLightActor::InitialiseComponents()
_CreateMaterial();
_CreateMesh();
_CreateRenderableComponent();
}
void HydraTestLightActor::DeferredInitialiseComponents()
@@ -173,7 +175,7 @@ void HydraTestLightActor::_CreateMaterial()
material.diffuse_texture_id = tex_id;
material.diffuse_colour = glm::vec4(1, 1, 1, 1);
material.metalic_rough = glm::vec4(0, 0.5, 0.3, 1);
material.emmissive_metalic_rough = glm::vec4(0, 0.5, 0.3, 1);
HydraID mat_id = engine->MaterialBufferManager()->CreateMaterial(material);
HydraMaterialComponent mat_comp = {};
@@ -181,7 +183,6 @@ void HydraTestLightActor::_CreateMaterial()
engine->ECS()->AddComponent<HydraMaterialComponent>(GetID(), mat_comp);
}
void HydraTestLightActor::_CreateRenderableComponent()
{
HydraRenderableComponent render_comp;
@@ -189,3 +190,4 @@ void HydraTestLightActor::_CreateRenderableComponent()
render_comp.renderable_types.set((uint32_t)HYDRA_RENDERABLE_TYPE::HYDRA_COLOUR, true);
ecs->AddComponent<HydraRenderableComponent>(GetID(), render_comp);
}