OpenGL is not supported by the video driver

When I use this code:

import com.badlogic.gdx.backends.lwjgl.LwjglApplication; import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration; public class Main { public static void main(String[] args) { LwjglApplicationConfiguration cfg = new LwjglApplicationConfiguration(); cfg.title = "MtxJungleGameMenu"; cfg.useGL20 = false; cfg.width = 800; cfg.height = 480; new LwjglApplication(new MainStarter(), cfg); } } 

I get an exception like this:

Exception in the LWJGL Application thread com.badlogic.gdx.utils.GdxRuntimeException: com.badlogic.gdx.utils.GdxRuntimeException: OpenGL is not supported by the video driver.

any help?

+7
source share
3 answers

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

The problem is solved in my case .. this will allow libgdx to run as openGL mode in the software.

Your code will look like this.

 import com.badlogic.gdx.backends.lwjgl.LwjglApplication; import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration; public class Main { public static void main(String[] args) { LwjglApplicationConfiguration cfg = new LwjglApplicationConfiguration(); System.setProperty("org.lwjgl.opengl.Display.allowSoftwareOpenGL", "true"); cfg.title = "MtxJungleGameMenu"; cfg.useGL20 = false; cfg.width = 800; cfg.height = 480; new LwjglApplication(new MainStarter(), cfg); } } 
+9
source

You need to update your video drivers.

Mostly display drivers for your PC.

+2
source

I had a problem just like fixing it, downgrading to jdk 8 update 45.

I used win 10 along with the integrated Intel HD 2000 for graphics.

0
source

All Articles