-/* See http://www.khronos.org/registry/egl/api/EGL/eglplatform.h *
- * for list and order of default EGL platforms. */
-#if defined (_WIN32) || defined (__VC32__) \
- && !defined (__CYGWIN__) && !defined (__SCITECH_SNAP__) /* Win32 and WinCE */
-# define USE_DEFAULT_PLATFORM USE_PLATFORM_WIN32
-#elif defined (__WINSCW__) || defined (__SYMBIAN32__) /* Symbian */
-# define USE_DEFAULT_PLATFORM USE_PLATFORM_SYMBIAN
-#elif defined (__ANDROID__) || defined (ANDROID)
-# define USE_DEFAULT_PLATFORM USE_PLATFORM_ANDROID
-#elif defined (__unix__) /* X11 (tentative) */
-# define USE_DEFAULT_PLATFORM USE_PLATFORM_X11
+#ifdef EGL_EXT_platform_base
+static EGLDisplay GetDisplayEXT(EGLenum plat, void *dpy, const EGLint *attrs)
+{
+ PFNEGLGETPLATFORMDISPLAYEXTPROC getDisplay =
+ (PFNEGLGETPLATFORMDISPLAYEXTPROC)
+ eglGetProcAddress("eglGetPlatformDisplayEXT");
+
+ assert(getDisplay != NULL);
+ return getDisplay(plat, dpy, attrs);
+}
+
+static EGLSurface CreateWindowSurfaceEXT(EGLDisplay dpy, EGLConfig config,
+ void *window, const EGLint *attrs)
+{
+ PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC createSurface =
+ (PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC)
+ eglGetProcAddress("eglCreatePlatformWindowSurfaceEXT");
+
+ assert(createSurface != NULL);
+ return createSurface(dpy, config, window, attrs);
+}