Setting up a basic GLFW example as in http://www.glfw.org/docs/latest/quick.html works, except the key callback function is never called. I’ve tried adding callbacks for mouse button and window_close etc and they all register fine. I’ve tried googling the issue, but it does not seem to be a common issue… Setting up a character_callback works…
I haven’t had this issue with other window libraries (like SDL2). Anyone got any ideas that I could try?
I’m using a mechanical keyboard (filco) on a Linux Mint 17.2 64 bit system.
BTW, why do you need CPP for this simple C program? Only for “cout”?
Also, if you don’t need to support ancient hardware, consider to replace all this long ago deprecated stuff such as “glMatrix”, “glVertex” and other immediate mode functions with modern approach - it will save you tons of reworking later.
Thanks for your warning, I wholeheartedly agree on not using legacy GL. I just copy pasted tutorial code to see if everything worked as it should. If you look at the code, you’ll also see that I set up a 4.5 context (commented out) in order to ensure that it wouldn’t give me any issues. Legacy GL is okay for spitting out some quick vertices.
And no, I did not specificly target C++ for cout, it’s just my default language.
Thanks, I tried the demo code on my laptop (same os) and had the same issues. Both cases pulled glfw straight from github. I’ll check out a stable release and see if that fixes it!