Commit 5745b3f4 authored by hybrid's avatar hybrid

Fix colormask deserialization default.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2179 dfc29bdd-3216-0410-991c-e03cc46cb475
parent be994b9f
...@@ -1595,8 +1595,10 @@ void CNullDriver::fillMaterialStructureFromAttributes(video::SMaterial& outMater ...@@ -1595,8 +1595,10 @@ 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");
// default 0 is ok
outMaterial.AntiAliasing = attr->getAttributeAsInt("AntiAliasing"); outMaterial.AntiAliasing = attr->getAttributeAsInt("AntiAliasing");
outMaterial.ColorMask = attr->getAttributeAsInt("ColorMask"); if (attr->existsAttribute("ColorMask"))
outMaterial.ColorMask = attr->getAttributeAsInt("ColorMask");
prefix = "BilinearFilter"; prefix = "BilinearFilter";
if (attr->existsAttribute(prefix.c_str())) // legacy if (attr->existsAttribute(prefix.c_str())) // legacy
outMaterial.setFlag(EMF_BILINEAR_FILTER, attr->getAttributeAsBool(prefix.c_str())); outMaterial.setFlag(EMF_BILINEAR_FILTER, attr->getAttributeAsBool(prefix.c_str()));
...@@ -1622,6 +1624,7 @@ void CNullDriver::fillMaterialStructureFromAttributes(video::SMaterial& outMater ...@@ -1622,6 +1624,7 @@ void CNullDriver::fillMaterialStructureFromAttributes(video::SMaterial& outMater
for (i=0; i<MATERIAL_MAX_TEXTURES; ++i) for (i=0; i<MATERIAL_MAX_TEXTURES; ++i)
outMaterial.TextureLayer[i].TextureWrap = (E_TEXTURE_CLAMP)attr->getAttributeAsEnumeration((prefix+core::stringc(i+1)).c_str(), aTextureClampNames); outMaterial.TextureLayer[i].TextureWrap = (E_TEXTURE_CLAMP)attr->getAttributeAsEnumeration((prefix+core::stringc(i+1)).c_str(), aTextureClampNames);
// default 0 is ok
prefix="LODBias"; prefix="LODBias";
for (i=0; i<MATERIAL_MAX_TEXTURES; ++i) for (i=0; i<MATERIAL_MAX_TEXTURES; ++i)
outMaterial.TextureLayer[i].LODBias = attr->getAttributeAsInt((prefix+core::stringc(i+1)).c_str()); outMaterial.TextureLayer[i].LODBias = attr->getAttributeAsInt((prefix+core::stringc(i+1)).c_str());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment