rev |
line source |
nuclear@2
|
1 #ifndef LIBEREBUS_H_
|
nuclear@2
|
2 #define LIBEREBUS_H_
|
nuclear@2
|
3
|
nuclear@2
|
4 struct erebus;
|
nuclear@2
|
5
|
nuclear@2
|
6 enum erb_option {
|
nuclear@2
|
7 ERB_OPT_WIDTH,
|
nuclear@2
|
8 ERB_OPT_HEIGHT,
|
nuclear@2
|
9 ERB_OPT_MAX_ITER,
|
nuclear@8
|
10 ERB_OPT_MAX_SAMPLES,
|
nuclear@2
|
11 ERB_OPT_NUM_THREADS,
|
nuclear@2
|
12 ERB_OPT_GAMMA,
|
nuclear@2
|
13
|
nuclear@2
|
14 ERB_NUM_OPTIONS
|
nuclear@2
|
15 };
|
nuclear@2
|
16
|
nuclear@2
|
17 #ifdef __cplusplus
|
nuclear@2
|
18 extern "C" {
|
nuclear@2
|
19 #endif
|
nuclear@2
|
20
|
nuclear@2
|
21 struct erebus *erb_init(void);
|
nuclear@2
|
22 void erb_destroy(struct erebus *ctx);
|
nuclear@2
|
23
|
nuclear@2
|
24 void erb_setopti(struct erebus *ctx, enum erb_option opt, int val);
|
nuclear@2
|
25 void erb_setoptf(struct erebus *ctx, enum erb_option opt, float val);
|
nuclear@2
|
26 void erb_setoptfv(struct erebus *ctx, enum erb_option opt, float *vec);
|
nuclear@2
|
27
|
nuclear@2
|
28 int erb_getopti(struct erebus *ctx, enum erb_option opt);
|
nuclear@2
|
29 float erb_getoptf(struct erebus *ctx, enum erb_option opt);
|
nuclear@2
|
30 float *erb_getoptfv(struct erebus *ctx, enum erb_option opt);
|
nuclear@2
|
31
|
nuclear@2
|
32 float *erb_get_framebuffer(struct erebus *ctx);
|
nuclear@2
|
33
|
nuclear@2
|
34 void erb_begin_frame(struct erebus *ctx, long ms);
|
nuclear@2
|
35 int erb_render(struct erebus *ctx, long timeout);
|
nuclear@2
|
36 int erb_render_rect(struct erebus *ctx, int x, int y, int width, int height, long timeout);
|
nuclear@2
|
37
|
nuclear@2
|
38 int erb_get_progress(struct erebus *ctx);
|
nuclear@2
|
39
|
nuclear@2
|
40 int erb_load_scene(struct erebus *ctx, const char *fname);
|
nuclear@2
|
41
|
nuclear@9
|
42 bool erb_input_keyboard(struct erebus *ctx, int key, bool pressed);
|
nuclear@9
|
43 bool erb_input_mouse_button(struct erebus *ctx, int bn, bool pressed, int x, int y);
|
nuclear@9
|
44 bool erb_input_mouse_motion(struct erebus *ctx, int x, int y);
|
nuclear@9
|
45 bool erb_input_6dof_button(struct erebus *ctx, int bn, bool pressed);
|
nuclear@9
|
46 bool erb_input_6dof_motion(struct erebus *ctx, float x, float y, float z);
|
nuclear@9
|
47
|
nuclear@2
|
48 #ifdef __cplusplus
|
nuclear@2
|
49 }
|
nuclear@2
|
50 #endif
|
nuclear@2
|
51
|
nuclear@2
|
52
|
nuclear@2
|
53 #endif /* LIBEREBUS_H_ */
|