Hi.I have a render loop method which is not necessarily located in the same block as the GLFW init stuff.So instead of using while loop as docs state I want to pass my loop method into a callback which will trigger that method on each frame.In GLUT I do it easily with
glutDisplayFunc(f);
In GLFW I tried :
glfwSetWindowRefreshCallback(f);
But the program exists without looping that method.
How do I do it ?
Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi.I have a render loop method which is not necessarily located in the same block as the GLFW init stuff.So instead of using while loop as docs state I want to pass my loop method into a callback which will trigger that method on each frame.In GLUT I do it easily with
glutDisplayFunc(f);
In GLFW I tried :
glfwSetWindowRefreshCallback(f);
But the program exists without looping that method.
How do I do it ?
Thanks.