]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - gl_rmain.c
Set NvOptimusEnablement.
[xonotic/darkplaces.git] / gl_rmain.c
index 3d9686e0c7f851f0c5dada0cb014f14c935b7f81..0759f1050216e0f40f0e8b20ff7f8b6160254a2b 100644 (file)
@@ -34,6 +34,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 extern LPDIRECT3DDEVICE9 vid_d3d9dev;
 #endif
 
+#ifdef WIN32
+// Enable NVIDIA High Performance Graphics while using Integrated Graphics.
+extern "C" {
+__declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
+}
+#endif
+
 mempool_t *r_main_mempool;
 rtexturepool_t *r_main_texturepool;