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 

check status of pagedlod


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
Meldryt
User


Joined: 02 Mar 2016
Posts: 41

PostPosted: Fri Aug 04, 2017 1:14 pm    Post subject:
check status of pagedlod
Reply with quote

Hi,

Is there a way to check current status/content of a pagedlod object of my scenegraph, for example if its already in the rendering process.

I need this to determine if a plugin was loaded or not.

Thank you!

Cheers,
Sebastian

edit:
i will check getNumFrameNumbers() or getNumTimeStamps()

edit2:
yeah getFrameNumber() works for me.

_________________
OSG Version: 3.0.1
OS: OpenSuse Leap 42.1
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 11275

PostPosted: Fri Aug 04, 2017 1:44 pm    Post subject:
check content of pagedlod
Reply with quote

Hi Sebastian,

On 4 August 2017 at 14:14, Sebastian Schmidt < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Is there a way to check current status/content of a pagedlod object of my scenegraph, for example if its already in the rendering process.


The PagedLOD node has get methods that tell you what children are loaded, a custom NodeVisitor could traverse it's subgraphs.  There are also PagedLOD methods that allow you to check the last frame number that a child was traversed.  Have no clue whether any of these are appropriate but given the following question I'm perplex why the above question is relevant to the later at all.
 
Quote:
I need this to determine if a plugin was loaded or not.


Surely one would check osgDB::Registry for the plugins that have been loaded rather than the scene graph?  The osgDB::Registry is what manages plugins, the scene graph loaded by the plugins don't have any connection back to the plugins.


I remain perplexed why you are asking about this task in the way you have, perhaps it would be best to take a step back and tell us what specific problem you have to solve rather than trying to second guess what the solution might be and then asking a questions based on these assumed solutions.  In general if we get users with perplexing questions it's typically due to them getting ahead of themselves w.r.t how to solve tasks, and asking the how to solve the task from a high level description is far easier to answer given the knowledge of the community.


Robert.

 

------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Meldryt
User


Joined: 02 Mar 2016
Posts: 41

PostPosted: Fri Aug 04, 2017 2:35 pm    Post subject:
Reply with quote

Ok..i will try to explain.

In my osg application "A" the scenegraph contains several pagedlod nodes which are reading from a custom osgdb plugin file.

Application "B" is rendering stuff to a texture and the plugin is returning a osg node containing this texture.

The initialization of application "A" take some time, especially the loading of the plugin at the end.

And i need to know when all of this is finished.


Currently i call getFrameNumber() of the PagedLOD. After loading is finished framenumber is > 0 (~300).

_________________
OSG Version: 3.0.1
OS: OpenSuse Leap 42.1
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 11275

PostPosted: Fri Aug 04, 2017 4:21 pm    Post subject:
check status of pagedlod
Reply with quote

On 4 August 2017 at 15:35, Sebastian Schmidt < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Ok..i will try to explain.

In my osg application "A" the scenegraph contains several pagedlod nodes which are reading from a custom osgdb plugin file.

Application "B" is rendering stuff to a texture and the plugin is returning a osg node containing this texture.

The initialization of application "A" take some time, especially the loading of the plugin at the end.

And i need to know when all of this is finished.


What do you mean by "all of this is finished"?  In application "A" or "B"?


It's hard to know really what you are after.


The only thing I can suggest at this stage, if a plugin is taking time to load and it's load is not deterministic due it being loaded in response to a PagedLOD file request then why not just preload the plugin or statically link it into your application so it doesn't happen during rendering of the frame.


Robert.


 

------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Meldryt
User


Joined: 02 Mar 2016
Posts: 41

PostPosted: Mon Aug 07, 2017 9:03 am    Post subject:
Re: check status of pagedlod
Reply with quote

robertosfield wrote:

What do you mean by "all of this is finished"?  In application "A" or "B"?


It's hard to know really what you are after.


The only thing I can suggest at this stage, if a plugin is taking time to load and it's load is not deterministic due it being loaded in response to a PagedLOD file request then why not just preload the plugin or statically link it into your application so it doesn't happen during rendering of the frame.


Robert.


I mean when all of the initialization of osg application "A" is finished (loading models, building the scenegraph and loading the plugin) . It must be loaded during runtime, because the plugin is also waiting for a established network connection with app "A" that is rendering stuff to the texture.

I will try osgDB::Registry for this. Maybe get the ReadResult from my ReaderWriter.

_________________
OSG Version: 3.0.1
OS: OpenSuse Leap 42.1
Back to top
View user's profile Send private message
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 Querying pagedLOD state James Turner General 2 Tue Sep 05, 2017 12:38 pm View latest post
No new posts Check if sampler2D is valid in fragme... romulogcerqueira General 10 Tue Dec 27, 2016 4:52 am 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 OpenVR, Oculus or HTC - Vive in OSG? ... Jan Ciger General 8 Mon Nov 28, 2016 11:31 pm 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