mirror of https://github.com/axmolengine/axmol.git
Merge pull request #13760 from super626/materialfix2
fix material clone
This commit is contained in:
commit
4022fb65e1
|
@ -442,6 +442,7 @@ Material* Material::clone() const
|
|||
for (const auto& technique: _techniques)
|
||||
{
|
||||
auto t = technique->clone();
|
||||
t->_parent = material;
|
||||
material->_techniques.pushBack(t);
|
||||
}
|
||||
|
||||
|
|
|
@ -86,6 +86,7 @@ Technique* Technique::clone() const
|
|||
for (const auto pass: _passes)
|
||||
{
|
||||
auto p = pass->clone();
|
||||
p->_parent = technique;
|
||||
technique->_passes.pushBack(p);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue