# raylib 4.0.0 — raylib v4.0.0 - Product: raylib (https://whatsnew.fyi/product/raylib) - Vendor: raysan5 - Date: 2021-11-04 - Version: 4.0.0 - Original notes: https://github.com/raysan5/raylib/releases/tag/4.0.0 - Permalink: https://whatsnew.fyi/product/raylib/releases/4.0.0 What's New is an index, not a publisher: every entry below links to the vendor's own release notes, which are the authoritative source. Entries are labelled where they are hand-curated sample data, pre-releases, or drawn from a secondary source such as a developer blog. Reuse: the summaries, labels and curation here are © What's New. Quote freely with attribution and a link back; wholesale republication of the corpus is not permitted — terms: https://whatsnew.fyi/terms. The vendors' own release notes remain their publishers'. --- - **added** — Event Automation System for recording and replaying input events - **added** — Custom game-loop control with SUPPORT_CUSTOM_FRAME_CONTROL config flag - **added** — OpenGL 4.3 support with compute shaders and Shader Storage Buffer Objects (SSBO) in rlgl - **added** — Support for VOX (MagikaVoxel) 3D model format - **added** — EncodeDataBase64() and DecodeDataBase64() functions - **added** — SeekMusicStream() function for music seeking - **added** — DrawTextPro() function with support for text rotations - **added** — raylib_parser tool to parse raylib.h and extract enums, structs, and functions into custom output formats - **added** — Zig build system support for compiling raylib library and examples - **changed** — Rename struct CharInfo to struct GlyphInfo for naming consistency - **changed** — Complete review of raylib API for consistent naming conventions - **changed** — Decouple rlgl module from platform layer and raylib - **changed** — Remove raymath dependency from rlgl - **changed** — Make raymath functions self-contained with no inter-function dependencies - **changed** — Standardize raymath function parameters to be received by value - **changed** — Standardize raymath functions to always use a result variable for return - **changed** — Make all raymath angles use radians with DEG2RAD and RAD2DEG macros provided - **changed** — Improve HiDPI support - **changed** — Completely review glTF models loading It's been about 6 months since last raylib release and it's been **8 years since I started with this project**, what an adventure! It's time for a new release: `raylib 4.0`, **the biggest release ever** and an inflexion point for the library. Many hours have been put in this release to make it special, **many library details have been polished**: syntax, naming conventions, code comments, functions descriptions, log outputs... Almost all the issues have been closed (only 3 remain open at the moment of this writing) and some amazing new features have been added. I expect this **`raylib 4.0`** to be a long term version (LTS), stable and complete enough for any new graphic/game/tool application development. Let's start with some numbers: - **+130** closed issues (for a TOTAL of **+1030**!) - **+550** commits since previous RELEASE - **+20** functions ADDED to raylib API - **+60** functions ADDED to rlgl API - **+40** functions RENAMED/REVIEWED/REDESIGNED - **+60** new contributors (for a TOTAL of **+275**!) Highlights for `raylib 4.0`: - **Naming consistency and coherency**: `raylib` API has been completely reviewed to be consistent on naming conventions for data structures and functions, comments and descriptions have been reviewed, also the syntax of many symbols for consistency; some functions and structs have been renamed (i.e. `struct CharInfo` to `struct GlyphInfo`). Output log messages have been also improved to show more info to the users. Several articles have been writen in this process: [raylib_syntax analysis](https://github.com/raysan5/raylib/wiki/raylib-syntax-analysis) and [raylib API usage analysis](https://gist.github.com/raysan5/7c0c9fff1b6c19af24bb4a51b7383f1e). In general, a big polishment of the library to make it more consistent and coherent. - **Event Automation System**: This new _experimental_ feature has been added for future usage, it allows to **record input events and re-play them automatically**. This feature could be very useful to automatize examples testing but also for tutorials with assited game playing, in-game cinematics, speedruns, AI playing and more! Note this feature is still experimental. - **Custom game-loop control**: As requested by some advance users, **the game-loop control can be exposed** compiling raylib with the config flag: `SUPPORT_CUSTOM_FRAME_CONTROL`. It's intended for advance users that want to control the events polling and also the timming mechanisms of their games. - [**`rlgl 4.0`**](https://github.com/raysan5/raylib/blob/master/src/rlgl.h): This module has been completely **decoupled from platform layer** and raylib, now `rlgl` single-file header-only library only depends on the multiple OpenGL backends supported, even the dependency on `raymath` has been removed. Additionally, **support for OpenGL 4.3** has been added, supporting compute shaders and Shader Storage Buffer Objects (SSBO). Now `rlgl` can be used as a complete standalone portable library to wrap several OpenGL version and providing **a simple and easy-to-use pseudo-OpenGL immediate-mode API**. - [**`raymath 1.5`**](https://github.com/raysan5/raylib/blob/master/src/raymath.h): This module has been reviewed and some new conventions have been adopted to make it **more portable and self-contained**: - Functions are self-contained, no function use other raymath function inside, required code is directly re-implemented - Functions input parameters are always received by value - Functions use always a "result" variable for return - Angles are always in radians (`DEG2RAD`/`RAD2DEG` macros provided for convenience) - [**`raygui 3.0`**](https://github.com/raysan5/raygui): The **official raylib immediate-mode gui library** (included in `raylib/src/extras`) has been updated to a new version, embedding the icons collection and adding mulstiple improvements. It has been simplified and constrained for a better focus on its task: provide a simple and easy-to-us _[Truncated at 4000 characters — full notes: https://github.com/raysan5/raylib/releases/tag/4.0.0]_