I successfully have my application running in a Swing window, no issues on Windows. But running on Linux causes some renderer exceptions when the app state is started:
A popup:
Failed to initialize OpenGL context
LWJGLException: Could not find GLX 1.3 config from peer info
And a stack trace:
org.lwjgl.LWJGLException: Could not find GLX 1.3 config from peer info
at org.lwjgl.opengl.LinuxPbufferPeerInfo.nInitHandle(Native Method)
at org.lwjgl.opengl.LinuxPbufferPeerInfo.<init>(LinuxPbufferPeerInfo.java:52)
at org.lwjgl.opengl.LinuxDisplay.createPbuffer(LinuxDisplay.java:1349)
at org.lwjgl.opengl.Pbuffer.createPbuffer(Pbuffer.java:234)
at org.lwjgl.opengl.Pbuffer.<init>(Pbuffer.java:219)
at org.lwjgl.opengl.Pbuffer.<init>(Pbuffer.java:190)
at org.lwjgl.opengl.Pbuffer.<init>(Pbuffer.java:166)
at com.jme3.system.lwjgl.LwjglCanvas.makePbufferAvailable(LwjglCanvas.java:350)
at com.jme3.system.lwjgl.LwjglCanvas.createContext(LwjglCanvas.java:484)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:120)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:221)
at java.base/java.lang.Thread.run(Thread.java:832)
Native method… oof. So here’s that method, which leads me here. I then see: NULL is returned if an undefined GLX attribute is encountered in attrib_list, if screen is invalid, or if dpy does not support the GLX extension.
Debugging C is not high on my skillset… although I may not be the only one with this issue.
None of this appears when running in a regular AWT window. Any apparent solutions?
What version of jme3 are you using, & also the Linux distro & version ?
Edit : it may be a well-known issue for GPU drivers for this particular Linux distro version, since GPU drivers are written in c represented as libc.so shared libraries that may cause invalid gl context if they are not there so 2 options :
I’ve been fiddling with this for a while now and I can’t find anything that works. For now I’m just adding an option in my application to use the standard display engine.
I think it would be safe to assume that the latest version of JME would also use an updated version of its underlying graphics library. It wasn’t exactly critical to the development of the rest of my program to know this.
I’m trying appSettings.setRenderer(AppSettings.LWJGL_OPENGL2) with the same results. Or am I doing this wrong?
Oh… sorry. Here’s my Gradle dependency: implementation "org.jmonkeyengine:jme3-lwjgl:3.4.0-stable" so I’m assuming this means I’ve been on LWJGL v2 already?