summaryrefslogtreecommitdiff
path: root/tools/editor/script_editor_debugger.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2015-10-20 19:19:19 -0300
committerJuan Linietsky <reduzio@gmail.com>2015-10-20 19:19:19 -0300
commitb5011d9bf1dea0e16b5b15da82f6110c4055ad09 (patch)
tree02dba35ef82e31a807fbe08887e64ea6fff6c1f3 /tools/editor/script_editor_debugger.cpp
parent2b12a8109dda1f47f9b75a5de91d7d00c1f25869 (diff)
-Fixes on atlas import to save memory if mipmaps are not used
-Make the video memory visible to improve debugging
Diffstat (limited to 'tools/editor/script_editor_debugger.cpp')
-rw-r--r--tools/editor/script_editor_debugger.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/tools/editor/script_editor_debugger.cpp b/tools/editor/script_editor_debugger.cpp
index 2e1fa2814e..084e7a6a1f 100644
--- a/tools/editor/script_editor_debugger.cpp
+++ b/tools/editor/script_editor_debugger.cpp
@@ -1322,6 +1322,38 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor){
}
+ VBoxContainer *vmem_vb = memnew( VBoxContainer );
+ HBoxContainer *vmem_hb = memnew( HBoxContainer );
+ Label *vmlb = memnew(Label("List of Video Memory Usage by Resource: ") );
+ vmlb->set_h_size_flags(SIZE_EXPAND_FILL);
+ vmem_hb->add_child( vmlb );
+ vmem_refresh = memnew( Button );
+ vmem_hb->add_child(vmem_refresh);
+ vmem_vb->add_child(vmem_hb);
+
+ MarginContainer *vmmc = memnew( MarginContainer );
+ vmmc = memnew( MarginContainer );
+ vmem_tree = memnew( Tree );
+ vmem_tree->set_v_size_flags(SIZE_EXPAND_FILL);
+ vmem_tree->set_h_size_flags(SIZE_EXPAND_FILL);
+ vmmc->add_child(vmem_tree);
+ vmmc->set_v_size_flags(SIZE_EXPAND_FILL);
+ vmem_vb->add_child(vmmc);
+
+ vmem_vb->set_name("Video Mem");
+ vmem_tree->set_columns(3);
+ vmem_tree->set_column_titles_visible(true);
+ vmem_tree->set_column_title(0,"Resource Path");
+ vmem_tree->set_column_expand(0,true);
+ vmem_tree->set_column_expand(1,false);
+ vmem_tree->set_column_title(1,"Type");
+ vmem_tree->set_column_min_width(1,150);
+ vmem_tree->set_column_expand(2,false);
+ vmem_tree->set_column_title(2,"Usage");
+ vmem_tree->set_column_min_width(2,150);
+
+ tabs->add_child(vmem_vb);
+
info = memnew( HSplitContainer );
info->set_name("Info");
tabs->add_child(info);