Fixed mesh deserialization

This commit is contained in:
antopilo
2025-01-04 03:17:11 -05:00
parent 342513e2e5
commit 3e10ee032c
2 changed files with 8 additions and 5 deletions

View File

@@ -200,8 +200,11 @@ namespace Nuake
{
Vertex vertex;
try {
vertex.uv_x = v["UV"]["X"];
vertex.uv_y = v["UV"]["Y"];
if (v.contains("UV") && v["UV"].contains("x") && v["UV"].contains("y"))
{
vertex.uv_x = v["UV"]["x"];
vertex.uv_y = v["UV"]["x"];
}
}
catch (std::exception& /*e*/) {
vertex.uv_x = 0.0f;

View File

@@ -79,9 +79,9 @@ namespace Nuake
{
for (auto& m : j["Meshes"])
{
//Ref<Mesh> mesh = CreateRef<VkMesh>();
//mesh->Deserialize(m);
//m_Meshes.push_back(mesh);
Ref<Mesh> mesh = CreateRef<Mesh>();
mesh->Deserialize(m);
m_Meshes.push_back(mesh);
}
}
}