36张图片打包

This commit is contained in:
xsl
2025-10-29 21:38:03 +08:00
parent 13357ab256
commit dfbef7caf1
54 changed files with 228 additions and 46 deletions
+15 -6
View File
@@ -732,7 +732,7 @@ void FaceApp::initVulkan()
loadTexture("demo0_ex.png", m_texs_ex[i], true);
}
loadTexture("out.png", tex_bg, false);
loadTexture("out.png", tex_bg, true);
createVertexBuffer();
createUniformBuffer();
setup_descriptor_pool();
@@ -1137,19 +1137,27 @@ void FaceApp::SetInitArg(const char* arg)
}
void FaceApp::changeMotion(const char* json)
{
Motion motion = json::parse(json);
changeMotion(motion);
}
void FaceApp::changeMotion(Motion& motion)
{
if (_curMotion.getMotionId() == motion.getMotionId())
{
return;
}
_curMotion = _initArg.motion;
_curMotion = motion;
for (int i = 0; i < _curMotion.png_num; ++i)
{
#ifdef _WIN32
string path = _curMotion.type + "/" + _curMotion.technique + "/" + _curMotion.step + "/" + _curMotion.show_type;
string path_name = path + "/" + _curMotion.png_name + std::to_string(i) + ".png";
//string path = _curMotion.type + "/" + _curMotion.technique + "/" + _curMotion.step + "/" + _curMotion.show_type;
string path = "pic";
string path_name = path + "/" + _curMotion.png_name;// +std::to_string(i) + ".png";
loadTextureExample(UTF8ToWideString(path_name), m_texs[i], true);
if (kThick)
{
@@ -1157,8 +1165,9 @@ void FaceApp::changeMotion(Motion& motion)
loadTextureExample(UTF8ToWideString(path_name_ex), m_texs_ex[i], true);
}
#else
string path = _curMotion.type + "/" + _curMotion.technique + "/" + _curMotion.step + "/" + _curMotion.show_type;
string path_name = path + "/" + _curMotion.png_name + std::to_string(i) + ".png";
//string path = _curMotion.type + "/" + _curMotion.technique + "/" + _curMotion.step + "/" + _curMotion.show_type;
string path = "pic";
string path_name = path + "/" + _curMotion.png_name;// +std::to_string(i) + ".png";
loadTexture(path_name, m_texs[i], true);
if (kThick)
{