Merge pull request #149 from lvlonggame/v3

Fix bug: load sprite3D from cache, the attach node will be discarded.
This commit is contained in:
XiaoYang 2014-10-24 15:43:37 +08:00
commit 01e2d62e90
1 changed files with 8 additions and 0 deletions

View File

@ -92,6 +92,14 @@ bool Sprite3D::loadFromCache(const std::string& path)
}
}
for(const auto& it : spritedata->nodedatas->skeleton)
{
if(it)
{
createAttachSprite3DNode(it,*(spritedata->materialdatas));
}
}
for (ssize_t i = 0; i < _meshes.size(); i++) {
_meshes.at(i)->setGLProgramState(spritedata->glProgramStates.at(i));
}