Key Handling mechanics
Posted
by
Max
on Game Development
See other posts from Game Development
or by Max
Published on 2014-06-08T16:57:20Z
Indexed on
2014/06/08
21:42 UTC
Read the original article
Hit count: 162
I am new to game development and am working on my first game using OpenGL and C++. I have a game class which handles everything necessary in an update() function. Now i want to handle keyboard inputs. I use GLFW which supports key callbacks. However i wonder how to deal with inputs. Should i record the keys pressed and poll on it the next time my game updates or should the callback immediately perform the necessary actions? And why?
Thanks :)
© Game Development or respective owner