Sunday, August 16, 2009

JavaFX with JOGL



JavaFX carries one big advantage over other technologies: it can have full access to OpenGL. It may take a couple of seconds longer to load, but instead of minimal games you have the opportunity to play modern, fully accelerated 3D games.

Moreover, JavaFX makes it easier to develop these games. You can fully utilize JavaFX widgets and effects on top of your 3D world view.

Soon we will be able to see many games running full 3D, right inside our browsers. Here is a proof of concept demo. Of course you are required to have 3D drivers installed to run it. Also requires Java version 1.6u15 or higher.

run applet

Perhaps the most interesting part of this applet is that the JOGL Gears demo can be embedded in JavaFX without any modifications. The changes were made only to introduce new functionality (pause gears, change the speed, and read fps counter).
In general, minimum to no changes are required to embed JOGL games in JavaFX.