[osg-users] Querying pagedLOD state
Voerman, L.
l.voerman at rug.nl
Tue Sep 5 06:21:49 PDT 2017
Hi James,
the PagedLOD addChild call is made from the main thread (
in DatabasePager::addLoadedDataToSceneGraph called
from DatabasePager::updateSceneGraph called from Scene::updateSceneGraph
called from Viewer::updateTraversal)
so there will not be a threading problem if you check the number of
children from the main thread.
Regards, Laurens.
On Tue, Sep 5, 2017 at 2:37 PM, James Turner <zakalawe at mac.com> wrote:
> Hi,
>
> I’ve done some searching of the OSG examples but didn’t discover a
> solution yet: how do I safely (given threading) query from the main thread,
> if a PagedLOD has loaded it’s content. (Assuming only a single level of
> detail)
>
> I think I can possibly query the number of children being 0 or 1, but that
> feels potentially a bit hacky? And again I worry about thread-safety; does
> the DatabasePager do some locking to regulate when loaded content is
> inserted into the PagedLOD?
>
> (Note I have many concurrent PagedLODs and I need to know if a particular
> one is finished, I can’t use a global query on the DatabasePager being
> idle, which some OSG examples do)
>
> Kind regards,
> James
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20170905/6ad13730/attachment.htm>
More information about the osg-users
mailing list