From e943d1ce5a1a40b6eef59ab6f4427ab4ff219f81 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 3 Dec 2017 20:25:55 -0800 Subject: [PATCH] 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 | 3 ++- src/video/SDL_egl_c.h | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/video/SDL_egl.c b/src/video/SDL_egl.c index 3b2305392..e1a1add15 100644 --- a/src/video/SDL_egl.c +++ b/src/video/SDL_egl.c @@ -261,7 +261,7 @@ SDL_EGL_LoadLibrary(_THIS, const char *egl_path, NativeDisplayType native_displa #endif if (_this->egl_data) { - return SDL_SetError("OpenGL ES context already created"); + return SDL_SetError("EGL context already created"); } _this->egl_data = (struct SDL_EGL_VideoData *) SDL_calloc(1, sizeof(SDL_EGL_VideoData)); @@ -375,6 +375,7 @@ SDL_EGL_LoadLibrary(_THIS, const char *egl_path, NativeDisplayType native_displa LOAD_FUNC(eglGetConfigAttrib); LOAD_FUNC(eglCreateContext); LOAD_FUNC(eglDestroyContext); + LOAD_FUNC(eglCreatePBufferSurface); LOAD_FUNC(eglCreateWindowSurface); LOAD_FUNC(eglDestroySurface); LOAD_FUNC(eglMakeCurrent); diff --git a/src/video/SDL_egl_c.h b/src/video/SDL_egl_c.h index 37b9602f1..dc16e00ec 100644 --- a/src/video/SDL_egl_c.h +++ b/src/video/SDL_egl_c.h @@ -62,6 +62,9 @@ typedef struct SDL_EGL_VideoData EGLBoolean(EGLAPIENTRY *eglDestroyContext) (EGLDisplay dpy, EGLContext ctx); + EGLSurface(EGLAPIENTRY *eglCreatePBufferSurface)(EGLDisplay dpy, EGLConfig config, + EGLint const* attrib_list); + EGLSurface(EGLAPIENTRY *eglCreateWindowSurface) (EGLDisplay dpy, EGLConfig config, NativeWindowType window,