2
0
Эх сурвалжийг харах

fix a bit more type inheritance issues

David Rose 14 жил өмнө
parent
commit
00a87f7c44

+ 2 - 0
panda/src/gobj/config_gobj.cxx

@@ -17,6 +17,7 @@
 #include "config_util.h"
 #include "config_gobj.h"
 #include "geom.h"
+#include "geomCacheEntry.h"
 #include "geomMunger.h"
 #include "geomPrimitive.h"
 #include "geomTriangles.h"
@@ -465,6 +466,7 @@ ConfigureFn(config_gobj) {
   AnimateVerticesRequest::init_type();
   BufferContext::init_type();
   Geom::init_type();
+  GeomCacheEntry::init_type();
   GeomPipelineReader::init_type();
   GeomContext::init_type();
   GeomLines::init_type();

+ 3 - 1
panda/src/gobj/geom.h

@@ -269,7 +269,9 @@ public:
       return _type_handle;
     }
     static void init_type() {
-      register_type(_type_handle, "Geom::CacheEntry");
+      GeomCacheEntry::init_type();
+      register_type(_type_handle, "Geom::CacheEntry",
+                    GeomCacheEntry::get_class_type());
     }
     
   private:

+ 2 - 0
panda/src/gobj/geomCacheEntry.cxx

@@ -18,6 +18,8 @@
 #include "config_gobj.h"
 #include "clockObject.h"
 
+TypeHandle GeomCacheEntry::_type_handle;
+
 ////////////////////////////////////////////////////////////////////
 //     Function: GeomCacheEntry::Destructor
 //       Access: Public, Virtual

+ 13 - 0
panda/src/gobj/geomCacheEntry.h

@@ -52,6 +52,19 @@ private:
 private:  
   GeomCacheEntry *_prev, *_next;
 
+public:
+  static TypeHandle get_class_type() {
+    return _type_handle;
+  }
+  static void init_type() {
+    ReferenceCount::init_type();
+    register_type(_type_handle, "GeomCacheEntry",
+                  ReferenceCount::get_class_type());
+  }
+  
+private:
+  static TypeHandle _type_handle;
+
   friend class GeomCacheManager;
 };
 

+ 1 - 0
panda/src/pgraph/cullResult.h

@@ -86,6 +86,7 @@ public:
     return _type_handle;
   }
   static void init_type() {
+    ReferenceCount::init_type();
     register_type(_type_handle, "CullResult",
                   ReferenceCount::get_class_type());
   }

+ 1 - 0
panda/src/pgraph/cullableObject.h

@@ -156,6 +156,7 @@ public:
   }
   static void init_type() {
 #ifdef DO_MEMORY_USAGE
+    ReferenceCount::init_type();
     register_type(_type_handle, "CullableObject",
                   ReferenceCount::get_class_type());
 #else

+ 1 - 0
panda/src/putil/clockObject.h

@@ -171,6 +171,7 @@ public:
     return _type_handle;
   }
   static void init_type() {
+    ReferenceCount::init_type();
     register_type(_type_handle, "ClockObject",
                   ReferenceCount::get_class_type());
   }