Reduce some graphics memory usage by disabling unnecesary modes, closes #12831

This commit is contained in:
Juan Linietsky 2017-12-06 20:47:56 -03:00
parent 42c01ba136
commit b38378dd6c

View file

@ -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);