完成动画切换

This commit is contained in:
xsl
2025-11-30 12:22:43 +08:00
parent 835f768a4a
commit 634d22f3be
4 changed files with 57 additions and 34 deletions
+4 -2
View File
@@ -1371,12 +1371,13 @@ void FaceApp::changeMotion(const string motion_type)
std::unique_lock<std::mutex> lock_changeMotion(changeMotionMtx);
for (int i = 0; i < this->m_texs.size(); ++i)
for (int i = 0; i < _nextMotion.png_names.size(); ++i)
{
destroyTexture(device, m_texs[i]);
}
for (int i = 0; i < m_texs_next.size(); ++i)
for (int i = 0; i < _nextMotion.png_names.size(); ++i)
{
m_texs[i] = m_texs_next[i];
m_texs_next[i].reset();
@@ -1385,6 +1386,7 @@ void FaceApp::changeMotion(const string motion_type)
update_descriptor_set(m_texs);
_curMotion_type = motion_type;
_curMotion_png_size = _nextMotion.png_names.size();
_motionState = ready;
// for (int i = 0; i < _curMotion.png_names.size(); ++i)