JavaFX in JOGL Overlay?

Hi, before I look into JavaFX a bit more, I’d like to know if it would be possible, and if so efficient, to use JavaFX to create a nice gui for display in a jogl Overlay. It would seem to be a nice way of implementing a slick ui for game work.

Fingers crossed…

Thanks,
graham

Probably possible. The main issue will probably be event redispatching. The Overlay is really just a graphical overlay and doesn’t have the concept of dispatching mouse events to the visual elements that are drawn in it.

At this point I’m thinking that the best interoperability mechanism will be to drop a GLJPanel into the Scenario scene graph. Unfortunately thinking about this I am pretty sure that if you turn on the Java 2D OpenGL pipeline, and therefore the Java 2D / JOGL bridge, you will get incorrect rendering results.

We’ll continue to investigate this within Sun and will post with updates.

well, the event redispatching is probably the easiest problem. There are even Swing utilities which do most of the work for you.

this are good news!
I hope that there will be also a clean solution to integrate swing components into the GLCanvas. The main problem are the overlay effects like text selection or JComboBoxes which are not painted if you call paint(graphics g). I am sure projects like Wonderland would benefit from full swing/scenario support in the JOGL Overlay.

Was just looking at Scenario - looks nice. I’ve done a fair it of work with Piccolo/Jazz previously, and like the idea of it utilising the graphics hardware.

The way I would envision using this is that any 2D work (mainly custom UI, menus, etc.) would be handled by Scenario and/or JavaFX at some point (which I understand will use Scenario anyway), and my own 3D gl calls happening on the layer below. All of this would occur within one canvas, and both jogl and scenario/javafx sides would play nicely together. Hopefully this will be achieved.

Looking at integrating the two though, why is there not one basic opengl canvas? Is it entirely unrealistic to have one canvas type, rather than talking about putting a GLJPanel into a Scenario graph?

found that recently:

[quote=http://forums.java.net/jive/message.jspa?messageID=264437#264437]Don’t bother trying to use the JME swingui classes. According to Josh Slack they have the same
bugs that the LG embedded swing implementation had. The Sun Swing team has been working on
a correct implementation of embedded swing which we will hopefully be able to take advantage of.
[/quote]
its about time ;D