LWJGL Forum

Programming => OpenGL => Topic started by: nico3000 on May 06, 2012, 13:34:34

Title: Tell LWJGL which GPU to use
Post by: nico3000 on May 06, 2012, 13:34:34
Hi,

ist it possible to force LWJGL to use specific GPU, if you have more than one?

We need support for GL 3.3 functions in a laptop which has an Intel GPU with only GL 3.0, but it has also a more powerful dedicated card with GL 3.3 support (at least I think so). So is it possible to get a list of all availiable GPUs and tell LWJGL which one to use?
Title: Re: Tell LWJGL which GPU to use
Post by: tlf30 on May 06, 2012, 16:38:29
That does not look normal for a laptop to have two diffrent graphic cards ???, use a program like Speccy to get the hardware data for us. The link to Speccy is: http://www.piriform.com/speccy (http://www.piriform.com/speccy)

Title: Re: Tell LWJGL which GPU to use
Post by: abcdef on May 06, 2012, 18:28:10
Some laptops have the standard intel graphics card and also an nivida or ati for advanced graphics stuff so its not something so out of the ordinary. Mainly gaming laptops I think and I think the laptop switches at a hardware level
Title: Re: Tell LWJGL which GPU to use
Post by: nico3000 on May 08, 2012, 09:19:16
For example the HP ProBook 4730s. It has an Intel HD Graphics Chip (capable of OpenGL 3.0.0) and also an AMD Radeon HD 6470M (capable of OpenGL 4.1.0) but LWJGL doesn't choose the Radeon, so I don't get support for OpenGL 3.3.0 (output of GL.glGetString(GL.GL_VENDOR) and GL.glGetString(GL.GL_VERSION) is "Mobile Intel(R) HD Graphics" and "OpenGL 3.0.0"). Is it possibe to use the AMD card?
Title: Re: Tell LWJGL which GPU to use
Post by: abcdef on May 08, 2012, 10:42:24
Don't you need to set the right option in the bios? If anything its got to be hardware controlled which graphics card its going to use. Isn't there a Switchable Graphics option in the BIOS

Have a look here on the problems of using open gl with the HP laptops in dynamic switchable graphics mode

http://h10025.www1.hp.com/ewfrf/wc/document?docname=c02948560&lc=en&cc=us&dlc=en

Title: Re: Tell LWJGL which GPU to use
Post by: axel22 on December 29, 2014, 12:29:35
Not sure if this is correct - seems like the adapter is chosen based on the registry value:

https://github.com/LWJGL/lwjgl/blob/master/src/java/org/lwjgl/opengl/WindowsDisplay.java#L466
Title: Re: Tell LWJGL which GPU to use
Post by: abcdef on December 30, 2014, 09:13:35
LWJGL3 doesn't use this code, try running with LWJGL3?

An alternative way is to try

"Right click on the desktop" and get the "configure switchable graphics", which you do by individual application, either recently run ones show up, or you can browse to associate. And then set to either "Power Saving" (HD4000) or "High Performance" (AMD6470)