[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: glut/freeglut and fork()



Steve Baker:
>  Well, so long as you never return from the idle function (or input
> function) in the forked task - and never call another GLUT/OpenGL function
> from within that fork, you should be OK.
That was the idea.

>  I guess I'd make sure there are no timers or anything running when I
> forked and I might even un-register all the GLUT callbacks before doing the
> fork.
Done, and it seems at least functional.... still lots of things to fix.
I had to remove the call to atexit(glutLeaveGameMode), that was giving me 
troubles on server thread exit(), but is very useful....
I'll try to restore the game mode every time the server connection is lost.

Thanx,
Francesco Orsenigo