Am 06.07.2011 00:33, schrieb Luigi Calori:
On 05/07/2011 20.32, Sebastian Messerschmidt wrote:
Am 05.07.2011 17:42, schrieb Chris 'Xenon' Hanson:
On 7/5/2011 5:50 AM, Sebastian Messerschmidt wrote:
Hi,
It seems like referencing e.g. tree1 multiple times in the graph creates multiple render instances instead of sharing the node. So loading the master.ive almost certainly consumes
all available memory.
Is there an error in my thinking, that the nodes for tree1 ... treeN can be shared whilst
being under a pagedLOD?
For some reason I thought there was already some sort of object-loader sharing cache.


Okay, sorry for the noise. I've found a topic which already covers this topic. For sharing nodes you'll have to setup the viewer to explicitly use shared nodes.
This way I've managed to display a huge database with some hotspots
Interesting... do you mind sharing the option / setup needed?
we could have similar problems

Sure, I was going to, but didn't have the piece of code checked in yesterday, so here we go:

// setup shared handling
osgDB::Registry::instance()->getOrCreateSharedStateManager()->setShareMode(osgDB::SharedStateManager::SHARE_ALL);

osgDB::ReaderWriter::Options* opt = osgDB::Registry::instance()->getOptions();
    if (opt == NULL) {
        opt = new osgDB::ReaderWriter::Options();
    }
// setup chaching
opt->setObjectCacheHint(osgDB::ReaderWriter::Options::CacheHintOptions::CACHE_ALL);
    osgDB::Registry::instance()->setOptions(opt);

I'm rather curious if there is some better documentation for things like these.

cheers
sebastian


_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to