C++ version of light engine.