diff options
author | Leonard Kugis <leonardkugis@gmail.com> | 2018-02-01 00:26:36 +0100 |
---|---|---|
committer | Leonard Kugis <leonardkugis@gmail.com> | 2018-02-01 00:26:36 +0100 |
commit | be4f2582062196dd6ecf393f55566367bc1dfa9f (patch) | |
tree | 9c80c556327097f6ab7e4b97b5b195d45167565f /src/render.c | |
parent | 28006d5fa6af63a9bc2f274e7daf7a741eaacde5 (diff) |
reorganized configs
Diffstat (limited to 'src/render.c')
-rw-r--r-- | src/render.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/render.c b/src/render.c index 6c01029..e10e44b 100644 --- a/src/render.c +++ b/src/render.c @@ -9,12 +9,11 @@ //#define HAVE_STRUCT_TIMESPEC #include <pthread.h> -void init_render(Config *config) +void init_render(config_t *config) { _config = config; s_arr = (u32 *) malloc((_config->width) * (_config->height) * sizeof(u32)); - _config->config_cpu.arr = s_arr; - _config->config_opencl.arr = s_arr; + _config->arr = s_arr; //glutInit(0, NULL); glutInitWindowPosition(0, 0); glutInitWindowSize(_config->width, _config->height); @@ -34,15 +33,13 @@ void init_render(Config *config) glOrtho(0, _config->width, 0, _config->height, -1, 1); glMatrixMode(GL_MODELVIEW); - _config->config_cpu.tex = tex; - _config->config_opencl.tex = tex; - _config->config_cpu.zoom_func = zoom_func; - _config->config_opencl.zoom_func = zoom_func; + _config->tex = tex; + _config->zoom_func = zoom_func; switch(_config->mode) { case MODE_CPU: - init_cpu(&_config->config_cpu); + init_cpu(_config); glutDisplayFunc(render_cpu); if (_config->zoomSpecific) { @@ -56,7 +53,7 @@ void init_render(Config *config) } break; case MODE_OPENCL: - init_opencl(&_config->config_opencl); + init_opencl(_config); glutDisplayFunc(render_opencl); if (_config->zoomSpecific) { |