From 4df7836f655501ce075914bd06b150778edd5ee3 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Sun, 18 Apr 2004 13:44:09 +0000 Subject: [PATCH] From Marco Jez, "fixes a bug that prevented mipmaps in images from being read correctly (the call to setImage() clears the previously filled _mipmapData vector)." --- src/osgPlugins/ive/Image.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/osgPlugins/ive/Image.cpp b/src/osgPlugins/ive/Image.cpp index 69f8742ca..fd9bfdf48 100644 --- a/src/osgPlugins/ive/Image.cpp +++ b/src/osgPlugins/ive/Image.cpp @@ -105,15 +105,15 @@ void Image::read(DataInputStream* in) // Read modified tag. setModifiedTag((unsigned int)in->readInt()); - // Read mipmapdata vector + // Read mipmapdata vector int size = in->readInt(); - _mipmapData.resize(size); + MipmapDataType mipmapData(size); //if (size) std::cout<<"is mip mapped "; for(int i=0;ireadInt(); + mipmapData[i]=(unsigned int)in->readInt(); //std::cout<<_mipmapData[i]<<"\t"; } //std::cout<