mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 00:06:44 -04:00
Merge branch 'release/1.10.x'
This commit is contained in:
commit
4040e7b390
@ -13,6 +13,7 @@
|
||||
|
||||
#import "cocoaPandaAppDelegate.h"
|
||||
#include "graphicsEngine.h"
|
||||
#include "config_cocoadisplay.h"
|
||||
|
||||
@implementation CocoaPandaAppDelegate
|
||||
|
||||
@ -33,12 +34,26 @@
|
||||
- (BOOL)applicationShouldTerminate:(NSApplication *)app {
|
||||
if (cocoadisplay_cat.is_debug()) {
|
||||
cocoadisplay_cat.debug()
|
||||
<< "Received applicationShouldTerminate, closing all Cocoa windows\n";
|
||||
<< "Received applicationShouldTerminate, requesting to close all Cocoa windows\n";
|
||||
}
|
||||
// Call performClose on all the windows. This should make ShowBase shut down.
|
||||
// Ask all the windows whether they are OK to be closed.
|
||||
bool should_close = true;
|
||||
for (NSWindow *window in [app windows]) {
|
||||
[window performClose:nil];
|
||||
if (![[window delegate] windowShouldClose:window]) {
|
||||
should_close = false;
|
||||
}
|
||||
}
|
||||
if (should_close) {
|
||||
if (cocoadisplay_cat.is_debug()) {
|
||||
cocoadisplay_cat.debug()
|
||||
<< "No window objected to close request, closing all windows\n";
|
||||
}
|
||||
// If so (none of them fired a close request event), close them now.
|
||||
for (NSWindow *window in [app windows]) {
|
||||
[window close];
|
||||
}
|
||||
}
|
||||
// Give the application a chance to run its own cleanup functions.
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -12,6 +12,7 @@
|
||||
*/
|
||||
|
||||
#import "cocoaPandaWindowDelegate.h"
|
||||
#include "config_cocoadisplay.h"
|
||||
|
||||
@implementation CocoaPandaWindowDelegate
|
||||
- (id) initWithGraphicsWindow:(CocoaGraphicsWindow*)window {
|
||||
|
@ -26,6 +26,7 @@ INLINE PT(Texture) Texture::
|
||||
make_copy() const {
|
||||
PT(Texture) tex = make_copy_impl();
|
||||
CDWriter cdata_tex(tex->_cycler, true);
|
||||
cdata_tex->_render_to_texture = false;
|
||||
cdata_tex->inc_properties_modified();
|
||||
cdata_tex->inc_image_modified();
|
||||
return tex;
|
||||
|
@ -10819,6 +10819,7 @@ CData() {
|
||||
Texture::CData::
|
||||
CData(const Texture::CData ©) {
|
||||
_num_mipmap_levels_read = 0;
|
||||
_render_to_texture = copy._render_to_texture;
|
||||
|
||||
do_assign(©);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user