mirror of https://github.com/axmolengine/axmol.git
fix material clone
This commit is contained in:
parent
d03b100ec1
commit
64471fab85
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue