Fixed the assert crash by making sure the glow material instance keeps the original material instance's user object

This commit is contained in:
Areloch 2014-04-16 10:38:53 -05:00
parent 7ad5d15306
commit 4594a13740

View file

@ -54,6 +54,7 @@ RenderGlowMgr::GlowMaterialHook::GlowMaterialHook( BaseMatInstance *matInst )
{
mGlowMatInst = (MatInstance*)matInst->getMaterial()->createMatInstance();
mGlowMatInst->getFeaturesDelegate().bind( &GlowMaterialHook::_overrideFeatures );
mGlowMatInst->setUserObject(matInst->getUserObject());
mGlowMatInst->init( matInst->getRequestedFeatures(),
matInst->getVertexFormat() );
}