mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-09 13:44:32 +00:00
update assimp to 6.0.5
This commit is contained in:
parent
2d2eb57e2e
commit
f5cf21cfeb
941 changed files with 22718 additions and 12240 deletions
|
|
@ -3,7 +3,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
@ -67,13 +67,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
using namespace Assimp;
|
||||
|
||||
namespace Assimp {
|
||||
|
||||
// underlying structure for aiPropertyStore
|
||||
typedef BatchLoader::PropertyMap PropertyMap;
|
||||
using PropertyMap = BatchLoader::PropertyMap ;
|
||||
|
||||
#if defined(__has_warning)
|
||||
#if __has_warning("-Wordered-compare-function-pointers")
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wordered-compare-function-pointers"
|
||||
# if __has_warning("-Wordered-compare-function-pointers")
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wordered-compare-function-pointers"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
@ -111,6 +112,7 @@ void GetImporterInstanceList(std::vector<BaseImporter *> &out);
|
|||
|
||||
/** will delete all registered importers. */
|
||||
void DeleteImporterInstanceList(std::vector<BaseImporter *> &out);
|
||||
|
||||
} // namespace Assimp
|
||||
|
||||
#ifndef ASSIMP_BUILD_SINGLETHREADED
|
||||
|
|
@ -120,14 +122,14 @@ static std::mutex gLogStreamMutex;
|
|||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Custom LogStream implementation for the C-API
|
||||
class LogToCallbackRedirector : public LogStream {
|
||||
class LogToCallbackRedirector final : public LogStream {
|
||||
public:
|
||||
explicit LogToCallbackRedirector(const aiLogStream &s) :
|
||||
stream(s) {
|
||||
mStream(s) {
|
||||
ai_assert(nullptr != s.callback);
|
||||
}
|
||||
|
||||
~LogToCallbackRedirector() {
|
||||
~LogToCallbackRedirector() override {
|
||||
#ifndef ASSIMP_BUILD_SINGLETHREADED
|
||||
std::lock_guard<std::mutex> lock(gLogStreamMutex);
|
||||
#endif
|
||||
|
|
@ -137,7 +139,7 @@ public:
|
|||
// might cause strange problems, but the chance is quite low.
|
||||
|
||||
PredefLogStreamMap::iterator it = std::find(gPredefinedStreams.begin(),
|
||||
gPredefinedStreams.end(), (Assimp::LogStream *)stream.user);
|
||||
gPredefinedStreams.end(), (Assimp::LogStream *)mStream.user);
|
||||
|
||||
if (it != gPredefinedStreams.end()) {
|
||||
delete *it;
|
||||
|
|
@ -146,12 +148,12 @@ public:
|
|||
}
|
||||
|
||||
/** @copydoc LogStream::write */
|
||||
void write(const char *message) {
|
||||
stream.callback(message, stream.user);
|
||||
void write(const char *message) override {
|
||||
mStream.callback(message, mStream.user);
|
||||
}
|
||||
|
||||
private:
|
||||
aiLogStream stream;
|
||||
const aiLogStream &mStream;
|
||||
};
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
|
@ -354,9 +356,10 @@ ASSIMP_API const aiScene *aiApplyCustomizedPostProcessing(const aiScene *scene,
|
|||
void CallbackToLogRedirector(const char *msg, char *dt) {
|
||||
ai_assert(nullptr != msg);
|
||||
ai_assert(nullptr != dt);
|
||||
LogStream *s = (LogStream *)dt;
|
||||
|
||||
s->write(msg);
|
||||
LogStream *stream = (LogStream *)dt;
|
||||
if (stream != nullptr) {
|
||||
stream->write(msg);
|
||||
}
|
||||
}
|
||||
|
||||
static LogStream *DefaultStream = nullptr;
|
||||
|
|
@ -369,7 +372,7 @@ ASSIMP_API aiLogStream aiGetPredefinedLogStream(aiDefaultLogStream pStream, cons
|
|||
if (DefaultStream == nullptr) {
|
||||
DefaultStream = LogStream::createDefaultStream(pStream, file);
|
||||
}
|
||||
|
||||
|
||||
if (!DefaultStream) {
|
||||
sout.callback = nullptr;
|
||||
sout.user = nullptr;
|
||||
|
|
@ -416,6 +419,10 @@ ASSIMP_API aiReturn aiDetachLogStream(const aiLogStream *stream) {
|
|||
DefaultLogger::get()->detachStream(it->second);
|
||||
delete it->second;
|
||||
|
||||
if ((Assimp::LogStream *)stream->user == DefaultStream) {
|
||||
DefaultStream = nullptr;
|
||||
}
|
||||
|
||||
gActiveLogStreams.erase(it);
|
||||
|
||||
if (gActiveLogStreams.empty()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue