Core: Make Color constexpr
This commit is contained in:
@@ -173,7 +173,7 @@ int main()
|
||||
auto& cameraLight = registry.emplace<Nz::LightComponent>(lightEntity1);
|
||||
|
||||
auto& spotLight = cameraLight.AddLight<Nz::SpotLight>(0xFFFFFFFF);
|
||||
spotLight.UpdateColor(Nz::Color::Red);
|
||||
spotLight.UpdateColor(Nz::Color::Red());
|
||||
spotLight.UpdateInnerAngle(Nz::DegreeAnglef(15.f));
|
||||
spotLight.UpdateOuterAngle(Nz::DegreeAnglef(20.f));
|
||||
spotLight.EnableShadowCasting(true);
|
||||
@@ -188,7 +188,7 @@ int main()
|
||||
auto& cameraLight = registry.emplace<Nz::LightComponent>(lightEntity2);
|
||||
|
||||
auto& spotLight = cameraLight.AddLight<Nz::SpotLight>(0xFFFFFFFF);
|
||||
spotLight.UpdateColor(Nz::Color::Green);
|
||||
spotLight.UpdateColor(Nz::Color::Green());
|
||||
spotLight.EnableShadowCasting(true);
|
||||
spotLight.UpdateShadowMapSize(1024);
|
||||
}
|
||||
@@ -258,7 +258,7 @@ int main()
|
||||
auto& cameraLight = registry.emplace<Nz::LightComponent>(lightEntity3);
|
||||
|
||||
auto& pointLight = cameraLight.AddLight<Nz::PointLight>(0xFFFFFFFF);
|
||||
pointLight.UpdateColor(Nz::Color::Blue);
|
||||
pointLight.UpdateColor(Nz::Color::Blue());
|
||||
pointLight.UpdateRadius(3.f);
|
||||
pointLight.EnableShadowCasting(true);
|
||||
pointLight.UpdateShadowMapSize(2048);
|
||||
@@ -521,13 +521,13 @@ int main()
|
||||
|
||||
Nz::DebugDrawer& debugDrawer = renderSystem.GetFramePipeline().GetDebugDrawer();
|
||||
auto& lightNode = registry.get<Nz::NodeComponent>(lightEntity3);
|
||||
//debugDrawer.DrawLine(lightNode.GetPosition(Nz::CoordSys::Global), lightNode.GetForward() * 10.f, Nz::Color::Blue);
|
||||
//debugDrawer.DrawLine(lightNode.GetPosition(Nz::CoordSys::Global), lightNode.GetForward() * 10.f, Nz::Color::Blue());
|
||||
Nz::Vector3f pos = lightNode.GetPosition(Nz::CoordSys::Global);
|
||||
debugDrawer.DrawBox(Nz::Boxf(pos.x - 0.05f, pos.y - 0.05f, pos.z - 0.05f, 0.1f, 0.1f, 0.1f), Nz::Color::Blue);
|
||||
debugDrawer.DrawBox(Nz::Boxf(pos.x - 0.05f, pos.y - 0.05f, pos.z - 0.05f, 0.1f, 0.1f, 0.1f), Nz::Color::Blue());
|
||||
/*debugDrawer.DrawBox(floorBox, Nz::Color::Red);
|
||||
Nz::Boxf intersection;
|
||||
if (floorBox.Intersect(test, &intersection))
|
||||
debugDrawer.DrawBox(intersection, Nz::Color::Green);*/
|
||||
debugDrawer.DrawBox(intersection, Nz::Color::Green());*/
|
||||
|
||||
systemGraph.Update();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user