From 652adcd5bfc569b93d8da3d1539f9a030d065eb7 Mon Sep 17 00:00:00 2001 From: clayjohn Date: Tue, 10 May 2022 10:02:44 -0700 Subject: Basic 3D rendering --- editor/editor_resource_preview.cpp | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) (limited to 'editor/editor_resource_preview.cpp') diff --git a/editor/editor_resource_preview.cpp b/editor/editor_resource_preview.cpp index 6d5b20e591..dffb378408 100644 --- a/editor/editor_resource_preview.cpp +++ b/editor/editor_resource_preview.cpp @@ -430,12 +430,8 @@ void EditorResourcePreview::check_for_invalidation(const String &p_path) { } void EditorResourcePreview::start() { - if (OS::get_singleton()->get_render_main_thread_mode() == OS::RENDER_ANY_THREAD) { - ERR_FAIL_COND_MSG(thread.is_started(), "Thread already started."); - thread.start(_thread_func, this); - } else { - _mainthread_only = true; - } + ERR_FAIL_COND_MSG(thread.is_started(), "Thread already started."); + thread.start(_thread_func, this); } void EditorResourcePreview::stop() { @@ -458,18 +454,3 @@ EditorResourcePreview::EditorResourcePreview() { EditorResourcePreview::~EditorResourcePreview() { stop(); } - -void EditorResourcePreview::update() { - if (!_mainthread_only) { - return; - } - - if (!exit.is_set()) { - // no need to even lock the mutex if the size is zero - // there is no problem if queue.size() is wrong, even if - // there was a race condition. - if (queue.size()) { - _iterate(); - } - } -} -- cgit v1.2.3