I have a program that uses Glib and glib main loop. Also, it uses openGL for drawing some things and needs to handle inputs from keyboard.
Problem se that I used to make everything separated from eachother, not combining it in one program. As Glib has main loop and openGL uses loop for rendering (with some sleeping). With that all, I need a loop for listening key events.
What is the best way of making all of this work togeather? Should I make three loops in threads or implement other loops to glib main loop and how to do that?