Point lights
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user