erebus
diff 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 diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/liberebus/src/erebus.h Sun Apr 27 16:02:47 2014 +0300 1.3 @@ -0,0 +1,46 @@ 1.4 +#ifndef LIBEREBUS_H_ 1.5 +#define LIBEREBUS_H_ 1.6 + 1.7 +struct erebus; 1.8 + 1.9 +enum erb_option { 1.10 + ERB_OPT_WIDTH, 1.11 + ERB_OPT_HEIGHT, 1.12 + ERB_OPT_MAX_ITER, 1.13 + ERB_OPT_NUM_THREADS, 1.14 + ERB_OPT_GAMMA, 1.15 + 1.16 + ERB_NUM_OPTIONS 1.17 +}; 1.18 + 1.19 +#ifdef __cplusplus 1.20 +extern "C" { 1.21 +#endif 1.22 + 1.23 +struct erebus *erb_init(void); 1.24 +void erb_destroy(struct erebus *ctx); 1.25 + 1.26 +void erb_setopti(struct erebus *ctx, enum erb_option opt, int val); 1.27 +void erb_setoptf(struct erebus *ctx, enum erb_option opt, float val); 1.28 +void erb_setoptfv(struct erebus *ctx, enum erb_option opt, float *vec); 1.29 + 1.30 +int erb_getopti(struct erebus *ctx, enum erb_option opt); 1.31 +float erb_getoptf(struct erebus *ctx, enum erb_option opt); 1.32 +float *erb_getoptfv(struct erebus *ctx, enum erb_option opt); 1.33 + 1.34 +float *erb_get_framebuffer(struct erebus *ctx); 1.35 + 1.36 +void erb_begin_frame(struct erebus *ctx, long ms); 1.37 +int erb_render(struct erebus *ctx, long timeout); 1.38 +int erb_render_rect(struct erebus *ctx, int x, int y, int width, int height, long timeout); 1.39 + 1.40 +int erb_get_progress(struct erebus *ctx); 1.41 + 1.42 +int erb_load_scene(struct erebus *ctx, const char *fname); 1.43 + 1.44 +#ifdef __cplusplus 1.45 +} 1.46 +#endif 1.47 + 1.48 + 1.49 +#endif /* LIBEREBUS_H_ */ 1.50 \ No newline at end of file