OpenGL is not supported by the video driver

前端 未结 3 1331
伪装坚强ぢ
伪装坚强ぢ 2020-12-20 17:10

When I use this code:

import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration;

public          


        
相关标签:
3条回答
  • 2020-12-20 17:30

    You need to update your video drivers.

    Basically the display drivers for your P.C

    0 讨论(0)
  • 2020-12-20 17:35

    i had a problem just like it and fixed it by downgrading to jdk 8 update 45.

    i was using win 10 along with the integrated Intel HD 2000 for graphics .

    0 讨论(0)
  • 2020-12-20 17:45

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

    Problem solved in my case.. this will allow libgdx to run as software openGL mode.

    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);
       }
    }
    
    0 讨论(0)
提交回复
热议问题