Having a go at jmonkeyengine 3.2

HI Guys
I wanted to have a go at using the latest jme3 engine to see if i can use the new profiler

stateManager.attach(new DetailedProfilerState());

So i think this in mater which is the same as 3.2. SO i checkout master branch from

https://github.com/jMonkeyEngine/jmonkeyengine.git

then build it which gave mr all these beautiful 3.2 jars

./jme3-android/build/libs/jme3-android-3.2.0-SNAPSHOT.jar
./jme3-android-native/build/libs/jme3-android-native-3.2.0-SNAPSHOT.jar
./jme3-blender/build/libs/jme3-blender-3.2.0-SNAPSHOT.jar
./jme3-bullet/build/libs/jme3-bullet-3.2.0-SNAPSHOT.jar
./jme3-bullet-native/build/libs/jme3-bullet-native-3.2.0-SNAPSHOT.jar
./jme3-bullet-native-android/build/libs/jme3-bullet-native-android-3.2.0-SNAPSHOT.jar
./jme3-core/build/libs/jme3-core-3.2.0-SNAPSHOT.jar
./jme3-desktop/build/libs/jme3-desktop-3.2.0-SNAPSHOT.jar
./jme3-effects/build/libs/jme3-effects-3.2.0-SNAPSHOT.jar
./jme3-examples/build/libs/jme3-examples-3.2.0-SNAPSHOT.jar
./jme3-ios/build/libs/jme3-ios-3.2.0-SNAPSHOT.jar
./jme3-jbullet/build/libs/jme3-jbullet-3.2.0-SNAPSHOT.jar
./jme3-jogg/build/libs/jme3-jogg-3.2.0-SNAPSHOT.jar
./jme3-jogl/build/libs/jme3-jogl-3.2.0-SNAPSHOT.jar
./jme3-lwjgl/build/libs/jme3-lwjgl-3.2.0-SNAPSHOT.jar
./jme3-networking/build/libs/jme3-networking-3.2.0-SNAPSHOT.jar
./jme3-niftygui/build/libs/jme3-niftygui-3.2.0-SNAPSHOT.jar
./jme3-plugins/build/libs/jme3-plugins-3.2.0-SNAPSHOT.jar
./jme3-terrain/build/libs/jme3-terrain-3.2.0-SNAPSHOT.jar
./jme3-testdata/build/libs/jme3-testdata-3.2.0-SNAPSHOT.jar

i then launched the 3.1 version of the sdk opened my project and replaced all the 3.1 “libraries” with these 3.2 jars. However i get

Exception in thread "main" java.lang.NoClassDefFoundError: org/lwjgl/opengl/ARBDebugOutputCallback$Handler
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
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:162)
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:125)
at com.jme3.lostVictories.LostVictory.main(LostVictory.java:106)
Caused by: java.lang.ClassNotFoundException: org.lwjgl.opengl.ARBDebugOutputCallback$Handler
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 9 more
  1. Is this the correct way to go about trying 3.2?
  2. Where should i get the correct version of lwjgl.jar to use? the previous version seems to not work…

Ok so forgive my noobness… I figured out that in jme3 sdk a library != jar
When i remove the library it not only removed the jme-lwjgl but also the the dependant jars

So i removed the existing jme-lwjgl and added ./jme3-lwjgl/build/libs/jme3-lwjgl-3.2.0-SNAPSHOT.jar
then re added the dependant jars manualy which were

${file.reference.jme3-lwjgl-3.2.0-SNAPSHOT.jar}:\
${file.reference.lwjgl-platform-2.9.3-natives-linux.jar}:\
${file.reference.lwjgl-platform-2.9.3-natives-osx.jar}:\
${file.reference.lwjgl-platform-2.9.3-natives-windows.jar}:\
${file.reference.jutils-1.0.0.jar}:\
${file.reference.jinput-2.0.5.jar}:\
${file.reference.lwjgl-2.9.3.jar}:\
${file.reference.jinput-platform-2.0.5-natives-linux.jar}:\
${file.reference.jinput-platform-2.0.5-natives-osx.jar}:\
${file.reference.jinput-platform-2.0.5-natives-windows.jar}:\

however now i get

SEVERE: Uncaught exception thrown in Thread[jME3 Main,5,main]
java.lang.IllegalStateException: Function is not supported
at org.lwjgl.BufferChecks.checkFunctionAddress(BufferChecks.java:58)
at org.lwjgl.opengl.GL33.glGetQueryObjectui64(GL33.java:368)
at org.lwjgl.opengl.ARBTimerQuery.glGetQueryObjectui64(ARBTimerQuery.java:44)
at com.jme3.renderer.lwjgl.LwjglGL.glGetQueryObjectui64(LwjglGL.java:458)
at com.jme3.renderer.opengl.GLRenderer.getProfilingTime(GLRenderer.java:2874)
at com.jme3.app.DetailedProfiler.appStep(DetailedProfiler.java:61)
at com.jme3.app.SimpleApplication.update(SimpleApplication.java:225)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(LwjglAbstractDisplay.java:151)
at com.jme3.system.lwjgl.LwjglDisplay.runLoop(LwjglDisplay.java:197)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:232)
at java.lang.Thread.run(Thread.java:745)

maybe i need to use a different version of the dependant jar?

instead of doing this do that:
in the jmonkeyengine folder in command line type
gradlew install

then use bootmonkey:

And set the version to 3.2.
then open the generated project with an ide that supports gradle (or use gradle command line to launch the project).

2 Likes

thanks for your response
i applogise for my noobness
i think i followed your instruction correctly… but i get

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not resolve all dependencies for configuration ‘:compile’.

Could not find org.jmonkeyengine:jme3-core:3.2.
Searched in the following locations:
https://jcenter.bintray.com/org/jmonkeyengine/jme3-core/3.2/jme3-core-3.2.pom
https://jcenter.bintray.com/org/jmonkeyengine/jme3-core/3.2/jme3-core-3.2.jar
Required by:
:MyGame:unspecified
Could not find org.jmonkeyengine:jme3-desktop:3.2.
Searched in the following locations:
https://jcenter.bintray.com/org/jmonkeyengine/jme3-desktop/3.2/jme3-desktop-3.2.pom
https://jcenter.bintray.com/org/jmonkeyengine/jme3-desktop/3.2/jme3-desktop-3.2.jar
Required by:
:MyGame:unspecified
Could not find org.jmonkeyengine:jme3-lwjgl:3.2.
Searched in the following locations:
https://jcenter.bintray.com/org/jmonkeyengine/jme3-lwjgl/3.2/jme3-lwjgl-3.2.pom
https://jcenter.bintray.com/org/jmonkeyengine/jme3-lwjgl/3.2/jme3-lwjgl-3.2.jar
Required by:
:MyGame:unspecified

I did do a ./gradlew install in the jmonkeyengine master branch which completed succesfully… Do you think i should use
Full Version: 3.2-6195
POM Version: 3.2.0-SNAPSHOT

instead of just 3.2? in bootmonkey

That’s what you should us.

There is never a such thing as “3.2” naked like that.

HI Thanks for your response again … I have made some progress but im still not there yet…
I created the project…
Then copied my game source into it… and then built it…
Then Imported it from intelliJ ide
now im getting

starting client:d993932f-a185-4a6f-8d86-4ef6e2c5ff95
Mar 22, 2017 1:36:45 PM com.jme3.system.JmeDesktopSystem initialize
INFO: Running on jMonkeyEngine 3.2-6195
  • Branch: master

  • Git Hash: a64175c

  • Build Date: 2017-03-21

    Exception in thread “jME3 Main” java.lang.UnsatisfiedLinkError:
    org.lwjgl.DefaultSysImplementation.getPointerSize()I
    at org.lwjgl.DefaultSysImplementation.getPointerSize(Native Method)
    at org.lwjgl.Sys.(Sys.java:118)
    at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:210)
    at java.lang.Thread.run(Thread.java:745)

Process finished with exit code 0

I have noticed some .dylib in the project root… i tried to include these by adding
-Djava.library.path=./
and as the absolute path
-Djava.library.path=/Users/dharshanar/development/profile/profileGames/TestGame
but i get the same error

i think bootmonkey placed libbulletjem.dylib liblwjgl.gylib, libopenal.dylib in the project root. But i think i either need more or im not referencing them correctly

i may be gettign further
i download native libs from

http://repo1.maven.org/maven2/org/lwjgl/lwjgl/lwjgl-platform/2.9.3/

but now im getting

com.jme3.asset.AssetLoadException: Error occured while loading asset "Interface/Fonts/Default.png (Flipped)" using AWTLoader

i might post that in a separate thread… just because it might be unrelated… this issue.

Or just take the New sdk and have a solid and working Ide :wink: just not so fancy and hipsterish

yea i am using it… Just wanted to use the new profiler… to try and improve performance. So thought id give master a go!

No, the NEW sdk: Release jMonkeyEngine SDK 3.2.0 Preview! · jMonkeyEngine/sdk · GitHub

1 Like

oh wow did’nt realise there was a sdk available… But alas profiling doesn’t work…

The game seems to run fine but when i turn on profiling i get

SEVERE: Uncaught exception thrown in Thread[jME3 Main,5,main]
java.lang.IllegalStateException: Function is not supported
at org.lwjgl.BufferChecks.checkFunctionAddress(BufferChecks.java:58)
at org.lwjgl.opengl.GL33.glGetQueryObjectui64(GL33.java:368)
at org.lwjgl.opengl.ARBTimerQuery.glGetQueryObjectui64(ARBTimerQuery.java:44)
at com.jme3.renderer.lwjgl.LwjglGL.glGetQueryObjectui64(LwjglGL.java:458)
at com.jme3.renderer.opengl.GLRenderer.getProfilingTime(GLRenderer.java:2874)
at com.jme3.app.DetailedProfiler.appStep(DetailedProfiler.java:61)
at com.jme3.app.SimpleApplication.update(SimpleApplication.java:225)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(LwjglAbstractDisplay.java:151)
at com.jme3.system.lwjgl.LwjglDisplay.runLoop(LwjglDisplay.java:197)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:232)
at java.lang.Thread.run(Thread.java:745)

Well there was no post on the hub about it, maybe we should do that. However it was actually only done because some users were wanting that but it’s really alpha…

@nehon Is the profiler guy, but to me it looks like your Hardware A) does not support openGL3.3 or B) For some reason does not support the way the profiler tries to profile (even though it should support it)

oh crap… I got a hello world example running using the above bootmonkey approach (no SDK) usining intelliJ…
I get the same error when trying to use the profiler

java.lang.IllegalStateException: Function is not supported
at org.lwjgl.BufferChecks.checkFunctionAddress(BufferChecks.java:58)

this might be the issue

Mar 23, 2017 11:36:38 AM com.jme3.renderer.opengl.GLRenderer loadCapabilitiesCommon
INFO: OpenGL Renderer Information

  • Vendor: Intel Inc.
  • Renderer: Intel Iris Pro OpenGL Engine
  • OpenGL Version: 2.1 INTEL-10.6.33
  • GLSL Version: 1.20
  • Profile: Compatibility

so nothing to do with the sdk
i am running on a mac running older Yosemite… I have a windows 10 machine at home… ill try it there

and voolaa!!! its working with a newer version of opengl
Its funny but the performance seems to be much better in 3.2

2 Likes

Over 3.0 or 3.1?

3.1 and 3.2 should both be faster than 3.0. I don’t remember if we did anything in 3.2 that should make significant improvements over 3.1, though.

You have to switch to core profile to get a newer OpenGL version on your Mac.

@Vortex thanks for your response… Could you please elaborate on how i can do “switch to core profile” . I had assumed i would just upgrade my mac os.
What is a core profile? is that a mac thing or jme thing?
I you could perhaps point me to some docs or search terms… Ill be happy to do some research and learn about it

It is an OpenGL thing.
https://www.khronos.org/opengl/wiki/Core_And_Compatibility_in_Contexts

MacOS is always a bit strict/strange when it comes to the gl implementation. As far as i know all other OS allow you to create the best available core profile, but on osx you have to request a specific version.

@dharshanar :
What @zzuegg says is correct. The link explains it all.

The OpenGL context is created in the rendering backend of jME. Which rendering backend are you using?

Can you try to select OpenGL 3 in the AppSettings? Hopefully it selects core profile then.