From Farshid Lashkari, and non power of two resize hint support to .osg ascii

This commit is contained in:
Robert Osfield
2005-05-10 08:07:37 +00:00
parent 44c363dd3f
commit 4811adda0a

View File

@@ -158,6 +158,22 @@ bool Texture_readLocalData(Object& obj, Input& fr)
}
}
if (fr[0].matchWord("resizeNonPowerOfTwo"))
{
if (fr[1].matchWord("TRUE"))
{
texture.setResizeNonPowerOfTwoHint(true);
fr +=2 ;
iteratorAdvanced = true;
}
else if (fr[1].matchWord("FALSE"))
{
texture.setResizeNonPowerOfTwoHint(false);
fr +=2 ;
iteratorAdvanced = true;
}
}
return iteratorAdvanced;
}
@@ -190,6 +206,9 @@ bool Texture_writeLocalData(const Object& obj, Output& fw)
else fw.indent() << "internalFormat " << texture.getInternalFormat() << std::endl;
}
fw.indent() << "resizeNonPowerOfTwo "<< (texture.getResizeNonPowerOfTwoHint()?"TRUE":"FALSE") << std::endl;
return true;
}