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 

DatabasePager questions


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





PostPosted: Thu Oct 30, 2008 10:58 am    Post subject:
DatabasePager questions
Reply with quote

I've only recently started using OpenSceneGraph, so am probably mistaken about this, but I feel there's some issues with osgDB::DatabasePager. It seems the design of osgDB::DatabasePager allows for multiple instances of it to exist side-by-side. Scene creates one instance in it's constructor, and if you call Registry::getOrCreateDatabasePager without setting a pager up, it creates another instance. The first uses the Database::create function, whereas the second uses a simple 'new'.

This has caused us some issues as we only expected there to be a single instance of osgDB::DatabasePager. What is the reason for explicitly allowing this functionality? It may simply be to do with the way we have the DatabasePager setup, but my lack of a higher view of the code is making it hard to understand what's supposed to happen.

Can anyone clarify how the DatabasePager is supposed to be used for me?

Kind regards,
Rick Appleton

------------------
Post generated by Mail2Forum
Back to top
Robert Osfield
Guest





PostPosted: Thu Oct 30, 2008 11:58 am    Post subject:
DatabasePager questions
Reply with quote

Hi Rick,

The osgDB::DatabasePager::instance() exist for backwards compatibility
with osgProducer from the OSG-1.x era. In OSG-2.x's osgViewer library
there is one osgDB::DatabasePager per osgViewer::Scene, and the Scene
is used internally by osgViewer::View to manage the sharing of a
single scene graph between multiple View's. The coupling of
DatabasePager and Scene ensures that there is only ever one pager
working for one scene graph. It also allows multiple scene graphs to
be managed, each with their own dedicated pager.

In terms of user management, this is all done behind the scenes in
osgViewer, it'll just automatically assign and set up and interact
with the pager, you needn't do anything yourself. If your scene graph
contains PagedLOD then it'll automatically start up and run in the
background.

The only time you need to know about the DatabasePager is when you
want to adjust parameters to optimize the behavior to your type of
data/application, but the since the defaults have been chosen to work
well for most datasets users typically won't need to tweak parameters.

Robert.


On Thu, Oct 30, 2008 at 10:57 AM, Rick Appleton
<> wrote:
Quote:

I've only recently started using OpenSceneGraph, so am probably mistaken
about this, but I feel there's some issues with osgDB::DatabasePager. It
seems the design of osgDB::DatabasePager allows for multiple instances of it
to exist side-by-side. Scene creates one instance in it's constructor, and
if you call Registry::getOrCreateDatabasePager without setting a pager up,
it creates another instance. The first uses the Database::create function,
whereas the second uses a simple 'new'.

This has caused us some issues as we only expected there to be a single
instance of osgDB::DatabasePager. What is the reason for explicitly allowing
this functionality? It may simply be to do with the way we have the
DatabasePager setup, but my lack of a higher view of the code is making it
hard to understand what's supposed to happen.

Can anyone clarify how the DatabasePager is supposed to be used for me?

Kind regards,
Rick Appleton






------------------
Post generated by Mail2Forum
Back to top
Rick Appleton
Guest





PostPosted: Thu Oct 30, 2008 12:22 pm    Post subject:
DatabasePager questions
Reply with quote

Thank you Robert for the quick reply.

I see the point in having a single osgDB::DatabasePager for a single osgViewer::Scene. However, this immediately raises the question which DatabasePager osgDB::Registry would point to, as osgDB::Registry is a singleton and only has a single pointer to a DatabasePager. Should we ignore the osgDB::Registry::getOrCreateDatabasePager function? I don't see it being used anywhere in OpenSceneGraph.

Kind regards,
Rick


-----Original Message-----
From: on behalf of Robert Osfield
Sent: Thu 10/30/2008 12:57 PM
To: OpenSceneGraph Users
Subject: Re: DatabasePager questions

Hi Rick,

The osgDB::DatabasePager::instance() exist for backwards compatibility
with osgProducer from the OSG-1.x era. In OSG-2.x's osgViewer library
there is one osgDB::DatabasePager per osgViewer::Scene, and the Scene
is used internally by osgViewer::View to manage the sharing of a
single scene graph between multiple View's. The coupling of
DatabasePager and Scene ensures that there is only ever one pager
working for one scene graph. It also allows multiple scene graphs to
be managed, each with their own dedicated pager.

In terms of user management, this is all done behind the scenes in
osgViewer, it'll just automatically assign and set up and interact
with the pager, you needn't do anything yourself. If your scene graph
contains PagedLOD then it'll automatically start up and run in the
background.

The only time you need to know about the DatabasePager is when you
want to adjust parameters to optimize the behavior to your type of
data/application, but the since the defaults have been chosen to work
well for most datasets users typically won't need to tweak parameters.

Robert.


On Thu, Oct 30, 2008 at 10:57 AM, Rick Appleton
<> wrote:
Quote:

I've only recently started using OpenSceneGraph, so am probably mistaken
about this, but I feel there's some issues with osgDB::DatabasePager. It
seems the design of osgDB::DatabasePager allows for multiple instances of it
to exist side-by-side. Scene creates one instance in it's constructor, and
if you call Registry::getOrCreateDatabasePager without setting a pager up,
it creates another instance. The first uses the Database::create function,
whereas the second uses a simple 'new'.

This has caused us some issues as we only expected there to be a single
instance of osgDB::DatabasePager. What is the reason for explicitly allowing
this functionality? It may simply be to do with the way we have the
DatabasePager setup, but my lack of a higher view of the code is making it
hard to understand what's supposed to happen.

Can anyone clarify how the DatabasePager is supposed to be used for me?

Kind regards,
Rick Appleton









------------------
Post generated by Mail2Forum
Back to top
Robert Osfield
Guest





PostPosted: Thu Oct 30, 2008 12:36 pm    Post subject:
DatabasePager questions
Reply with quote

Hi Rick,

On Thu, Oct 30, 2008 at 12:17 PM, Rick Appleton
<> wrote:
Quote:
I see the point in having a single osgDB::DatabasePager for a single osgViewer::Scene. However, this immediately raises the question which DatabasePager osgDB::Registry would point to, as osgDB::Registry is a singleton and only has a single pointer to a DatabasePager. Should we ignore the osgDB::Registry::getOrCreateDatabasePager function? I don't see it being used anywhere in OpenSceneGraph.

Oooh, those methods are deprecated, and completely forgotton about...
thanks for pointing this out. I've just removed them from the
Registry to avoid future confusion. I'll check this in after a clean
build.

Robert.


------------------
Post generated by Mail2Forum
Back to top
Rick Appleton
Guest





PostPosted: Thu Oct 30, 2008 12:52 pm    Post subject:
DatabasePager questions
Reply with quote

Thanks again for the quick reply. All is clear now, and I'll fix our code to not use the Registry DatabasePager.

Rick


-----Original Message-----
From: on behalf of Robert Osfield
Sent: Thu 10/30/2008 1:36 PM
To: OpenSceneGraph Users
Subject: Re: DatabasePager questions

Hi Rick,

On Thu, Oct 30, 2008 at 12:17 PM, Rick Appleton
<> wrote:
Quote:
I see the point in having a single osgDB::DatabasePager for a single osgViewer::Scene. However, this immediately raises the question which DatabasePager osgDB::Registry would point to, as osgDB::Registry is a singleton and only has a single pointer to a DatabasePager. Should we ignore the osgDB::Registry::getOrCreateDatabasePager function? I don't see it being used anywhere in OpenSceneGraph.

Oooh, those methods are deprecated, and completely forgotton about...
thanks for pointing this out. I've just removed them from the
Registry to avoid future confusion. I'll check this in after a clean
build.

Robert.





------------------
Post generated by Mail2Forum
Back to top
Robert Osfield
Guest





PostPosted: Thu Oct 30, 2008 1:04 pm    Post subject:
DatabasePager questions
Reply with quote

On Thu, Oct 30, 2008 at 12:52 PM, Rick Appleton
<> wrote:
Quote:
Thanks again for the quick reply. All is clear now, and I'll fix our code to not use the Registry DatabasePager.

They are now removed from svn too Smile

Robert.


------------------
Post generated by Mail2Forum
Back to top
John Vidar Larring
Guest





PostPosted: Thu Oct 30, 2008 1:15 pm    Post subject:
DatabasePager questions
Reply with quote

Thanks for removing it. The osgDB::Registry::getOrCreateDatabasePager
function method has probably sent me on a wild goose chase more than once...

-- John

Robert Osfield wrote:
Quote:
Hi Rick,

On Thu, Oct 30, 2008 at 12:17 PM, Rick Appleton
<> wrote:
Quote:
I see the point in having a single osgDB::DatabasePager for a single osgViewer::Scene. However, this immediately raises the question which DatabasePager osgDB::Registry would point to, as osgDB::Registry is a singleton and only has a single pointer to a DatabasePager. Should we ignore the osgDB::Registry::getOrCreateDatabasePager function? I don't see it being used anywhere in OpenSceneGraph.

Oooh, those methods are deprecated, and completely forgotton about...
thanks for pointing this out. I've just removed them from the
Registry to avoid future confusion. I'll check this in after a clean
build.

Robert.




--
Best regards,
John
WeatherOne


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



------------------
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 Avoid call of SetupThreads in Databas... remoe Submission 3 Sun Apr 30, 2017 2:05 pm View latest post
No new posts 答复: osg-users Digest, Vol 105, Is... 韩志平 General 1 Thu Feb 09, 2017 3:03 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 [osgEarth] several problems and quest... hulrien General [forum] 3 Thu Nov 24, 2016 10:42 am View latest post
No new posts streamlining DatabasePager::requiresU... filnet Submission 0 Sun Jul 03, 2016 8:07 pm 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