Added PostLoad methods to ensure all models have created vertex buffers and all materials have generated shaders before the user gains control of the camera, to fix hitching issues

This commit is contained in:
parax0
2016-02-10 17:38:32 -07:00
parent 6d55444cc2
commit 739e3c51bf
17 changed files with 91 additions and 13 deletions

View File

@@ -80,6 +80,14 @@ CColor CSceneNode::WireframeColor() const
}
// ************ MAIN FUNCTIONALITY ************
void CSceneNode::OnLoadFinished()
{
PostLoad();
for (auto it = mChildren.begin(); it != mChildren.end(); it++)
(*it)->OnLoadFinished();
}
void CSceneNode::Unparent()
{
// May eventually want to reset XForm so global position = local position