]> git.lizzy.rs Git - dragonblocks_alpha.git/blob - src/client/scene.h
4e26d252ff3905001394616c64d1d63ed319083c
[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 max_texture_units;
18         mat4x4 projection;
19         f32 fov;
20         f32 render_distance;
21 } scene;
22
23 bool scene_init();
24 void scene_deinit();
25 void scene_add_object(Object *obj);
26 void scene_render();
27 void scene_on_resize(int width, int height);
28 GLuint scene_get_max_texture_units();
29 void scene_get_view_proj(mat4x4 target);
30
31 #endif