2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 21:47:42 +00:00

Lots of bug fixes

This commit is contained in:
Jack Andersen
2018-05-09 21:25:26 -10:00
parent b58ebc1af5
commit 12430610f1
23 changed files with 129 additions and 43 deletions

View File

@@ -38,7 +38,8 @@ void CSkinnedModel::Calculate(const CPoseAsTransforms& pose,
{
if (morphEffect || g_PointGenFunc)
{
if (boo::ObjToken<boo::IGraphicsBufferD> vertBuf = m_modelInst->UpdateUniformData(drawFlags, nullptr, nullptr))
if (boo::ObjToken<boo::IGraphicsBufferD> vertBuf =
m_modelInst->UpdateUniformData(drawFlags, nullptr, nullptr))
{
x10_skinRules->TransformVerticesCPU(m_vertWorkspace, pose, *x4_model);
if (morphEffect)
@@ -46,11 +47,20 @@ void CSkinnedModel::Calculate(const CPoseAsTransforms& pose,
if (g_PointGenFunc)
g_PointGenFunc(g_PointGenCtx, m_vertWorkspace);
x4_model->ApplyVerticesCPU(vertBuf, m_vertWorkspace);
m_modifiedVBO = true;
}
}
else
{
m_modelInst->UpdateUniformData(drawFlags, x10_skinRules.GetObj(), &pose);
if (boo::ObjToken<boo::IGraphicsBufferD> vertBuf =
m_modelInst->UpdateUniformData(drawFlags, x10_skinRules.GetObj(), &pose))
{
if (m_modifiedVBO)
{
x4_model->RestoreVerticesCPU(vertBuf);
m_modifiedVBO = false;
}
}
}
}