summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-12-06 20:47:56 -0300
committerJuan Linietsky <reduzio@gmail.com>2017-12-06 20:49:54 -0300
commitb38378dd6c963d71d0c1ad40c53b29588e581757 (patch)
tree6cf0a751a197155ba71240373f8fd60440d8426c
parent42c01ba136640079d9ccc6b2baf06f18e907b12f (diff)
Reduce some graphics memory usage by disabling unnecesary modes, closes #12831
-rw-r--r--editor/editor_node.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 31ed86d05a..71728250a1 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -269,6 +269,7 @@ void EditorNode::_notification(int p_what) {
Engine::get_singleton()->set_editor_hint(true);
+ get_tree()->get_root()->set_usage(Viewport::USAGE_2D_NO_SAMPLING); //reduce memory usage
get_tree()->get_root()->set_disable_3d(true);
get_tree()->get_root()->set_as_audio_listener(false);
get_tree()->get_root()->set_as_audio_listener_2d(false);
@@ -5021,6 +5022,7 @@ EditorNode::EditorNode() {
scene_root_parent->set_v_size_flags(Control::SIZE_EXPAND_FILL);
scene_root = memnew(Viewport);
+ scene_root->set_usage(Viewport::USAGE_2D);
scene_root->set_disable_3d(true);
VisualServer::get_singleton()->viewport_set_hide_scenario(scene_root->get_viewport_rid(), true);