I've got a small graphics processing application that I'm writing in Rust. It has various graphics backends (Metal, Vulkan, D3D) depending on the underlying OS. I'd like to create a simple application in Java (probably JavaFX but I could use AWT) as a proof of concept to allow a user to make simple tweaks to the graphics. However, I'm unsure about how to approach this interop. I don't want (or think I need to use LWJGL) because the Rust library handles this. What I really want is to:
1. Create a window.
2. Assign a portion of that window to be the render context for my Rust library.
3. Assign the other parts of that window to be my editing widgets.
4. Be able to detect mouse clicks in (2) to select rendered objects and alter them with (3).
I expect there is some amount of FFI work that needs to be done, which I know I'll need to look into. Where I'm really lost is how I hook up the graphics so that the Java app displays the rendered image and is able to process input.
Any thoughts or suggestions about how to procede?
1. Create a window.
2. Assign a portion of that window to be the render context for my Rust library.
3. Assign the other parts of that window to be my editing widgets.
4. Be able to detect mouse clicks in (2) to select rendered objects and alter them with (3).
I expect there is some amount of FFI work that needs to be done, which I know I'll need to look into. Where I'm really lost is how I hook up the graphics so that the Java app displays the rendered image and is able to process input.
Any thoughts or suggestions about how to procede?