$ account raysan5
raylib is a cross-platform game development library written in C99, designed to provide a simple and easy-to-use API for creating games, prototypes, and multimedia applications. It abstracts away platform-specific details like window creation, input handling, and graphics rendering, offering a consistent interface across Windows, macOS, Linux, Android, and Web (via Emscripten). The library is modular, with core modules for shapes, textures, text, 3D models, audio, and shaders, all built on top of a low-level OpenGL abstraction layer (rlgl). It bundles its own windowing backend (a fork of GLFW) and includes numerous single-file external libraries for image loading (stb_image), audio decoding (dr_flac, dr_mp3, dr_wav, jar_mod, jar_xm), compression (sdefl, qoa, pep), and model loading (tinyobj_loader, cgltf, vox_loader). The repository contains over 200 example programs that serve as both documentation and test cases, covering everything from basic window creation to advanced shader effects and 3D rendering pipelines. The architecture follows a monolithic library pattern with a single public header (raylib.h) and several optional headers (raymath.h, rlgl.h, raygui.h). The core library is compiled from source files (rcore.c, rshapes.c, rtextures.c, rtext.c, rmodels.c, raudio.c) and platform-specific backends (rcore_desktop_glfw.c, rcore_android.c, rcore_web_emscripten.c, etc.). The library is designed to be self-contained, with no external runtime dependencies beyond the operating system's graphics drivers. Build system support includes CMake, Make, Zig, Meson, and IDE project files for Visual Studio, VSCode, CodeBlocks, and others. Key data flows involve initializing a window and graphics context, then entering a game loop where user input is polled, game state is updated, and rendering commands are issued. The library handles resource management (textures, fonts, models, audio streams) internally, with automatic cleanup on window close. The audio subsystem supports streaming, effects, and multi-channel playback. The shader system allows custom GLSL vertex and fragment shaders to be applied to 2D and 3D rendering. The library also includes utility modules for math (vectors, matrices, quaternions), easing functions, gesture recognition, and camera systems. External dependencies are minimal due to extensive bundling; the only required system libraries are OpenGL (or OpenGL ES on mobile/web) and the platform's native windowing/input APIs. The bundled GLFW fork provides a consistent windowing layer across platforms. The library is actively maintained with regular commits, CI builds for multiple platforms, and a large community of users and contributors.
This repository contains raygui, an immediate-mode GUI library for the raylib game programming library. It is written entirely in C as a single header file (src/raygui.h). The library provides over 25 controls (buttons, sliders, text boxes, list views, color pickers, etc.) designed specifically for building development tools, debug overlays, and editors. The architecture follows an immediate-mode pattern where controls are drawn and return their state every frame, with no retained state managed by the library, making it highly predictable and easy to integrate into existing game loops. A powerful styling system allows complete customization of colors, fonts, and metrics, with over 20 pre-built themes provided in the styles/ directory. The library also includes a built-in icon system with 256+ 16x16 icons. While tightly coupled to raylib by default, a standalone mode (RAYGUI_STANDALONE) allows it to be adapted to any graphics library by implementing a small set of backend functions. The examples directory contains several high-quality, reusable custom widgets (curve editor, property list, file dialog) that demonstrate how to extend the library. The codebase is mature, well-documented, and actively maintained, representing a high standard of C library craftsmanship within its domain.