Add UseMipMaps serialization as pointed out by pc0de

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3402 dfc29bdd-3216-0410-991c-e03cc46cb475
master
hybrid 2010-09-09 08:26:04 +00:00
parent 68dd0061eb
commit db0375bf15
1 changed files with 6 additions and 0 deletions

View File

@ -1791,6 +1791,7 @@ io::IAttributes* CNullDriver::createAttributesFromMaterial(const video::SMateria
attr->addBool("FrontfaceCulling", material.FrontfaceCulling); attr->addBool("FrontfaceCulling", material.FrontfaceCulling);
attr->addBool("FogEnable", material.FogEnable); attr->addBool("FogEnable", material.FogEnable);
attr->addBool("NormalizeNormals", material.NormalizeNormals); attr->addBool("NormalizeNormals", material.NormalizeNormals);
attr->addBool("UseMipMaps", material.UseMipMaps);
attr->addInt("AntiAliasing", material.AntiAliasing); attr->addInt("AntiAliasing", material.AntiAliasing);
attr->addInt("ColorMask", material.ColorMask); attr->addInt("ColorMask", material.ColorMask);
@ -1855,6 +1856,11 @@ void CNullDriver::fillMaterialStructureFromAttributes(video::SMaterial& outMater
outMaterial.FrontfaceCulling = attr->getAttributeAsBool("FrontfaceCulling"); outMaterial.FrontfaceCulling = attr->getAttributeAsBool("FrontfaceCulling");
outMaterial.FogEnable = attr->getAttributeAsBool("FogEnable"); outMaterial.FogEnable = attr->getAttributeAsBool("FogEnable");
outMaterial.NormalizeNormals = attr->getAttributeAsBool("NormalizeNormals"); outMaterial.NormalizeNormals = attr->getAttributeAsBool("NormalizeNormals");
if (attr->existsAttribute("UseMipMaps")) // legacy
outMaterial.UseMipMaps = attr->getAttributeAsBool("UseMipMaps");
else
outMaterial.UseMipMaps = true;
// default 0 is ok // default 0 is ok
outMaterial.AntiAliasing = attr->getAttributeAsInt("AntiAliasing"); outMaterial.AntiAliasing = attr->getAttributeAsInt("AntiAliasing");
if (attr->existsAttribute("ColorMask")) if (attr->existsAttribute("ColorMask"))