Swing on Top - 2D on 3D

Hello all

I have read that it is possible to “Draw Java2D graphics on top of 3D OpenGL rendering. The JGears demo again provides an example of this: the icons and frames-per-second counter are drawn on top of the gears using Java2D.” This is quite an astounding claim (requires Mustang, apparently) as IMHO this gives jOGL quite the leg up on the desktop horse.

Does anyone have experience in this regard? How fast is it? How reliable is it?

With Mustang and the Java2D/OpenGL pipeline active (-Dsun.java2d.opengl=true) this functionality is extremely fast. It seems to be pretty reliable on at least NVidia and ATI hardware. We have recently been working to allow JOGL to interoperate with the Java2D/OpenGL pipeline when the latter is using EXT_framebuffer_object rather than pbuffers for its rendering. This functionality appears to be working well on the abovementioned hardware as well. There are a couple of demos on the jogl-demos home page utilizing this support. Try installing the current Mustang weekly build and try them out.

Ah, sounds promising. Would it be possible to [easily] make a fully 3D ui that almost entirely consists of Swing components, and have, say, 3D popups and flyouts?

Not really. The 2D/3D integration doesn’t inherently support 3D components, only integration of 2D and 3D rendering. You may want to look at Project Looking Glass; I’m aware that they have been working on a 3D-aware Toolkit implementation which supports Swing.