Hi all, I report what I believe could be considered a bug, probably introduced after the promotion of the Drawable class to a node, together with the new callback system.
I have a GUIEventHandler derived class installed on a Drawable. After some digging I've realized that it's called twice for every event due to the EventVisitor code here: https://github.com/ openscenegraph/OpenSceneGraph/blob/master/include/osgGA/EventVisitor#L86 GUIEventHandler happens to derive both from NodeCallback and DrawableEventCallback, resulting in it being called twice. I think this might be considered as a bug if the intended behavior was to keep using the old GUIEventHandler interface the way it was (when attached to the viewer for instance, it is called only once as expected). Relate issue: I've re-implemented my callback deriving from osg::Callback, but this results in a crash as the osg::CallbackObject interface is used even if the cast does not succeed (first if condition) https://github.com/openscenegraph/OpenSceneGraph/blob/master/include/osgGA/EventVisitor#L93 I fixed that by deriving from osg::NodeCallback, but I had to reimplement the operator() method instead of run(), as the second is not called by the visitor - that also it's a bit counter-intuitive with respect to the osg::Callback class interface. Ricky
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

