Suckless OGL 1.0.0
A lean, high-performance C11 PBR Renderer
Loading...
Searching...
No Matches
renderer.h
Go to the documentation of this file.
1#ifndef RENDERER_H
2#define RENDERER_H
3
4#include <stdbool.h>
5#include <stdint.h>
6
7/* Forward declarations — RenderContext holds only pointers. */
8typedef struct Scene Scene;
9typedef struct PostProcess PostProcess;
10typedef struct Camera Camera;
11typedef struct GPUProfiler GPUProfiler;
12typedef struct GPUProfilerUI GPUProfilerUI;
13typedef struct EnvManager EnvManager;
14typedef struct ActionNotifier ActionNotifier;
15typedef struct EffectBenchmark EffectBenchmark;
16
21typedef void (*RenderUIFn)(void* user_data);
22
44
48void renderer_draw_frame(const RenderContext* ctx);
49
50#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:21
void renderer_draw_frame(const RenderContext *ctx)
Orchestrates the entire frame render (scene, postprocess, ui).
Definition renderer.c:26
Manager for action notifications.
Definition action_notifier.h:42
Represents a 3D camera with orientation, movement, and physical properties.
Definition camera.h:41
State for the automated benchmark sweep.
Definition effect_benchmark.h:65
Encapsulates state for environment loading, transitions, and IBL.
Definition env_manager.h:34
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:27
double delta_time
Definition renderer.h:38
Camera * camera
Definition renderer.h:30
GPUProfiler * profiler
Definition renderer.h:31
int height
Definition renderer.h:37
GPUProfilerUI * profiler_ui
Definition renderer.h:32
uint64_t frame_count
Definition renderer.h:39
bool log_gpu_metrics
Definition renderer.h:40
void * render_ui_data
Definition renderer.h:42
Scene * scene
Definition renderer.h:28
int width
Definition renderer.h:36
EffectBenchmark * effect_bench
Definition renderer.h:35
EnvManager * env_mgr
Definition renderer.h:33
RenderUIFn render_ui
Definition renderer.h:41
PostProcess * postprocess
Definition renderer.h:29
ActionNotifier * notifier
Definition renderer.h:34
Encapsulates all 3D scene data, geometry, and rendering state.
Definition scene.h:27