[osg-users] updatecallback deprecation proposal

Julien Valentin julienvalentin51 at gmail.com
Tue Mar 5 16:28:06 PST 2019


Hi,
Would there be a way to make Drawable update callback less complex?
I suppose this ensure retrocompatibility but perhaps some pathes could be deprecated for sanity in 3.6....

Code:
 osgUtil/UpdateVisitor
 virtual void apply(osg::Drawable& drawable)
        {
            osg::Callback* callback = drawable.getUpdateCallback();
            if (callback)
            {
                osg::DrawableUpdateCallback* drawable_callback = callback->asDrawableUpdateCallback();
                osg::NodeCallback* node_callback = callback->asNodeCallback();

                if (drawable_callback) drawable_callback->update(this,&drawable);
                if (node_callback) (*node_callback)(&drawable, this);

                if (!drawable_callback && !node_callback)  callback->run(&drawable, this);
            }

            handle_callbacks(drawable.getStateSet());
        }



Thank you!

Cheers,
Julien

------------------------
Twirling twirling twirling toward freedom

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75691#75691







More information about the osg-users mailing list