mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
Fixed bug in prepare_for_deletion
This commit is contained in:
parent
79cf7493de
commit
d1ea4b3570
@ -1002,31 +1002,22 @@ end_frame(FrameMode mode) {
|
|||||||
void GraphicsOutput::
|
void GraphicsOutput::
|
||||||
prepare_for_deletion() {
|
prepare_for_deletion() {
|
||||||
|
|
||||||
// I'll remove this permanently in a few days. - Josh
|
_active = false;
|
||||||
// HOWEVER - it might be nice to add this functionality to the
|
_delete_flag = true;
|
||||||
// new module. It's not in there yet.
|
|
||||||
|
// We have to be sure to remove all of the display regions
|
||||||
|
// immediately, so that circular reference counts can be cleared
|
||||||
|
// up (each display region keeps a pointer to a CullResult,
|
||||||
|
// which can hold all sorts of pointers).
|
||||||
|
remove_all_display_regions();
|
||||||
|
|
||||||
// But when show-buffers mode is enabled, we want to keep the
|
// If we were rendering directly to texture, we can't delete the
|
||||||
// window around until the user has a chance to see the texture.
|
// buffer until the texture is gone too.
|
||||||
// So we don't do most of the following in show-buffers mode.
|
for (int i=0; i<count_textures(); i++) {
|
||||||
// if (!show_buffers) {
|
if (get_rtm_mode(i) == RTM_bind_or_copy) {
|
||||||
// _active = false;
|
_hold_textures.push_back(get_texture(i));
|
||||||
// _delete_flag = true;
|
}
|
||||||
//
|
}
|
||||||
// // We have to be sure to remove all of the display regions
|
|
||||||
// // immediately, so that circular reference counts can be cleared
|
|
||||||
// // up (each display region keeps a pointer to a CullResult,
|
|
||||||
// // which can hold all sorts of pointers).
|
|
||||||
// remove_all_display_regions();
|
|
||||||
//
|
|
||||||
// // If we were rendering directly to texture, we can't delete the
|
|
||||||
// // buffer until the texture is gone too.
|
|
||||||
// for (int i=0; i<count_textures(); i++) {
|
|
||||||
// if (get_rtm_mode(i) == RTM_bind_or_copy) {
|
|
||||||
// _hold_textures.push_back(get_texture(i));
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// We have to be sure to clear the _textures pointers, though, or
|
// We have to be sure to clear the _textures pointers, though, or
|
||||||
// we'll end up holding a reference to the textures forever.
|
// we'll end up holding a reference to the textures forever.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user