Bladeren bron

assimp: Support compilation with Assimp 5.x

Closes #1212
Daniel 4 jaren geleden
bovenliggende
commit
80892ede94
2 gewijzigde bestanden met toevoegingen van 15 en 0 verwijderingen
  1. 9 0
      pandatool/src/assimp/pandaLogger.cxx
  2. 6 0
      pandatool/src/assimp/pandaLogger.h

+ 9 - 0
pandatool/src/assimp/pandaLogger.cxx

@@ -38,6 +38,15 @@ void PandaLogger::OnDebug(const char *message) {
   assimp_cat.debug() << message << "\n";
   assimp_cat.debug() << message << "\n";
 }
 }
 
 
+/**
+ *
+ */
+void PandaLogger::OnVerboseDebug(const char *message) {
+  if (assimp_cat.is_spam()) {
+    assimp_cat.spam() << message << "\n";
+  }
+}
+
 /**
 /**
  *
  *
  */
  */

+ 6 - 0
pandatool/src/assimp/pandaLogger.h

@@ -30,11 +30,17 @@ protected:
   INLINE bool attachStream(Assimp::LogStream*, unsigned int) {
   INLINE bool attachStream(Assimp::LogStream*, unsigned int) {
     return false;
     return false;
   };
   };
+  INLINE bool detachStream(Assimp::LogStream*, unsigned int) {
+    return false;
+  };
+
+  // Kept for compatibility with Assimp 4.x
   INLINE bool detatchStream(Assimp::LogStream*, unsigned int) {
   INLINE bool detatchStream(Assimp::LogStream*, unsigned int) {
     return false;
     return false;
   };
   };
 
 
   void OnDebug(const char *message);
   void OnDebug(const char *message);
+  void OnVerboseDebug(const char *message);
   void OnError(const char *message);
   void OnError(const char *message);
   void OnInfo(const char *message);
   void OnInfo(const char *message);
   void OnWarn(const char *message);
   void OnWarn(const char *message);