How do i verify if the Desktop/Device can run openGl ES 2.0 ?

How do i verify if the Desktop/Device can run openGl ES 2.0 ?

Hi Guys, im trying to generate an error file if the device cant run in Es2.0 because my textures arent in power of two…

Any ideas?

Heres what i did

 public static void main(String[] args) {
        fixOpenAlIssue();

        LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
        config.title = "Archer 0.6.7 Alpha Version";
        config.width = 800;
        config.height = 600;
        config.useGL20 = true; //this is important
        new LwjglApplication(new MainView(), config);

    }

And then :

public class MainView extends Game {

    @Override
    public void create() {
        GraphicAvaiability.hasGl2Avaiable();
        setScreen(new MenuView());
    }

And then…

public class GraphicAvaiability {

    public static boolean hasGl2Avaiable() {

        try {
            Sprite sprite = new Sprite(new Texture(Gdx.files.internal("imagens/libGDXBackground.png")));
            sprite.getTexture().dispose();

            return true;
        } catch (Exception ex) {
            FilesManager.logGl20Info(ex.getMessage());
            System.out.println(ex.getMessage());
        }
        return false;
    }
}

So i get a debug file if it fails :stuck_out_tongue: