Divide Framework 0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
PointLightSystem.cpp
Go to the documentation of this file.
1
2
4
8
9namespace Divide {
11 : PlatformContextComponent(context),
12 ECSSystem(parentEngine)
13 {
14 }
15
18
20 for (PointLightComponent* comp : _componentCache) {
21 if (comp->_drawImpostor) {
22 IM::SphereDescriptor descriptor;
23 descriptor.center = comp->positionCache();
24
25 descriptor.radius = 0.5f;
26 descriptor.colour = Util::ToByteColour(comp->getDiffuseColour());
27 context().gfx().debugDrawSphere(comp->getGUID() + 0, descriptor);
28
29 descriptor.radius = comp->range();
31 context().gfx().debugDrawSphere(comp->getGUID() + 1, descriptor);
32 }
33 }
34 }
35
36} //namespace Divide
#define PROFILE_SCOPE_AUTO(CATEGORY)
Definition: Profiler.h:87
void debugDrawSphere(const I64 ID, IM::SphereDescriptor descriptor) noexcept
Definition: GFXDevice.cpp:2936
PlatformContext & context() noexcept
GFXDevice & gfx() noexcept
PointLightSystem(ECS::ECSEngine &parentEngine, PlatformContext &context)
void PreUpdate(F32 dt) override
constexpr Optick::Category::Type Scene
Definition: Profiler.h:66
UColour4 ToByteColour(const FColour4 &floatColour) noexcept
Definition: MathHelper.cpp:256
Handle console commands that start with a forward slash.
Definition: AIProcessor.cpp:7