From a65903938a261eb1b21e5fa2073fc695d348f305 Mon Sep 17 00:00:00 2001 From: baldurk Date: Tue, 24 Jul 2018 11:43:53 +0100 Subject: [PATCH] Clear GL dispatch table when using EGL on linux too. Closes #1040 * We can't call functions in libGL.so when using GLES, since it might be incompatible. --- renderdoc/driver/gl/egl_hooks.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/renderdoc/driver/gl/egl_hooks.cpp b/renderdoc/driver/gl/egl_hooks.cpp index d97b96e28..8e8ef90bf 100644 --- a/renderdoc/driver/gl/egl_hooks.cpp +++ b/renderdoc/driver/gl/egl_hooks.cpp @@ -537,9 +537,10 @@ static void EGLHooked(void *handle) EGL_NONHOOKED_SYMBOLS(EGL_FETCH) #undef EGL_FETCH -#if ENABLED(RDOC_WIN32) - // On windows we completely erase all GL function pointers. These might point into opengl32.dll - // which is not what we want to call when we're using a libEGL emulator +// on systems where EGL isn't the primary/only way to get GL function pointers, we need to ensure we +// re-fetch all function pointers through eglGetProcAddress and don't try to use any through the +// primary system library (opengl32.dll/libGL.so), since they may not work correctly. +#if DISABLED(RDOC_ANDROID) RDCEraseEl(GL); #endif