From cfb8b43b4a40b1ac33c1c3a5b3482eeb69bc5bf8 Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Tue, 31 Dec 2013 22:59:01 -0600 Subject: [PATCH] [GLExtensions] Don't fail out loading funciton pointers in both ES2 and ES3 modes. --- Source/Core/VideoBackends/OGL/GLExtensions/GLExtensions.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/Core/VideoBackends/OGL/GLExtensions/GLExtensions.cpp b/Source/Core/VideoBackends/OGL/GLExtensions/GLExtensions.cpp index 3f2bbcc474..f21d001123 100644 --- a/Source/Core/VideoBackends/OGL/GLExtensions/GLExtensions.cpp +++ b/Source/Core/VideoBackends/OGL/GLExtensions/GLExtensions.cpp @@ -437,6 +437,7 @@ namespace GLExtensions // Private members and functions void *_dlsym; bool _isES3; + bool _isES; u32 _GLVersion; std::unordered_map _extensionlist; // Forward declared init functions @@ -511,7 +512,7 @@ namespace GLExtensions if (_dlsym) // Just in case dlopen fails *func = dlsym(_dlsym, name.c_str()); #endif - if (*func == NULL && _isES3) + if (*func == NULL && _isES) *func = (void*)0xFFFFFFFF; // Easy to determine invalid function, just so we continue on if (*func == NULL) ERROR_LOG(VIDEO, "Couldn't load function %s", name.c_str()); @@ -533,6 +534,7 @@ namespace GLExtensions _dlsym = dlopen(NULL, RTLD_LAZY); #endif _isES3 = GLInterface->GetMode() == GLInterfaceMode::MODE_OPENGLES3; + _isES = GLInterface->GetMode() == GLInterfaceMode::MODE_OPENGLES3 || GLInterface->GetMode() == GLInterfaceMode::MODE_OPENGLES2; // Grab glGetStringi immediately // We need it to grab the extension list