javaopengllibgdxlwjgl

How to find out which graphcs card my libgdx/lwjgl game is running on?


Using an laptop that has multiple graphics cards, I wonder which one is being used by my libGDX / LWJGL game. How can I find out? Are there any built-in functions?

There seem to be some information providing methods in com.badlogic.gdx.Gdx.graphics but so far I only got stuff like the display resolution and GL version etc.


Solution

  • Thanks to Erdal Küçük's comment I found the solution for libGDX:

    import com.badlogic.gdx.graphics.GL20;
    
    Gdx.graphics.getGL20().glGetString(GL20.GL_VENDOR);
    Gdx.graphics.getGL20().glGetString(GL20.GL_RENDERER);
    

    See https://registry.khronos.org/OpenGL-Refpages/gl4/html/glGetString.xhtml