浏览代码

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

Areloch 11 年之前
父节点
当前提交
4594a13740
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      Engine/source/renderInstance/renderGlowMgr.cpp

+ 1 - 0
Engine/source/renderInstance/renderGlowMgr.cpp

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