Hi Alessandro,

In 2.2 it might of been that the max number of contexts required
wasn't being reset by the viewer, this in turn would have had an
impact on how the scene graph would have handled unref'ing of imagery
as its download to the graphics card.

The growth in memory does sounds kinda extreme, without seeing the
model first hand I could really speculate and what it exactly it might
be.  Non power of two textures, by default, will be rescaled, but this
is done in the fly as the data is downloaded so shouldn't affect
memory consumption too much.  You can tell the OSG not to rescale non
power of texture is by doing
texture->setResizeNonPowerOfTwoHint(false); on all the textures in the
scene graph.  This will keep memory down a bit.

BTW, you will always get large memory usage in memory vs model size as
most imagery is stored compressed, and once you download data you
typically end up with two copies of the data, one in app memory, and
one managed by the OpenGl driver.

Robert.

On Sat, Jan 10, 2009 at 10:41 AM, alessandro terenzi
<[email protected]> wrote:
> Dealing with collada files I noticed a problem:
>
> OSG 2.2.0: if I load a 20 MB model ( geometry+textures) with osgviewer, the
> memory usage grows up to 700/800 MB and does not decrease until program
> termination.
>
> OSG 2.6.0: if I load the same model, the memory usage reachs 700/800 MB too,
> but when the model is displayed the memory used is just 60/70 MB.
>
> I must state that the model has a huge quantity of not-power of 2 textures,
> and rescaling occurs.
>
> My questions: is this difference (from version 2.2 to 2.6) in the collada
> plugin itself or in OSG's core? What is the reason for such a different
> behaviour?
>
> Thank you.
> Alessandro
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to