Suckless OGL 1.0.0
A lean, high-performance C11 PBR Renderer
Loading...
Searching...
No Matches
app_input.h
Go to the documentation of this file.
1
14#ifndef APP_INPUT_H
15#define APP_INPUT_H
16
17#include "gl_common.h"
18#include <stdbool.h>
19
20/* Forward declarations — avoids pulling heavy headers into app_input.h */
21typedef struct App App;
22typedef struct Camera Camera;
23typedef struct Scene Scene;
24typedef struct PostProcess PostProcess;
25typedef struct EnvManager EnvManager;
26typedef struct ActionNotifier ActionNotifier;
27typedef struct AppUIOverlay AppUIOverlay;
28typedef struct GPUProfilerUI GPUProfilerUI;
29typedef struct EffectBenchmark EffectBenchmark;
30typedef struct PerfModeContext PerfModeContext;
31typedef struct GamepadState GamepadState;
32typedef struct AsyncLoader AsyncLoader;
33
71
83void key_callback(GLFWwindow* window, int key, int scancode, int action,
84 int mods);
85
92void mouse_callback(GLFWwindow* window, double xpos, double ypos);
93
100void scroll_callback(GLFWwindow* window, double xoffset, double yoffset);
101
112void framebuffer_size_callback(GLFWwindow* window, int width, int height);
113
122void handle_app_input(AppInputContext* ctx, int key, int mods);
123
124/* --- Internal Logic Bridge Functions --- */
125
133void app_handle_env_input(AppInputContext* ctx, int action, int mods, int key);
134
141
147void app_save_png_frame(AppInputContext* ctx, const char* filename);
148
157
158#endif /* APP_INPUT_H */
void scroll_callback(GLFWwindow *window, double xoffset, double yoffset)
Primary GLFW scroll callback.
Definition app_input.c:896
void handle_app_input(AppInputContext *ctx, int key, int mods)
Dispatches application-level logic for key inputs.
Definition app_input.c:660
void key_callback(GLFWwindow *window, int key, int scancode, int action, int mods)
Primary GLFW key callback.
Definition app_input.c:771
void app_save_png_frame(AppInputContext *ctx, const char *filename)
Captures the current framebuffer and saves it as a PNG file.
Definition app_input.c:905
void framebuffer_size_callback(GLFWwindow *window, int width, int height)
Primary GLFW framebuffer size callback.
Definition app_input.c:50
AppInputContext app_input_ctx_from_app(App *app)
Constructs an AppInputContext from the full App state.
Definition app.c:383
void app_handle_env_input(AppInputContext *ctx, int action, int mods, int key)
Handles input for cycling environment maps.
Definition app_input.c:104
void app_toggle_fullscreen(AppInputContext *ctx, GLFWwindow *window)
Toggles the application window between Windowed and Fullscreen.
Definition app_input.c:837
void mouse_callback(GLFWwindow *window, double xpos, double ypos)
Primary GLFW mouse position callback.
Definition app_input.c:881
Common OpenGL definitions, RAII helpers, and utilities.
Manager for action notifications.
Definition action_notifier.h:42
Focused context for application-level input handling.
Definition app_input.h:42
int * pending_height
Definition app_input.h:67
bool * perf_mode_active
Definition app_input.h:68
bool * is_fullscreen
Definition app_input.h:60
AsyncLoader * async_loader
Definition app_input.h:54
int * saved_x
Definition app_input.h:61
int * pending_width
Definition app_input.h:66
int * saved_y
Definition app_input.h:62
int * height
Definition app_input.h:58
ActionNotifier * notifier
Definition app_input.h:48
bool * resize_pending
Definition app_input.h:65
int * saved_height
Definition app_input.h:64
GamepadState * gamepad
Definition app_input.h:53
PerfModeContext * perf_context
Definition app_input.h:52
GPUProfilerUI * timeline_ui
Definition app_input.h:50
Camera * camera
Definition app_input.h:44
bool * log_gpu_metrics
Definition app_input.h:69
EnvManager * env_mgr
Definition app_input.h:47
Scene * scene
Definition app_input.h:45
int * width
Definition app_input.h:57
int * saved_width
Definition app_input.h:63
EffectBenchmark * effect_bench
Definition app_input.h:51
PostProcess * postprocess
Definition app_input.h:46
bool * camera_enabled
Definition app_input.h:59
AppUIOverlay * overlay
Definition app_input.h:49
GLFWwindow * window
Definition app_input.h:43
Definition app_ui.h:41
The central state container for the entire application.
Definition app.h:24
Definition async_loader.c:14
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
Definition gamepad_input.h:45
State container for performance mode.
Definition perf_mode.h:53
Main pipeline state for post-processing.
Definition postprocess_internal.h:46
Encapsulates all 3D scene data, geometry, and rendering state.
Definition scene.h:27
struct GLFWwindow GLFWwindow
Definition window.h:4