erebus

view liberebus/src/erebus.h @ 10:506e114b7ca2

foo
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 24 May 2014 17:43:46 +0300
parents e2d9bf168a41
children b1fc96c71bcc
line source
1 #ifndef LIBEREBUS_H_
2 #define LIBEREBUS_H_
4 struct erebus;
6 enum erb_option {
7 ERB_OPT_WIDTH,
8 ERB_OPT_HEIGHT,
9 ERB_OPT_MAX_ITER,
10 ERB_OPT_MAX_SAMPLES,
11 ERB_OPT_NUM_THREADS,
12 ERB_OPT_GAMMA,
14 ERB_NUM_OPTIONS
15 };
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
21 struct erebus *erb_init(void);
22 void erb_destroy(struct erebus *ctx);
24 void erb_setopti(struct erebus *ctx, enum erb_option opt, int val);
25 void erb_setoptf(struct erebus *ctx, enum erb_option opt, float val);
26 void erb_setoptfv(struct erebus *ctx, enum erb_option opt, float *vec);
28 int erb_getopti(struct erebus *ctx, enum erb_option opt);
29 float erb_getoptf(struct erebus *ctx, enum erb_option opt);
30 float *erb_getoptfv(struct erebus *ctx, enum erb_option opt);
32 float *erb_get_framebuffer(struct erebus *ctx);
34 void erb_begin_frame(struct erebus *ctx, long ms);
35 int erb_render(struct erebus *ctx, long timeout);
36 int erb_render_rect(struct erebus *ctx, int x, int y, int width, int height, long timeout);
38 int erb_get_progress(struct erebus *ctx);
40 int erb_load_scene(struct erebus *ctx, const char *fname);
42 bool erb_input_keyboard(struct erebus *ctx, int key, bool pressed);
43 bool erb_input_mouse_button(struct erebus *ctx, int bn, bool pressed, int x, int y);
44 bool erb_input_mouse_motion(struct erebus *ctx, int x, int y);
45 bool erb_input_6dof_button(struct erebus *ctx, int bn, bool pressed);
46 bool erb_input_6dof_motion(struct erebus *ctx, float x, float y, float z);
48 #ifdef __cplusplus
49 }
50 #endif
53 #endif /* LIBEREBUS_H_ */