opengl: compile against iOS OpenGLES implementation

This commit is contained in:
Aman Gupta 2016-10-19 12:07:05 -07:00 committed by wm4
parent 5da510b5fc
commit 4bd3e51fbe
3 changed files with 25 additions and 1 deletions

View File

@ -36,6 +36,9 @@
#include <OpenGL/gl.h>
#include <OpenGL/gl3.h>
#include <OpenGL/glext.h>
#elif HAVE_IOS_GL
#include <OpenGLES/ES2/glext.h>
#include <OpenGLES/ES3/glext.h>
#elif HAVE_ANDROID_GL
#include <GLES3/gl3.h>
#else

View File

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

View File

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