CompositeViewer support: Difference between revisions

Jump to navigation Jump to search
m
Line 137: Line 137:
* Normally one should ever need to worry about constructing or destructing the DatabasePager, it should happen behinds the scenes managed by osgViewer.  osgViewer::Scene is used internally by osgViewer to manage one DatabasePager per scene graph.  The Scene object will be shared automatically between Views if you assign the same Node pointer then you call View::setSceneData.  This sharing is done automatically for you.  When a Scene object is destructed it's DatabasePager will be destructed if no other references to it exist. If you have multiple Views that you should be using CompositeViewer, not multiple Viewer. If you are creating and destroying views regularly then you are probably best to enable/disable them by setting the View's master Camera's NodeMask to 0x0 and back to 0xffffffff, as this will switch off rendering but keep the  backend around ready to be re-enabled.<ref>https://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg63057.html</ref>
* Normally one should ever need to worry about constructing or destructing the DatabasePager, it should happen behinds the scenes managed by osgViewer.  osgViewer::Scene is used internally by osgViewer to manage one DatabasePager per scene graph.  The Scene object will be shared automatically between Views if you assign the same Node pointer then you call View::setSceneData.  This sharing is done automatically for you.  When a Scene object is destructed it's DatabasePager will be destructed if no other references to it exist. If you have multiple Views that you should be using CompositeViewer, not multiple Viewer. If you are creating and destroying views regularly then you are probably best to enable/disable them by setting the View's master Camera's NodeMask to 0x0 and back to 0xffffffff, as this will switch off rendering but keep the  backend around ready to be re-enabled.<ref>https://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg63057.html</ref>
* osgViewer automatically shares a single DatabasePager between Views when the Views share the same scene graph.  This is required to avoid inconsistencies in the scene graph causing errors.  Sharing a single DatabasePager doesn't prevent that pager from handling multiple viewpoints at the same time, if fact it knows nothing about viewpoints, it only handles database requests for tiles, so it totally agnostic to how you manage your viewpoints.  Everything should basically just work out of the box without any need for specific settings from yourself.<ref>https://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg34846.html</ref>
* osgViewer automatically shares a single DatabasePager between Views when the Views share the same scene graph.  This is required to avoid inconsistencies in the scene graph causing errors.  Sharing a single DatabasePager doesn't prevent that pager from handling multiple viewpoints at the same time, if fact it knows nothing about viewpoints, it only handles database requests for tiles, so it totally agnostic to how you manage your viewpoints.  Everything should basically just work out of the box without any need for specific settings from yourself.<ref>https://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg34846.html</ref>
The existing DatabasePager functionality can page over the network,
but this isn't an issue for the DatabasePager - its purely a function
of the net plugin that does the loading across the http.  This means
paging and reading across the network are completely orthogonal and
can be mixed and matched at will.
The Viewers already have support for adding and remove subgraphs from
the main scene graph via the DatabasePager.  You needn't add your own
code as long as the database is set in a way that utilises
DatabasePager.
You can write your own DatabasePager functionality, but it its likely
to be alot less work just to use the built in paging support, this way
the task for you is just how to build you database.  Teaching you how
to reimplement existing functionality really is way beyond the level
of support I can provide for free.<ref>https://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg01766.html</ref>


=== Threading ===
=== Threading ===

Navigation menu