summaryrefslogtreecommitdiff
path: root/src/dispatch_common.h
diff options
context:
space:
mode:
authorRyan Houdek <Sonicadvance1@gmail.com>2014-05-04 19:05:34 -0500
committerRyan Houdek <Sonicadvance1@gmail.com>2014-05-28 22:18:56 -0500
commitc791612b0a468b5c572352e66eeaeb1d8c8947e5 (patch)
tree349b44042356b98ab8a404c60a48da3a98c44be8 /src/dispatch_common.h
parent7422de5b4be7b19d789136b3bb5f932de42db27c (diff)
downloadlibepoxy-c791612b0a468b5c572352e66eeaeb1d8c8947e5.tar.gz
Adds support for Android.
This has been tested with both OpenGL and OpenGL ES on Android. We can't use dlsym on Android to get all the function pointers since Android's libGLES* libraries are just shim libraries that pass everything through to the real vendor specific libraries. Due to this we must grab function pointers entirely through eglGetProcAddress instead of dlsym.
Diffstat (limited to 'src/dispatch_common.h')
-rw-r--r--src/dispatch_common.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/dispatch_common.h b/src/dispatch_common.h
index 28bf533..a4eb0f0 100644
--- a/src/dispatch_common.h
+++ b/src/dispatch_common.h
@@ -33,6 +33,11 @@
#define PLATFORM_HAS_GLX 1
#define PLATFORM_HAS_WGL 0
#define EPOXY_IMPORTEXPORT
+#elif defined(ANDROID)
+#define PLATFORM_HAS_EGL 1
+#define PLATFORM_HAS_GLX 0
+#define PLATFORM_HAS_WGL 0
+#define EPOXY_IMPORTEXPORT
#else
#define PLATFORM_HAS_EGL 1
#define PLATFORM_HAS_GLX 1