[client/main] Added some code to use dedicated GPU on Windows (thanks to Hopson).
This commit is contained in:
parent
c2e70e28b9
commit
4e9f6500d0
@ -13,6 +13,19 @@
|
||||
*/
|
||||
#include "ClientApplication.hpp"
|
||||
|
||||
// Use discrete GPU by default in Windows
|
||||
// from https://gist.github.com/statico/6809850727c708f08458
|
||||
// Thanks to Hopson for pointing this out
|
||||
#ifdef _WIN32
|
||||
extern "C" {
|
||||
// http://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf
|
||||
__declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
|
||||
|
||||
// https://gpuopen.com/amdpowerxpressrequesthighperformance/
|
||||
__declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
ClientApplication app(argc, argv);
|
||||
app.run();
|
||||
|
Loading…
x
Reference in New Issue
Block a user