This patch is looking good, and the only change I'd suggest is using "#ifndef EGL_OPENGL_ES3_BIT_KHR" and "#endif" around the define for EGL_OPENGL_ES3_BIT_KHR since some compilers might fail due to a possible redefine.