Jme Inside Jfx11?

@jayfella would it be possible to modify your jme-jfx-11 library to get jme inside of jfx11?

The reason I ask, is the only way I have found to get jfx11 in android is using gluon’s custom jni wrapper with graalvm.
(you can read this link for more details: Anyone tried Gluon Client Plugin for Android/iOS? - #45 by Ali_RS)

If we could get jme inside of a jfx scene, then we could use jfx in jme in jfx in android.
So you would have a top level JFX wrapper that only holds the application, and then the jme app would use your jfx library like normal inside of it. (I think that could work…?) If nothing else we could move the UI outside of jme to the jfx layer that jme is in.

What are your thoughts? Would it be possible to get jme inside of jfx11 for use in android?

Tagging @Ali_RS as he would be interested in your answer.

Thank you,
Trevor

EDIT: Performance is not a concern at this point, just getting it to work would be an achievement on its own.

1 Like

Yep. I’ve done it already.

It draws the scene on a jfx canvas.

https://github.com/jayfella/JmeSDK?files=1

2 Likes

I guess I could answer that better.

https://github.com/jayfella/JmeSDK/blob/master/src/main/java/com/jayfella/sdk/controller/MainPage.java#L88

And

https://github.com/jayfella/JmeSDK/blob/master/src/main/java/com/jayfella/sdk/service/impl/JmeEngineServiceImpl.java

1 Like

Hi jayfella, I’ve tried to build this and am running into errors. It seems your wrapper for jmesdk is on gradle 6 while sdk-ext is on 5.2, so maybe that could be the problem? When I run ./gradle build install in sdk-ext, I get:

FAILURE: Build failed with an exception.

* Where:
Build file '/home/davisro/dev/jmesdk/sdk-ext/build.gradle' line: 4

* What went wrong:
Plugin [id: 'org.openjfx.javafxplugin'] was not found in any of the following sources:

- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (plugin dependency must include a version number for this source)

I can fix it by adding version ‘0.0.8’ to the openjfx plugin declaration. But then when I run ./gradlew run in JmeSDK, I get this:

FAILURE: Build failed with an exception.

* Where:
Build file '/home/davisro/dev/jmesdk/sdk-ext/build.gradle' line: 4

* What went wrong:
Error resolving plugin [id: 'org.openjfx.javafxplugin', version: '0.0.8']
> Plugin request for plugin already on the classpath must not include a version

Remove the version number from the SDK build.gradle?

I abandoned the project a while ago. It had a lot of shortcomings, so I took it as experience and moved on to the plugin system im writing now.

It should compile and work for the most part, though.

To be clear… are you referring to the JmeSDK project referenced above, or the Jme-JFX11 project?

I’ve abandoned the SDK project. The jfx-11 project is still very much alive.

2 Likes