ForceDiscreteGPU.cpp 554 B

1234567891011121314151617
  1. // Copyright (c) 2008-2023 the Urho3D project
  2. // License: MIT
  3. // Prefer the high-performance GPU on switchable GPU systems
  4. #ifdef _WIN32
  5. extern "C"
  6. {
  7. // https://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf
  8. __declspec(dllexport) unsigned long NvOptimusEnablement = 1;
  9. // https://community.amd.com/t5/archives-discussions/can-an-opengl-app-default-to-the-discrete-gpu-on-an-enduro/td-p/279440
  10. __declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
  11. }
  12. #endif // def _WIN32