From: Steve B. <sjb...@ai...> - 2005-03-18 13:19:57
|
manyam svvvprasad wrote: > glutIdleFunc(Idle); > sub_win = glutCreateSubWindow(Traffic_simulator, 730, > 410, 260 , 260); <snip> > void Idle() > { > glutSetWindow (main_win); > glutPostRedisplay(); > glutSetWindow (sub_win); > glutPostRedisplay(); > } Idle() refers to sub_win. However, you register it BEFORE sub_win has been created. That's dangerous because GLUT might call Idle() before glutCreateSubWindow has been called. I doubt that this is THE problem - but it's certain that it is a problem. More likely (since you are clearly using threading) is that you have some kind of race condition in some of the code that you aren't showing us. Different timing in the Linux and Windows versions would inevitably occur - so any race condition might appear to work in one OS and not in the other. But it's really hard to say. ---------------------------- Steve Baker ------------------------- HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> 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----- |