summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--platform/android/os_android.cpp9
-rw-r--r--platform/haiku/os_haiku.cpp15
-rw-r--r--platform/iphone/os_iphone.cpp11
-rw-r--r--platform/osx/os_osx.mm3
-rw-r--r--platform/uwp/os_uwp.cpp7
-rw-r--r--platform/windows/os_windows.cpp3
-rw-r--r--platform/x11/os_x11.cpp3
7 files changed, 26 insertions, 25 deletions
diff --git a/platform/android/os_android.cpp b/platform/android/os_android.cpp
index 8e050c1d27..abbd9c9aa7 100644
--- a/platform/android/os_android.cpp
+++ b/platform/android/os_android.cpp
@@ -39,7 +39,7 @@
#include "file_access_android.h"
#include "main/main.h"
#include "servers/visual/visual_server_raster.h"
-//#include "servers/visual/visual_server_wrap_mt.h"
+#include "servers/visual/visual_server_wrap_mt.h"
#ifdef ANDROID_NATIVE_ACTIVITY
#include "dir_access_android.h"
@@ -182,11 +182,12 @@ Error OS_Android::initialize(const VideoMode &p_desired, int p_video_driver, int
video_driver_index = p_video_driver;
- visual_server = memnew(VisualServerRaster);
- /* if (get_render_thread_mode() != RENDER_THREAD_UNSAFE) {
+ if (get_render_thread_mode() != RENDER_THREAD_UNSAFE) {
visual_server = memnew(VisualServerWrapMT(visual_server, false));
- };*/
+ } else {
+ visual_server = memnew(VisualServerRaster);
+ }
visual_server->init();
// visual_server->cursor_set_visible(false, 0);
diff --git a/platform/haiku/os_haiku.cpp b/platform/haiku/os_haiku.cpp
index c80365f1f3..a4a32c939c 100644
--- a/platform/haiku/os_haiku.cpp
+++ b/platform/haiku/os_haiku.cpp
@@ -117,16 +117,15 @@ Error OS_Haiku::initialize(const VideoMode &p_desired, int p_video_driver, int p
#endif
- visual_server = memnew(VisualServerRaster());
-
- ERR_FAIL_COND_V(!visual_server, ERR_UNAVAILABLE);
-
- // TODO: enable multithreaded VS
- /*
+ // FIXME: Reimplement threaded rendering? Or remove?
if (get_render_thread_mode() != RENDER_THREAD_UNSAFE) {
- visual_server = memnew(VisualServerWrapMT(visual_server, get_render_thread_mode() == RENDER_SEPARATE_THREAD));
+
+ visual_server = memnew(VisualServerWrapMT(visual_server, false));
+ } else {
+ visual_server = memnew(VisualServerRaster);
}
- */
+
+ ERR_FAIL_COND_V(!visual_server, ERR_UNAVAILABLE);
video_driver_index = p_video_driver;
diff --git a/platform/iphone/os_iphone.cpp b/platform/iphone/os_iphone.cpp
index addef61ec7..d0934d8e9d 100644
--- a/platform/iphone/os_iphone.cpp
+++ b/platform/iphone/os_iphone.cpp
@@ -34,7 +34,7 @@
#include "drivers/gles3/rasterizer_gles3.h"
#include "servers/visual/visual_server_raster.h"
-//#include "servers/visual/visual_server_wrap_mt.h"
+#include "servers/visual/visual_server_wrap_mt.h"
#include "main/main.h"
@@ -107,13 +107,12 @@ Error OSIPhone::initialize(const VideoMode &p_desired, int p_video_driver, int p
RasterizerGLES3::register_config();
RasterizerGLES3::make_current();
- visual_server = memnew(VisualServerRaster());
- /*
- FIXME: Reimplement threaded rendering? Or remove?
+ // FIXME: Reimplement threaded rendering? Or remove?
if (get_render_thread_mode() != RENDER_THREAD_UNSAFE) {
visual_server = memnew(VisualServerWrapMT(visual_server, false));
- };
- */
+ } else {
+ visual_server = memnew(VisualServerRaster);
+ }
visual_server->init();
//visual_server->cursor_set_visible(false, 0);
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm
index b84e22f53c..cbdec92b90 100644
--- a/platform/osx/os_osx.mm
+++ b/platform/osx/os_osx.mm
@@ -1383,10 +1383,11 @@ Error OS_OSX::initialize(const VideoMode &p_desired, int p_video_driver, int p_a
video_driver_index = p_video_driver;
- visual_server = memnew(VisualServerRaster);
if (get_render_thread_mode() != RENDER_THREAD_UNSAFE) {
visual_server = memnew(VisualServerWrapMT(visual_server, get_render_thread_mode() == RENDER_SEPARATE_THREAD));
+ } else {
+ visual_server = memnew(VisualServerRaster);
}
visual_server->init();
diff --git a/platform/uwp/os_uwp.cpp b/platform/uwp/os_uwp.cpp
index 6410378593..5de8f6539f 100644
--- a/platform/uwp/os_uwp.cpp
+++ b/platform/uwp/os_uwp.cpp
@@ -294,14 +294,13 @@ Error OSUWP::initialize(const VideoMode &p_desired, int p_video_driver, int p_au
set_video_mode(vm);
- visual_server = memnew(VisualServerRaster);
// FIXME: Reimplement threaded rendering? Or remove?
- /*
if (get_render_thread_mode() != RENDER_THREAD_UNSAFE) {
- visual_server = memnew(VisualServerWrapMT(visual_server, get_render_thread_mode() == RENDER_SEPARATE_THREAD));
+ visual_server = memnew(VisualServerWrapMT(visual_server, false));
+ } else {
+ visual_server = memnew(VisualServerRaster);
}
- */
visual_server->init();
input = memnew(InputDefault);
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index 3bbffd8fb7..7a543445b6 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -1332,10 +1332,11 @@ Error OS_Windows::initialize(const VideoMode &p_desired, int p_video_driver, int
gl_context->set_use_vsync(video_mode.use_vsync);
#endif
- visual_server = memnew(VisualServerRaster);
if (get_render_thread_mode() != RENDER_THREAD_UNSAFE) {
visual_server = memnew(VisualServerWrapMT(visual_server, get_render_thread_mode() == RENDER_SEPARATE_THREAD));
+ } else {
+ visual_server = memnew(VisualServerRaster);
}
/*
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp
index 88c2c8aec6..4fa34b1f2b 100644
--- a/platform/x11/os_x11.cpp
+++ b/platform/x11/os_x11.cpp
@@ -342,11 +342,12 @@ Error OS_X11::initialize(const VideoMode &p_desired, int p_video_driver, int p_a
context_gl->set_use_vsync(current_videomode.use_vsync);
#endif
- visual_server = memnew(VisualServerRaster);
if (get_render_thread_mode() != RENDER_THREAD_UNSAFE) {
visual_server = memnew(VisualServerWrapMT(visual_server, get_render_thread_mode() == RENDER_SEPARATE_THREAD));
+ } else {
+ visual_server = memnew(VisualServerRaster);
}
if (current_videomode.maximized) {
current_videomode.maximized = false;