Re: [osg-users] Out of memory loading a small file in osgviewer

2009-06-03 Thread Gustav Haapalahti
Hi, I solved the problem by enabling caching of objects etc. Code: osgDB::Options* opt = osgDB::Registry::instance()->getOptions(); if (opt == NULL) { opt = new osgDB::Options(); } opt->setObjectCacheHint(osgDB::Options::CACHE_ALL); osgDB::Registry::instance()->setOptions(opt); Cheers, Gu

Re: [osg-users] Out of memory loading a small file in osgviewer

2009-06-02 Thread Colin Rayment
Haapalahti Sent: 02 June 2009 11:49 To: osg-users@lists.openscenegraph.org Subject: [osg-users] Out of memory loading a small file in osgviewer 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

Re: [osg-users] Out of memory loading a small file in osgviewer

2009-06-02 Thread Stephan Kussmaul
Hi Gustav, If you try to remove the texture by renaming it and the problem still occurs, then the memory consumption is probably due to the vertices of the tree. If you use external references over ProxyNodes nothing will be shared concerning the vertices and this behaviour would be "normal".

Re: [osg-users] Out of memory loading a small file in osgviewer

2009-06-02 Thread Gustav Haapalahti
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

Re: [osg-users] Out of memory loading a small file in osgviewer

2009-06-02 Thread Gustav Haapalahti
Hi, I have debugged some and also checked what files are accessed by using Process Explorer and I have come to the conclusion that the tree model that I use is loaded over and over again. It seems like Osg does not remember that it has already loaded the file. I found that useObjectCache is se

Re: [osg-users] Out of memory loading a small file in osgviewer

2009-06-02 Thread Stephan Kussmaul
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

Re: [osg-users] Out of memory loading a small file in osgviewer

2009-06-02 Thread Robert Osfield
HI Gustav, You'll need to have a look at what it causing the out of memory issue - for instance run your app in a debug and when the memory starts growing break the app and have a look at the stack trace, this might indicate where the problem might stem from. Robert. On Tue, Jun 2, 2009 at 11:48

[osg-users] Out of memory loading a small file in osgviewer

2009-06-02 Thread Gustav Haapalahti
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 consumpt