Merge pull request #101 from dcower/master

Fix wglGetProcAddress-related crash on 64-bit Windows with NOGDI defined
This commit is contained in:
Nigel Stewart 2016-09-01 20:39:07 +10:00 committed by GitHub
commit 67e980b532
1 changed files with 8 additions and 0 deletions

View File

@ -6,6 +6,14 @@
#elif defined(GLEW_EGL) #elif defined(GLEW_EGL)
# include <GL/eglew.h> # include <GL/eglew.h>
#elif defined(_WIN32) #elif defined(_WIN32)
/*
* If NOGDI is defined, wingdi.h won't be included by windows.h, and thus
* wglGetProcAddress won't be declared. It will instead be implicitly declared,
* potentially incorrectly, which we don't want.
*/
# if defined(NOGDI)
# undef NOGDI
# endif
# include <GL/wglew.h> # include <GL/wglew.h>
#elif !defined(__ANDROID__) && !defined(__native_client__) && !defined(__HAIKU__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX)) #elif !defined(__ANDROID__) && !defined(__native_client__) && !defined(__HAIKU__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX))
# include <GL/glxew.h> # include <GL/glxew.h>