src/video/emscripten/SDL_emscriptenopengles.c
changeset 10644 594c17c446f6
parent 9998 f67cf37e9cd4
child 10737 3406a0f8b041
     1.1 --- a/src/video/emscripten/SDL_emscriptenopengles.c	Wed Nov 23 11:49:26 2016 -0500
     1.2 +++ b/src/video/emscripten/SDL_emscriptenopengles.c	Wed Nov 23 17:20:28 2016 -0500
     1.3 @@ -39,11 +39,15 @@
     1.4      if (!_this->egl_data) {
     1.5          return SDL_OutOfMemory();
     1.6      }
     1.7 -    
     1.8 +
     1.9 +    /* Emscripten forces you to manually cast eglGetProcAddress to the real
    1.10 +       function type; grep for "__eglMustCastToProperFunctionPointerType" in
    1.11 +       Emscripten's egl.h for details. */
    1.12 +    _this->egl_data->eglGetProcAddress = (void *(EGLAPIENTRY *)(const char *)) eglGetProcAddress;
    1.13 +
    1.14      LOAD_FUNC(eglGetDisplay);
    1.15      LOAD_FUNC(eglInitialize);
    1.16      LOAD_FUNC(eglTerminate);
    1.17 -    LOAD_FUNC(eglGetProcAddress);
    1.18      LOAD_FUNC(eglChooseConfig);
    1.19      LOAD_FUNC(eglGetConfigAttrib);
    1.20      LOAD_FUNC(eglCreateContext);