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


Gustav Haapalahti schrieb:
Hi,

I have a problem with a terrain model that is originally in the OpenFlight 
format. I do not have any problem when loading the OpenFlight file directly, 
but I get a problem after converting the file to the .osg format with osgconv. 
When I load the .osg file with osgviewer the memory consumption increases more 
and more until 2GB is used and the program crashes. When I load the original 
OpenFlight file, the osgviewer only uses about 30MB of memory.

I believe that the problem has something to do with external file references 
that are inside ProxyNode:s in the converted .osg file. I have a tree model 
that is placed at lots of positions.

Thank you!

Cheers,
Gustav

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=13341#13341





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



--
-------------------------------------
Stephan Kussmaul
Geschaeftsfuehrender Gesellschafter / Managing Director
TrianGraphics GmbH
Schoenhauser Allee 45
10435 Berlin
Germany
Tel: +49 (0)30 48495565   FAX: +49 (0)30 48495581
Email: [email protected]
Web: www.triangraphics.de
-------------------------------------
Sitz der Gesellschaft / Corporate Headquarters:
TrianGraphics GmbH, Berlin
Registereintragung / Registration:
Amtsgericht Berlin-Charlottenburg HRB 93807 B
Geschaeftsfuehrer / Managing Directors:
Stephan Kussmaul, Mirco Nierenz, Volker Walkiewicz
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to