I'm working on a project where I have an opengl window and a gtk window, now I want to be able to control the opengl from gtk.
In Gtk window I have a button which call the image generator and after this I would like to redraw the opengl window so I can see the result, but if I call the display function from the button clicked callback nothing happens. The only think that worked so far was when I set the glutIdleFunc to my display func, that way the opengl window was redrawn constantly, however it seems to me that there must be a better way. Also I tried the glutTimerFunc to check for a conditional variables but again is there any better way.
My idea is to be able to tell/signal/call directly the opengl display function or force the glutMainLoop to do an iteration, whenever I click the button, but I really don't know how to do that.
Any ideas?