From 4bd3e51fbe61ae83bc9f6674646962d24ea1e075 Mon Sep 17 00:00:00 2001 From: Aman Gupta Date: Wed, 19 Oct 2016 12:07:05 -0700 Subject: opengl: compile against iOS OpenGLES implementation --- video/out/opengl/common.h | 3 +++ video/out/opengl/header_fixes.h | 17 +++++++++++++++++ wscript | 6 +++++- 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/video/out/opengl/common.h b/video/out/opengl/common.h index 5abe839b8d..afb5b61f7e 100644 --- a/video/out/opengl/common.h +++ b/video/out/opengl/common.h @@ -36,6 +36,9 @@ #include #include #include +#elif HAVE_IOS_GL +#include +#include #elif HAVE_ANDROID_GL #include #else diff --git a/video/out/opengl/header_fixes.h b/video/out/opengl/header_fixes.h index 9953f7e497..9a7108dcda 100644 --- a/video/out/opengl/header_fixes.h +++ b/video/out/opengl/header_fixes.h @@ -92,6 +92,23 @@ #define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB #endif +#if HAVE_IOS_GL +#define GL_WRITE_ONLY GL_WRITE_ONLY_OES +#define GL_TEXTURE_1D 0x0DE0 +#define GL_R16 0x822A +#define GL_RG16 0x822C +#define GL_RGB10 0x8052 +#define GL_RGB16 0x8054 +#define GL_RGBA12 0x805A +#define GL_RGBA16 0x805B +#define GL_LUMINANCE8 GL_LUMINANCE8_EXT +#define GL_LUMINANCE8_ALPHA8 GL_LUMINANCE8_ALPHA8_EXT +#define GL_LUMINANCE16 0x8042 +#define GL_LUMINANCE16_ALPHA16 0x8048 +#define GL_TEXTURE_RED_SIZE 0x805C +#define GL_TEXTURE_LUMINANCE_SIZE 0x8060 +#endif + // GL_ARB_timer_query and EXT_disjoint_timer_query #ifndef GL_TIME_ELAPSED // Same as GL_TIME_ELAPSED_EXT diff --git a/wscript b/wscript index 7dea08b8db..b309e32cd3 100644 --- a/wscript +++ b/wscript @@ -811,10 +811,14 @@ video_output_features = [ 'desc': 'Android OpenGL ES support', 'deps': ['android'], 'func': check_statement('GLES3/gl3.h', '(void)GL_RGB32F'), # arbitrary OpenGL ES 3.0 symbol + } , { + 'name': '--ios-gl', + 'desc': 'iOS OpenGL ES support', + 'func': check_statement('OpenGLES/ES3/glext.h', '(void)GL_RGB32F'), # arbitrary OpenGL ES 3.0 symbol } , { 'name': '--any-gl', 'desc': 'Any OpenGL (ES) support', - 'deps_any': ['standard-gl', 'android-gl', 'cocoa'], + 'deps_any': ['standard-gl', 'android-gl', 'ios-gl', 'cocoa'], 'func': check_true } , { 'name': '--plain-gl', -- cgit v1.2.3