GLJPanel -> SwingNode -> JavaFX

I’ve read online about embedding JOGL content into JavaFX, by using a GLJPanel in a SwingNode. So far I’ve failed to get this working (Java newbie) or find a working example online. Has anyone gotten this to work? Is there a sample project available?

Alternatively is there a sample LWJGL/JavaFX project online I can look at? I checked out LWJGL-FX but couldn’t get it to compile, or the windows EXE to run… :frowning: (can post details if necessary)

-Brendan

LWJGL can run in Java2D component parent (Swing maybe?). You need to do Display.setParent() and that way your OpenGL canvas will be in JPanel for example.

Hi

Please look at this project which is a port of the one you mentioned:

I thank a lot Spasi for his project and Aqd for his port by the way :slight_smile:

GLJPanel works with SwingNode, some developers confirmed it a few weeks ago or our IRC channel.

Rather ask your question about JOGL on our official forum:
http://forum.jogamp.org/jogl-f782158.html

JOGL has an excellent interoperability with AWT, Swing and SWT, with or without NEWT (its own windowing toolkit), with heavyweight or lightweight component, which eases the integration in any Java application.

This bug report deals with JOGL OpenJFX/JavaFX interoperability:
https://jogamp.org/bugzilla/show_bug.cgi?id=607

JOGL can even accelerate your Java2D rendering with GLG2D:
https://brandonborkholder.github.io/glg2d/

Best regards.

FYI I am continuing this discussion here:

http://forum.jogamp.org/GLJPanel-in-JavaFX-blanking-out-window-td4032861.html