diff options
Diffstat (limited to 'editor/editor_resource_preview.h')
-rw-r--r-- | editor/editor_resource_preview.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/editor/editor_resource_preview.h b/editor/editor_resource_preview.h index ea16c8fde0..9d1f269661 100644 --- a/editor/editor_resource_preview.h +++ b/editor/editor_resource_preview.h @@ -81,6 +81,11 @@ class EditorResourcePreview : public Node { SafeFlag exit; SafeFlag exited; + // when running from GLES, we want to run the previews + // in the main thread using an update, rather than create + // a separate thread + bool _mainthread_only = false; + struct Item { Ref<Texture2D> preview; Ref<Texture2D> small_preview; @@ -98,6 +103,7 @@ class EditorResourcePreview : public Node { static void _thread_func(void *ud); void _thread(); + void _iterate(); Vector<Ref<EditorResourcePreviewGenerator>> preview_generators; @@ -119,6 +125,9 @@ public: void start(); void stop(); + // for single threaded mode + void update(); + EditorResourcePreview(); ~EditorResourcePreview(); }; |