closes https://github.com/assimp/assimp/issues/1513: fix assimp for cross compile for android
This commit is contained in:
@@ -49,7 +49,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include <assimp/ai_assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
#ifdef __unix__
|
||||
#include <sys/param.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -88,6 +88,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include "StringUtils.h"
|
||||
|
||||
namespace glTF2
|
||||
{
|
||||
#ifdef ASSIMP_API
|
||||
@@ -239,7 +241,7 @@ namespace glTF2
|
||||
case ComponentType_UNSIGNED_BYTE:
|
||||
return 1;
|
||||
default:
|
||||
throw DeadlyImportError("GLTF: Unsupported Component Type " + std::to_string(t));
|
||||
throw DeadlyImportError("GLTF: Unsupported Component Type " + to_string(t));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -258,11 +258,11 @@ Ref<T> LazyDict<T>::Retrieve(unsigned int i)
|
||||
Value &obj = (*mDict)[i];
|
||||
|
||||
if (!obj.IsObject()) {
|
||||
throw DeadlyImportError("GLTF: Object at index \"" + std::to_string(i) + "\" is not a JSON object");
|
||||
throw DeadlyImportError("GLTF: Object at index \"" + to_string(i) + "\" is not a JSON object");
|
||||
}
|
||||
|
||||
T* inst = new T();
|
||||
inst->id = std::string(mDictId) + "_" + std::to_string(i);
|
||||
inst->id = std::string(mDictId) + "_" + to_string(i);
|
||||
inst->oIndex = i;
|
||||
ReadMember(obj, "name", inst->name);
|
||||
inst->Read(obj, mAsset);
|
||||
|
||||
@@ -402,7 +402,7 @@ void glTF2Exporter::ExportMaterials()
|
||||
for (unsigned int i = 0; i < mScene->mNumMaterials; ++i) {
|
||||
const aiMaterial* mat = mScene->mMaterials[i];
|
||||
|
||||
std::string id = "material_" + std::to_string(i);
|
||||
std::string id = "material_" + to_string(i);
|
||||
|
||||
Ref<Material> m = mAsset->materials.Create(id);
|
||||
|
||||
|
||||
@@ -1282,7 +1282,7 @@ inline void Asset::ReadBinaryHeader(IOStream& stream)
|
||||
}
|
||||
|
||||
AI_SWAP4(header.version);
|
||||
asset.version = std::to_string(header.version);
|
||||
asset.version = to_string(header.version);
|
||||
if (header.version != 1) {
|
||||
throw DeadlyImportError("GLTF: Unsupported binary glTF version");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user