diff options
Diffstat (limited to 'src/render.h')
-rw-r--r-- | src/render.h | 46 |
1 files changed, 8 insertions, 38 deletions
diff --git a/src/render.h b/src/render.h index dde79be..2cb76c1 100644 --- a/src/render.h +++ b/src/render.h @@ -11,57 +11,27 @@ #define COORDS(x, y, width) ((y)*(width)+(x)) #include "defs.h" -#include <stdlib.h> -#include <GL/glut.h> -#include <pthread.h> -#include <math.h> +#include "render_cpu.h" +#include "render_opencl.h" typedef struct config { - u32 iterations; - u8 threads; - u32 colorFrom; - u32 colorTo; - long double to_x; - long double to_y; - long double speed; + CpuConfig config_cpu; + OpenCLConfig config_opencl; + u8 mode; u8 video; u8 filetype; u16 width; u16 height; - u8 renderFPS; u8 videoFPS; u32 bitrate; const char *path; // TODO: key mapping als option in die struct } Config; -typedef struct t_args { - u8 tc; - u8 tid; - long double x_min; - long double x_max; - long double y_min; - long double y_max; - u32 (*sfunc) (long double, long double, u32); - u32 *arr; -} ThreadArgs; - Config *_config; -u32 (*_sfunc) (long double, long double, u32); -u32 *s_arr; -GLuint tex; -u32 rendercnt; -long double x_min, x_max, y_min, y_max; -long double x_min_s, x_max_s, y_min_s, y_max_s; -int delta; -long double dt, ft; - -void render_init(Config *config, u32 (*sfunc) (long double, long double, u32)); -void render_show(); -void gl_render(void); -void gl_idle(void); +u32 s_arr; -void calculate(long double x_min, long double y_min, long double x_max, long double y_max, u32 (*sfunc) (long double, long double, u32), u32 *arr); -void calculate_t(void *args); +void init_render(Config *config); +void show_render(); #endif /* RENDER_H_ */ |