[osg-users] GUIEventHandler called twice - possible bug(s)
Robert Osfield
robert.osfield at gmail.com
Mon Oct 10 04:32:08 PDT 2016
Hi Riccardo,
On 10 October 2016 at 12:17, Riccardo Corsi <riccardo.corsi at kairos3d.it> wrote:
> both double call and crash fixed on my side as well.
Good to hear things are now resolved.
> Now that one can safely implement a callback by deriving directly from
> osg::Callback, I think most users should go that way for their new code.
> If that's the case, the not-very-intuitive path of implementing operator()
> rather than run() in the NodeCallback should be a minor issue.
Yep, have to agree it's a bit convoluted having the old API's around.
> Maybe a note in the comments suggesting to derive from osg::Callback rather
> than the legacy classes could be worth it?
The subclasses still have an advantage that they often adapt the
parameters to something easier to work with in the context of the
subclass. Using osg::Callback can require a bit more legwork to cast
types.
As a general rule, subclassing from osg::Callback is what I'd prefer.
Robert.
More information about the osg-users
mailing list