View Full Version : Force choice of card

09-15-2014, 10:23 AM
I have an MSI GE40 20L, which has both Intel HD 4600 and nVidia GTX750M GPUs. The computer saves power (and extends battery-life) by choosing the Intel HD graphics by default, but I would like to force my application to use the nVidia instead. How do I do this?

I'd basically like the application to automatically choose the best GPU available, on any given system configuration. I'm using GLEW to expose function pointers.

Update: I found a way to do this via the nVidia control panel, but is there a way to do it programmatically / automatically?

09-15-2014, 11:09 AM
For the Optimus platform, just add:

extern "C" { _declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001; }
to activate NV graphics card.

09-15-2014, 11:13 AM
Thanks :-)

What does this do when the target system does not have an nVidia card installed? And what do I do to target a system with the same problem, but with Intel HD vs ATI Radeon?

09-15-2014, 12:03 PM
On AMD it is called "AMD Hybrid Graphics". I have no idea how to choose GPU using that technology since I don't have an AMD card. Try to google. Each technology/vendor has its own way for choosing GPUs.

09-15-2014, 12:14 PM

Thank you for all the info... I think I'll simply state in the manual that the user must select the card he / she would prefer to use by means of the vendor-specific control panel. This might be better anyway, as some users might opt to use the lower-end card simply for the power-saving feature.