From 78507bf22eabe69e2e1eabb0503f4427cc298a92 Mon Sep 17 00:00:00 2001
From: Gijs de Rooy <gijsrooy@hotmail.com>
Date: Mon, 15 Jul 2013 21:47:14 +0200
Subject: [PATCH] Suggest NVIDIA Optimus to use the high-end GPU.

---
 src/Main/main.cxx | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/Main/main.cxx b/src/Main/main.cxx
index ea94dd4cd..77893a013 100644
--- a/src/Main/main.cxx
+++ b/src/Main/main.cxx
@@ -273,6 +273,12 @@ static void ATIScreenSizeHack()
     globals->get_renderer()->addCamera(hackCam, false);
 }
 
+// Propose NVIDIA Optimus to use high-end GPU
+#if defined(SG_WINDOWS)
+extern "C" {
+    _declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
+}
+#endif
 
 static void logToFile()
 {