title: Game loop with keyboard listener
body: <p>For a C++/OpenGL game I'm making I want both a keyboard input handler, and a constant screen update, because there are constant moving parts in the game.
  Now I've read that I can use glutKeyboardFunc() for the keyboard listener, and a simple while loop for the constant screen update (while gameRunning {...}).</p>
  
  <p>But how can I combine the two, because if I use the while loop the key listener will never get called, because the game is still running the while loop.</p>