Skip to content

Commit

Permalink
Fixed bug 3945 - Add eglCreatePbufferSurface function
Browse files Browse the repository at this point in the history
tomwardio

Proposed patch loads eglCreatePbufferSurface in same manner as other 1.1 functors. This allows custom video drivers to create pbuffer surfaces.
  • Loading branch information
slouken committed Dec 4, 2017
1 parent 25df5a5 commit e943d1c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/video/SDL_egl.c
Expand Up @@ -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));
Expand Down Expand Up @@ -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);
Expand Down
3 changes: 3 additions & 0 deletions src/video/SDL_egl_c.h
Expand Up @@ -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,
Expand Down

0 comments on commit e943d1c

Please sign in to comment.