diff options
author | Sven Gothel <[email protected]> | 2023-01-14 20:23:46 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-01-14 20:23:46 +0100 |
commit | 4b944d5ae8cd0040ee43fcdefa92bfe06c56518b (patch) | |
tree | ec5e1ac5546bf615564568a1831641ae971c17f2 /src/jogl/classes | |
parent | b367231929a8e4d8eac53933a59a297b75ef5e58 (diff) |
MacOS: MacOSXCGLContext.drawableUpdatedNotify(): Issue updateContext() on main thread, deferred w/o wait (MacOS >= 13)
updateContextRegister() stays in current thread.
Diffstat (limited to 'src/jogl/classes')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java index 8e944c2ef..cf9924b26 100644 --- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java +++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java @@ -383,16 +383,7 @@ public class MacOSXCGLContext extends GLContextImpl isIncompleteView = false; } if( !isIncompleteView ) { - if( useAppKit ) { - OSXUtil.RunOnMainThread(true, false, new Runnable() { - @Override - public void run() { - updateHandle = CGL.updateContextRegister(contextHandle, drawable.getHandle()); - } - }); - } else { - updateHandle = CGL.updateContextRegister(contextHandle, drawable.getHandle()); - } + updateHandle = CGL.updateContextRegister(contextHandle, drawable.getHandle(), false /* useAppKit .. onMain */); if(0 == updateHandle) { throw new InternalError("XXX2"); } @@ -409,7 +400,6 @@ public class MacOSXCGLContext extends GLContextImpl } } - private static boolean useAppKit = false; @Override protected void drawableUpdatedNotify() throws GLException { if( drawable.getChosenGLCapabilities().isOnscreen() ) { @@ -424,16 +414,7 @@ public class MacOSXCGLContext extends GLContextImpl if (contextHandle == 0) { throw new GLException("Context not created"); } - if( useAppKit ) { - OSXUtil.RunOnMainThread(true, false, new Runnable() { - @Override - public void run() { - CGL.updateContext(contextHandle); - } - }); - } else { - CGL.updateContext(contextHandle); - } + CGL.updateContext(contextHandle, true /* useAppKit .. onMain */); } } } |