$darkmode
#include "app_input.h"#include "app_ui.h"#include "camera.h"#include "camera_input.h"#include "env_manager.h"#include "gamepad_input.h"#include "gpu_profiler_ui.h"#include "log.h"#include "perf_mode.h"#include "postprocess_input.h"#include "profiler.h"#include "scene.h"#include "scene_simulation.h"#include "scene_visuals.h"#include "utils.h"#include <math.h>#include <stb_image_write.h>#include <stdlib.h>#include <string.h>Enumerations | |
| enum | { PBR_DEBUG_MODE_COUNT = 10 } |
| enum | { NOTIF_BUF_SIZE = 128 } |
Functions | |
| void | framebuffer_size_callback (GLFWwindow *window, int width, int height) |
| Primary GLFW framebuffer size callback. More... | |
| static void | handle_pbr_debug_mode (AppInputContext *ctx) |
| static void | handle_aa_mode_input (AppInputContext *ctx) |
| void | app_handle_env_input (AppInputContext *ctx, int action, int mods, int key) |
| Handles input for cycling environment maps. More... | |
| static void | handle_overlay_input (AppInputContext *ctx) |
| static void | handle_subdiv_input (AppInputContext *ctx, int key) |
| static void | handle_camera_toggle (AppInputContext *ctx) |
| static void | handle_f3_input (AppInputContext *ctx, int mods) |
| static void | handle_f9_input (AppInputContext *ctx) |
| static void | app_toggle_help (AppInputContext *ctx) |
| static void | app_close_help (AppInputContext *ctx) |
| static bool | handle_f_key_input (AppInputContext *ctx, int key, int mods) |
| static void | handle_y_key_input (AppInputContext *ctx, int mods) |
| static void | handle_system_key_input (AppInputContext *ctx, int key, int mods) |
| static bool | handle_g_key_input (AppInputContext *ctx, int mods) |
| static void | handle_sim_speed_input (AppInputContext *ctx, bool speed_up) |
| static void | handle_gravity_input (AppInputContext *ctx, bool increase) |
| static void | handle_sim_or_gravity_input (AppInputContext *ctx, int mods, bool increase) |
| static void | handle_o_key_input (AppInputContext *ctx) |
| static void | handle_neon_cycle (AppInputContext *ctx) |
| static void | handle_neon_adjust (AppInputContext *ctx, int increase) |
| static int | handle_neon_input (AppInputContext *ctx, int key, int mods) |
| void | handle_app_input (AppInputContext *ctx, int key, int mods) |
| Dispatches application-level logic for key inputs. More... | |
| void | key_callback (GLFWwindow *window, int key, int scancode, int action, int mods) |
| Primary GLFW key callback. More... | |
| void | app_toggle_fullscreen (AppInputContext *ctx, GLFWwindow *window) |
| Toggles the application window between Windowed and Fullscreen. More... | |
| void | mouse_callback (GLFWwindow *window, double xpos, double ypos) |
| Primary GLFW mouse position callback. More... | |
| void | scroll_callback (GLFWwindow *window, double xoffset, double yoffset) |
| Primary GLFW scroll callback. More... | |
| void | app_save_png_frame (AppInputContext *ctx, const char *filename) |
| Captures the current framebuffer and saves it as a PNG file. More... | |
Variables | |
| static const float | SIM_SPEED_FACTOR = 2.0F |
| static const float | SIM_SPEED_MAX = 64.0F |
| static const float | SIM_SPEED_MIN = 0.125F |
| static const float | SIM_SPEED_INV_FACTOR = 0.5F |
| static const float | GRAVITY_FACTOR = 2.0F |
| static const float | GRAVITY_MAX = 128.0F |
| static const float | GRAVITY_MIN_POSITIVE = 0.125F |
| static const float | GRAVITY_INV_FACTOR = 0.5F |
| static const char *const | HELP_MODE_NAMES [] |
| static const char *const | NEON_PARAM_NAMES [] = {"Intensity", "Core", "Width"} |
|
static |
| void app_handle_env_input | ( | AppInputContext * | ctx, |
| int | action, | ||
| int | mods, | ||
| int | key | ||
| ) |
Handles input for cycling environment maps.
| ctx | Pointer to the input context. |
| action | GLFW action (Press/Release). |
| mods | Modifiers. |
| key | Directional key. |
| void app_save_png_frame | ( | AppInputContext * | ctx, |
| const char * | filename | ||
| ) |
Captures the current framebuffer and saves it as a PNG file.
| ctx | Pointer to the input context. |
| filename | Output file path (should end in .png). |
| void app_toggle_fullscreen | ( | AppInputContext * | ctx, |
| GLFWwindow * | window | ||
| ) |
Toggles the application window between Windowed and Fullscreen.
| ctx | Pointer to the input context. |
| window | GLFW window handle. |
|
static |
| void framebuffer_size_callback | ( | GLFWwindow * | window, |
| int | width, | ||
| int | height | ||
| ) |
Primary GLFW framebuffer size callback.
Handles resizing of the OpenGL viewport and all dependent post-processing buffers to match the new window dimensions.
| window | The GLFW window context. |
| width | New framebuffer width. |
| height | New framebuffer height. |
postprocess_resize.
|
static |
| void handle_app_input | ( | AppInputContext * | ctx, |
| int | key, | ||
| int | mods | ||
| ) |
Dispatches application-level logic for key inputs.
Handles system-wide shortcuts (ESC to exit, Space to pause, etc.).
| ctx | Pointer to the input context. |
| key | Locked key code. |
| mods | Active modifiers. |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
| void key_callback | ( | GLFWwindow * | window, |
| int | key, | ||
| int | scancode, | ||
| int | action, | ||
| int | mods | ||
| ) |
Primary GLFW key callback.
Dispatches raw key events to handle_app_input, camera_process_key_callback, and other specific handlers.
| window | The GLFW window context. |
| key | The keyboard key code. |
| scancode | System-specific scancode. |
| action | GLFW_PRESS, GLFW_RELEASE, or GLFW_REPEAT. |
| mods | Active modifier keys (Shift, Ctrl, Alt). |
| void mouse_callback | ( | GLFWwindow * | window, |
| double | xpos, | ||
| double | ypos | ||
| ) |
Primary GLFW mouse position callback.
| window | The GLFW window context. |
| xpos | Absolute mouse X-coordinate. |
| ypos | Absolute mouse Y-coordinate. |
| void scroll_callback | ( | GLFWwindow * | window, |
| double | xoffset, | ||
| double | yoffset | ||
| ) |
Primary GLFW scroll callback.
| window | The GLFW window context. |
| xoffset | Scroll amount along the X-axis. |
| yoffset | Scroll amount along the Y-axis. |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |