WIP Lights

This commit is contained in:
Tobias Dahl
2014-03-11 09:18:51 +01:00
parent 9ee4890f4a
commit 0ec0022d6a
14 changed files with 2405 additions and 48 deletions
+13
View File
@@ -25,6 +25,19 @@ void Systems::RenderSystem::UpdateEntity( double dt, EntityID entity, EntityID p
Model* model = m_CachedModels[modelComponent->ModelFile];
m_Renderer->AddModelToDraw(model, transformComponent->Position, transformComponent->Orientation);
}
auto pointLightComponent = m_World->GetComponent<Components::PointLight>(entity, "PointLight");
if (pointLightComponent != nullptr)
{
m_Renderer->AddPointLightToDraw(
transformComponent->Position,
pointLightComponent->Specular,
pointLightComponent->Diffuse,
pointLightComponent->constantAttenuation,
pointLightComponent->linearAttenuation,
pointLightComponent->quadraticAttenuation,
pointLightComponent->spotExponent);
}
auto cameraComponent = m_World->GetComponent<Components::Camera>(entity, "Camera");
if (cameraComponent != nullptr)
{