修复 动画播放 错误的bug

This commit is contained in:
xsl
2025-12-22 14:55:00 +08:00
parent 29e0c1e9a8
commit c83f36c976
3 changed files with 41 additions and 8 deletions
+9 -5
View File
@@ -692,10 +692,12 @@ void FaceApp::render(VkCommandBuffer commandBuffer, long long frameTime)
return;
}
string curMotionName = _curMotions[_curMotionIndex].name;
int loadMotionIndex = motion_list_map[curMotionName];
//if (cur_left)
{
vkCmdBindDescriptorSets(commandBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, m_pipelineLayout, 0, 1, &m_descriptor_sets_left[_curMotionIndex], 0, NULL);
}
//{
vkCmdBindDescriptorSets(commandBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, m_pipelineLayout, 0, 1, &m_descriptor_sets_left[loadMotionIndex], 0, NULL);
//}
//else
//{
// vkCmdBindDescriptorSets(commandBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, m_pipelineLayout, 0, 1, &m_descriptor_sets_right[_curMotionIndex], 0, NULL);
@@ -1478,8 +1480,10 @@ void FaceApp::loadMotionThread()
string path_name = path + "/" + _loadMotions[i].name + "ex.png";
loadTexture(path_name, pre_texs[i], true, commandPool_ex);
#endif // _WIN32
motion_list_map[_loadMotions[i].name] = i;
}
update_descriptor_set(m_texs_left, m_descriptor_sets_left);
_isLoadMotion = false;
_callback_loadfinish();
}
@@ -1532,7 +1536,7 @@ void FaceApp::changeMotionList(vector<string> motions, AnimationFinishedCallback
//}
//else
//{
update_descriptor_set(m_texs_left, m_descriptor_sets_left);
// update_descriptor_set(m_texs_left, m_descriptor_sets_left);
// cur_left = true;
//}