]> git.lizzy.rs Git - dragonblocks_alpha.git/blob - src/client/scene.h
Add diffuse lighting, improve skybox and add timelapse
[dragonblocks_alpha.git] / src / client / scene.h
1 #ifndef _SCENE_H_
2 #define _SCENE_H_
3
4 #include <stdbool.h>
5 #include <pthread.h>
6 #include <linmath.h/linmath.h>
7 #include <dragontype/list.h>
8 #include <dragontype/number.h>
9 #include "client/object.h"
10
11 extern struct Scene
12 {
13         List objects;
14         pthread_mutex_t mtx;
15         GLuint prog;
16         GLint loc_MVP;
17         GLint loc_daylight;
18         GLint loc_lightDir;
19         GLint max_texture_units;
20         mat4x4 projection;
21         f32 fov;
22         f32 render_distance;
23 } scene;
24
25 bool scene_init();
26 void scene_deinit();
27 void scene_add_object(Object *obj);
28 void scene_render();
29 void scene_on_resize(int width, int height);
30 GLuint scene_get_max_texture_units();
31 void scene_get_view_proj(mat4x4 target);
32
33 #endif