$darkmode
Suckless OGL 1.0.0
A lean, high-performance C11 PBR Renderer
renderer.h
Go to the documentation of this file.
1 #ifndef RENDERER_H
2 #define RENDERER_H
3 
4 #include <stdint.h>
5 
6 /* Forward declarations — RenderContext holds only pointers. */
7 typedef struct Scene Scene;
8 typedef struct PostProcess PostProcess;
9 typedef struct Camera Camera;
10 typedef struct GPUProfiler GPUProfiler;
11 typedef struct GPUProfilerUI GPUProfilerUI;
12 typedef struct EnvManager EnvManager;
13 typedef struct ActionNotifier ActionNotifier;
14 typedef struct EffectBenchmark EffectBenchmark;
15 
20 typedef void (*RenderUIFn)(void* user_data);
21 
26 typedef struct RenderContext {
35  int width;
36  int height;
37  double delta_time;
38  uint64_t frame_count;
43 
47 void renderer_draw_frame(const RenderContext* ctx);
48 
49 #endif /* RENDERER_H */
void(* RenderUIFn)(void *user_data)
Callback type for rendering the UI overlay. Decouples the renderer from the App struct.
Definition: renderer.h:20
void renderer_draw_frame(const RenderContext *ctx)
Orchestrates the entire frame render (scene, postprocess, ui).
Definition: renderer.c:17
Manager for action notifications.
Definition: action_notifier.h:41
Represents a 3D camera with orientation, movement, and physical properties.
Definition: camera.h:40
State for the automated benchmark sweep.
Definition: effect_benchmark.h:65
Encapsulates state for environment loading, transitions, and IBL.
Definition: env_manager.h:26
Manages the visual state and animations for the GPU timeline.
Definition: gpu_profiler_ui.h:12
Manages GPU timing using double-buffered queries to avoid stalls.
Definition: gpu_profiler.h:86
Main pipeline state for post-processing.
Definition: postprocess_internal.h:46
All state needed by renderer_draw_frame for a single frame. Populated by the caller (App or test harn...
Definition: renderer.h:26
double delta_time
Definition: renderer.h:37
Camera * camera
Definition: renderer.h:29
GPUProfiler * profiler
Definition: renderer.h:30
int height
Definition: renderer.h:36
GPUProfilerUI * profiler_ui
Definition: renderer.h:31
uint64_t frame_count
Definition: renderer.h:38
int log_gpu_metrics
Definition: renderer.h:39
void * render_ui_data
Definition: renderer.h:41
Scene * scene
Definition: renderer.h:27
int width
Definition: renderer.h:35
EffectBenchmark * effect_bench
Definition: renderer.h:34
EnvManager * env_mgr
Definition: renderer.h:32
RenderUIFn render_ui
Definition: renderer.h:40
PostProcess * postprocess
Definition: renderer.h:28
ActionNotifier * notifier
Definition: renderer.h:33
Encapsulates all 3D scene data, geometry, and rendering state.
Definition: scene.h:28