Does glutMainLoop () call more than callbacks?
Yes, it is his responsibility to manage the entire event, for example, receiving events from your graphics system. It then invokes callbacks with event data.
If you want to do your own event handling, do not use GLUT. There are other structures that give you a lower level of access to events and expect that you will perform all event scheduling. Take a look at GLFW and SDL.
source share