Thanks Farshid, fix merged and submitted to svn/trunk.
On 31 October 2013 02:11, Farshid Lashkari <[email protected]> wrote: > Hi Robert, > > I recently encountered an issue attempting to load an IVE file generated > by an older version of OSG. The file contained dxt1 compressed image data > with mipmaps. The loaded model would cause crashes when passing the mipmap > data to glCompressedTexImage2D. It seems that the size of the data array > within the IVE file did not match the computed size from > Image::getTotalSizeInBytesIncludingMipmaps(). This essentially made the > mipmap offsets invalid within the Image object. > > I'm not sure if the IVE was simply generated incorrectly, or if the > Image::getTotalSizeInBytesIncludingMipmaps() was modified since the file > was generated. Either way, I added a simple check in the IVE loader so that > it clears the mipmap offsets if the actual data size does not match the > computed data size. This seems like a safe fallback since the mipmap data > can be automatically generated, and it fixes the problem in my case. > > Also, while looking into this issue, I noticed that the osgDB::InputStream > class applies the serialized image allocation mode. However, since the > serializer is allocating the image data itself, it seems like it should > force the allocation mode to USE_NEW_DELETE. > > I've attached both changes. > > Cheers, > Farshid > > _______________________________________________ > osg-submissions mailing list > [email protected] > > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org > >
_______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
