From 16b784162bde2725a95e36f313862cbf77b978ec Mon Sep 17 00:00:00 2001 From: JosiahWI Date: Sun, 8 Oct 2023 12:33:24 -0500 Subject: [PATCH] Print glTF loading issues to log --- source/Irrlicht/CGLTFMeshFileLoader.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/Irrlicht/CGLTFMeshFileLoader.cpp b/source/Irrlicht/CGLTFMeshFileLoader.cpp index 1a5d02fc..59ce3209 100644 --- a/source/Irrlicht/CGLTFMeshFileLoader.cpp +++ b/source/Irrlicht/CGLTFMeshFileLoader.cpp @@ -2,8 +2,10 @@ #include "CMeshBuffer.h" #include "coreutil.h" #include "IAnimatedMesh.h" +#include "ILogger.h" #include "IReadFile.h" #include "irrTypes.h" +#include "os.h" #include "path.h" #include "S3DVertex.h" #include "SAnimatedMesh.h" @@ -342,7 +344,12 @@ bool CGLTFMeshFileLoader::tryParseGLTF(io::IReadFile* file, auto buf = std::make_unique(file->getSize()); file->read(buf.get(), file->getSize()); + if (warn != "") { + os::Printer::log(warn.c_str(), ELL_WARNING); + } + if (err != "") { + os::Printer::log(err.c_str(), ELL_ERROR); return false; }