eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor)
{
if (dpy) {
+ EGLBoolean retVal;
_EGLDisplay *dpyPriv = _eglLookupDisplay(dpy);
if (!dpyPriv) {
return EGL_FALSE;
return EGL_FALSE;
}
/* Initialize the particular driver now */
- return dpyPriv->Driver->API.Initialize(dpyPriv->Driver, dpy,
- major, minor);
+ retVal = dpyPriv->Driver->API.Initialize(dpyPriv->Driver, dpy,
+ major, minor);
+
+ dpyPriv->Driver->APImajor = *major;
+ dpyPriv->Driver->APIminor = *minor;
+ sprintf(dpyPriv->Driver->Version, "%d.%d", *major, *minor);
+
+ return retVal;
}
return EGL_FALSE;
}
#define _EGL_MAX_EXTENSIONS_LEN 1000
-#define _EGL_VERSION_STRING "1.4"
-
#define _EGL_VENDOR_STRING "Mesa Project"
case EGL_VENDOR:
return _EGL_VENDOR_STRING;
case EGL_VERSION:
- return _EGL_VERSION_STRING;
+ return drv->Version;
case EGL_EXTENSIONS:
_eglUpdateExtensionsString(drv);
return drv->Extensions.String;
*/
struct _egl_driver
{
- EGLBoolean Initialized; /* set by driver after initialized */
+ EGLBoolean Initialized; /**< set by driver after initialized */
- void *LibHandle; /* dlopen handle */
+ void *LibHandle; /**< dlopen handle */
_EGLDisplay *Display;
- int ABIversion;
- int APImajor, APIminor; /* returned through eglInitialize */
+ int APImajor, APIminor; /**< as returned by eglInitialize() */
+ char Version[10]; /**< initialized from APImajor/minor */
+
const char *ClientAPIs;
- _EGLAPI API;
+ _EGLAPI API; /**< EGL API dispatch table */
_EGLExtensions Extensions;
};