Robert,

Thanks for the suggestion, I'm sure it will work fine! I think I will even collect the image filenames in the callback and compare them to the image filenames used for the osg::Textures in the resulting scene graph.

/Andreas

Robert Osfield wrote:

On 5/21/06, *Andreas Ekstrand* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    Hi,

Can I determine if a loaded IVE file has imbedded textures or not?

Once a model is loaded in there isn't typically any file specific information retained, it'll just be a scene graph in memory with little or no correlation of where the file came from.

    I
    suppose I could check whether the file names in the osg::Image objects
    exist on disk or not, but I would prefer another way since images
    with
    the same file names could exist on disk even if they were inbedded.


I don't think this would be robust for the reasons you point out.

Perhaps you could try something like using a osgDB::Registry::ReadFileCallback to catch all read file requests, and if you are already reading a .ive you could then look for any subsequent readImage requests. Then after loaded check the scene graph for the number of osg::Image attached to it, and if it matches the number of readImage's then you've got a file which had all osg::Image read in from external sources, otherwise you have a candidate for an .ive file which contains embedded images.

Robert.

------------------------------------------------------------------------

_______________________________________________
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/

Reply via email to