erebus

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