Fix parsing of glTF version

Handle version as int in gltf
Fix format specifiers in glTF version parser
This commit is contained in:
John Senneker
2017-09-11 11:02:15 -04:00
committed by Daniel Hritzkiv
parent 19876e9822
commit 140b903d7a
9 changed files with 45 additions and 47 deletions
+2 -1
View File
@@ -109,7 +109,8 @@ bool glTFImporter::CanRead(const std::string& pFile, IOSystem* pIOHandler, bool
glTF::Asset asset(pIOHandler);
try {
asset.Load(pFile, extension == "glb");
return asset.asset.version < 2;
std::string version = asset.asset.version;
return !version.empty() && version[0] == '1';
} catch (...) {
return false;
}