From cc884ee71f017d9493da22565fc33e6828da123d Mon Sep 17 00:00:00 2001 From: Leonard Kugis Date: Sun, 28 Jan 2018 22:26:04 +0100 Subject: Added point and click functionality --- src/render.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'src/render.c') diff --git a/src/render.c b/src/render.c index 191dcd9..d8f6f59 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; } -- cgit v1.2.1