diff options
author | Rob Clark <robdclark@gmail.com> | 2017-03-13 11:03:06 -0400 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2017-03-13 11:47:23 -0400 |
commit | db8c6fc0f625e3a3d36731363276c459661d4149 (patch) | |
tree | f324d2ee2daa154102e3902e931219db18627653 | |
parent | 98f6dc3d75338b234c4f049eb2f29b6dffac109a (diff) |
fix compile break with old EGL headers
We would fall-back to eglGetDisplay() if EGL_EXT_platform_base is not
supported, but that still required at least compiling against recent EGL
headers.
-rw-r--r-- | common.h | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -32,6 +32,23 @@ #include <gbm.h> #include <drm_fourcc.h> +#ifndef EGL_KHR_platform_gbm +#define EGL_KHR_platform_gbm 1 +#define EGL_PLATFORM_GBM_KHR 0x31D7 +#endif /* EGL_KHR_platform_gbm */ + +#ifndef EGL_EXT_platform_base +#define EGL_EXT_platform_base 1 +typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETPLATFORMDISPLAYEXTPROC) (EGLenum platform, void *native_display, const EGLint *attrib_list); +typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC) (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLint *attrib_list); +typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMPIXMAPSURFACEEXTPROC) (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLint *attrib_list); +#ifdef EGL_EGLEXT_PROTOTYPES +EGLAPI EGLDisplay EGLAPIENTRY eglGetPlatformDisplayEXT (EGLenum platform, void *native_display, const EGLint *attrib_list); +EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformWindowSurfaceEXT (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLint *attrib_list); +EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurfaceEXT (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLint *attrib_list); +#endif +#endif /* EGL_EXT_platform_base */ + struct gbm { struct gbm_device *dev; struct gbm_surface *surface; |