Hi Aurelien, On 3 June 2014 20:28, Aurelien Albert <[email protected]> wrote: > Pjotr wrote: >> Also whats the point of a Drawable::Update/Event/CullCallback now, should't >> they be deprecated now that a Drawable is a Node and can use the Node's >> callbacks? > > > I think Pjotr is right there. Maybe there's a way to solve this using C++ > "type erasure" : create an "osg::AbstractCallback" class as nearly an empty > shell, and all rewrite all current callbacks classes/structures as child of > "osg::AbstractCallback". All callbacks management methods (get/set/...) > should also use (internally) "osg::AbstractCallback" interface. > > Maybe it would be easier to keep compatibility with exisiting code. Then if > you set the use of "osg::CallbackObject" (which is also derived from > "osg::AbstractCallback") as the standard way in new code, it's possible to > clean code and break API compatibility in a future OSG version simply by > removing the "osg::AbstractCallback" class and keep only > "osg::CallbackObject" as entry point in callbacks system.
One of the possibilities I'm currently considering is having a base class from Callbacks. The exact form of this class I've haven't narrowed down yet. I have considering CallbackObject as a candidate but it's design is geared around parameters as objects that would be too costly and break backwards compatibility. I plan to sort out the the Callback issue today, once I've got something working well I'll check it in and discuss it on this thread. Robert. _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

