* Remove android based workaround, it is handled in SDL_EGL_GetProcAddress.
authorBrandon Schaefer <brandon.schaefer@canonical.com>
Tue, 04 Feb 2014 12:28:35 -0800
changeset 8168 76d51b45342e
parent 8167 82ec2a95e664
child 8169 663ba61243ff
* Remove android based workaround, it is handled in SDL_EGL_GetProcAddress.
src/video/mir/SDL_miropengl.c
--- a/src/video/mir/SDL_miropengl.c	Tue Feb 04 11:38:40 2014 -0500
+++ b/src/video/mir/SDL_miropengl.c	Tue Feb 04 12:28:35 2014 -0800
@@ -29,14 +29,8 @@
 
 #include "SDL_miropengl.h"
 
-#include <dlfcn.h>
-
-#define DEFAULT_OGL_ES2 "libGLESv2.so"
-
 #include "SDL_mirdyn.h"
 
-void* MIR_GLHandle = NULL;
-
 void
 MIR_GL_SwapWindow(_THIS, SDL_Window* window)
 {
@@ -83,22 +77,6 @@
 MIR_GL_UnloadLibrary(_THIS)
 {
     SDL_EGL_UnloadLibrary(_this);
-
-    if (MIR_GLHandle) {
-        dlclose(MIR_GLHandle);
-        MIR_GLHandle = NULL;
-    }
-}
-
-void
-Ensure_GL_HandleOpen()
-{
-    if (!MIR_GLHandle) {
-        MIR_GLHandle = dlopen(DEFAULT_OGL_ES2, RTLD_GLOBAL);
-        if (!MIR_GLHandle) {
-            SDL_SetError("Failed to dlopen library.");
-        }
-    }
 }
 
 void*
@@ -106,18 +84,6 @@
 {
     void* proc_addr = SDL_EGL_GetProcAddress(_this, proc);
 
-    /* FIXME when on the phone/tablet eglGetProcAddress returns NULL through libhybris,
-       seems to be a problem in android. Also looks like a problem in the android video driver:
-       src/video/android/SDL_androidgl.c
-
-       Workaround, to just get the address ourself
-    */
-
-    if (!proc_addr) {
-        Ensure_GL_HandleOpen();
-        proc_addr = dlsym(MIR_GLHandle, proc);
-    }
-
     if (!proc_addr) {
         SDL_SetError("Failed to find proc address!");
     }