|
|
@ -92,3 +92,24 @@ epoxy_has_egl_extension(EGLDisplay dpy, const char *ext) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return epoxy_extension_in_string(eglQueryString(dpy, EGL_EXTENSIONS), ext) || epoxy_extension_in_string(eglQueryString(NULL, EGL_EXTENSIONS), ext); |
|
|
|
return epoxy_extension_in_string(eglQueryString(dpy, EGL_EXTENSIONS), ext) || epoxy_extension_in_string(eglQueryString(NULL, EGL_EXTENSIONS), ext); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* @brief Checks whether EGL is available. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @return `true` if EGL is available |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
bool |
|
|
|
|
|
|
|
epoxy_has_egl(void) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
#if !PLATFORM_HAS_EGL |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
#else |
|
|
|
|
|
|
|
EGLDisplay* (* pf_eglGetCurrentDisplay) (void); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pf_eglGetCurrentDisplay = epoxy_conservative_egl_dlsym("eglGetCurrentDisplay", false); |
|
|
|
|
|
|
|
if (pf_eglGetCurrentDisplay) |
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
#endif /* PLATFORM_HAS_EGL */ |
|
|
|
|
|
|
|
} |
|
|
|