Programming gl/glut in X Windows

Hi

Can anyone please help me with this hopefully simple problem.

I have some data that I would like to display on the screen in real time. The data is very simple (only points in 2D that either are set or not). The problem is that scince I get the data from my main program I cant use glutMainLoop (scince it doesnt return) and so I cant use glutCreateWindow. A solution is to create a new thread (which uses the mainloop) and send the data via a pipe to it but it seems unnecessarily hard for this simple (??) problem. Is there a way to use glutCreateWindow without using the glutMainLoop or is there another way?
Hope somebody can help me.
/Gul

You are supposed to use glutMainLoop. The structure of a GLUT program is the same as any other GUI program. The solution is to integrate your non visual code with GLUT.

This is a good experience also for doing other GUI programs.