$darkmode
Suckless OGL 1.0.0
A lean, high-performance C11 PBR Renderer
app_input.h
Go to the documentation of this file.
1 
10 #ifndef APP_INPUT_H
11 #define APP_INPUT_H
12 
13 typedef struct App App;
14 typedef struct Camera Camera;
15 #include "gl_common.h"
16 
28 void key_callback(GLFWwindow* window, int key, int scancode, int action,
29  int mods);
30 
37 void mouse_callback(GLFWwindow* window, double xpos, double ypos);
38 
45 void scroll_callback(GLFWwindow* window, double xoffset, double yoffset);
46 
57 void framebuffer_size_callback(GLFWwindow* window, int width, int height);
58 
67 void handle_app_input(App* app, int key, int mods);
68 
69 /* --- Internal Logic Bridge Functions --- */
70 
78 void app_handle_env_input(App* app, int action, int mods, int key);
79 
85 void app_toggle_fullscreen(App* app, GLFWwindow* window);
86 
92 void app_save_png_frame(App* app, const char* filename);
93 
94 #endif /* APP_INPUT_H */
void scroll_callback(GLFWwindow *window, double xoffset, double yoffset)
Primary GLFW scroll callback.
Definition: app_input.c:649
void key_callback(GLFWwindow *window, int key, int scancode, int action, int mods)
Primary GLFW key callback.
Definition: app_input.c:528
void app_toggle_fullscreen(App *app, GLFWwindow *window)
Toggles the application window between Windowed and Fullscreen.
Definition: app_input.c:592
void framebuffer_size_callback(GLFWwindow *window, int width, int height)
Primary GLFW framebuffer size callback.
Definition: app_input.c:29
void handle_app_input(App *app, int key, int mods)
Dispatches application-level logic for key inputs.
Definition: app_input.c:410
void app_handle_env_input(App *app, int action, int mods, int key)
Handles input for cycling environment maps.
Definition: app_input.c:80
void app_save_png_frame(App *app, const char *filename)
Captures the current framebuffer and saves it as a PNG file.
Definition: app_input.c:656
void mouse_callback(GLFWwindow *window, double xpos, double ypos)
Primary GLFW mouse position callback.
Definition: app_input.c:637
Common OpenGL definitions, RAII helpers, and utilities.
The central state container for the entire application.
Definition: app.h:35
Represents a 3D camera with orientation, movement, and physical properties.
Definition: camera.h:40
struct GLFWwindow GLFWwindow
Definition: window.h:4