fix: Fix macOS not displaying rendered Vulkan surface#2
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the macOS AWT canvas implementations for both OpenGL and Vulkan. For OpenGL, it updates the createNSOpenGLView method to correctly initialize NSOpenGLView instances and introduces an intermediate CALayer for better layer management. For Vulkan, the createMTKView method is significantly refactored to use dedicated helper methods for LibFFI calls, improving clarity and robustness, and also incorporates an intermediate CALayer and ensures UI updates are performed on the main thread. Review comments indicate a critical issue in PlatformMacOSXGLCanvas.java where setWantsLayer: and layer were incorrectly called on an uninitialized nsOpenGLView object instead of the properly initialized view object, which could lead to crashes.
|
|
This pull request introduces some changes regarding the MacOS platform (this was introduced in lwjg3-awt in this PR).