> I'm my program, I am using lots of threads, and fltk is NOT > the main thread. The main thread is reserved for my > openglthread which has its own loop, since I am using glfw for that.
Then you may be heading for a world of pain... How portable do you want your code to be? If it is only to run on your current platform, and it is mostly working, then you may be OK. But you need to know that a lot of host systems are only properly happy about accessing the graphics system from the "main" thread, (i.e. the thread that was created when main was called...) So, since this is the lowest common denominator, fltk pretty much expects it will exist in the main thread. If it doesn't, depending on your platform, Bad Things can happen. I have had "issues" on win32 platforms that were a result of this, and although it is possible to work around it, it is not trivial. That same code worked flawlessly on some other host platforms and was useless on others... It's tricky. This *may* be what is causing the problems you describe. Also, note that this isn't particularly a fltk limitation, a lot of gui libs suffer from this constraint in one form or another, I'm afraid. I don't know what to suggest, since you are trying to make fltk play nice with another gui lib, both of which probably want to be in the main thread. This is going to be awkward. If it were me, I'd drop the glfw and do it all in fltk, but others would likely take a different view! You can probably make it work by having both your glfw code and fltk code in the main thread, and have your glfw loop call fltk::flush() from time to time to keep fltk ticking along. Well, something like that. SELEX Sensors and Airborne Systems Limited Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 3EL A company registered in England & Wales. Company no. 02426132 ******************************************************************** This email and any attachments are confidential to the intended recipient and may also be privileged. If you are not the intended recipient please delete it from your system and notify the sender. You should not copy it or use it for any purpose nor disclose or distribute its contents to any other person. ******************************************************************** _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

