From dd4bd88df247a3fb249f000fb1093b5ef53e1cc0 Mon Sep 17 00:00:00 2001 From: erikwijmans Date: Sat, 26 Jan 2019 07:40:01 -0800 Subject: [PATCH] Switch to using eglGetCurrentDisplay instead of querying for the defualt --- src/MagnumExternal/OpenGL/GL/flextGLPlatform.cpp | 2 +- src/MagnumExternal/OpenGL/GL/flextGLPlatform.cpp.template | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MagnumExternal/OpenGL/GL/flextGLPlatform.cpp b/src/MagnumExternal/OpenGL/GL/flextGLPlatform.cpp index 9e8049bf5..209bc1241 100644 --- a/src/MagnumExternal/OpenGL/GL/flextGLPlatform.cpp +++ b/src/MagnumExternal/OpenGL/GL/flextGLPlatform.cpp @@ -44,7 +44,7 @@ void flextGLInit(Magnum::GL::Context& context) { /* EGL contexts on NVidia 390 drivers don't have correct statically linked GL 1.0 and 1.1 functions (such as glGetString()) and one has to retrieve them explicitly using eglGetProcAddress(). */ - EGLDisplay display = eglGetDisplay(EGL_DEFAULT_DISPLAY); + EGLDisplay display = eglGetCurrentDisplay(); const char* vendor = eglQueryString(display, EGL_VENDOR); if(std::strcmp(vendor, "NVIDIA") == 0 && !context.isDriverWorkaroundDisabled("nv-egl-incorrect-gl11-function-pointers")) { diff --git a/src/MagnumExternal/OpenGL/GL/flextGLPlatform.cpp.template b/src/MagnumExternal/OpenGL/GL/flextGLPlatform.cpp.template index 4a6d904cd..42261143e 100644 --- a/src/MagnumExternal/OpenGL/GL/flextGLPlatform.cpp.template +++ b/src/MagnumExternal/OpenGL/GL/flextGLPlatform.cpp.template @@ -45,7 +45,7 @@ void flextGLInit(Magnum::GL::Context& context) { /* EGL contexts on NVidia 390 drivers don't have correct statically linked GL 1.0 and 1.1 functions (such as glGetString()) and one has to retrieve them explicitly using eglGetProcAddress(). */ - EGLDisplay display = eglGetDisplay(EGL_DEFAULT_DISPLAY); + EGLDisplay display = eglGetCurrentDisplay(); const char* vendor = eglQueryString(display, EGL_VENDOR); if(std::strcmp(vendor, "NVIDIA") == 0 && !context.isDriverWorkaroundDisabled("nv-egl-incorrect-gl11-function-pointers")) { @for category,funcs in functions: