egl: if a surface type isn't defined let's default to EGL_WINDOW_BIT
authorAlan Hourihane <alanh@vmware.com>
Thu, 19 Feb 2009 13:07:10 +0000 (13:07 +0000)
committerAlan Hourihane <alanh@vmware.com>
Thu, 19 Feb 2009 13:09:02 +0000 (13:09 +0000)
src/egl/main/eglconfig.c

index b19988f..f2f3258 100644 (file)
@@ -133,6 +133,9 @@ _eglParseConfigAttribs(_EGLConfig *config, const EGLint *attrib_list)
       config->Attrib[i] = EGL_DONT_CARE;
    }
 
+   /* by default choose windows unless otherwise specified */
+   config->Attrib[EGL_SURFACE_TYPE - FIRST_ATTRIB] = EGL_WINDOW_BIT;
+
    for (i = 0; attrib_list && attrib_list[i] != EGL_NONE; i++) {
       const EGLint attr = attrib_list[i];
       if (attr >= EGL_BUFFER_SIZE &&