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
<[EMAIL PROTECTED]> wrote:
>
> 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
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to