[osg-users] Safely loading paged databases at runtime
jasonbeverage at gmail.com
Mon Mar 23 10:01:25 PDT 2009
Ha, I was just getting ready to reply to you saying I've found the issue:)
That was exactly it, switching over to using using a ref_ptr within the
ReaderWriterOSGEarth plugin for the cached TileBuilder objects seems to have
fixed my issue.
2009/3/23 Robert Osfield <robert.osfield at gmail.com>
> Hi Jason,
> Normally the DatabasePager works on loaded scene graph that are entirely
> independent from the main scene graph and these subgraphs are only merged
> with the main scene graph when the main frame loop calls the update on the
> DatabasePager to merge any new tiles, remove expired ones. The update is
> down thread safe, with locking happening for all the appropriate places. If
> the place that the node is being attached is already unref'd from the scene
> graph then the subgraph should just be safely discarded.
> In the case of osgEarth do you have a pointers to global/parental
> structures in the plugins that would break the normal scene graph
> encapsulation that the database normally has? If there is such a reference
> then it might be best to take a reference to this global/parent strucutre
> during the running of the plugin to prevent it going out of scope before the
> end of the call to the plugin.
> 2009/3/23 Jason Beverage <jasonbeverage at gmail.com>
>> Hi Robert,
>> I've been working with loading and unloading different osgEarth files at
>> runtime (such as from a File | Open menu) using OSG and have found that I
>> need to take special care to make sure that the DatabasePager is not working
>> on a loaded node before removing it and replacing it with a different
>> scene. This isn't a big deal and essentially consists of telling the
>> database pager to not accept any new requests, clearing any pending requests
>> and waiting for the pager to complete by checking the getRequestsInProgress.
>> I've found that if I simply replace the main earth file's node with a new
>> one while the DatabasePager is working, my application will crash. Is this
>> the intended behavior or have I found a potential issue?
>> osg-users mailing list
>> osg-users at lists.openscenegraph.org
> osg-users mailing list
> osg-users at lists.openscenegraph.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the osg-users