> Glfw is a opengl framework, which needs to be the main > thread. As my fltk-program isn't using opengl, everything works fine.
Still, you need to be aware that creating and destroying fltk widgets from a thread other than the main thread may cause some oddities in your graphics layer... > I don't plan to make this portable, at least not the > fltk-gui-part of it. the glfw-thread is part of my > game-framework which I needed some gui for so that I can edit > my gameobjects. > > Does flush do the same thing as the fltk-loop? > I am wiling to test that. it may solve a lot of problems > since I don't have to make lots of extra code to handle > thread safety and so on. You might well be better off using fltk-1.1.8 rather than fltk-2, I would suggest. Recent versions of fltk-1.1 have better thread handling, and it is generally more stable. Fltk-2 is essentially still alpha, so you might encounter problems along the way - I know I've been tripped up by incompatible API changes at various points. Anyway... In effect, you can "simulate" the effect of calling the fltk run loop by simply calling check() or flush() (check is probably a better bet, actually) fairly frequently from whatever main loop your app has. That probably lets you duck some of your thread issues anyway? 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

