OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

Querying pagedLOD state


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
James Turner
Guest





PostPosted: Tue Sep 05, 2017 12:38 pm    Post subject:
Querying pagedLOD state
Reply with quote

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


------------------
Post generated by Mail2Forum
Back to top
Voerman, L.
Guest





PostPosted: Tue Sep 05, 2017 1:23 pm    Post subject:
Querying pagedLOD state
Reply with quote

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 < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
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
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


------------------
Post generated by Mail2Forum
Back to top
James Turner
Guest





PostPosted: Tue Sep 05, 2017 6:26 pm    Post subject:
Querying pagedLOD state
Reply with quote

Quote:
On 5 Sep 2017, at 14:21, Voerman, L. < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
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.


Ah excellent, thanks for clarifying that!

Kind regards,
James

------------------
Post generated by Mail2Forum
Back to top
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts check status of pagedlod Meldryt General 4 Fri Aug 04, 2017 1:14 pm View latest post
No new posts FrameStamp in osg::State scrawl General 5 Wed Feb 01, 2017 8:33 pm View latest post
No new posts IncrementalCompileOperation state leak scrawl Submission 1 Mon Dec 05, 2016 6:09 pm View latest post
No new posts How to check if pagedLod already exis... srappose General 10 Tue Nov 29, 2016 10:15 am View latest post
No new posts How to implement pagedLOD without rea... wernerM General 7 Wed Nov 09, 2016 11:47 am View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP