Apple is deprecating OpenGL pipeline on MacOSX
so the demo projects have to upgrade its FXGL version which could provide new pipeline support(Metal instead of OpenGL)
the version should be from 11 -> 17.x(17.3 is recommended)
11 is not longer supported on new MacOSX versions
If we run the application by using FXGL 11 on MacOSX 13.4.1 it will throw exceptions indicating that:
Graphics Device initialization failed for : es2, sw
Error initializing QuantumRenderer: no suitable pipeline found
8月 26, 2023 1:54:04 PM com.sun.javafx.application.PlatformImpl startup
Warning: Unsupported JavaFX configuration: classes were loaded from 'unnamed module @2da90a2f'
Loading library prism_es2 from resource failed: java.lang.UnsatisfiedLinkError: /Users/chengenzhao/.openjfx/cache/16/libprism_es2.dylib: dlopen(/Users/chengenzhao/.openjfx/cache/16/libprism_es2.dylib, 0x0001): tried: '/Users/chengenzhao/.openjfx/cache/16/libprism_es2.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/chengenzhao/.openjfx/cache/16/libprism_es2.dylib' (no such file), '/Users/chengenzhao/.openjfx/cache/16/libprism_es2.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))
java.lang.UnsatisfiedLinkError: /Users/chengenzhao/.openjfx/cache/16/libprism_es2.dylib: dlopen(/Users/chengenzhao/.openjfx/cache/16/libprism_es2.dylib, 0x0001): tried: '/Users/chengenzhao/.openjfx/cache/16/libprism_es2.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/chengenzhao/.openjfx/cache/16/libprism_es2.dylib' (no such file), '/Users/chengenzhao/.openjfx/cache/16/libprism_es2.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))
at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:331)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:197)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:139)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2404)
at java.base/java.lang.Runtime.load0(Runtime.java:817)
at java.base/java.lang.System.load(System.java:2015)
at com.sun.glass.utils.NativeLibLoader.installLibraryFromResource(NativeLibLoader.java:214)
at com.sun.glass.utils.NativeLibLoader.loadLibraryFromResource(NativeLibLoader.java:194)
at com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:135)
at com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:53)
at com.sun.prism.es2.ES2Pipeline.lambda$static$0(ES2Pipeline.java:69)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:319)
at com.sun.prism.es2.ES2Pipeline.<clinit>(ES2Pipeline.java:51)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:391)
at java.base/java.lang.Class.forName(Class.java:382)
at com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:218)
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:91)
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
at java.base/java.lang.Thread.run(Thread.java:1623)
Loading library prism_sw from resource failed: java.lang.UnsatisfiedLinkError: /Users/chengenzhao/.openjfx/cache/16/libprism_sw.dylib: dlopen(/Users/chengenzhao/.openjfx/cache/16/libprism_sw.dylib, 0x0001): tried: '/Users/chengenzhao/.openjfx/cache/16/libprism_sw.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/chengenzhao/.openjfx/cache/16/libprism_sw.dylib' (no such file), '/Users/chengenzhao/.openjfx/cache/16/libprism_sw.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))
java.lang.UnsatisfiedLinkError: /Users/chengenzhao/.openjfx/cache/16/libprism_sw.dylib: dlopen(/Users/chengenzhao/.openjfx/cache/16/libprism_sw.dylib, 0x0001): tried: '/Users/chengenzhao/.openjfx/cache/16/libprism_sw.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/chengenzhao/.openjfx/cache/16/libprism_sw.dylib' (no such file), '/Users/chengenzhao/.openjfx/cache/16/libprism_sw.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))
at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:331)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:197)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:139)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2404)
at java.base/java.lang.Runtime.load0(Runtime.java:817)
at java.base/java.lang.System.load(System.java:2015)
at com.sun.glass.utils.NativeLibLoader.installLibraryFromResource(NativeLibLoader.java:214)
at com.sun.glass.utils.NativeLibLoader.loadLibraryFromResource(NativeLibLoader.java:194)
at com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:135)
at com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:53)
at com.sun.prism.sw.SWPipeline.lambda$static$0(SWPipeline.java:42)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:319)
at com.sun.prism.sw.SWPipeline.<clinit>(SWPipeline.java:41)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:391)
at java.base/java.lang.Class.forName(Class.java:382)
at com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:218)
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:91)
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
at java.base/java.lang.Thread.run(Thread.java:1623)
Graphics Device initialization failed for : es2, sw
Error initializing QuantumRenderer: no suitable pipeline found
java.lang.RuntimeException: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
at com.sun.javafx.tk.quantum.QuantumRenderer.getInstance(QuantumRenderer.java:280)
at com.sun.javafx.tk.quantum.QuantumToolkit.init(QuantumToolkit.java:244)
at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:261)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:286)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:160)
at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:658)
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:678)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195)
at java.base/java.lang.Thread.run(Thread.java:1623)
Caused by: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:94)
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
... 1 more
java.lang.RuntimeException: No toolkit found
at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:273)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:286)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:160)
at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:658)
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:678)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195)
at java.base/java.lang.Thread.run(Thread.java:1623)
Error during launch:
Application will now exit
Process finished with exit code 255
Hi:
Apple is deprecating OpenGL pipeline on MacOSX so the demo projects have to upgrade its FXGL version which could provide new pipeline support(Metal instead of OpenGL) the version should be from 11 -> 17.x(17.3 is recommended) 11 is not longer supported on new MacOSX versions If we run the application by using FXGL 11 on MacOSX 13.4.1 it will throw exceptions indicating that: Graphics Device initialization failed for : es2, sw Error initializing QuantumRenderer: no suitable pipeline found