cnlohr / noeuclid

Non-euclidean GPU Raytraced Game
BSD 3-Clause "New" or "Revised" License
644 stars 48 forks source link

Controls glitchy/sticking (possibly mac only) #21

Closed DavidJRobertson closed 9 years ago

DavidJRobertson commented 9 years ago

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.

phiresky commented 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.

cnlohr commented 9 years ago

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.

cnlohr commented 9 years ago

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?

phiresky commented 9 years ago

This might also have something to do with how keyboard did not work (al all) on windows when I crosscompiled.

DavidJRobertson commented 9 years ago

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).

phiresky commented 9 years ago

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.

DavidJRobertson commented 9 years ago

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
phiresky commented 9 years ago

Oh. Sorry, forgot to take that and a conditional include out, try again.

DavidJRobertson commented 9 years ago

Yep, that fixed the controls issue