Hi Paul,

This behavior has been standard for some time.  The reason is that the
Optimizer's default set of optimizer options include the optimization
of texture settings, and these include unrefing texture images after
apply.  This feature of osg::Texture is useful for keeping memory
footprints down at runtime.

You can use the OSG_OPTIMIZER env var to override the default
optimizer options, or just comment out the call to the Optimizer.

Robert.

On 1/18/07, Paul Martz <[EMAIL PROTECTED]> wrote:


Hi all -- If I load a model into osgviewer and hit the 'o' key to dump it to
a .osg file, the texture file names appear to be stripped out. In other
words, saved_model.osg enables texturing and its StateSets have a Texture2D
StateAttribute, but there is no texture file name. As a result, when the
saved_model.osg is loaded back in, texturing acts like it's disabled.

My guess here is that, when the model is loaded and rendered initially, the
osg::Images are removed from the osg::Texture2D objects after the OpenGL
texture objects are created. The texture file names are lost at that point,
because they were stored in the osg::Image.

Is this what's happening? And if so, is there a way to stop it (such as an
environment variable or command line option)?

I'm seeing this behavior with CVS about 2 or 3 weeks old.

Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com
303 859 9466

_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to