aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl')
-rw-r--r--src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java4
-rw-r--r--src/jogl/native/macosx/MacOSXWindowSystemInterface-calayer.m29
2 files changed, 4 insertions, 29 deletions
diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java
index 485fbd0a0..19a334b75 100644
--- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java
+++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java
@@ -866,7 +866,7 @@ public class MacOSXCGLContext extends GLContextImpl
if(DEBUG) {
System.err.println("MaxOSXCGLContext.NSOpenGLImpl.associateDrawable(true): "+attachGLLayerCmd);
}
- OSXUtil.RunOnMainThread(false, attachGLLayerCmd);
+ OSXUtil.RunOnMainThread(false, false /* kickNSApp */, attachGLLayerCmd);
} else { // -> null == backingLayerHost
lastWidth = drawable.getSurfaceWidth();
lastHeight = drawable.getSurfaceHeight();
@@ -893,7 +893,7 @@ public class MacOSXCGLContext extends GLContextImpl
if(DEBUG) {
System.err.println("MaxOSXCGLContext.NSOpenGLImpl.associateDrawable(false): "+dCmd);
}
- OSXUtil.RunOnMainThread(false, dCmd);
+ OSXUtil.RunOnMainThread(false, true /* kickNSApp */, dCmd);
if( null != gl3ShaderProgram ) {
gl3ShaderProgram.destroy(MacOSXCGLContext.this.gl.getGL3());
gl3ShaderProgram = null;
diff --git a/src/jogl/native/macosx/MacOSXWindowSystemInterface-calayer.m b/src/jogl/native/macosx/MacOSXWindowSystemInterface-calayer.m
index 652b0545e..d83ddbc22 100644
--- a/src/jogl/native/macosx/MacOSXWindowSystemInterface-calayer.m
+++ b/src/jogl/native/macosx/MacOSXWindowSystemInterface-calayer.m
@@ -112,39 +112,14 @@ extern GLboolean glIsVertexArray (GLuint array);
#endif
-#ifdef VERBOSE_ON
- #define CGLRETAINCOUNT(c) (NULL!=c?(int)CGLGetContextRetainCount(c):-1)
-#else
- #define CGLRETAINCOUNT(c)
-#endif
-
- (void)dealloc
{
- /**
- * The explicit CGLContext destruction below
- * ensures that it is not left behind.
- * Tests show that w/o these gymnastics, the CGLContext is not freed immediately after calling dealloc.
- * The retain, release and dealloc ensures [super dealloc] won't message 'invalid context'.
- */
- CGLContextObj cglCtx = [self CGLContextObj];
-
- DBG_PRINT("MyNSOpenGLContext::dealloc.0 %p (refcnt %d) - CGL-Ctx %p\n", self, (int)[self retainCount], cglCtx, CGLRETAINCOUNT(cglCtx));
+ DBG_PRINT("MyNSOpenGLContext::dealloc.0 %p (refcnt %d)\n", self, (int)[self retainCount]);
// NSLog(@"MyNSOpenGLContext::dealloc: %@",[NSThread callStackSymbols]);
[self clearDrawable];
- DBG_PRINT("MyNSOpenGLContext::dealloc.1 %d\n", CGLRETAINCOUNT(cglCtx));
- if( NULL != cglCtx ) {
- CGLRetainContext( cglCtx );
- DBG_PRINT("MyNSOpenGLContext::dealloc.2 %d\n", CGLRETAINCOUNT(cglCtx));
- }
+
[super dealloc];
- DBG_PRINT("MyNSOpenGLContext::dealloc.3 %d\n", CGLRETAINCOUNT(cglCtx));
- if( NULL != cglCtx ) {
- CGLReleaseContext( cglCtx );
- DBG_PRINT("MyNSOpenGLContext::dealloc.4 %d\n", CGLRETAINCOUNT(cglCtx));
- CGLDestroyContext( cglCtx );
- DBG_PRINT("MyNSOpenGLContext::dealloc.5 %d\n", CGLRETAINCOUNT(cglCtx));
- }
DBG_PRINT("MyNSOpenGLContext::dealloc.X\n");
}