Fixed bug 3945 - Add eglCreatePbufferSurface function
authorSam Lantinga <slouken@libsdl.org>
Sun, 03 Dec 2017 20:25:55 -0800
changeset 117183006dd42e4db
parent 11716 93edd752e966
child 11719 a4477243eb20
Fixed bug 3945 - Add eglCreatePbufferSurface function

tomwardio

Proposed patch loads eglCreatePbufferSurface in same manner as other 1.1 functors. This allows custom video drivers to create pbuffer surfaces.
src/video/SDL_egl.c
src/video/SDL_egl_c.h
     1.1 --- a/src/video/SDL_egl.c	Tue Nov 28 18:31:18 2017 -0800
     1.2 +++ b/src/video/SDL_egl.c	Sun Dec 03 20:25:55 2017 -0800
     1.3 @@ -261,7 +261,7 @@
     1.4  #endif
     1.5  
     1.6      if (_this->egl_data) {
     1.7 -        return SDL_SetError("OpenGL ES context already created");
     1.8 +        return SDL_SetError("EGL context already created");
     1.9      }
    1.10  
    1.11      _this->egl_data = (struct SDL_EGL_VideoData *) SDL_calloc(1, sizeof(SDL_EGL_VideoData));
    1.12 @@ -375,6 +375,7 @@
    1.13      LOAD_FUNC(eglGetConfigAttrib);
    1.14      LOAD_FUNC(eglCreateContext);
    1.15      LOAD_FUNC(eglDestroyContext);
    1.16 +    LOAD_FUNC(eglCreatePBufferSurface);
    1.17      LOAD_FUNC(eglCreateWindowSurface);
    1.18      LOAD_FUNC(eglDestroySurface);
    1.19      LOAD_FUNC(eglMakeCurrent);
     2.1 --- a/src/video/SDL_egl_c.h	Tue Nov 28 18:31:18 2017 -0800
     2.2 +++ b/src/video/SDL_egl_c.h	Sun Dec 03 20:25:55 2017 -0800
     2.3 @@ -62,6 +62,9 @@
     2.4      
     2.5      EGLBoolean(EGLAPIENTRY *eglDestroyContext) (EGLDisplay dpy, EGLContext ctx);
     2.6      
     2.7 +    EGLSurface(EGLAPIENTRY *eglCreatePBufferSurface)(EGLDisplay dpy, EGLConfig config,
     2.8 +                                                     EGLint const* attrib_list);
     2.9 +
    2.10      EGLSurface(EGLAPIENTRY *eglCreateWindowSurface) (EGLDisplay dpy,
    2.11                                           EGLConfig config,
    2.12                                           NativeWindowType window,