summaryrefslogtreecommitdiff
path: root/main/performance.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'main/performance.cpp')
-rw-r--r--main/performance.cpp40
1 files changed, 39 insertions, 1 deletions
diff --git a/main/performance.cpp b/main/performance.cpp
index 0f3383c4a8..39b42e803c 100644
--- a/main/performance.cpp
+++ b/main/performance.cpp
@@ -57,10 +57,10 @@ void Performance::_bind_methods() {
BIND_ENUM_CONSTANT(RENDER_SHADER_CHANGES_IN_FRAME);
BIND_ENUM_CONSTANT(RENDER_SURFACE_CHANGES_IN_FRAME);
BIND_ENUM_CONSTANT(RENDER_DRAW_CALLS_IN_FRAME);
- BIND_ENUM_CONSTANT(RENDER_USAGE_VIDEO_MEM_TOTAL);
BIND_ENUM_CONSTANT(RENDER_VIDEO_MEM_USED);
BIND_ENUM_CONSTANT(RENDER_TEXTURE_MEM_USED);
BIND_ENUM_CONSTANT(RENDER_VERTEX_MEM_USED);
+ BIND_ENUM_CONSTANT(RENDER_USAGE_VIDEO_MEM_TOTAL);
BIND_ENUM_CONSTANT(PHYSICS_2D_ACTIVE_OBJECTS);
BIND_ENUM_CONSTANT(PHYSICS_2D_COLLISION_PAIRS);
BIND_ENUM_CONSTANT(PHYSICS_2D_ISLAND_COUNT);
@@ -153,6 +153,44 @@ float Performance::get_monitor(Monitor p_monitor) const {
return 0;
}
+Performance::MonitorType Performance::get_monitor_type(Monitor p_monitor) const {
+ ERR_FAIL_INDEX_V(p_monitor, MONITOR_MAX, MONITOR_TYPE_QUANTITY);
+ // ugly
+ static const MonitorType types[MONITOR_MAX] = {
+
+ MONITOR_TYPE_QUANTITY,
+ MONITOR_TYPE_TIME,
+ MONITOR_TYPE_TIME,
+ MONITOR_TYPE_MEMORY,
+ MONITOR_TYPE_MEMORY,
+ MONITOR_TYPE_MEMORY,
+ MONITOR_TYPE_MEMORY,
+ MONITOR_TYPE_MEMORY,
+ MONITOR_TYPE_QUANTITY,
+ MONITOR_TYPE_QUANTITY,
+ MONITOR_TYPE_QUANTITY,
+ MONITOR_TYPE_QUANTITY,
+ MONITOR_TYPE_QUANTITY,
+ MONITOR_TYPE_QUANTITY,
+ MONITOR_TYPE_QUANTITY,
+ MONITOR_TYPE_QUANTITY,
+ MONITOR_TYPE_QUANTITY,
+ MONITOR_TYPE_MEMORY,
+ MONITOR_TYPE_MEMORY,
+ MONITOR_TYPE_MEMORY,
+ MONITOR_TYPE_MEMORY,
+ MONITOR_TYPE_QUANTITY,
+ MONITOR_TYPE_QUANTITY,
+ MONITOR_TYPE_QUANTITY,
+ MONITOR_TYPE_QUANTITY,
+ MONITOR_TYPE_QUANTITY,
+ MONITOR_TYPE_QUANTITY,
+
+ };
+
+ return types[p_monitor];
+}
+
void Performance::set_process_time(float p_pt) {
_process_time = p_pt;