Candle
2D lighting for SFML
Candle is a SFML based C++ library that provides light, shadow casting and field of view functionalities with easy integration
Contents
Demo
Before anything, here you have a little example of how it looks.
The code comes with a demo program showing the functionalities provided by the library. In it you can place lights and edges that will cast shadows, and modify the behaviour of the fog.
You can check the full manual of the demo here.
Build
CMake
You can build the static library and the demo program with CMake.
mkdir build && cd build
cmake .. -DBUILD_DEMO=ON
cmake --build .
This will generate libCandle-s.a
or (Candle-s.lib
on Windows) in build/lib
folder, and the demo
program (or demo.exe
) in build/bin
.
Make
Alternatively, if you work in Linux, you can…