fix clone

This commit is contained in:
yangxiao 2015-09-11 15:08:59 +08:00
parent 64471fab85
commit ca24e6eba3
2 changed files with 1 additions and 3 deletions

View File

@ -443,9 +443,6 @@ Material* Material::clone() const
{
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);
}

View File

@ -86,6 +86,7 @@ Technique* Technique::clone() const
for (const auto pass: _passes)
{
auto p = pass->clone();
p->_parent = technique;
technique->_passes.pushBack(p);
}