Closed DavidJRobertson closed 9 years ago
Probably has to do with the way GLUT interacts with the OS on mac. pKeyUp (attached to glut here) is probably not called for whatever reason.
Ooph that's rough. http://stackoverflow.com/questions/3638187/how-to-detect-command-key-as-a-modifier-in-a-glut-program-running-on-a-mac Surely someone has to have solved this a cleaner way by now! EDIT I misread this page initially, it was specific to command key - googling still.
It doesn't look like people are having trouble with the stock glut key up events on OSX. Any idea what version of GLUT you're compiling with on the mac?
This might also have something to do with how keyboard did not work (al all) on windows when I crosscompiled.
Not sure how to find the GLUT version. It's whatever ships with OSX10.10 or the latest Xcode or whatever (I don't have a clue what Apple's doing to be honest).
I just created a branch switching from GLUT to SFML. Please try it https://github.com/cnlohr/noeuclid/tree/SFML and see if the problem persists.
Doesn't build:
[ 14%] Building CXX object CMakeFiles/noeuclid.dir/RTHelper.cpp.o
/Users/david/Code/noeuclid/RTHelper.cpp:444:13: error: use of undeclared identifier 'glutSwapBuffers'
glutSwapBuffers();
^
1 error generated.
make[2]: *** [CMakeFiles/noeuclid.dir/RTHelper.cpp.o] Error 1
make[1]: *** [CMakeFiles/noeuclid.dir/all] Error 2
make: *** [all] Error 2
Oh. Sorry, forgot to take that and a conditional include out, try again.
Yep, that fixed the controls issue
It seems that the controls stick until the relevant key is pressed again (e.g. will keep moving forward until w is pressed briefly). This makes it very difficult to control.