fix for nvidia optimus systems defaulting to integrated graphics devices.
authorTerri00 <thrustmediaproductions@gmail.com>
Thu, 28 Mar 2019 14:52:36 +0000 (14:52 +0000)
committerTerri00 <thrustmediaproductions@gmail.com>
Thu, 28 Mar 2019 14:52:36 +0000 (14:52 +0000)
MCDV/main.cpp

index 1a747be08105b602a144743317a145800b69e614..66583ee0ecca2aae4f726a1ccac9b3a0b3aee65f 100644 (file)
@@ -786,4 +786,17 @@ int main(int argc, const char** argv) {
 
        return 1;
 }
-#endif
\ No newline at end of file
+#endif
+
+/* 
+
+NVIDIA optimus systems will default to intel integrated graphics chips.
+These chips cause fatal memory issues when using opengl3.3 (even though they claim to generate correct contexts)
+
+This export gets picked up by NVIDIA drivers (v 302+).
+It will force usage of the dedicated video device in the machine, which likely has full coverage of 3.3
+
+*/
+extern "C" {
+       _declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
+}