How to force OpenGL use discrete GPU

If your laptop or PC have more than one GPU then sometimes your OpenGL app can choose wrong card.

It is frequent situation on laptops where you have integrated card from Intel and some discrete from nVidia or AMD.

You can create profile for your app to run specific card, or you can force your app to use most powerful GPU, just add this code in some of your module:

// Enable High Performance Graphics while using Integrated Graphics. 
__declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;        // Nvidia 
__declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;  // AMD

You can read about nVidia here, and about AMD here

Did you like the article? Share with friends:
Автор snezhok_13
Writes about gamedev. Graphics programmer on AAA projects.

Leave a Reply

Your email address will not be published. Required fields are marked *