diff --git a/panda/src/display/graphicsStateGuardian.I b/panda/src/display/graphicsStateGuardian.I index 65caac6acf..c2714e634c 100644 --- a/panda/src/display/graphicsStateGuardian.I +++ b/panda/src/display/graphicsStateGuardian.I @@ -51,6 +51,17 @@ release_all_textures() { return _prepared_objects->release_all_textures(); } +//////////////////////////////////////////////////////////////////// +// Function: GraphicsStateGuardian::release_all_geoms +// Access: Public +// Description: Frees the resources for all geoms associated with +// this GSG. +//////////////////////////////////////////////////////////////////// +INLINE int GraphicsStateGuardian:: +release_all_geoms() { + return _prepared_objects->release_all_geoms(); +} + //////////////////////////////////////////////////////////////////// // Function: GraphicsStateGuardian::set_active // Access: Published diff --git a/panda/src/display/graphicsStateGuardian.cxx b/panda/src/display/graphicsStateGuardian.cxx index afefa87a95..0bfa3577ff 100644 --- a/panda/src/display/graphicsStateGuardian.cxx +++ b/panda/src/display/graphicsStateGuardian.cxx @@ -1229,7 +1229,7 @@ close_gsg() { free_pointers(); // If we're not sharing the prepared objects list with any other - // GSG, go ahread and release all the textures and geoms now. This + // GSG, go ahead and release all the textures and geoms now. This // isn't really a reliable test of whether we are sharing this list, // but it's not too important if we get this wrong since this ought // to be an optional cleanup anyway. (Presumably, the underlying @@ -1237,7 +1237,7 @@ close_gsg() { // geoms when the last context using them is released.) if (_prepared_objects->get_ref_count() == 1) { release_all_textures(); - //release_all_geoms(); + release_all_geoms(); } } diff --git a/panda/src/display/graphicsStateGuardian.h b/panda/src/display/graphicsStateGuardian.h index fb464bb246..6d270f37b9 100644 --- a/panda/src/display/graphicsStateGuardian.h +++ b/panda/src/display/graphicsStateGuardian.h @@ -72,7 +72,7 @@ public: PUBLISHED: INLINE int release_all_textures(); - // int release_all_geoms(); + INLINE int release_all_geoms(); INLINE void set_active(bool active); INLINE bool is_active() const;