* 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 816876d51b45342e
parent 8167 82ec2a95e664
child 8169 663ba61243ff
* Remove android based workaround, it is handled in SDL_EGL_GetProcAddress.
src/video/mir/SDL_miropengl.c
     1.1 --- a/src/video/mir/SDL_miropengl.c	Tue Feb 04 11:38:40 2014 -0500
     1.2 +++ b/src/video/mir/SDL_miropengl.c	Tue Feb 04 12:28:35 2014 -0800
     1.3 @@ -29,14 +29,8 @@
     1.4  
     1.5  #include "SDL_miropengl.h"
     1.6  
     1.7 -#include <dlfcn.h>
     1.8 -
     1.9 -#define DEFAULT_OGL_ES2 "libGLESv2.so"
    1.10 -
    1.11  #include "SDL_mirdyn.h"
    1.12  
    1.13 -void* MIR_GLHandle = NULL;
    1.14 -
    1.15  void
    1.16  MIR_GL_SwapWindow(_THIS, SDL_Window* window)
    1.17  {
    1.18 @@ -83,22 +77,6 @@
    1.19  MIR_GL_UnloadLibrary(_THIS)
    1.20  {
    1.21      SDL_EGL_UnloadLibrary(_this);
    1.22 -
    1.23 -    if (MIR_GLHandle) {
    1.24 -        dlclose(MIR_GLHandle);
    1.25 -        MIR_GLHandle = NULL;
    1.26 -    }
    1.27 -}
    1.28 -
    1.29 -void
    1.30 -Ensure_GL_HandleOpen()
    1.31 -{
    1.32 -    if (!MIR_GLHandle) {
    1.33 -        MIR_GLHandle = dlopen(DEFAULT_OGL_ES2, RTLD_GLOBAL);
    1.34 -        if (!MIR_GLHandle) {
    1.35 -            SDL_SetError("Failed to dlopen library.");
    1.36 -        }
    1.37 -    }
    1.38  }
    1.39  
    1.40  void*
    1.41 @@ -106,18 +84,6 @@
    1.42  {
    1.43      void* proc_addr = SDL_EGL_GetProcAddress(_this, proc);
    1.44  
    1.45 -    /* FIXME when on the phone/tablet eglGetProcAddress returns NULL through libhybris,
    1.46 -       seems to be a problem in android. Also looks like a problem in the android video driver:
    1.47 -       src/video/android/SDL_androidgl.c
    1.48 -
    1.49 -       Workaround, to just get the address ourself
    1.50 -    */
    1.51 -
    1.52 -    if (!proc_addr) {
    1.53 -        Ensure_GL_HandleOpen();
    1.54 -        proc_addr = dlsym(MIR_GLHandle, proc);
    1.55 -    }
    1.56 -
    1.57      if (!proc_addr) {
    1.58          SDL_SetError("Failed to find proc address!");
    1.59      }