mirror of https://github.com/encounter/SDL.git
Fixed bug 3940 - Add support for EGL_SURFACE_TYPE
tomwardio Add support to be able to set EGL_SURFACE_TYPE bits when creating an EGL config. This is usefule when wanting to create pixel buffer surfaces in custom video drivers.
This commit is contained in:
parent
bf3e363d4b
commit
7334a2a1b5
|
@ -527,6 +527,11 @@ SDL_EGL_ChooseConfig(_THIS)
|
||||||
_this->egl_data->eglBindAPI(EGL_OPENGL_API);
|
_this->egl_data->eglBindAPI(EGL_OPENGL_API);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_this->egl_data->egl_surfacetype) {
|
||||||
|
attribs[i++] = EGL_SURFACE_TYPE;
|
||||||
|
attribs[i++] = _this->egl_data->egl_surfacetype;
|
||||||
|
}
|
||||||
|
|
||||||
attribs[i++] = EGL_NONE;
|
attribs[i++] = EGL_NONE;
|
||||||
|
|
||||||
if (_this->egl_data->eglChooseConfig(_this->egl_data->egl_display,
|
if (_this->egl_data->eglChooseConfig(_this->egl_data->egl_display,
|
||||||
|
|
|
@ -35,6 +35,7 @@ typedef struct SDL_EGL_VideoData
|
||||||
EGLDisplay egl_display;
|
EGLDisplay egl_display;
|
||||||
EGLConfig egl_config;
|
EGLConfig egl_config;
|
||||||
int egl_swapinterval;
|
int egl_swapinterval;
|
||||||
|
int egl_surfacetype;
|
||||||
|
|
||||||
EGLDisplay(EGLAPIENTRY *eglGetDisplay) (NativeDisplayType display);
|
EGLDisplay(EGLAPIENTRY *eglGetDisplay) (NativeDisplayType display);
|
||||||
EGLDisplay(EGLAPIENTRY *eglGetPlatformDisplay) (EGLenum platform,
|
EGLDisplay(EGLAPIENTRY *eglGetPlatformDisplay) (EGLenum platform,
|
||||||
|
|
Loading…
Reference in New Issue