metasurf
diff examples/metaballs/src/metaballs.c @ 5:dedd153d2ceb
- fixed makefile to produce non-broken shared objects
- removed glutGetModifiers from the motion callback and placed it in the mouse
callback as apparently it's not supposed to be called from there.
- added MacOSX include paths in the examples
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Tue, 25 Oct 2011 23:38:39 +0300 |
parents | 52664d3451ad |
children |
line diff
1.1 --- a/examples/metaballs/src/metaballs.c Tue Oct 25 23:21:32 2011 +0300 1.2 +++ b/examples/metaballs/src/metaballs.c Tue Oct 25 23:38:39 2011 +0300 1.3 @@ -262,12 +262,14 @@ 1.4 1.5 int bnstate[32]; 1.6 int prev_x, prev_y; 1.7 +int mod; 1.8 1.9 void mouse(int bn, int state, int x, int y) 1.10 { 1.11 bnstate[bn] = state == GLUT_DOWN; 1.12 prev_x = x; 1.13 prev_y = y; 1.14 + mod = glutGetModifiers(); 1.15 } 1.16 1.17 void motion(int x, int y) 1.18 @@ -279,7 +281,7 @@ 1.19 prev_x = x; 1.20 prev_y = y; 1.21 1.22 - if(glutGetModifiers()) { 1.23 + if(mod) { 1.24 if(bnstate[GLUT_LEFT_BUTTON]) { 1.25 cam_inp_rotate(dx, dy); 1.26 }