完成动画切换
This commit is contained in:
+4
-2
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user