diff --git a/include/GL/eglew.h b/include/GL/eglew.h index ffa640a..ead8663 100644 --- a/include/GL/eglew.h +++ b/include/GL/eglew.h @@ -974,6 +974,21 @@ typedef EGLBoolean ( * PFNEGLQUERYDISPLAYATTRIBEXTPROC) (EGLDisplay dpy, EGLint #endif /* EGL_EXT_device_query_name */ +/* ------------------------- EGL_EXT_display_alloc ------------------------- */ + +#ifndef EGL_EXT_display_alloc +#define EGL_EXT_display_alloc 1 + +#define EGL_ALLOC_NEW_DISPLAY_EXT 0x3379 + +typedef EGLBoolean ( * PFNEGLDESTROYDISPLAYEXTPROC) (EGLDisplay dpy); + +#define eglDestroyDisplayEXT EGLEW_GET_FUN(__eglewDestroyDisplayEXT) + +#define EGLEW_EXT_display_alloc EGLEW_GET_VAR(__EGLEW_EXT_display_alloc) + +#endif /* EGL_EXT_display_alloc */ + /* ------------------------ EGL_EXT_explicit_device ------------------------ */ #ifndef EGL_EXT_explicit_device @@ -2984,6 +2999,8 @@ EGLEW_FUN_EXPORT PFNEGLQUERYDEVICEATTRIBEXTPROC __eglewQueryDeviceAttribEXT; EGLEW_FUN_EXPORT PFNEGLQUERYDEVICESTRINGEXTPROC __eglewQueryDeviceStringEXT; EGLEW_FUN_EXPORT PFNEGLQUERYDISPLAYATTRIBEXTPROC __eglewQueryDisplayAttribEXT; +EGLEW_FUN_EXPORT PFNEGLDESTROYDISPLAYEXTPROC __eglewDestroyDisplayEXT; + EGLEW_FUN_EXPORT PFNEGLQUERYDMABUFFORMATSEXTPROC __eglewQueryDmaBufFormatsEXT; EGLEW_FUN_EXPORT PFNEGLQUERYDMABUFMODIFIERSEXTPROC __eglewQueryDmaBufModifiersEXT; @@ -3154,6 +3171,7 @@ EGLEW_VAR_EXPORT GLboolean __EGLEW_EXT_device_openwf; EGLEW_VAR_EXPORT GLboolean __EGLEW_EXT_device_persistent_id; EGLEW_VAR_EXPORT GLboolean __EGLEW_EXT_device_query; EGLEW_VAR_EXPORT GLboolean __EGLEW_EXT_device_query_name; +EGLEW_VAR_EXPORT GLboolean __EGLEW_EXT_display_alloc; EGLEW_VAR_EXPORT GLboolean __EGLEW_EXT_explicit_device; EGLEW_VAR_EXPORT GLboolean __EGLEW_EXT_gl_colorspace_bt2020_hlg; EGLEW_VAR_EXPORT GLboolean __EGLEW_EXT_gl_colorspace_bt2020_linear; diff --git a/src/glew.c b/src/glew.c index 14cac78..026aa67 100644 --- a/src/glew.c +++ b/src/glew.c @@ -19753,6 +19753,8 @@ PFNEGLQUERYDEVICEATTRIBEXTPROC __eglewQueryDeviceAttribEXT = NULL; PFNEGLQUERYDEVICESTRINGEXTPROC __eglewQueryDeviceStringEXT = NULL; PFNEGLQUERYDISPLAYATTRIBEXTPROC __eglewQueryDisplayAttribEXT = NULL; +PFNEGLDESTROYDISPLAYEXTPROC __eglewDestroyDisplayEXT = NULL; + PFNEGLQUERYDMABUFFORMATSEXTPROC __eglewQueryDmaBufFormatsEXT = NULL; PFNEGLQUERYDMABUFMODIFIERSEXTPROC __eglewQueryDmaBufModifiersEXT = NULL; @@ -19923,6 +19925,7 @@ GLboolean __EGLEW_EXT_device_openwf = GL_FALSE; GLboolean __EGLEW_EXT_device_persistent_id = GL_FALSE; GLboolean __EGLEW_EXT_device_query = GL_FALSE; GLboolean __EGLEW_EXT_device_query_name = GL_FALSE; +GLboolean __EGLEW_EXT_display_alloc = GL_FALSE; GLboolean __EGLEW_EXT_explicit_device = GL_FALSE; GLboolean __EGLEW_EXT_gl_colorspace_bt2020_hlg = GL_FALSE; GLboolean __EGLEW_EXT_gl_colorspace_bt2020_linear = GL_FALSE; @@ -20336,6 +20339,19 @@ static GLboolean _glewInit_EGL_EXT_device_query () #endif /* EGL_EXT_device_query */ +#ifdef EGL_EXT_display_alloc + +static GLboolean _glewInit_EGL_EXT_display_alloc () +{ + GLboolean r = GL_FALSE; + + r = ((eglDestroyDisplayEXT = (PFNEGLDESTROYDISPLAYEXTPROC)glewGetProcAddress((const GLubyte*)"eglDestroyDisplayEXT")) == NULL) || r; + + return r; +} + +#endif /* EGL_EXT_display_alloc */ + #ifdef EGL_EXT_image_dma_buf_import_modifiers static GLboolean _glewInit_EGL_EXT_image_dma_buf_import_modifiers () @@ -21097,6 +21113,10 @@ GLenum eglewInit (EGLDisplay display) #ifdef EGL_EXT_device_query_name EGLEW_EXT_device_query_name = _glewSearchExtension("EGL_EXT_device_query_name", extStart, extEnd); #endif /* EGL_EXT_device_query_name */ +#ifdef EGL_EXT_display_alloc + EGLEW_EXT_display_alloc = _glewSearchExtension("EGL_EXT_display_alloc", extStart, extEnd); + if (glewExperimental || EGLEW_EXT_display_alloc) EGLEW_EXT_display_alloc = !_glewInit_EGL_EXT_display_alloc(); +#endif /* EGL_EXT_display_alloc */ #ifdef EGL_EXT_explicit_device EGLEW_EXT_explicit_device = _glewSearchExtension("EGL_EXT_explicit_device", extStart, extEnd); #endif /* EGL_EXT_explicit_device */ @@ -31797,6 +31817,13 @@ GLboolean eglewIsSupported (const char* name) continue; } #endif +#ifdef EGL_EXT_display_alloc + if (_glewStrSame3(&pos, &len, (const GLubyte*)"display_alloc", 13)) + { + ret = EGLEW_EXT_display_alloc; + continue; + } +#endif #ifdef EGL_EXT_explicit_device if (_glewStrSame3(&pos, &len, (const GLubyte*)"explicit_device", 15)) { diff --git a/src/glewinfo.c b/src/glewinfo.c index 582f33e..6c648a4 100644 --- a/src/glewinfo.c +++ b/src/glewinfo.c @@ -12358,6 +12358,17 @@ static void _glewInfo_EGL_EXT_device_query_name (void) #endif /* EGL_EXT_device_query_name */ +#ifdef EGL_EXT_display_alloc + +static void _glewInfo_EGL_EXT_display_alloc (void) +{ + GLboolean fi = glewPrintExt("EGL_EXT_display_alloc", EGLEW_EXT_display_alloc, eglewIsSupported("EGL_EXT_display_alloc"), eglewGetExtension("EGL_EXT_display_alloc")); + + glewInfoFunc(fi, "eglDestroyDisplayEXT", eglDestroyDisplayEXT == NULL); +} + +#endif /* EGL_EXT_display_alloc */ + #ifdef EGL_EXT_explicit_device static void _glewInfo_EGL_EXT_explicit_device (void) @@ -18555,6 +18566,9 @@ static void eglewInfo () #ifdef EGL_EXT_device_query_name _glewInfo_EGL_EXT_device_query_name(); #endif /* EGL_EXT_device_query_name */ +#ifdef EGL_EXT_display_alloc + _glewInfo_EGL_EXT_display_alloc(); +#endif /* EGL_EXT_display_alloc */ #ifdef EGL_EXT_explicit_device _glewInfo_EGL_EXT_explicit_device(); #endif /* EGL_EXT_explicit_device */