From 4b1f9d6550d2df9bd9737bcb61d77a15894d2419 Mon Sep 17 00:00:00 2001 From: Terri00 Date: Thu, 28 Mar 2019 14:52:36 +0000 Subject: [PATCH] fix for nvidia optimus systems defaulting to integrated graphics devices. --- MCDV/main.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/MCDV/main.cpp b/MCDV/main.cpp index 1a747be..66583ee 100644 --- a/MCDV/main.cpp +++ b/MCDV/main.cpp @@ -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; +} -- 2.25.1