aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawable.java52
-rw-r--r--src/nativewindow/native/macosx/OSXmisc.m2
2 files changed, 1 insertions, 53 deletions
diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawable.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawable.java
index a97f3b1b2..7ee0d4fbe 100644
--- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawable.java
+++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawable.java
@@ -123,58 +123,6 @@ public abstract class MacOSXCGLDrawable extends GLDrawableImpl {
return GLBackendType.NSOPENGL == openGLMode ? getHandle() : null;
}
- /**
- @Override
- protected void destroyHandle() {
- if(layeredSurfaceType == LayeredSurfaceType.Direct) {
- // direct surface host, eg. AWT GLCanvas
- final MacOSXJAWTWindow lsh = MacOSXCGLDrawableFactory.getLayeredSurfaceHost(surface);
- if (DEBUG) {
- System.err.println("destroyHandle: layerType " + layeredSurfaceType + ", backingLayer "+toHexString(lsh.getSurfaceHandle()) + " -> 0");
- }
- OSXUtil.DestroyNSView(lsh.getSurfaceHandle());
- // CGL.releaseNSOpenGLView(lsh.getSurfaceHandle());
- lsh.setSurfaceHandle(0);
- } else if (DEBUG) {
- System.err.println("destroyHandle: layerType " + layeredSurfaceType);
- }
- super.destroyHandle();
- }
-
- @Override
- protected void updateHandle() {
- final MacOSXJAWTWindow lsh = MacOSXCGLDrawableFactory.getLayeredSurfaceHost(surface);
- if (null != lsh) {
- if(lsh == surface) {
- // direct surface host, eg. AWT GLCanvas
- layeredSurfaceType = LayeredSurfaceType.Direct;
- final long oldNSView = lsh.getSurfaceHandle();
- if(0 != oldNSView) {
- OSXUtil.DestroyNSView(oldNSView);
- // CGL.releaseNSOpenGLView(oldNSView);
- }
- final long nsView = OSXUtil.CreateNSView(0, 0, getWidth(), getHeight());
- // final long nsView = CGL.createNSOpenGLView(0, 0, getWidth(), getHeight());
- lsh.setSurfaceHandle(nsView);
- if (DEBUG) {
- System.err.println("updateHandle: layerType " + layeredSurfaceType + ", backingLayer "+toHexString(oldNSView) + " -> "+toHexString(nsView));
- }
- } else {
- // parent surface host, eg. via native parenting w/ NewtCanvasAWT
- layeredSurfaceType = LayeredSurfaceType.Parented;
- if (DEBUG) {
- System.err.println("updateHandle: layerType " + layeredSurfaceType + ", backingLayer "+toHexString(getHandle()));
- }
- }
- } else {
- layeredSurfaceType = LayeredSurfaceType.None;
- if (DEBUG) {
- System.err.println("updateHandle: layerType " + layeredSurfaceType);
- }
- }
- super.updateHandle();
- } */
-
@Override
protected void updateHandle() {
final MacOSXJAWTWindow lsh = MacOSXCGLDrawableFactory.getLayeredSurfaceHost(surface);
diff --git a/src/nativewindow/native/macosx/OSXmisc.m b/src/nativewindow/native/macosx/OSXmisc.m
index 7b7897701..de0d278fd 100644
--- a/src/nativewindow/native/macosx/OSXmisc.m
+++ b/src/nativewindow/native/macosx/OSXmisc.m
@@ -273,7 +273,7 @@ JNIEXPORT void JNICALL Java_jogamp_nativewindow_macosx_OSXUtil_AddCASublayer0
CGRect lRectRoot = [rootLayer frame];
// simple 1:1 layout !
[subLayer setFrame:lRectRoot];
- DBG_PRINT("CALayer::AddCASublayer0.0: %p . %p %lf/%lf %lfx%lf (%lf/%lf %lfx%lf) (refcnt %d)\n",
+ DBG_PRINT("CALayer::AddCASublayer0.0: %p . %p %lf/%lf %lfx%lf (refcnt %d)\n",
rootLayer, subLayer, lRectRoot.origin.x, lRectRoot.origin.y, lRectRoot.size.width, lRectRoot.size.height, (int)[subLayer retainCount]);
[JNFRunLoop performOnMainThreadWaiting:YES withBlock:^(){
[rootLayer addSublayer:subLayer];