diff options
Diffstat (limited to 'src/debug.h')
| -rw-r--r-- | src/debug.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/debug.h b/src/debug.h new file mode 100644 index 0000000..7b00453 --- /dev/null +++ b/src/debug.h @@ -0,0 +1,35 @@ +#ifndef PW_DEBUG_H +#define PW_DEBUG_H + +#include <SDL3/SDL_render.h> + +struct pw_debug { + SDL_Texture *font; + struct { + uint64_t clock; + uint64_t count; + double sample; + } fps; +}; + +/** + * Initializes debug state. + */ +struct pw_debug *pw_debug_init(SDL_Renderer *renderer); + +/** + * Frees debug state. + */ +void pw_debug_free(struct pw_debug *debug); + +/** + * Iterates a new frame and updates debug information. + */ +bool pw_debug_iterate(struct pw_debug *debug); + +/** + * Prints debug information to screen. + */ +bool pw_debug_render(struct pw_debug *debug); + +#endif |
