Choose between Intel and NVidia GPU programatically

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Choose between Intel and NVidia GPU programatically

asambol
My laptop has 2 GPUs - Intel and NVidia. Intel has very low performance and poor anti-aliasing support, so I want to render using NVidia GPU. Currently I do that by opening NVidia control panel and setting NVidia GPU as global default.

Is there a way to do that programatically? All games I install automatically know how to use NVidia GPU regardles of default global GPU in NVidia control panel.

I found this topic from 2014, has something changed since then? http://www.java-gaming.org/index.php?topic=32183.0

"From what I know that's impossible. That extension only allows you to handle multiple Nvidia GPUs in the same machine. The choice between the Intel GPU and the Nvidia GPU is done before the application even starts. By the time the OpenGL context has been created it'll be too late. Even worse, the Intel card uses a completely different driver which does not support the Nvidia specific NV_gpu_affinity extension, so it'd be impossible to even confirm that there is an Nvidia GPU from within the program itself without resorting to scanning the file system or some other hack. The selection of the Nvidia GPU has to be done during context creation, which no Java binding supports as far as I know."
Reply | Threaded
Open this post in threaded view
|

Re: Choose between Intel and NVidia GPU programatically

gouessej
Administrator
Use NV GPU affinity but it is currently unsupported by JOGL.
Julien Gouesse | Personal blog | Website