[osg-users] updatecallback deprecation proposal
Robert Osfield
robert.osfield at gmail.com
Wed Mar 6 00:49:57 PST 2019
Hi Julien,
The complexity is about retaining backwards compatibility. Changing
it would break end users code and likely silently for us as only a
small percentage of end users test releases prior to them be released
so we don't find out we've broken their code until it's too late, so
we need to be conservative.
Robert.
On Wed, 6 Mar 2019 at 01:22, Julien Valentin <julienvalentin51 at gmail.com> wrote:
>
> 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
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
More information about the osg-users
mailing list