Hi Joan, This is a feature of the Optimizer OPTIMIZE_TEXTURE_SETTINGS pass. This allows the OSG to automatically deleted osg::Image's that arn't needed for rendering - this is a typically good thing as it reduces memory footprint at runtime. The osg::Image is where the image information comes from, so if you remove it you can do things like save the image or the original file name.
Simply call the Optimizer with the flags you want, in your case without the OPTIMIZE_TEXTURE_SETTINGS which is included by default. Robert. On 8/14/06, jOan <[EMAIL PROTECTED]> wrote:
Hi, I have the same kind of trouble in my app, since 1.1, if I try a osgDB::writeNodeFile of a part of the SG during the simulation, texture are lost in the exported ive files. In the visualisation, texture are ok. But inside the SG, textures (osg::Texture2D*) are present in the state BUT if you do a getImage() on it it's always NULL. I have also first suspected a change in the flt loader but it is not the case. jOan Abadie 2006/8/14, Joakim Simonsson < [EMAIL PROTECTED]>: > > Hmm. This have worked perfectly with previous versions (pre 1.1). > > På Mon, 14 Aug 2006 15:16:56 +0200, skrev Robert Osfield > <[EMAIL PROTECTED]>: > > > Hi Joakim, > > > > I suspect the problem is down to the eixting models having been > > download to GPU and release the osg::Image, and the StateVisitor will > > be looking at the osg::Image to determine that they are seperate > > textures. > > > > Robert. > > > > On 8/14/06, Joakim Simonsson < [EMAIL PROTECTED]> wrote: > >> > >> It is an ive file that looks correct when loaded with osgViewer. > >> However, > >> my app loads multiple ive files, and then it executes an optimization of > >> the top most scene data. > >> > >> I have found out that it is SHARE_DUPLICATE_STATE that causes this > >> error. > >> When comparing Optimizer.cpp between osg-version 1.0 and 1.1, no changes > >> have been made to the StateVisitor visitor. So I am suspecting helper > >> functions that StateVisitor use to be wrong. > >> > >> I am using the the 1.1.1-rc1 version of osg. > >> > >> På Mon, 14 Aug 2006 14:49:09 +0200, skrev Robert Osfield > >> <[EMAIL PROTECTED]>: > >> > >> > Hi Joakim, > >> > > >> > Is this an open flight model? Have you tested the CVS version? > >> > > >> > Robert. > >> > > >> > On 8/14/06, Joakim Simonsson <[EMAIL PROTECTED]> wrote: > >> >> > >> >> The optimizer with osg1.1 and later is really crazy. > >> >> > >> >> I will investigate further in this today. > >> >> > >> >> Attached are two screenshots how it looks like with and without > >> >> optimization. > >> >> > >> >> One possibility is that someone have implemented a Salvador Dali > >> >> generator. If that is the case, it would be good with a ReaderWriter > >> >> option for that. ;) > >> >> > >> >> Anyway, I will try to make some example files that generates this > >> error. > >> >> > >> >> > >> >> -- > >> >> Joakim Simonsson > >> >> > >> >> _______________________________________________ > >> >> osg-users mailing list > >> >> [email protected] > >> >> http://openscenegraph.net/mailman/listinfo/osg-users > >> >> http://www.openscenegraph.org/ > >> >> > >> >> > >> >> > >> > _______________________________________________ > >> > osg-users mailing list > >> > [email protected] > >> > http://openscenegraph.net/mailman/listinfo/osg-users > >> > http://www.openscenegraph.org/ > >> > >> > >> > >> -- > >> Joakim Simonsson > >> _______________________________________________ > >> osg-users mailing list > >> [email protected] > >> http://openscenegraph.net/mailman/listinfo/osg-users > >> http://www.openscenegraph.org/ > >> > > _______________________________________________ > > osg-users mailing list > > [email protected] > > http://openscenegraph.net/mailman/listinfo/osg-users > > http://www.openscenegraph.org/ > > > > -- > Joakim Simonsson > _______________________________________________ > osg-users mailing list > [email protected] > http://openscenegraph.net/mailman/listinfo/osg-users > http://www.openscenegraph.org/ > -- jOan _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
