[Commits] SDL: Fixed bug 3945 - Add eglCreatePbufferSurface function

libsdl.org revision control commits-owner at libsdl.org
Sun Dec 3 20:26:01 PST 2017


details:   https://hg.libsdl.org/SDL/rev/3006dd42e4db
changeset: 11718:3006dd42e4db
user:      Sam Lantinga <slouken at libsdl.org>
date:      Sun Dec 03 20:25:55 2017 -0800
description:
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.

diffstat:

 src/video/SDL_egl.c   |  3 ++-
 src/video/SDL_egl_c.h |  3 +++
 2 files changed, 5 insertions(+), 1 deletions(-)

diffs (33 lines):

diff -r 93edd752e966 -r 3006dd42e4db src/video/SDL_egl.c
--- a/src/video/SDL_egl.c	Tue Nov 28 18:31:18 2017 -0800
+++ b/src/video/SDL_egl.c	Sun Dec 03 20:25:55 2017 -0800
@@ -261,7 +261,7 @@
 #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 @@
     LOAD_FUNC(eglGetConfigAttrib);
     LOAD_FUNC(eglCreateContext);
     LOAD_FUNC(eglDestroyContext);
+    LOAD_FUNC(eglCreatePBufferSurface);
     LOAD_FUNC(eglCreateWindowSurface);
     LOAD_FUNC(eglDestroySurface);
     LOAD_FUNC(eglMakeCurrent);
diff -r 93edd752e966 -r 3006dd42e4db src/video/SDL_egl_c.h
--- a/src/video/SDL_egl_c.h	Tue Nov 28 18:31:18 2017 -0800
+++ b/src/video/SDL_egl_c.h	Sun Dec 03 20:25:55 2017 -0800
@@ -62,6 +62,9 @@
     
     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,


More information about the commits mailing list