Eric O'Connell

03/10/2023, 5:44 AM
Is it possible to wrap a native view with desktop compose? On Mac, I’d like to host an MTKView and hook up a MoltenVK renderer but drive the UI with compose. Also, whatever the equivalent of that would be on Windows 😂 ..
I already do the equivalent on Android, using SurfaceView, but I realize this is more involved :)

Alexander Maryanovsky

03/10/2023, 6:36 AM
I don’t know whether or how, but you can try something with JAWT:
and embed it using SwingPanel


03/10/2023, 7:11 AM
JavaFX has if you can render your Vulkan into an offscreen buffer, use that to bring it into JavaFX, and then bridge JavaFX to Swing, I'd expect that to be more performant than Canvas as there's only one software copy involved
unfortunately I don't think there's a way to avoid the copy like SurfaceView