diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-06-28 21:58:48 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-06-28 21:58:48 +0400 |
commit | c776d5e003a956ddc0e11d36f99b8b242de941b7 (patch) | |
tree | 8044b7cd15e24b14274f06af0477fae134f539c2 /intern | |
parent | 77e0709e48a067b765bd79382e202aa7a781d65a (diff) |
Fix #35904: on Windows force NVidia Optimus, which does automatic graphics
switching between an integrated Intel and a dedicated NVidia card, to use the
dedicated card for Blender.
A more portable and general solution would be nice, but it's all I could find:
http://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf
Diffstat (limited to 'intern')
-rw-r--r-- | intern/ghost/intern/GHOST_WindowWin32.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp index 6d3b34b0785..b0d0b1a5b5d 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.cpp +++ b/intern/ghost/intern/GHOST_WindowWin32.cpp @@ -106,6 +106,11 @@ static int is_crappy_intel_card(void) return is_crappy; } +/* force NVidia Optimus to used dedicated graphics */ +extern "C" { + __declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001; +} + GHOST_WindowWin32::GHOST_WindowWin32( GHOST_SystemWin32 *system, const STR_String& title, |