Browse Source

Merge pull request #941 from WolfgangD/master

Fixes parent relationship for cloned passes and techniques
Sean Paul Taylor 12 years ago
parent
commit
ff5085638e
2 changed files with 2 additions and 0 deletions
  1. 1 0
      gameplay/src/Pass.cpp
  2. 1 0
      gameplay/src/Technique.cpp

+ 1 - 0
gameplay/src/Pass.cpp

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