Reputation: 41
JavaFX 2.0 has recently caught my attention. I'd like to use it for my GUI and use a graphics library like LibGDX for the rendering. To be specific, I'm making a small toy game engine. JavaFX has the amazing GUI that I want, but doesn't seem to have all the graphics capabilities that I would like. So I want to use something else like LibGDX for rendering.
Is this possible, or am I stuck with Prism?
Thanks in advance.
Upvotes: 4
Views: 6403
Reputation: 2026
Per the Libgdx + JavaFX forum thread, it sounds as though people have made progress getting libGDX working within a JavaFX application.
Specifically, the following two repos are mentioned:
Upvotes: 2
Reputation: 71
You can create your user interface with scene2d, a set of libraries also included on libGDX engine-libraries (http://code.google.com/p/libgdx/wiki/scene2d). All you need to do is create an Actor of this library and add it on your stage/scene/screen. After that, apply some Actions to your actor and you will get the same effect that with JavaFX or Flash. If you need a special action that you can't run in the render of your app and you need to encapsulate this action in your Actor, create a new actor that implements your primary object (label, textbutton,...) and override the method act and draw to implement your own Actor.
libGDX is not compatible (I think) with JavaFX, create all the app in LibGDX, is a good deal.
Upvotes: 3