mirror of https://github.com/axmolengine/axmol.git
fix clone
This commit is contained in:
parent
64471fab85
commit
ca24e6eba3
|
@ -443,9 +443,6 @@ Material* Material::clone() const
|
||||||
{
|
{
|
||||||
auto t = technique->clone();
|
auto t = technique->clone();
|
||||||
t->_parent = material;
|
t->_parent = material;
|
||||||
for (ssize_t i = 0; i < t->getPassCount(); i++) {
|
|
||||||
t->getPassByIndex(i)->_parent = t;
|
|
||||||
}
|
|
||||||
material->_techniques.pushBack(t);
|
material->_techniques.pushBack(t);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -86,6 +86,7 @@ Technique* Technique::clone() const
|
||||||
for (const auto pass: _passes)
|
for (const auto pass: _passes)
|
||||||
{
|
{
|
||||||
auto p = pass->clone();
|
auto p = pass->clone();
|
||||||
|
p->_parent = technique;
|
||||||
technique->_passes.pushBack(p);
|
technique->_passes.pushBack(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue