AP2 documentation¶
AP2 (Application Primitives) is a C17 kit for games and tools.
Copyright (c) 2024-2026 Jack Waechter. MIT licensed. See LICENSE.
Draw with the short names (AP_Clear, AP_FillRect, AP_Present, AP_DrawTexture). They are macros over AP_Render*.
Guides¶
- Getting started — install, build, first window
- Architecture — subsystems, modules, coordinate spaces
- API overview — map of every public header
- Materials and textures — PBR, specular-glossiness, unlit, custom
- glTF models — loading
.glb/.gltf(single-file and folder-based) - Advanced PBR — Cook-Torrance BRDF, normal/metallic-roughness/emissive maps
- Best practices — code organization, memory, performance, debugging
- Material & 3D API reference — full signatures with examples
Tutorials¶
Subjects¶
- Hello window
- Drawing in 2D
- Textures and sprites
- Input
- Audio
- Text and fonts
- Immediate GUI
- 3D
- Shaders and post-processing
- Tilemaps
Apps and games¶
- Breakout — bricks, paddle, collision, score
- Top-down walker — WASD/gamepad, camera, spatial SFX
- Desktop tool — inspector-style GUI app
Advanced, step-by-step¶
- 3D: a PBR product scene — glTF/GLB loading (incl. folder-based models), studio lighting, orbit camera, per-mesh material overrides, post-processing
- Retained-mode GUI —
AP2_GuiAdvanced: windows, layouts, theming, signals, CSS-like styling, embedded canvas widgets - Camera rigs and cinematic post — first-person/orbit rigs, screen-space picking, the full post-processing effect catalog
- Capstone: a complete application — 3D + tilemap HUD + retained GUI + spatial audio + post, wired into one app
Headers under include/AP2/ win if a tutorial and a signature disagree.
The GitHub Pages site and the wiki are published from this folder on each push.