diff --git a/panda/src/gobj/config_gobj.cxx b/panda/src/gobj/config_gobj.cxx index da60a9dfde..15fdd344d6 100644 --- a/panda/src/gobj/config_gobj.cxx +++ b/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(); diff --git a/panda/src/gobj/geom.h b/panda/src/gobj/geom.h index eb9b049dbd..0f0fa7425d 100644 --- a/panda/src/gobj/geom.h +++ b/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: diff --git a/panda/src/gobj/geomCacheEntry.cxx b/panda/src/gobj/geomCacheEntry.cxx index 1560880806..173388d9b4 100644 --- a/panda/src/gobj/geomCacheEntry.cxx +++ b/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 diff --git a/panda/src/gobj/geomCacheEntry.h b/panda/src/gobj/geomCacheEntry.h index a60a0617b1..b4d742bf3b 100644 --- a/panda/src/gobj/geomCacheEntry.h +++ b/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; }; diff --git a/panda/src/pgraph/cullResult.h b/panda/src/pgraph/cullResult.h index dae9c5c4b4..12922df5c5 100644 --- a/panda/src/pgraph/cullResult.h +++ b/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()); } diff --git a/panda/src/pgraph/cullableObject.h b/panda/src/pgraph/cullableObject.h index b3e950788c..d828bb8c54 100644 --- a/panda/src/pgraph/cullableObject.h +++ b/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 diff --git a/panda/src/putil/clockObject.h b/panda/src/putil/clockObject.h index 185b424270..b59968919e 100644 --- a/panda/src/putil/clockObject.h +++ b/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()); }