Is it possible to replace glutMainLoop() with simple loop?

glut, opengl

Solution

If you're using FreeGLUT, you can use `glutMainLoopEvent`. It does one cycle of processing of the event loop, so you can call it in a loop.

while(...)
{
  glutMainLoopEvent();
  //do other stuff.
}

Problem

Is it possible to replace `glutMainLoop()` with simple loop ( e.g. `while` or `for` ) and in this loop just call all callbacks? I have done this and picture is displaying fine but window ( in which is picture displayed ) is not responding ( can not move it ). Does `glutMainLoop()` call more than callbacks?

Original source