Browse Source

fix leak: just ignore broken texture coordinates.

kimkulling 5 năm trước cách đây
mục cha
commit
f938a6b744
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      code/AssetLib/glTF2/glTF2Importer.cpp

+ 2 - 1
code/AssetLib/glTF2/glTF2Importer.cpp

@@ -417,7 +417,8 @@ void glTF2Importer::ImportMeshes(glTF2::Asset &r) {
 			}
 			for (size_t tc = 0; tc < attr.texcoord.size() && tc < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++tc) {
                 if (!attr.texcoord[tc]) {
-                    throw DeadlyImportError("GLTF: Texture coordinate accessor not found or non-contiguous texture coordinate sets");
+                    DefaultLogger::get()->warn("Texture coordinate accessor not found or non-contiguous texture coordinate sets.");
+                    continue;
                 }
 
 				if (attr.texcoord[tc]->count != aim->mNumVertices) {