summaryrefslogtreecommitdiff
path: root/platform/iphone/os_iphone.cpp
diff options
context:
space:
mode:
authorSam Green <greensamuelm@gmail.com>2020-02-21 21:42:34 -0800
committerSam Green <greensamuelm@gmail.com>2020-02-21 21:42:34 -0800
commitf40ff128b53caf966f920a9e4e323603e1617168 (patch)
tree01ff46940563bf226d6b8b1d7a331f0fcdacde3d /platform/iphone/os_iphone.cpp
parente03e607230f590d90ad7e455e370dcd982e9cfaa (diff)
Update detect.py
Diffstat (limited to 'platform/iphone/os_iphone.cpp')
-rw-r--r--platform/iphone/os_iphone.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/platform/iphone/os_iphone.cpp b/platform/iphone/os_iphone.cpp
index 0587e734b1..db203ff2b3 100644
--- a/platform/iphone/os_iphone.cpp
+++ b/platform/iphone/os_iphone.cpp
@@ -38,7 +38,7 @@
#if defined(VULKAN_ENABLED)
#include "servers/visual/rasterizer_rd/rasterizer_rd.h"
-#import <QuartzCore/CAMetalLayer.h>
+// #import <QuartzCore/CAMetalLayer.h>
#include <vulkan/vulkan_metal.h>
#endif
@@ -110,6 +110,7 @@ int OSIPhone::get_current_video_driver() const {
}
Error OSIPhone::initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver) {
+ video_driver_index = p_video_driver;
#if defined(OPENGL_ENABLED)
bool gl_initialization_error = false;
@@ -130,15 +131,19 @@ Error OSIPhone::initialize(const VideoMode &p_desired, int p_video_driver, int p
}
#endif
- video_driver_index = p_video_driver;
+#if defined(VULKAN_ENABLED)
+ RasterizerRD::make_current();
+#endif
+
+
visual_server = memnew(VisualServerRaster);
// FIXME: Reimplement threaded rendering
if (get_render_thread_mode() != RENDER_THREAD_UNSAFE) {
visual_server = memnew(VisualServerWrapMT(visual_server, false));
}
-
visual_server->init();
//visual_server->cursor_set_visible(false, 0);
+
#if defined(OPENGL_ENABLED)
// reset this to what it should be, it will have been set to 0 after visual_server->init() is called
RasterizerStorageGLES2::system_fbo = gl_view_base_fb;