1. 完成了对嵌入式Linux平台支持的相关代码的合并,同时对于OpenGL ES平台的shader进行了重写以适配ES平台,不过暂时还未加入到CMakeLists构建脚本当中,预计在下次提交中加入。

This commit is contained in:
Misaki
2026-06-25 00:26:49 +08:00
parent f7be85fbf6
commit c036b005f8
21 changed files with 415 additions and 27 deletions
@@ -284,6 +284,12 @@ void LAppLive2DManager::LoadModelFromPath(const std::string& modelPath, const st
_models.PushBack(new LAppModel()); // 这样在加载的时候都使用的models[0]这一个位置,自行实现模型选择器要注意注意
_models[0]->LoadAssets(modelPathStr.GetRawString(), modelJsonName.GetRawString());
if (_models[0]->GetModel() == nullptr)
{
LAppPal::PrintLogLn("[APP]Failed to load model: %s / %s", modelPath.c_str(), fileName.c_str());
return;
}
// 加载完后根据模型大小来重新设置当前窗口大小
const int width = static_cast<int>(_models[0]->GetModel()->GetCanvasWidthPixel() / 15.0);
const int height = static_cast<int>(_models[0]->GetModel()->GetCanvasHeightPixel() / 15.0);
+5
View File
@@ -168,6 +168,11 @@ void LAppModel::LoadAssets(const csmChar* dir, const csmChar* fileName)
const csmString path = csmString(dir) + fileName;
csmByte* buffer = CreateBuffer(path.GetRawString(), &size);
if (buffer == nullptr)
{
LAppPal::PrintLogLn("[APP]Failed to load model setting file: %s", path.GetRawString());
return;
}
ICubismModelSetting* setting = new CubismModelSettingJson(buffer, size);
DeleteBuffer(buffer, path.GetRawString());