Auto-select the NVIDIA process on dual-video card laptops

Some software that I developed relies heavily on OpenGL, etc. Currently is a 32-bit application (will change to 64-bit in the future) on usually Windows 7 or 10. We have used a variety of laptops with a variety of NVIDIA cards.

On laptops with dual video cards (integrated Intel and NVIDIA), the integrated Intel is usually chosen by the system. In this case, the software requires the use of the “High Performance NVIDIA Processor”. So, I manually select the NVIDIA card for that application in the NVIDIA Control Panel.

I believe that most software automatically chooses the correct video card so one does not have to manually do this within the NVIDIA Control Panel. How is it done so that it automatically selects the NVIDIA processor?

>>I manually select the NVIDIA card for that application in the NVIDIA Control Panel.<<

That would be the recommended way to do this.

You could also export a global DWORD variable with the name “NvOptimusEnablement” but according to multiple forum entries you can find about that, there were issues with that functionality. I don’t know if all of them have been solved in the meantime.

Thank you very much for the reply. I did a search on that and found the following page:
https://docs.nvidia.com/gameworks/content/technologies/desktop/optimus.htm

It does seem to work at least on my laptop with that global variable. I notice that static library bindings may achieve the same thing. Do you know if this is as problematic? Do you know if the application just needs to be bound to once or all of the libraries? It looks like it says just binding, in other words, no function calls. Is that correct?

Nvidia writes and assigns profiles to games and applications. I do not know the process, but I believe that in some cases, Nvidia simply does it via their own initiative. While, I assume that at other times, applications and games must be submitted to have their exe assigned to an official profile in the drivers

Games and applications that do not have an official profile present in Nvidia’s drivers get assigned to a global default profile.

Here’s another link that may or may not be helpful (I’m not a dev)

https://developer.nvidia.com/optimus