erebus

view liberebus/src/erebus.h @ 8:e2d9bf168a41

semi-works ...
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 24 May 2014 06:12:57 +0300
parents 474a0244f57d
children d38e13d6063c
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 #ifdef __cplusplus
43 }
44 #endif
47 #endif /* LIBEREBUS_H_ */