Re: JOGL for Mac ARM Silicon
Posted by
Manu on
Nov 18, 2022; 3:24pm
URL: https://forum.jogamp.org/JOGL-for-Mac-ARM-Silicon-tp4040887p4041942.html
Thank you Martin.
I ran more tests this morning, and I confirm that setting the first parameter of
OSXUtil.RunOnMainThread to
false worked also in Sweet Home 3D for macOS 10.15, macOS 13 Intel and even for macOS 10.14, which is very good news because it's the last macOS version which supported 32 bit applications that some people may be obliged to keep.
Therefore, this solution works for macOS versions from 10.14 to 13, but the test I proposed to add in
NSOpenGLImpl#release must cite 10.14 too.
The proposed change is finally to replace the following statement in
jogamp.opengl.macosx.cgl.MacOSXCGLContext class:
OSXUtil.RunOnMainThread(true /* wait */, true /* kickNSApp */, new Runnable() {
@Override
public void run() {
CGL.setContextView(ctx, 0);
} } );
by:
String osVersion = System.getProperty("os.version");
boolean wait = osVersion.startsWith("10.")
&& !osVersion.startsWith("10.14")
&& !osVersion.startsWith("10.15")
&& !osVersion.startsWith("10.16");
OSXUtil.RunOnMainThread(wait /* wait */, true /* kickNSApp */, new Runnable() {
@Override
public void run() {
CGL.setContextView(ctx, 0);
} } );
This solution is programmed in the
jogl-all.jar file available in the ZIP file
jogl-all-2.4.0-rc-20221118.zip and also in
SweetHome3D 7.0.2d where you can now import furniture without the hanging issue. I also changed the
Implementation-Version value to
2.4.0-rc-20221118 in the
MANIFEST.MF file of
jogl-all.jar to avoid any confusion.
It would be nice to commit this change in JOGL code, but I don't have the keys for that...
Emmanuel Puybaret