From 1c3ea27064257d8cf7b9f36b0388b8cf2e94ab08 Mon Sep 17 00:00:00 2001 From: Leonard Kugis Date: Fri, 26 Jan 2018 01:12:49 +0100 Subject: Skeleton for OpenCL rendering, cleaned up alot, WIP and crashing --- src/render.h | 46 ++++++++-------------------------------------- 1 file changed, 8 insertions(+), 38 deletions(-) (limited to 'src/render.h') 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 -#include -#include -#include +#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_ */ -- cgit v1.2.1