Added support for AMD PowerXpress override.

Generalized _GLFW_USE_OPTIMUS_HPG to _GLFW_USE_HYBRID_HPG to reflect the
change.

Fixes #520.
This commit is contained in:
Camilla Berglund
2015-05-29 13:08:12 +02:00
parent 0fa909a889
commit 6d5753c548
5 changed files with 23 additions and 14 deletions
+2 -2
View File
@@ -57,8 +57,8 @@
// Define this to 1 if building as a shared library / dynamic library / DLL
#cmakedefine _GLFW_BUILD_DLL
// Define this to 1 to force use of high-performance GPU on Optimus systems
#cmakedefine _GLFW_USE_OPTIMUS_HPG
// Define this to 1 to force use of high-performance GPU on hybrid systems
#cmakedefine _GLFW_USE_HYBRID_HPG
// Define this to 1 if the XInput X11 extension is available
#cmakedefine _GLFW_HAS_XINPUT
+11 -4
View File
@@ -31,14 +31,21 @@
#include <malloc.h>
#if defined(_GLFW_USE_OPTIMUS_HPG)
#if defined(_GLFW_USE_HYBRID_HPG) || defined(_GLFW_USE_OPTIMUS_HPG)
// Applications exporting this symbol with this value will be automatically
// directed to the high-performance GPU on Nvidia Optimus systems
// directed to the high-performance GPU on Nvidia Optimus systems with
// up-to-date drivers
//
__declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
__declspec(dllexport) DWORD NvOptimusEnablement = 1;
#endif // _GLFW_USE_OPTIMUS_HPG
// Applications exporting this symbol with this value will be automatically
// directed to the high-performance GPU on AMD PowerXpress systems with
// up-to-date drivers
//
__declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
#endif // _GLFW_USE_HYBRID_HPG
#if defined(_GLFW_BUILD_DLL)