Fix usage of AI_MATKEY_UVTRANSFORM in LWO loader. The buffer was incorrectly dimensioned, random data got pulled into the material key's data section. This fixes a few failures in the regression testing suite.
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@603 67173fc5-114c-0410-ac8e-9d2fd5bffc1fpull/1/head
parent
b56f35c2b8
commit
ebc03be3ac
|
@ -157,7 +157,8 @@ bool LWOImporter::HandleTextures(MaterialHelper* pcMat, const TextureList& in, a
|
|||
trafo.mScaling.x = (*it).wrapAmountW;
|
||||
trafo.mScaling.y = (*it).wrapAmountH;
|
||||
|
||||
pcMat->AddProperty((float*)&trafo,sizeof(aiUVTransform),AI_MATKEY_UVTRANSFORM(type,cur));
|
||||
BOOST_STATIC_ASSERT(sizeof(aiUVTransform)/sizeof(float) == 5);
|
||||
pcMat->AddProperty((float*)&trafo,5,AI_MATKEY_UVTRANSFORM(type,cur));
|
||||
}
|
||||
DefaultLogger::get()->debug("LWO2: Setting up non-UV mapping");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue