[osg-users] update node in view using cullcallback

Robert Osfield robert.osfield at gmail.com
Wed Aug 29 23:50:25 PDT 2018


Hi Cong,

Whether it's safe to do or not will depend the threading you are using
in your viewer.  If you viewer is running single threaded then it
should be fine to use cull callbacks.  However, if you have multiple
cull traversals threads happening in parallel then you'll end up with
a potential race condition unless you mutex your callbacks.

Robert.

On Thu, 30 Aug 2018 at 00:39, Cong Ye <sirian_ye at hotmail.com> wrote:
>
> Hi,
>
> I am recently working on a big scene simulation project. To optimize the performance, we consider to only update elements (material color, position, rotation etc.) in frustum or not culled. The most straightforward method come to me is using cullcallback to do the update. I implemented it and it works. However, after come across some online articles, most of them are not suggested to use cullcallback. Could I ask is there any drawbacks to do so?
>
> Thank you!
>
> Cheers,
> Cong
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=74619#74619
>
>
>
>
>
> _______________________________________________
> 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