![]() |
Gamedev Framework (gf) 0.22.0
A C++17 framework for 2D games
|
A light system. More...
#include <gf/LightSystem.h>
Public Member Functions | |
LightSystem (Vector2i size) | |
void | setAmbientColor (const Color4f &color) |
LightId | addLightShape (LightShape &shape) |
LightId | addLightPoint (LightPointEmission &light) |
void | removeLight (LightId id) |
void | draw (RenderTarget &target, const RenderStates &states) override |
Draw the object to a render target. More... | |
void | dump () |
![]() | |
virtual | ~Drawable () |
Virtual desctructor. More... | |
virtual void | draw (RenderTarget &target, const RenderStates &states)=0 |
Draw the object to a render target. More... | |
A light system.
gf::LightSystem::LightSystem | ( | Vector2i | size | ) |
LightId gf::LightSystem::addLightPoint | ( | LightPointEmission & | light | ) |
LightId gf::LightSystem::addLightShape | ( | LightShape & | shape | ) |
|
overridevirtual |
Draw the object to a render target.
This is a pure virtual function that has to be implemented by the derived class to define how the drawable should be drawn.
target | Render target to draw to |
states | Current render states |
Implements gf::Drawable.
void gf::LightSystem::dump | ( | ) |
void gf::LightSystem::removeLight | ( | LightId | id | ) |
|
inline |