aboutsummaryrefslogtreecommitdiff
path: root/src/render.c
diff options
context:
space:
mode:
authorLeonard Kugis <leonardkugis@gmail.com>2018-01-28 22:26:04 +0100
committerLeonard Kugis <leonardkugis@gmail.com>2018-01-28 22:26:04 +0100
commitcc884ee71f017d9493da22565fc33e6828da123d (patch)
tree33f97802d7f1461155d34fed0da2cfe1fe657945 /src/render.c
parentda4b72ea58e97d14306cfd322a8ef7a40337645d (diff)
Added point and click functionality
Diffstat (limited to 'src/render.c')
-rw-r--r--src/render.c22
1 files changed, 20 insertions, 2 deletions
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;
}