Speeding up the JavaFX Presentation Cube for Jfokus
Join the DZone community and get the full member experience.
Join For Freei'll be traveling to stockholm in a few days to give a university session on javafx at jfokus on january 27, 2009. during that week on january 29-30 i'll also be teaching an intensive two-day class on creating javafx applications , with a focus on developing rich internet applications. in the past i've used a rotating cube developed in javafx to display static and dynamic (executing javafx code) content.
the cube uses the perspectivetransform effect to do faux-3d, and was running at around 10 frames per second. i asked stephen chin if he could tune it up a bit, and he sent me back a modified program that consistently achieves 60+ fps on my dual core 2.4 ghz vista machine. in a later post stephen and i will point out the optimization techniques used, but for now i wanted to give you a java web start link to try it out:
to see the fps that the cube is achieving on your machine, take a look at the java console. it also displays any acceleration type in use. here's my console output for reference:
acceleration type is: direct3d
animation fps: 62
animation fps: 64
animation fps: 64
animation fps: 64
animation fps: 64
animation fps: 64
animation fps: 64
animation fps: 64
animation fps: 63
animation fps: 64
by the way, the presentation slides in the example that you'll be running are dated, but i'll post the actual jfokus presentation cube on this blog for you shortly after the session. also, as i mentioned in yesterday's widgetfx 1.0 post , i'll show you the code for this presentation cube as well as walking through how to tweak the code to convert it into a widgetfx widget.
enjoy,
jim weaver
javafxpert.com
Opinions expressed by DZone contributors are their own.
Comments