summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author David 'Digit' Turner <digit@google.com> 2010-11-05 12:41:51 +0100
committer David 'Digit' Turner <digit@google.com> 2010-11-07 23:36:28 +0100
commitdfd0759ff635c2734104f63518f63efd2345cdc4 (patch)
tree7896f1c6feb74d8e8cf9fe09f06e17f82d55f212
parentdca7b6fbd01afa0fe26925307d2c721439b3b63f (diff)
Refresh EGL header to work with the NDK
This change allows to use this header with the NDK's standalone toolchain. For the record, the NDK toolchain defines __ANDROID__ as a compiler built-in macro, this is however not the case currently for the prebuilt binaries that are being used by the full Android build system, which otherwise defines ANDROID. This change allows the header to be used by all toolchains properly. Note however that we should properly should change our toolchain and sources to provide and rely on __ANDROID__ instead of ANDROID though. Change-Id: Iaa1aa1146985b5f24dcf3a83d9ddb9b4b59dc328
-rw-r--r--opengl/include/EGL/eglplatform.h23
1 files changed, 11 insertions, 12 deletions
diff --git a/opengl/include/EGL/eglplatform.h b/opengl/include/EGL/eglplatform.h
index 25d7697ee3..bfac71bec6 100644
--- a/opengl/include/EGL/eglplatform.h
+++ b/opengl/include/EGL/eglplatform.h
@@ -78,18 +78,7 @@ typedef int EGLNativeDisplayType;
typedef void *EGLNativeWindowType;
typedef void *EGLNativePixmapType;
-#elif defined(__unix__) && !defined(ANDROID)
-
-/* X11 (tentative) */
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-
-typedef Display *EGLNativeDisplayType;
-typedef Pixmap EGLNativePixmapType;
-typedef Window EGLNativeWindowType;
-
-
-#elif defined(ANDROID)
+#elif defined(__ANDROID__) || defined(ANDROID)
#include <android/native_window.h>
@@ -99,6 +88,16 @@ typedef struct ANativeWindow* EGLNativeWindowType;
typedef struct egl_native_pixmap_t* EGLNativePixmapType;
typedef void* EGLNativeDisplayType;
+#elif defined(__unix__)
+
+/* X11 (tentative) */
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+
+typedef Display *EGLNativeDisplayType;
+typedef Pixmap EGLNativePixmapType;
+typedef Window EGLNativeWindowType;
+
#else
#error "Platform not recognized"
#endif