summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-01-14 20:23:46 +0100
committerSven Gothel <[email protected]>2023-01-14 20:23:46 +0100
commit4b944d5ae8cd0040ee43fcdefa92bfe06c56518b (patch)
treeec5e1ac5546bf615564568a1831641ae971c17f2 /src/jogl/classes
parentb367231929a8e4d8eac53933a59a297b75ef5e58 (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.java23
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 */);
}
}
}