release_all_geoms

This commit is contained in:
David Rose 2005-01-11 01:58:20 +00:00
parent 9d44c1a374
commit e04bc8d4ed
3 changed files with 14 additions and 3 deletions

View File

@ -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

View File

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

View File

@ -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;