diff options
Diffstat (limited to 'lighting.hpp')
-rw-r--r-- | lighting.hpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/lighting.hpp b/lighting.hpp new file mode 100644 index 0000000..f7708a1 --- /dev/null +++ b/lighting.hpp @@ -0,0 +1,29 @@ +#ifndef lighting_hpp +#define lighting_hpp + +#include "maths.hpp" +#include "video.hpp" + +struct Arena; +struct World; + +struct Lighting { + static constexpr int max_lights = 128; + Staged_Buffer lights; + int light_count; + void init(Device* dev); + void destroy(Device* dev); + void update(Device* dev, Context& ctx, World& w); + void write_buf(void* ptr, World& w); +}; + +struct Light { + v3f colour; + float brightness; +}; + +struct Sun_Light : Light { + v3f dir; +}; + +#endif |