$darkmode
Suckless OGL 1.0.0
A lean, high-performance C11 PBR Renderer
gpu_profiler_ui.h
Go to the documentation of this file.
1 #ifndef GPU_PROFILER_UI_H
2 #define GPU_PROFILER_UI_H
3 
4 #include "gpu_profiler.h"
5 #include "ui.h"
6 #include <stdbool.h>
7 
12 typedef struct {
14  float box_height;
16  float global_alpha;
17  int position;
18  bool visible;
20 
24 void gpu_profiler_ui_init(GPUProfilerUI* profiler_ui);
25 
29 void gpu_profiler_ui_update(GPUProfilerUI* profiler_ui,
30  GPUProfiler* live_profiler, double delta_time,
31  double current_time, bool should_log_metrics);
32 
36 void gpu_profiler_ui_draw(GPUProfilerUI* profiler_ui, UIContext* ctx,
37  int screen_width, int screen_height);
38 
43 
48 
52 void gpu_profiler_ui_cleanup(GPUProfilerUI* profiler_ui);
53 
54 #endif /* GPU_PROFILER_UI_H */
void gpu_profiler_ui_toggle_position(GPUProfilerUI *profiler_ui)
Toggles the timeline position (Top/Bottom).
Definition: gpu_profiler_ui.c:381
void gpu_profiler_ui_toggle_visibility(GPUProfilerUI *profiler_ui)
Toggles the timeline visibility (with animation).
Definition: gpu_profiler_ui.c:372
void gpu_profiler_ui_draw(GPUProfilerUI *profiler_ui, UIContext *ctx, int screen_width, int screen_height)
Renders the GPU timeline using the provided UI context.
Definition: gpu_profiler_ui.c:240
void gpu_profiler_ui_cleanup(GPUProfilerUI *profiler_ui)
Cleans up GPU resources used by the UI.
Definition: gpu_profiler_ui.c:386
void gpu_profiler_ui_update(GPUProfilerUI *profiler_ui, GPUProfiler *live_profiler, double delta_time, double current_time, bool should_log_metrics)
Updates animations and synchronizes data with the live profiler.
Definition: gpu_profiler_ui.c:181
void gpu_profiler_ui_init(GPUProfilerUI *profiler_ui)
Initializes the GPU timeline UI state.
Definition: gpu_profiler_ui.c:172
Manages the visual state and animations for the GPU timeline.
Definition: gpu_profiler_ui.h:12
int position
Definition: gpu_profiler_ui.h:17
float prev_box_height
Definition: gpu_profiler_ui.h:15
float global_alpha
Definition: gpu_profiler_ui.h:16
bool visible
Definition: gpu_profiler_ui.h:18
GPUProfiler display_profiler
Definition: gpu_profiler_ui.h:13
float box_height
Definition: gpu_profiler_ui.h:14
Manages GPU timing using double-buffered queries to avoid stalls.
Definition: gpu_profiler.h:86
Persistent state for the UI system.
Definition: ui.h:49
Minimal immediate-mode User Interface (UI) library.