A overlay window showing the a frame time graph with the current frame time, ~10 seconds of history as well as reference lines for the current avg. and a configurable target frame time. This is considered a debug tool to support in any efforts that are related to understanding current frame times of the games. More specifically this can be used to asses impact of any bemanitools hooking to the game’s main (render) loop.
23 lines
661 B
C
23 lines
661 B
C
#ifndef IMGUI_DEBUG_TIME_HISTORY_H
|
|
#define IMGUI_DEBUG_TIME_HISTORY_H
|
|
|
|
#include <stdint.h>
|
|
|
|
typedef struct imgui_debug_time_history {
|
|
uint32_t size;
|
|
float *time_values_ms;
|
|
uint32_t current_index;
|
|
float min_time_ms;
|
|
float max_time_ms;
|
|
float avg_time_ms;
|
|
} imgui_debug_time_history_t;
|
|
|
|
void imgui_debug_time_history_init(uint32_t size, imgui_debug_time_history_t *history);
|
|
|
|
void imgui_debug_time_history_update(imgui_debug_time_history_t *history, float time_ms);
|
|
|
|
float imgui_debug_time_history_recent_value_get(const imgui_debug_time_history_t *history);
|
|
|
|
void imgui_debug_time_history_free(imgui_debug_time_history_t *history);
|
|
|
|
#endif |