4
votes

I've been following the setup tutorial found at: libGDX setup tutorial. I'm not sure what's going on here. I can finally get the project to deploy in the emulator, however, the desktop version is not quite working. I've grabbed a copy of both gdx-backend-jogl.jar as well as the native jogl and it still seems to give the same error.

I've i have viewed the following thread and thought i could just copy the jogl jar files from the libgdx nightly latest folder into the libs folder within the my-gdx-game-desktop project --- but this didn't work: Error when launching Java app on desktop using LibGdx/Eclipse

Does any have any ideas as to how i could fix this?

console dump

Exception in thread "LWJGL Application" com.badlogic.gdx.utils.GdxRuntimeException: OpenGL is not supported by the video driver.
        at com.badlogic.gdx.backends.lwjgl.LwjglGraphics.createDisplayPixelFormat(LwjglGraphics.java:198)
        at com.badlogic.gdx.backends.lwjgl.LwjglGraphics.setupDisplay(LwjglGraphics.java:160)
        at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:139)
        at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:131)
    Caused by: org.lwjgl.LWJGLException: Pixel format not accelerated
        at org.lwjgl.opengl.WindowsPeerInfo.nChoosePixelFormat(Native Method)
        at org.lwjgl.opengl.WindowsPeerInfo.choosePixelFormat(WindowsPeerInfo.java:52)
        at org.lwjgl.opengl.WindowsDisplay.createWindow(WindowsDisplay.java:214)
        at org.lwjgl.opengl.Display.createWindow(Display.java:306)
        at org.lwjgl.opengl.Display.create(Display.java:873)
        at org.lwjgl.opengl.Display.create(Display.java:782)
        at com.badlogic.gdx.backends.lwjgl.LwjglGraphics.createDisplayPixelFormat(LwjglGraphics.java:186)
        ... 3 more
    AL lib: ReleaseALC: 1 device not closed
2
Obvious question given the error, "OpenGL is not supported by the video driver", but do you have OpenGL drivers installed?Rod Hyde

2 Answers

4
votes

You are lacking an OpenGL capable card. Libgdx requires at least OpenGL 1.5 on the desktop (for OpenGL ES 1.x emulation, 2.1 for OpenGL ES 2.0 emulation).

Either install up to date drivers, or if your card does not support OpenGL, get a new card. OpenGL 1.5 is supported by 10 year old graphics cards.

2
votes

Put this code

System.setProperty("org.lwjgl.opengl.Display.allowSoftwareOpenGL", "true");

this will solve your problem..