feature: load model dynamicly is available

bug fix : crush when loading model with no animation

bug : crush when loading model with no materials info
pull/2/head
ink-soul 2023-06-01 15:56:40 +08:00
parent 59c4d750a3
commit 34afb08673
1 changed files with 6 additions and 2 deletions

View File

@ -1620,8 +1620,11 @@
if (camera.updated) {
updateUniformBuffers();
}
if(!paused)
if (!paused && glTFModel.animations.size() > 0)
{
glTFModel.updateAnimation(frameTimer, shaderData.skinSSBO);
}
}
void VulkanExample::viewChanged()
@ -1659,7 +1662,8 @@
GUIFunction guiFunc{};
std::string strModelFilePath;
strModelFilePath = guiFunc.openFileFolderDialog();
std::cout << strModelFilePath << std::endl;
filePath.glTFModelFilePath = strModelFilePath;
loadAssets();
}
}
}