> > But... is "current_glut_idle" static, so it applies to all > glut windows > > in an app, or do we have a separate "current_glut_idle" > value for each > > glut window...? And if so, how does glutIdleFunc() find the right > > instance? And... I really have no idea... I guess that > "traditionally" > > there would maybe only be one glut window, and therefore > only one glut > > idle function? > > I'd make the idle function a non-static member of the class. That > way each GLUT window can have its own idle function, and the default > window will provide compatibility with existing apps.
Yes, I think that sounds like the most useful option, so if you had multiple glut windows within your fltk app, each could have it's own unique idle function. But what I'm not getting (and I hope I'm just being stupid here) is how glutIdleFunc() is meant to determine the correct glut window? I don't think our glutIdleFunc() is a member of the Fl_Glut_Window class, and it doesn't get passed the identity of the object in question (it has to maintain the "traditional" glut API and so on I guess...) So, I'm at a loss as to how glutIdleFunc() finds the correct glut window to act on? Cheers, -- Ian 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

