summaryrefslogtreecommitdiff
path: root/lighting.hpp
blob: f7708a1ef48d0cbfcc27f08b6e2215cf3bf4eccd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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