closes https://github.com/assimp/assimp/issues/1513: fix assimp for cross compile for android

This commit is contained in:
Kim Kulling
2017-11-15 21:26:25 +01:00
parent 80ba6d10f7
commit 7db10022e9
12 changed files with 2335 additions and 6 deletions

View File

@@ -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>

View File

@@ -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));
}
}

View File

@@ -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);

View File

@@ -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);

View File

@@ -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");
}