Suckless OGL 1.0.0
A lean, high-performance C11 PBR Renderer
Loading...
Searching...
No Matches
app.h
Go to the documentation of this file.
1#ifndef APP_H
2#define APP_H
3
4#include "action_notifier.h" // IWYU pragma: export
5#include "app_ui.h" // IWYU pragma: export
6#include "app_window.h" // IWYU pragma: export
7#include "effect_benchmark.h" // IWYU pragma: export
8#include "gl_common.h" // IWYU pragma: export
9#include <cglm/cglm.h> // IWYU pragma: export
10
11/* --- Opaque sub-struct forward declarations --- */
12typedef struct AppProfiling AppProfiling;
13typedef struct AppInput AppInput;
14typedef struct PostProcess PostProcess;
15typedef struct Scene Scene;
16typedef struct EnvManager EnvManager;
17typedef struct AsyncLoader AsyncLoader;
19
24typedef struct App {
25 /* --- Pointers and Dynamic Objects --- */
30 double delta_time;
31 uint64_t frame_count;
34 /* --- Sub-Modules (Opaque, Heap-Allocated) --- */
39 /* --- App State Flags and Values --- */
40 const char* title;
41 int width;
42 int height;
47 /* --- Global GPU Resources --- */
48 GLuint lum_ssbo[2];
50 /* --- Global Configuration Uniforms --- */
51 float u_metallic;
53 float u_ao;
54 float u_exposure;
60} App;
61
62/* --- Core Control Flow --- */
63
67int app_init(App* app, int width, int height, const char* title);
68
72void app_cleanup(App* app);
73
77void app_run(App* app);
78
82void app_update(App* app);
83
85
86#endif /* APP_H */
Temporary on-screen notification system for user actions.
@ TRACY_SCREENSHOT_WIDTH
Definition app.h:84
@ TRACY_SCREENSHOT_HEIGHT
Definition app.h:84
void app_run(App *app)
Enters the main application rendering and event loop.
Definition app.c:218
void app_cleanup(App *app)
Safely releases all GPU and CPU resources held by the application.
Definition app.c:125
int app_init(App *app, int width, int height, const char *title)
Fully initializes the application state, window, and OpenGL context.
Definition app.c:78
struct AsyncCoordinator AsyncCoordinator
Definition app.h:18
void app_update(App *app)
One-frame logic update (physics, timers, camera).
Definition app.c:347
UI rendering module for the application.
Automated A/B GPU cost measurement for individual postprocess effects.
Common OpenGL definitions, RAII helpers, and utilities.
Manager for action notifications.
Definition action_notifier.h:42
Camera, gamepad, key-bindings, and input smoothing grouped together.
Definition app_input_state.h:23
Profiling, metrics, and performance monitoring grouped together.
Definition app_profiling.h:25
Definition app_ui.h:41
Groups GLFW window handle and all window/resize state.
Definition app_window.h:15
The central state container for the entire application.
Definition app.h:24
float u_roughness
Definition app.h:52
AppUIOverlay overlay
Definition app.h:37
int width
Definition app.h:41
double last_frame_time
Definition app.h:29
GLuint lum_ssbo[2]
Definition app.h:48
EffectBenchmark effect_bench
Definition app.h:45
int height
Definition app.h:42
PostProcess * postprocess
Definition app.h:27
float u_metallic
Definition app.h:51
Scene * scene
Definition app.h:26
AppProfiling * profiling
Definition app.h:35
float u_ao
Definition app.h:53
float * lum_histogram_buffer
Definition app.h:32
double delta_time
Definition app.h:30
AppWindow win
Definition app.h:28
const char * title
Definition app.h:40
uint64_t frame_count
Definition app.h:31
float u_exposure
Definition app.h:54
EnvManager * env_mgr
Definition app.h:43
AppInput * input
Definition app.h:36
AsyncLoader * async_loader
Definition app.h:56
ActionNotifier notifier
Definition app.h:44
AsyncCoordinator * async_coord
Definition app.h:58
Definition async_loader.c:14
State for the automated benchmark sweep.
Definition effect_benchmark.h:65
Encapsulates state for environment loading, transitions, and IBL.
Definition env_manager.h:34
Main pipeline state for post-processing.
Definition postprocess_internal.h:46
Encapsulates all 3D scene data, geometry, and rendering state.
Definition scene.h:27