erebus

view liberebus/src/erebus.h @ 0:4abdce1361b9

initial commit
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 27 Apr 2014 16:02:47 +0300
parents
children 474a0244f57d
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_NUM_THREADS,
11 ERB_OPT_GAMMA,
13 ERB_NUM_OPTIONS
14 };
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
20 struct erebus *erb_init(void);
21 void erb_destroy(struct erebus *ctx);
23 void erb_setopti(struct erebus *ctx, enum erb_option opt, int val);
24 void erb_setoptf(struct erebus *ctx, enum erb_option opt, float val);
25 void erb_setoptfv(struct erebus *ctx, enum erb_option opt, float *vec);
27 int erb_getopti(struct erebus *ctx, enum erb_option opt);
28 float erb_getoptf(struct erebus *ctx, enum erb_option opt);
29 float *erb_getoptfv(struct erebus *ctx, enum erb_option opt);
31 float *erb_get_framebuffer(struct erebus *ctx);
33 void erb_begin_frame(struct erebus *ctx, long ms);
34 int erb_render(struct erebus *ctx, long timeout);
35 int erb_render_rect(struct erebus *ctx, int x, int y, int width, int height, long timeout);
37 int erb_get_progress(struct erebus *ctx);
39 int erb_load_scene(struct erebus *ctx, const char *fname);
41 #ifdef __cplusplus
42 }
43 #endif
46 #endif /* LIBEREBUS_H_ */