I’m currently trying to learn openGL and I am using GLFW.
in the window, I am using the
glfwSetKeyCallback function for single key presses/ key combinations (like
CTRL + q or
ESC for closing window with a
switch statement) and I am using another function that runs every few milisecond for constant keypresses (like
W for moving forward or
A for moving left using multiple
seperating the two usecases in two different function makes it easier for me, but I was wondering if it was a good idea to use them like that or if I should use all the different usecases in a single function, either the callback or the one that is called every few miliseconds. (I hope that was clear)
Thanks in advance for your advice !
Check the Answers