fix material clone

This commit is contained in:
yangxiao 2015-09-10 09:23:02 +08:00
parent d03b100ec1
commit 64471fab85
1 changed files with 4 additions and 0 deletions

View File

@ -442,6 +442,10 @@ Material* Material::clone() const
for (const auto& technique: _techniques)
{
auto t = technique->clone();
t->_parent = material;
for (ssize_t i = 0; i < t->getPassCount(); i++) {
t->getPassByIndex(i)->_parent = t;
}
material->_techniques.pushBack(t);
}