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

Re: glut/freeglut and fork()



Francesco Orsenigo wrote:

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.
It seems to me that a more natural approach would be to have the server be
the main program, have it immediately start a client, then the client can
decide either to connect to the local server that started it - or to some
remote server off on the network.

That way the server never ran GLUT at all, never opened an OpenGL rendering
context, etc, etc.

---------------------------- Steve Baker -------------------------
HomeEmail: <sjbaker1@airmail.net>    WorkEmail: <sjbaker@link.com>
HomePage : http://www.sjbaker.org
Projects : http://plib.sf.net    http://tuxaqfh.sf.net
           http://tuxkart.sf.net http://prettypoly.sf.net
-----BEGIN GEEK CODE BLOCK-----
GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- W+++ N o+ K? w--- !O M-
V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r+++ y++++
-----END GEEK CODE BLOCK-----