diff options
author | Brian Paul <[email protected]> | 2005-05-16 02:15:42 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2005-05-16 02:15:42 +0000 |
commit | 51ac95ba8945711cf65e94a2deba6c896dea5f0e (patch) | |
tree | 6a8c4cdd2d3e37f89c21e98d51ddd104c3af0867 /src/egl/main/egldriver.c | |
parent | 6493bd07a7a766552c754920190972c91f5c336c (diff) |
added boolean extension flags to _EGLDriver
Diffstat (limited to 'src/egl/main/egldriver.c')
-rw-r--r-- | src/egl/main/egldriver.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/egl/main/egldriver.c b/src/egl/main/egldriver.c index e2120e383a8..8cad3d895ec 100644 --- a/src/egl/main/egldriver.c +++ b/src/egl/main/egldriver.c @@ -197,6 +197,24 @@ _eglInitDriverFallbacks(_EGLDriver *drv) } +/** + * Examine the individual extension enable/disable flags and recompute + * the driver's Extensions string. + */ +static void +UpdateExtensionsString(_EGLDriver *drv) +{ + drv->Extensions[0] = 0; + + if (drv->MESA_screen_surface) + strcat(drv->Extensions, "EGL_MESA_screen_surface"); + if (drv->MESA_copy_context) + strcat(drv->Extensions, "EGL_MESA_copy_context"); + assert(strlen(drv->Extensions) < MAX_EXTENSIONS_LEN); +} + + + const char * _eglQueryString(_EGLDriver *drv, EGLDisplay dpy, EGLint name) { @@ -208,7 +226,8 @@ _eglQueryString(_EGLDriver *drv, EGLDisplay dpy, EGLint name) case EGL_VERSION: return "1.0"; case EGL_EXTENSIONS: - return ""; + UpdateExtensionsString(drv); + return drv->Extensions; default: _eglError(EGL_BAD_PARAMETER, "eglQueryString"); return NULL; |