Suckless OGL 1.0.0
A lean, high-performance C11 PBR Renderer
Loading...
Searching...
No Matches
app.c File Reference
#include "app.h"
#include "adaptive_sampler.h"
#include "app_input.h"
#include "app_input_state.h"
#include "app_profiling.h"
#include "app_settings.h"
#include "app_subsystem.h"
#include "app_ui.h"
#include "async/async_coordinator.h"
#include "async_loader.h"
#include "bool_utils.h"
#include "camera.h"
#include "camera_input.h"
#include "env_manager.h"
#include "gamepad_input.h"
#include "icosphere.h"
#include "instanced_rendering.h"
#include "lum_histogram.h"
#include "postprocess.h"
#include "postprocess_internal.h"
#include "profiler.h"
#include "renderer.h"
#include "scene.h"
#include "scene_gpu_resources.h"
#include "texture.h"
#include "tracy_gpu.h"
#include <GLFW/glfw3.h>
#include <string.h>
Include dependency graph for app.c:

Functions

static void app_load_initial_hdr (App *app)
 
int app_init (App *app, int width, int height, const char *title)
 Fully initializes the application state, window, and OpenGL context.
 
void app_cleanup (App *app)
 Safely releases all GPU and CPU resources held by the application.
 
static void app_render_ui_trampoline (void *user_data)
 
static void app_update_camera (App *app)
 
static void app_update_mesh_subdivisions (App *app, int *last_subdiv)
 
void app_run (App *app)
 Enters the main application rendering and event loop.
 
void app_update (App *app)
 One-frame logic update (physics, timers, camera).
 
AppInputContext app_input_ctx_from_app (App *app)
 Constructs an AppInputContext from the full App state.
 

Variables

static const char *const DEFAULT_ENV_FILENAME = "env.hdr"
 
static const SubsystemDescriptor APP_SUBSYSTEM_TABLE []
 

Function Documentation

◆ app_cleanup()

void app_cleanup ( App *  app)

Safely releases all GPU and CPU resources held by the application.

Here is the call graph for this function:

◆ app_init()

int app_init ( App *  app,
int  width,
int  height,
const char *  title 
)

Fully initializes the application state, window, and OpenGL context.

Here is the call graph for this function:

◆ app_input_ctx_from_app()

AppInputContext app_input_ctx_from_app ( App *  app)

Constructs an AppInputContext from the full App state.

Bridges between the GLFW user-pointer (App*) and the decoupled input API (AppInputContext*). Defined in app.c to keep the heavy App sub-struct includes out of app_input.c.

◆ app_load_initial_hdr()

static void app_load_initial_hdr ( App *  app)
static
Here is the call graph for this function:

◆ app_render_ui_trampoline()

static void app_render_ui_trampoline ( void *  user_data)
static
Here is the call graph for this function:

◆ app_run()

void app_run ( App *  app)

Enters the main application rendering and event loop.

Here is the call graph for this function:

◆ app_update()

void app_update ( App *  app)

One-frame logic update (physics, timers, camera).

Here is the call graph for this function:

◆ app_update_camera()

static void app_update_camera ( App *  app)
static
Here is the call graph for this function:

◆ app_update_mesh_subdivisions()

static void app_update_mesh_subdivisions ( App *  app,
int *  last_subdiv 
)
static
Here is the call graph for this function:

Variable Documentation

◆ APP_SUBSYSTEM_TABLE

const SubsystemDescriptor APP_SUBSYSTEM_TABLE[]
static
Initial value:
= {
APP_PROFILING_DESCRIPTOR, APP_ASYNC_COORD_DESCRIPTOR,
}
#define APP_INPUT_DESCRIPTOR
Definition app_input_state.h:47
#define APP_PROFILING_DESCRIPTOR
Definition app_profiling.h:53
#define APP_WINDOW_DESCRIPTOR
Definition app_window.h:28
#define APP_ASYNC_LOADER_DESCRIPTOR
Definition async_loader.h:179
#define APP_ENV_MGR_DESCRIPTOR
Definition env_manager.h:119
#define APP_LUM_HISTOGRAM_DESCRIPTOR
Definition lum_histogram.h:11
#define APP_POSTPROCESS_DESCRIPTOR
Definition postprocess.h:52
#define APP_SCENE_DESCRIPTOR
Definition scene.h:121

◆ DEFAULT_ENV_FILENAME

const char* const DEFAULT_ENV_FILENAME = "env.hdr"
static