Hi Marco,

On Mon, Mar 31, 2008 at 3:23 PM, Marco Jez <[EMAIL PROTECTED]> wrote:
>  > Another possibility I missed is the use of doubles in osg::Plane by
>  > default, whereas 1.2 used float by default in osg::Plane.
>
>  thanks for the hint. However, I think the problem could be related to the
>  compile/apply of GL objects instead. If I disable the GLObjectsVisitor that
>  my app runs after loading a new scene, both builds of the application start
>  in similar conditions with little difference in memory consumption. At this
>  point I start moving the camera around, and display lists and textures get
>  compiled as they are displayed for the first time. Here the difference
>  between the OSG-1.2-based build and the newer one becomes clear: the newer
>  one eats much more memory, roughly twice as much, while the amount of data
>  loaded (geometry+imagery) is the same.
>
>  All textures are DXT-compressed, and they come with mipmaps already stored
>  in the image file (DDS). In order to minimize the influence of other
>  optimizations, I've turned off the UnRefImageAfter....etc. flag on all
>  textures. Except for the different version of OpenThreads and
>  OpenSceneGraph, both builds share the same code and 3rd-party libraries.

The scene graph in 1.2 and 2.x is fundamentally the same, it certainly
shouldn't consume twice as much memory all on its own, so the
differences you've observed sound like a setting issue, all possibly a
bug.

>  Any other clues?

My best guess for the difference right now is that the
UnRefImageAfterApply is not being utilized for some reason.  To avoid
threading problems apparent in 1.2 the OSG-2.x versions initialization
the GL objects arrays to a larger default, if you app isn't setting
the number of context down to the number you are using then perhaps
this is where the discrepancy is occurring.

There was a bug in osgViewer/osg::GraphicsContext that wasn't
automatically resetting setting the max number of graphics contexts to
what was being used which did lead to the auto unref not being
engaged, I fixed this on the 19th of Februrary this year so if you are
using an SVN version or dev version after this then osgViewer apps
should be fine.   However, if your own app doesn't use osgViewer then
you'll need to set
osg::DisplaySetting::setMaxNumberOfGraphicsContexts(int) by hand.

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

Reply via email to