diff options
Diffstat (limited to 'platform/iphone')
-rw-r--r-- | platform/iphone/app_delegate.h | 4 | ||||
-rw-r--r-- | platform/iphone/display_layer.mm | 2 | ||||
-rw-r--r-- | platform/iphone/display_server_iphone.mm | 14 | ||||
-rw-r--r-- | platform/iphone/platform_config.h | 2 |
4 files changed, 12 insertions, 10 deletions
diff --git a/platform/iphone/app_delegate.h b/platform/iphone/app_delegate.h index d6a2292dd2..76c28b2272 100644 --- a/platform/iphone/app_delegate.h +++ b/platform/iphone/app_delegate.h @@ -32,9 +32,9 @@ @class ViewController; -// FIXME: Add support for both GLES2 and Vulkan when GLES2 is implemented again, +// FIXME: Add support for both OpenGL and Vulkan when OpenGL is implemented again, // so it can't be done with compilation time branching. -//#if defined(OPENGL_ENABLED) +//#if defined(GLES3_ENABLED) //@interface AppDelegate : NSObject <UIApplicationDelegate, GLViewDelegate> { //#endif //#if defined(VULKAN_ENABLED) diff --git a/platform/iphone/display_layer.mm b/platform/iphone/display_layer.mm index b8df81b89a..afe612e1a5 100644 --- a/platform/iphone/display_layer.mm +++ b/platform/iphone/display_layer.mm @@ -89,7 +89,7 @@ // FIXME: Add Vulkan support via MoltenVK. Add fallback code back? // Create GL ES 2 context - if (GLOBAL_GET("rendering/driver/driver_name") == "GLES2") { + if (GLOBAL_GET("rendering/driver/driver_name") == "opengl3") { context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2]; NSLog(@"Setting up an OpenGL ES 2.0 context."); if (!context) { diff --git a/platform/iphone/display_server_iphone.mm b/platform/iphone/display_server_iphone.mm index e18448fb6d..7d13a08d39 100644 --- a/platform/iphone/display_server_iphone.mm +++ b/platform/iphone/display_server_iphone.mm @@ -51,8 +51,8 @@ DisplayServerIPhone *DisplayServerIPhone::get_singleton() { DisplayServerIPhone::DisplayServerIPhone(const String &p_rendering_driver, WindowMode p_mode, DisplayServer::VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i &p_resolution, Error &r_error) { rendering_driver = p_rendering_driver; -#if defined(OPENGL_ENABLED) - // FIXME: Add support for both GLES2 and Vulkan when GLES2 is implemented +#if defined(GLES3_ENABLED) + // FIXME: Add support for both OpenGL and Vulkan when OpenGL is implemented // again, if (rendering_driver == "opengl_es") { @@ -60,9 +60,9 @@ DisplayServerIPhone::DisplayServerIPhone(const String &p_rendering_driver, Windo // FIXME: Add Vulkan support via MoltenVK. Add fallback code back? - if (RasterizerGLES2::is_viable() == OK) { - RasterizerGLES2::register_config(); - RasterizerGLES2::make_current(); + if (RasterizerGLES3::is_viable() == OK) { + RasterizerGLES3::register_config(); + RasterizerGLES3::make_current(); } else { gl_initialization_error = true; } @@ -83,7 +83,7 @@ DisplayServerIPhone::DisplayServerIPhone(const String &p_rendering_driver, Windo // reset this to what it should be, it will have been set to 0 after // rendering_server->init() is called - // RasterizerStorageGLES2::system_fbo = gl_view_base_fb; + // RasterizerStorageGLES3system_fbo = gl_view_base_fb; } #endif @@ -157,7 +157,7 @@ Vector<String> DisplayServerIPhone::get_rendering_drivers_func() { #if defined(VULKAN_ENABLED) drivers.push_back("vulkan"); #endif -#if defined(OPENGL_ENABLED) +#if defined(GLES3_ENABLED) drivers.push_back("opengl_es"); #endif diff --git a/platform/iphone/platform_config.h b/platform/iphone/platform_config.h index 88ad4a3f67..68ef4e31a7 100644 --- a/platform/iphone/platform_config.h +++ b/platform/iphone/platform_config.h @@ -30,6 +30,8 @@ #include <alloca.h> +#define OPENGL_INCLUDE_H <ES3/gl.h> + #define PLATFORM_REFCOUNT #define PTHREAD_RENAME_SELF |