diff options
author | Leonard Kugis <leonardkugis@gmail.com> | 2018-01-31 23:31:02 +0100 |
---|---|---|
committer | Leonard Kugis <leonardkugis@gmail.com> | 2018-01-31 23:31:02 +0100 |
commit | 28006d5fa6af63a9bc2f274e7daf7a741eaacde5 (patch) | |
tree | 3090cdc8a6674273ddce83bb9f789b599ad442b3 /src/render.c | |
parent | 70d4ba8d3bfa3c5b219a8baf86d279adf5177d14 (diff) | |
parent | f6ecdf87b278d62a7259bca573e81484ad9932f6 (diff) |
Merge branch 'cl'
Diffstat (limited to 'src/render.c')
-rw-r--r-- | src/render.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/src/render.c b/src/render.c index 2ebb7c3..6c01029 100644 --- a/src/render.c +++ b/src/render.c @@ -44,12 +44,30 @@ void init_render(Config *config) case MODE_CPU: init_cpu(&_config->config_cpu); glutDisplayFunc(render_cpu); - glutIdleFunc(idle_cpu); + if (_config->zoomSpecific) + { + glutIdleFunc(idle_cpu); + } + else + { + glutIdleFunc(idle_cpu_dummy); + glutKeyboardFunc(keyboard_cpu); + glutMouseFunc(mouse_cpu); + } break; case MODE_OPENCL: init_opencl(&_config->config_opencl); glutDisplayFunc(render_opencl); - glutIdleFunc(idle_opencl); + if (_config->zoomSpecific) + { + glutIdleFunc(idle_opencl); + } + else + { + glutIdleFunc(idle_opencl_dummy); + glutKeyboardFunc(keyboard_opencl); + glutMouseFunc(mouse_opencl); + } break; } |