bad char
[vg.git] / vg_profiler.h
1 #pragma once
2 #include "vg_platform.h"
3 #include "vg_imgui.h"
4 #define VG_PROFILE_SAMPLE_COUNT 128
5
6 extern int vg_profiler;
7
8 struct vg_profile
9 {
10 const char *name;
11
12 u64 samples[ VG_PROFILE_SAMPLE_COUNT ];
13 u32 buffer_count, buffer_current;
14
15 enum profile_mode
16 {
17 k_profile_mode_frame,
18 k_profile_mode_accum
19 }
20 mode;
21
22 u64 start;
23 };
24
25 void vg_profile_begin( struct vg_profile *profile );
26 void vg_profile_increment( struct vg_profile *profile );
27 void vg_profile_end( struct vg_profile *profile );
28 void vg_profile_drawn( struct vg_profile **profiles, u32 count,
29 f64 budget, ui_rect panel,
30 int dir, i32 normalize );
31 void vg_profiler_init(void);