mln_gfx/rendering_stats.rs
1/// Counters of the rendering backend. The `num_*` and `mem_*` counters of
2/// buffers, textures and frame buffers count the live resources; `total_*`,
3/// `*_updates` and `*_bytes` grow over the context's life.
4#[derive(Clone, Debug, Default, PartialEq)]
5pub struct RenderingStats {
6 /// Frame CPU encoding time (seconds).
7 pub encoding_time: f64,
8 /// Frame CPU rendering time (seconds).
9 pub rendering_time: f64,
10 /// Number of frames rendered.
11 pub num_frames: i32,
12 /// Draw calls executed during the most recent frame.
13 pub num_draw_calls: i32,
14 /// Draw calls executed during all the frames.
15 pub total_draw_calls: i32,
16 /// Textures created.
17 pub num_created_textures: i32,
18 /// Live textures.
19 pub num_active_textures: i32,
20 /// Net texture bindings.
21 pub num_texture_bindings: i32,
22 /// Times a texture was updated.
23 pub num_texture_updates: i32,
24 /// Bytes written in texture updates.
25 pub texture_update_bytes: usize,
26 /// Buffers created.
27 pub total_buffers: usize,
28 /// Backend buffer objects created.
29 pub total_buffer_objs: usize,
30 /// Times a buffer was updated.
31 pub buffer_updates: usize,
32 /// Times a backend buffer object was updated.
33 pub buffer_obj_updates: usize,
34 /// Bytes written in buffer updates.
35 pub buffer_update_bytes: usize,
36 /// Live buffers of every kind.
37 pub num_buffers: i32,
38 /// Live offscreen frame buffers.
39 pub num_frame_buffers: i32,
40 /// Live index buffers.
41 pub num_index_buffers: i32,
42 /// Bytes written in index buffer updates.
43 pub index_update_bytes: usize,
44 /// Live vertex buffers.
45 pub num_vertex_buffers: i32,
46 /// Bytes written in vertex buffer updates.
47 pub vertex_update_bytes: usize,
48 /// Live uniform and storage buffers.
49 pub num_uniform_buffers: i32,
50 /// Times a uniform or storage buffer was updated.
51 pub num_uniform_updates: i32,
52 /// Bytes written in uniform and storage buffer updates.
53 pub uniform_update_bytes: usize,
54 /// Bytes of the live textures.
55 pub mem_textures: i32,
56 /// Bytes of the live buffers of every kind.
57 pub mem_buffers: i32,
58 /// Bytes of the live index buffers.
59 pub mem_index_buffers: i32,
60 /// Bytes of the live vertex buffers.
61 pub mem_vertex_buffers: i32,
62 /// Bytes of the live uniform and storage buffers.
63 pub mem_uniform_buffers: i32,
64 /// Stencil buffer clears.
65 pub stencil_clears: i32,
66 /// Stencil buffer updates.
67 pub stencil_updates: i32,
68}