Struct in ldk_renderer.h

LDKRendererFrameDomainStats

typedef struct LDKRendererFrameDomainStats{
  u32 rendered_view_count;
  u32 opaque_mesh_render_count;
  u32 overlay_mesh_render_count;
  u32 batch_count;
  u32 instanced_batch_count;
  u32 instanced_instance_count;
  u32 max_batch_size;
  u32 draw_call_count;
  u32 opaque_mesh_draw_call_count;
  u32 overlay_mesh_draw_call_count;
  u32 shadow_draw_call_count;
  u32 line_draw_call_count;
  u32 grid_draw_call_count;
  u32 skybox_draw_call_count;
  u32 ui_draw_call_count;
  u32 present_draw_call_count;
}LDKRendererFrameDomainStats;
Struct in ldk_renderer.h

LDKRendererFrameStats

typedef struct LDKRendererFrameStats{
  double cpu_time_ms;
  LDKRHIFrameStats rhi;
  u32 rendered_view_count;
  u32 mesh_submit_count;
  u32 opaque_mesh_render_count;
  u32 overlay_mesh_render_count;
  u32 batch_count;
  u32 instanced_batch_count;
  u32 instanced_instance_count;
  u32 max_batch_size;
  u32 draw_call_count;
  u32 opaque_mesh_draw_call_count;
  u32 overlay_mesh_draw_call_count;
  u32 shadow_draw_call_count;
  u32 line_draw_call_count;
  u32 grid_draw_call_count;
  u32 skybox_draw_call_count;
  u32 ui_draw_call_count;
  u32 present_draw_call_count;
  LDKRendererFrameDomainStats game;
  LDKRendererFrameDomainStats non_game;
}LDKRendererFrameStats;
Function in ldk_renderer.h

ldk_renderer_last_frame_stats_get

Return renderer statistics for the last fully completed frame. CPU time measures the elapsed CPU-side duration of ldk_renderer_render_frame(), including time spent inside RHI calls. It is not GPU time and may include waits performed by the backend. Rendered work is also split by destination. game contains work rendered into the configured game view (and direct game presentation/UI when present_game is enabled). non_game contains all other views and host UI. A VIEW_ALL submission is counted independently in each destination where it is actually rendered. mesh_submit_count remains global because a single submission may participate in both domains.

LDK_API LDKRendererFrameStats ldk_renderer_last_frame_stats_get(LDKRenderer const *renderer);

Parameters

LDKRenderer const *renderer
Renderer instance.

Returns

A snapshot of the previous completed renderer frame. A zeroed snapshot is returned for a null renderer or before the first frame.