summaryrefslogtreecommitdiff
path: root/servers/visual/visual_server_viewport.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'servers/visual/visual_server_viewport.cpp')
-rw-r--r--servers/visual/visual_server_viewport.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/servers/visual/visual_server_viewport.cpp b/servers/visual/visual_server_viewport.cpp
index dd6bc3cf26..a700fcf11b 100644
--- a/servers/visual/visual_server_viewport.cpp
+++ b/servers/visual/visual_server_viewport.cpp
@@ -252,7 +252,9 @@ void VisualServerViewport::draw_viewports() {
// process all our active interfaces
ARVRServer::get_singleton()->_process();
- clear_color = GLOBAL_GET("rendering/environment/default_clear_color");
+ if (Engine::get_singleton()->is_editor_hint()) {
+ clear_color = GLOBAL_GET("rendering/environment/default_clear_color");
+ }
//sort viewports
active_viewports.sort_custom<ViewportSort>();
@@ -660,5 +662,9 @@ bool VisualServerViewport::free(RID p_rid) {
return false;
}
+void VisualServerViewport::set_default_clear_color(const Color &p_color) {
+ clear_color = p_color;
+}
+
VisualServerViewport::VisualServerViewport() {
}