aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/macosx
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/macosx')
-rw-r--r--src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java
index 8e845e847..b75d2f927 100644
--- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java
+++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java
@@ -477,11 +477,11 @@ public abstract class MacOSXCGLContext extends GLContextImpl
} else {
texWidth = drawable.getWidth();
texHeight = drawable.getHeight();
- }
+ }
nsOpenGLLayer = CGL.createNSOpenGLLayer(ctx, nsOpenGLLayerPFmt, drawable.getHandle(), fixedCaps.isBackgroundOpaque(), texWidth, texHeight);
if (DEBUG) {
System.err.println("NS create nsOpenGLLayer "+toHexString(nsOpenGLLayer));
- }
+ }
lsh.attachSurfaceLayer(nsOpenGLLayer);
}
} finally {
@@ -499,8 +499,8 @@ public abstract class MacOSXCGLContext extends GLContextImpl
if (DEBUG) {
System.err.println("NS destroy nsOpenGLLayer "+toHexString(nsOpenGLLayer));
}
- lsh.attachSurfaceLayer(0);
CGL.releaseNSOpenGLLayer(nsOpenGLLayer);
+ lsh.detachSurfaceLayer(nsOpenGLLayer);
CGL.deletePixelFormat(nsOpenGLLayerPFmt);
nsOpenGLLayerPFmt = 0;
nsOpenGLLayer = 0;