You use basic loops. gtk_main()starts before the call gtk_quit().
Starts the main loop before the call gtk_main_quit(). You can nest calls in gtk_main (). In this case, gtk_main_quit () will make the innermost call to the main loop.
In addition, it glutMainLoop()works the same; it forever processes GL events.
glutMainLoop () on OpenGL.org
glutMainLoop() GLUT. GLUT. . , .
, ( , , ), gtk_main_iteration() .
gtk_main_iteration() GTK.org
mainloop. GTK + , . gtk_main_iteration_do() , - gtk_events_pending(), .
.. GLUT gtk_main_iteration(), GLUT.
GLUT, gtk_main_iteration(), glutIdleFunc(void (*func)(void)), - glutIdleFunc()..
glutTimerFunc(unsigned int msecs,
void (*func)(int value), value) gtk_main_iteration() 200 .
, , , glutIdleFunc() , .
GTK GL.