Hi John,

Are you reading and then writing out a scene graph that has been
rendered?   Are you running the osgUtil::Optimizer on the loaded scene
graph before rendering?

If so then it's likely that the osg::Texture UnrefImageDataAfterApply
support that is off by default but is enabled by the Optimizer will be
unrefing your imagery once the image data has been downloaded to the
graphics card.

If you want to save the scene graph after it's been loaded then you
need to not enable the UnrefImageDataAfterApply by only selecting the
Optimizer passes that don't effect the Texture settings.

Robert.

On Wed, May 6, 2009 at 9:26 PM, John Price <john.pric...@gmail.com> wrote:
>
> Hi,
>
> I am saving a loaded scene with the following:
>
> bool cOSG::Save(const std::string filename)
> {
>       return osgDB::writeNodeFile(*mRoot.get(), filename);
> }
>
> If I have loaded "cow.osg" and save it to "cow1.osg" the two files are 
> identical except in the textureUnit section of the saved file "cow1.osg" the 
> reference to:
>
>     file "Images/reflect.rgb"
>
> is missing. I have done a reasonable amount of research on my own, but can't 
> seem to work this one out. When loading "cow1.osg" everything is good except 
> there are no textures. This senario holds true for any file I save in any 
> format. Any help would be much welcomed.
>
> Thank you!
>
> Cheers,
> John Price
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=11556#11556
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to