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
This commit is contained in:
David 'Digit' Turner 2010-11-05 12:41:51 +01:00
parent dca7b6fbd0
commit dfd0759ff6
1 changed files with 11 additions and 12 deletions

View File

@ -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