From 6c55d2aad22cd5fc3a7f1499c4cb85779613a394 Mon Sep 17 00:00:00 2001 From: reduz Date: Fri, 2 Jul 2021 20:14:19 -0300 Subject: Fix Render Info * Fixed and redone the process to obtain render information from a viewport * Some stats, such as material changes are too difficult to guess on Vulkan, were removed. * Separated visible and shadow stats, which causes confusion. * Texture, buffer and general video memory can be queried now. * Fixed the performance metrics too. --- servers/rendering/renderer_scene.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'servers/rendering/renderer_scene.h') diff --git a/servers/rendering/renderer_scene.h b/servers/rendering/renderer_scene.h index d2e9f64335..8273e53d46 100644 --- a/servers/rendering/renderer_scene.h +++ b/servers/rendering/renderer_scene.h @@ -201,7 +201,12 @@ public: virtual void sdfgi_set_debug_probe_select(const Vector3 &p_position, const Vector3 &p_dir) = 0; virtual void render_empty_scene(RID p_render_buffers, RID p_scenario, RID p_shadow_atlas) = 0; - virtual void render_camera(RID p_render_buffers, RID p_camera, RID p_scenario, RID p_viewport, Size2 p_viewport_size, float p_lod_threshold, RID p_shadow_atlas, Ref &p_xr_interface) = 0; + + struct RenderInfo { + int info[RS::VIEWPORT_RENDER_INFO_TYPE_MAX][RS::VIEWPORT_RENDER_INFO_MAX] = {}; + }; + + virtual void render_camera(RID p_render_buffers, RID p_camera, RID p_scenario, RID p_viewport, Size2 p_viewport_size, float p_lod_threshold, RID p_shadow_atlas, Ref &p_xr_interface, RenderInfo *r_render_info = nullptr) = 0; virtual void update() = 0; virtual void render_probes() = 0; -- cgit v1.2.3