2
0
Эх сурвалжийг харах

Merge pull request #941 from WolfgangD/master

Fixes parent relationship for cloned passes and techniques
Sean Paul Taylor 12 жил өмнө
parent
commit
ff5085638e

+ 1 - 0
gameplay/src/Pass.cpp

@@ -92,6 +92,7 @@ Pass* Pass::clone(Technique* technique, NodeCloneContext &context) const
     effect->addRef();
     effect->addRef();
     Pass* pass = new Pass(getId(), technique, effect);
     Pass* pass = new Pass(getId(), technique, effect);
     RenderState::cloneInto(pass, context);
     RenderState::cloneInto(pass, context);
+    pass->_parent = technique;
     return pass;
     return pass;
 }
 }
 
 

+ 1 - 0
gameplay/src/Technique.cpp

@@ -65,6 +65,7 @@ Technique* Technique::clone(Material* material, NodeCloneContext &context) const
         technique->_passes.push_back(passCopy);
         technique->_passes.push_back(passCopy);
     }
     }
     RenderState::cloneInto(technique, context);
     RenderState::cloneInto(technique, context);
+    technique->_parent = material;
     return technique;
     return technique;
 }
 }