summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2021-01-31 00:21:36 +0100
committerHugo Locurcio <hugo.locurcio@hugo.pro>2021-01-31 00:21:36 +0100
commit85ed6958360dd231e275cd804db308290fd19fbf (patch)
tree982a296cc28b388bf7fd9b4aed914c47e747b366 /editor/plugins
parent46de553473b4bea49176fb4316176a5662931160 (diff)
Add viewport resolution to the 3D editor's View Information pane
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/node_3d_editor_plugin.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index dcf38e0617..e236192208 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -2493,6 +2493,13 @@ void Node3DEditorViewport::_notification(int p_what) {
text += "Z: " + rtos(current_camera->get_translation().z).pad_decimals(1) + "\n";
text += TTR("Pitch") + ": " + itos(Math::round(current_camera->get_rotation_degrees().x)) + "\n";
text += TTR("Yaw") + ": " + itos(Math::round(current_camera->get_rotation_degrees().y)) + "\n\n";
+
+ text += TTR("Size") +
+ vformat(
+ ": %dx%d (%.1fMP)\n",
+ viewport->get_size().x,
+ viewport->get_size().y,
+ viewport->get_size().x * viewport->get_size().y * 0.000'001);
text += TTR("Objects Drawn") + ": " + itos(viewport->get_render_info(Viewport::RENDER_INFO_OBJECTS_IN_FRAME)) + "\n";
text += TTR("Material Changes") + ": " + itos(viewport->get_render_info(Viewport::RENDER_INFO_MATERIAL_CHANGES_IN_FRAME)) + "\n";
text += TTR("Shader Changes") + ": " + itos(viewport->get_render_info(Viewport::RENDER_INFO_SHADER_CHANGES_IN_FRAME)) + "\n";