www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: fluzz on August 14, 2016, 08:50:19 pm

Title: Using JavaFX with jPCT
Post by: fluzz on August 14, 2016, 08:50:19 pm
I found an article for using swing with jPCT on the wiki (http://www.jpct.net/wiki/index.php?title=Using_jPCT_in_Swing (http://www.jpct.net/wiki/index.php?title=Using_jPCT_in_Swing)), but I want to use JavaFX. Any suggestions or things I need to know?
Title: Re: Using JavaFX with jPCT
Post by: EgonOlsen on August 14, 2016, 09:11:43 pm
No idea. You would need to make JavaFX and LWJGL work together. It's not really a jPCT thing.
Title: Re: Using JavaFX with jPCT
Post by: fluzz on August 15, 2016, 04:46:09 pm
Would you recommend that I use swing then? I just wanted to use JavaFX because swing might get deprecated soon (it still works for now). There have been no improvements to swing, and Oracle mostly supports JavaFX. I'm worried that some of my projects would not work in the future...
Title: Re: Using JavaFX with jPCT
Post by: EgonOlsen on August 15, 2016, 07:26:55 pm
Swing is the base of most business applications that aren't using a web client. Abandoning it would mean to abandon all these applications. I'm very sure that this won't happen, so I see no problem with using Swing.
Why do you need a GUI library anyway? I'm just asking, because Sinne people wanted to use GUI libraries to create a GUI on top of the GL rendering and I don't think that this is a very good idea.
Title: Re: Using JavaFX with jPCT
Post by: fluzz on August 17, 2016, 05:09:01 pm
I was planning to make a game. I need the main menu and all that stuff, and correct me if I'm wrong, but doesn't swing create standalone desktop applications as well?

I still haven't figured out how to make the HUD yet. Maybe swing could do that? I'm open to suggestions. Thanks!
Title: Re: Using JavaFX with jPCT
Post by: EgonOlsen on August 17, 2016, 08:48:31 pm
If it's supposed to be a game, I would always go with pure GL and leave Swing and similar GUI libraries aside. The simplest way to create a GUI with jPCT is to blit textures. A slightly more advanced way is to make yourself a simple GUI lib that uses texture blits in the background. You might want to look at http://www.jpct.net/wiki/index.php?title=Open_sourced_projects_from_Thomas (http://www.jpct.net/wiki/index.php?title=Open_sourced_projects_from_Thomas), which includes some GUI stuff. It's for jPCT-AE, but the GUI related parts shouldn't be too hard to port.
Title: Re: Using JavaFX with jPCT
Post by: fluzz on August 19, 2016, 05:58:17 am
But how would I deploy it as a desktop application? I don't need swing for much except deployment. :-\
Title: Re: Using JavaFX with jPCT
Post by: EgonOlsen on August 19, 2016, 08:37:50 am
I'm not sure what using Swing has to do with deploying the application!? Can you explain that in more detail?
Title: Re: Using JavaFX with jPCT
Post by: fluzz on August 20, 2016, 05:58:30 am
Ok, never mind. Sorry; I don't even remember where I saw that.  ;D No idea what I was talking about.