Browse Source

release_all_geoms

David Rose 21 years ago
parent
commit
e04bc8d4ed

+ 11 - 0
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

+ 2 - 2
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();
   }
 }
 

+ 1 - 1
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;