It runs a little clunky, but should be enough to continue developing. Hopefully I won’t have any issues. I don’t know if the frame rate would improve if I was running GL ES 3 instead of GL 2. But as long as I can develop I’m happy.
Let me know if you want help with getting GL ES to the pi.
I am able to run jme in raspberry pi. BUT you need to add a dependency on the lwjgl natives for arm (assuming you are using lwjgl). Also, it will run in OpenGL, not on Open GLES. so it runs kind of slow if you are loading big stuff.
You need org.jmonkeyengine:jme3-lwjgl3:3.3.2-stable to actually get jmonkey to use lwjgl. But that will only download the main .so files. ARM binaries are not included by default. so you need to add specifically the ARM binaries.
My build.gradle is a bit messy because I am including 32 bits windows and both 32 and 64 bits ARM. plus I am adding binaries for a lot of dependencies:
where for example rootProject.ext[“lwjgl-arm64”].toString() is equal to “org.lwjgl:lwjgl:3.2.3:natives-linux-arm64” and so on.
Keep in mind though that you will only be able to use OpenGL, NOT OpenGL ES. I really hope JMonkeyEngine added support for OpenGL ES in their desktop library and not only their android library. I would assume it will speed things up quite a bit in RPi, but I wouldn’t know.
Sorry, I have never tried it. My guess is that the easiest way would be to not do it with Java. do it is C and then just wrap a native call from java or something. But I wouldn’t know, never tried it.
Hello @superjugy , just to know , i bought RPI4B , but JmE didnot work even if implementing the 3.2.3lwjgl for arm64 Jme desktop ignores it & searches for its own library on org.jmonkeyEngine.lwjgl ,
so it gives a UnSatisfiedLinkError.openal not supported by Linux-arm64 if using jmeLwjgl
& if using the lwjgl3.2.3 linux arm64 it gives me ClassNotFoundException jme cannot find lwjgl desktop do you have a solution for this?
as regards Pi4J if you want to know , i have tried it & its working , basically its based on WiringPI C lang library ,so you have to use WiringPI Strategy of wiring pins
EDIT : Discovered that wiring Pi datasheet of RPI4b would be the same as RPI3B since they have the same number of pins , you can find these data on Pi4J official website
Hi @superjugy , sorry for late reply , i rarely open my RPI these days of exams , i have the latest Raspibian installed , what do you mean by update , you mean update through apt packages ? or the system update ?
> Task :JmETest.main()
Dec 31, 2020 3:33:24 AM com.jme3.system.JmeDesktopSystem initialize
INFO: Running on jMonkeyEngine 3.3.2-stable
* Branch: HEAD
* Git Hash: 1a05e3f
* Build Date: 2020-04-27
Dec 31, 2020 3:33:25 AM com.jme3.system.JmeDesktopSystem newContextLwjgl
SEVERE: CRITICAL ERROR: Context class is missing!
Make sure jme3_lwjgl-ogl is on the classpath.
java.lang.ClassNotFoundException: com.jme3.system.lwjgl.LwjglDisplay
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:315)
at com.jme3.system.JmeDesktopSystem.newContextLwjgl(JmeDesktopSystem.java:199)
at com.jme3.system.JmeDesktopSystem.newContext(JmeDesktopSystem.java:279)
at com.jme3.system.JmeSystem.newContext(JmeSystem.java:159)
at com.jme3.app.LegacyApplication.start(LegacyApplication.java:461)
at com.jme3.app.LegacyApplication.start(LegacyApplication.java:424)
at com.jme3.app.SimpleApplication.start(SimpleApplication.java:127)
at JmETest.main(JmETest.java:10)
Exception in thread "main" java.lang.NullPointerException
at com.jme3.system.JmeDesktopSystem.newContext(JmeDesktopSystem.java:280)
at com.jme3.system.JmeSystem.newContext(JmeSystem.java:159)
at com.jme3.app.LegacyApplication.start(LegacyApplication.java:461)
at com.jme3.app.LegacyApplication.start(LegacyApplication.java:424)
at com.jme3.app.SimpleApplication.start(SimpleApplication.java:127)
at JmETest.main(JmETest.java:10)
> Task :JmETest.main() FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':JmETest.main()'.
> Process 'command '/usr/lib/jvm/java-11-openjdk-armhf/bin/java'' finished with non-zero exit value 1
which is mainly due to lwjgl:display class inside lwjgl of jme that only supports the desktop amd no arm support
In your build.gradle I only see you adding the natives for lwjgl. try also adding the natives for lwjgl-glfw, lwjgl-jemalloc, lwjgl-opengl and lwjgl-openal. maybe that will fix it.
As for update, yes, I meant a sudo apt upgrade or sudo apt update