Add RENDERING_INFO parameters to GL Compatibility renderer

This also fixes RENDERING_INFO_TOTAL_PRIMITIVES_IN_FRAME for the RD renderers as it was incorrectly reporting vertex/index count at times

This also adds memory tracking to textures and buffers to catch memory leaks.

This also cleans up some memory leaks that the new system caught.
This commit is contained in:
clayjohn 2023-05-26 18:09:39 -07:00 committed by Rémi Verschelde
parent 9c41c4ecb6
commit 36a005fafc
No known key found for this signature in database
GPG key ID: C3336907360768E1
17 changed files with 336 additions and 242 deletions

View file

@ -251,7 +251,7 @@ uint64_t RenderingServerDefault::get_rendering_info(RenderingInfo p_info) {
if (p_info == RENDERING_INFO_TOTAL_OBJECTS_IN_FRAME) {
return RSG::viewport->get_total_objects_drawn();
} else if (p_info == RENDERING_INFO_TOTAL_PRIMITIVES_IN_FRAME) {
return RSG::viewport->get_total_vertices_drawn();
return RSG::viewport->get_total_primitives_drawn();
} else if (p_info == RENDERING_INFO_TOTAL_DRAW_CALLS_IN_FRAME) {
return RSG::viewport->get_total_draw_calls_used();
}