I am currently trying to make jMonkeyEngine3 work on my environment (CentOS 5.6 Linux 32bit via Oracle VM VirtualBox).
I downloaded the jME3 SDK installer for Linux 32bit here: http://hub.jmonkeyengine.org/download/246488/
After installing the SDK, I create a new BasicGame project, and run it. The “Display Settings for jMonkey Engine 3.0” window appears and after clicking the “Continue” button, I get this error message in a pop-up window :
Failed to create display
LWJGLException: Could not choose visual
What could be the cause of this error?
I hope it is not a graphics card driver issue or the VM causing this.
Well this seems awfully like graficard/driver related, as lwjgl is the opengl binding.
As I run jme problemlessy under arch-linux and ubuntu, it works under linux.
-> does glx_gears run on centos for you?
-> what driver is used by glx of xserver?
(Also was CentOs one of the do it yourself linux(like arch= or more like ubuntu, so I know how to formulate further questions.
The VM could be the issue. Definitely try to run glx_gears to see if the VM graphics setup is even exposing open GL properly. I’ve had lots of problems with that in VMs in the past. (And even when working, it’s not great.)
Well you can redirect a real graficcard with some luck then its viable, but else I tent to agree. As long as there is not something like vt-x for the graficcard this will not change.
I’d like to correct an error i’ve made: the environment is CentOS 5.6 Linux 64bit, not 32bit.
I’ve been misleaded because it was automatically identified as “Other Linux 32-bit” when importing the .ova file in Oracle VM VirtualBox.
So I tried again with the jME3 SDK installer for Linux 64bit and got sadly the same error :S
-> does glx_gears run on centos for you?
glxgears seems to work properly, showing 3 gears. The rotating animation of the gears is not really fluid though.
-> what driver is used by glx of xserver?
I'm quite new to this 3D/OpenGL/GLX/xserver stuff, so I'm not quite sure but I think it is the Mesa driver.
Well you can redirect a real graficcard with some luck then its viable, but else I tent to agree. As long as there is not something like vt-x for the graficcard this will not change.
I'm not sure if this info will help, but the VM has an option for acceleration "VT-x/AMD-V" which is activated by default.
run:
Apr 16, 2014 11:59:06 AM com.jme3.system.JmeDesktopSystem initialize
INFO: Running on jMonkeyEngine 3.0.5
Apr 16, 2014 11:59:07 AM com.jme3.app.Application handleError
SEVERE: Failed to create display
org.lwjgl.LWJGLException: Could not choose visual
at org.lwjgl.opengl.LinuxDisplayPeerInfo.initDefaultPeerInfo(Native Method)
at org.lwjgl.opengl.LinuxDisplayPeerInfo.<init>(LinuxDisplayPeerInfo.java:61)
at org.lwjgl.opengl.LinuxDisplay.createPeerInfo(LinuxDisplay.java:788)
at org.lwjgl.opengl.DrawableGL.setPixelFormat(DrawableGL.java:61)
at org.lwjgl.opengl.Display.create(Display.java:846)
at org.lwjgl.opengl.Display.create(Display.java:757)
at com.jme3.system.lwjgl.LwjglDisplay.createContext(LwjglDisplay.java:140)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:113)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:207)
at java.lang.Thread.run(Thread.java:662)
Apr 16, 2014 11:59:07 AM com.jme3.system.lwjgl.LwjglAbstractDisplay run
SEVERE: Display initialization failed. Cannot continue.
Hope it will help to solve this issue or at least give a clear reason of why it does not work in my environment.
I know this is old, but I really want to share this:
I had mesa drivers with bumblebee (which I hear is now outdated!? I’m not sure, might be rumours), and I had a similar error.
What fixed it for me was getting the xorg-xrandr package.