Reduce some graphics memory usage by disabling unnecesary modes, closes #12831
This commit is contained in:
parent
42c01ba136
commit
b38378dd6c
1 changed files with 2 additions and 0 deletions
|
@ -269,6 +269,7 @@ void EditorNode::_notification(int p_what) {
|
||||||
|
|
||||||
Engine::get_singleton()->set_editor_hint(true);
|
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_disable_3d(true);
|
||||||
get_tree()->get_root()->set_as_audio_listener(false);
|
get_tree()->get_root()->set_as_audio_listener(false);
|
||||||
get_tree()->get_root()->set_as_audio_listener_2d(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_parent->set_v_size_flags(Control::SIZE_EXPAND_FILL);
|
||||||
|
|
||||||
scene_root = memnew(Viewport);
|
scene_root = memnew(Viewport);
|
||||||
|
scene_root->set_usage(Viewport::USAGE_2D);
|
||||||
scene_root->set_disable_3d(true);
|
scene_root->set_disable_3d(true);
|
||||||
|
|
||||||
VisualServer::get_singleton()->viewport_set_hide_scenario(scene_root->get_viewport_rid(), true);
|
VisualServer::get_singleton()->viewport_set_hide_scenario(scene_root->get_viewport_rid(), true);
|
||||||
|
|
Loading…
Reference in a new issue