closes https://github.com/assimp/assimp/issues/2992: add single or double precision + missing compilers.

issue_2992
kimkulling 2020-08-07 14:23:07 +02:00
parent 8504c191db
commit 13d7fad7f7
3 changed files with 52 additions and 24 deletions

View File

@ -515,7 +515,7 @@ void WriteLogOpening(const std::string& file) {
// need to ask the authors of incoming bug reports for
// the library version they're using - a log dump is
// sufficient.
const unsigned int flags( aiGetCompileFlags() );
const unsigned int flags = aiGetCompileFlags();
std::stringstream stream;
stream << "Assimp " << aiGetVersionMajor() << "." << aiGetVersionMinor() << "." << aiGetVersionRevision() << " "
#if defined(ASSIMP_BUILD_ARCHITECTURE)
@ -537,11 +537,19 @@ void WriteLogOpening(const std::string& file) {
#endif
<< " "
#if defined(ASSIMP_BUILD_COMPILER)
<< ( ASSIMP_BUILD_COMPILER )
<< (ASSIMP_BUILD_COMPILER)
#elif defined(_MSC_VER)
<< "msvc"
#elif defined(__GNUC__)
<< "gcc"
#elif defined(__clang__)
<< "clang"
#elif defined(__EMSCRIPTEN__)
<< "emscripten"
#elif defined(__MINGW32__)
<< "MinGW-w64 32bit"
#elif defined(__MINGW64__)
<< "MinGW-w64 64bit"
#else
<< "<unknown compiler>"
#endif
@ -552,7 +560,8 @@ void WriteLogOpening(const std::string& file) {
<< (flags & ASSIMP_CFLAGS_NOBOOST ? " noboost" : "")
<< (flags & ASSIMP_CFLAGS_SHARED ? " shared" : "")
<< (flags & ASSIMP_CFLAGS_SINGLETHREADED ? " singlethreaded" : "");
<< (flags & ASSIMP_CFLAGS_SINGLETHREADED ? " singlethreaded" : "")
<< (flags & ASSIMP_CFLAGS_DOUBLE_SUPPORT ? " double : " : "single : ");
ASSIMP_LOG_DEBUG(stream.str());
}

View File

@ -104,6 +104,9 @@ ASSIMP_API unsigned int aiGetCompileFlags() {
#ifdef _STLPORT_VERSION
flags |= ASSIMP_CFLAGS_STLPORT;
#endif
#ifdef ASSIMP_DOUBLE_PRECISION
flags |= ASSIMP_CFLAGS_DOUBLE_SUPPORT;
#endif
return flags;
}
@ -113,13 +116,29 @@ ASSIMP_API unsigned int aiGetVersionRevision() {
return GitVersion;
}
// ------------------------------------------------------------------------------------------------
ASSIMP_API const char *aiGetBranchName() {
return GitBranch;
}
// ------------------------------------------------------------------------------------------------
ASSIMP_API aiScene::aiScene() :
mFlags(0), mRootNode(nullptr), mNumMeshes(0), mMeshes(nullptr), mNumMaterials(0), mMaterials(nullptr), mNumAnimations(0), mAnimations(nullptr), mNumTextures(0), mTextures(nullptr), mNumLights(0), mLights(nullptr), mNumCameras(0), mCameras(nullptr), mMetaData(nullptr), mPrivate(new Assimp::ScenePrivateData()) {
mFlags(0),
mRootNode(nullptr),
mNumMeshes(0),
mMeshes(nullptr),
mNumMaterials(0),
mMaterials(nullptr),
mNumAnimations(0),
mAnimations(nullptr),
mNumTextures(0),
mTextures(nullptr),
mNumLights(0),
mLights(nullptr),
mNumCameras(0),
mCameras(nullptr),
mMetaData(nullptr),
mPrivate(new Assimp::ScenePrivateData()) {
// empty
}

View File

@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
Copyright (c) 2006-2020, assimp team
All rights reserved.
Redistribution and use of this software in source and binary forms,
@ -91,7 +89,7 @@ ASSIMP_API unsigned int aiGetVersionMajor (void);
ASSIMP_API unsigned int aiGetVersionRevision (void);
// ---------------------------------------------------------------------------
/** @brief Returns the branchname of the Assimp runtime.
/** @brief Returns the branch-name of the Assimp runtime.
* @return The current branch name.
*/
ASSIMP_API const char *aiGetBranchName();
@ -107,12 +105,14 @@ ASSIMP_API const char *aiGetBranchName();
#define ASSIMP_CFLAGS_NOBOOST 0x8
//! Assimp was compiled with ASSIMP_BUILD_SINGLETHREADED defined
#define ASSIMP_CFLAGS_SINGLETHREADED 0x10
//! Assimp was compiled with ASSIMP_BUILD_SINGLETHREADED defined
#define ASSIMP_CFLAGS_DOUBLE_SUPPORT 0x20
// ---------------------------------------------------------------------------
/** @brief Returns assimp's compile flags
* @return Any bitwise combination of the ASSIMP_CFLAGS_xxx constants.
*/
ASSIMP_API unsigned int aiGetCompileFlags (void);
ASSIMP_API unsigned int aiGetCompileFlags(void);
#ifdef __cplusplus
} // end extern "C"