One follow-up on this topic - a workaround.
If I also modify the IVE loader, then I can load binary IVE files that only have
a single instance of each texture saved, as documented in my previous post, and
have the texture correctly appear in all subsequent children. I've added a
single line to the loader as documented at the end of this message. So this is a
'solution' to my immediate need.
However, a few questions for the experts: is this a good solution, or was the
IVE save and load meant to work differently? Also, would multiple saves of a
single texture in an IVE file be considered a bug or just an oversight? A full
solution might also require the modification of the all of the Texture*cpp files
in the ive plugin.
Kind regards,
- Andrew
// 'workaround'
// modify DataInputStream.cpp in osgPlugins/ive as follows
// add single line with comment NEW!
osg::Image* DataInputStream::readImage(IncludeImageMode mode)
{
switch(mode) {
case IMAGE_INCLUDE_DATA:
// Read image data from stream
if(readBool())
{
osg::Image* image = new osg::Image();
((ive::Image*)image)->read(this);
_imageMap[image->getFileName()] = image; // NEW! - also save
filename
return image;
}
break;
...
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org