Hi,
I have tried your suggestion and it did not help my case unfortunately. I still
get abnormal memory usage.
The external file references in the .osg file that was generated with osgconv
looks like follows and I assume that the loading of this file is not cached so
it gets duplicated. There are about 120 of these ProxyNode:s all pointing to
the same file. If I change the FileNameList to point to an object that is
smaller than this "birch_unit.flt" file then the terrain can be loaded but
still takes abnormal amounts of memory.
ProxyNode {
nodeMask 0xffffffff
cullingActive TRUE
ExtRefMode LOAD_IMMEDIATELY
Radius -1
FileNameList 1 {
birch_unit.flt
}
num_children 0
}
Stephan Kussmaul wrote:
> Hi Gustav,
>
> in the standard viewer the sharing of textures in not activated by
> default. So my guess is that the textures of the trees are loaded over
> and over again. You might try to activate this feature with the
> following code in the viewer and try again to verify this. (I don't
> think there is a command line option to activate this, is there?)
>
> osgDB::Registry::instance()->getOrCreateSharedStateManager();
> if (osgDB::Registry::instance()->getSharedStateManager())
>
> osgDB::Registry::instance()->getSharedStateManager()->setShareMode(osgDB::SharedStateManager::SHARE_ALL);
>
> I hope this helps. We had this problem before and I would vote for
> activating the sharing of textures in the viewer by default.
>
> -Stephan
>
Best Regards Gustav
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=13366#13366
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org