33 Commits

Author SHA1 Message Date
Ray
019cc889fc Updated Notepad++ scripts and autocomplete 2026-04-13 19:26:28 +02:00
034ffda887 [cmake] update cmake for PLATFORM_MEMORY (#5749)
* update cmake for PLATFORM_MEMORY

* remove opengl example for memory platform

* update for winmm and cross compile
2026-04-13 18:55:45 +02:00
970531d112 Update BINDINGS.md to add new FreeBASIC port (#5755)
Added the raylib4fb port
2026-04-12 23:49:38 +02:00
Ray
99eaf72362 Merge branch 'master' of https://github.com/raysan5/raylib 2026-04-12 19:49:54 +02:00
Ray
1339ec637e Update raylib.h 2026-04-12 19:49:45 +02:00
44e5126d08 update 2025->2026, 5.5->6.0 (#5754) 2026-04-12 19:21:09 +02:00
Ray
51d693607e Update Makefile 2026-04-12 11:07:19 +02:00
Ray
a5427bc38f Update rlsw.h 2026-04-12 11:07:09 +02:00
605303f62b fix: pthread_mutex_lock called on a destroyed mutex (#5752) 2026-04-12 10:32:05 +02:00
b3592631b0 update makefile for PLATFORM_MEMORY (#5750) 2026-04-12 10:25:59 +02:00
Ray
ddfbe973d4 Updated Windows resource file 2026-04-12 10:24:35 +02:00
fe5271c568 update raylib.rc to 6.0 (2026) (#5748) 2026-04-12 10:23:09 +02:00
de95b3aa70 added gpuready check to gentexturemipmaps (#5747) 2026-04-10 15:42:06 +02:00
Ray
fbcc8cdb55 Update shapes_top_down_lights.c 2026-04-09 11:52:06 +02:00
Ray
ca6f188233 Update shaders_shapes_textures.c 2026-04-09 11:52:04 +02:00
Ray
8e54b19d9f Update shapes_basic_shapes.c 2026-04-09 11:46:00 +02:00
Ray
e24b01bb28 Update HISTORY.md 2026-04-09 11:36:26 +02:00
Ray
68d519910a Merge branch 'master' of https://github.com/raysan5/raylib 2026-04-09 11:35:24 +02:00
Ray
53915d77e6 Update CHANGELOG 2026-04-09 11:22:13 +02:00
b202421e08 rlparser: update raylib_api.* by CI 2026-04-09 09:16:49 +00:00
Ray
05a14456ae REDESIGNED: DrawCircleGradieent() to use Vector2 as center parameter #5738 2026-04-09 11:16:31 +02:00
c5fc771622 removed the first RL_DEFAULT_SHADER_ATTRIB_LOCATION_BONEMATRICES (#5727) 2026-04-06 00:38:04 +02:00
Ray
d3c6f426b4 Update for software renderer on DRM #5721 2026-04-05 11:02:26 +02:00
c4bd4faab5 [build][CMake] REVIEWED: DRM software renderer configuration (#5721)
https://github.com/raysan5/raylib/pull/5720#issuecomment-4187113099

In this comment, it was pointed out that LibraryConfigurations.cmake
still tries to find and link egl, gbm, and glesv2, even when using the
software renderer is it not necessary.

This patch addresses that.
2026-04-05 11:01:44 +02:00
4a6ceb9c76 [rcore_rgfw] Icon color format fix (#5724)
After RGFW update to 2.0.0-dev in fbd83cafc7, RGFW_window_setIcon api has changed -- not it takes pixel format enum instead of number of channels. On raylib side it was still passing 4 (number of channels in rgba) which is enum value for BGRA8. Instead we have to pass 2 now (RGFW_formatRGBA8 = 2).
2026-04-05 10:50:31 +02:00
Ray
6ef0044381 REVIEWED: Window messages WM_SIZING, WM_SIZE, WM_WINDOWPOSCHANGED #5720 2026-04-04 17:37:25 +02:00
Ray
1122add3ee Minor format tweak 2026-04-04 17:36:18 +02:00
Ray
92f82b4add Update raylib.h 2026-04-04 16:50:15 +02:00
Ray
cdff3d7bea Update CHANGELOG 2026-04-04 16:50:10 +02:00
138ef838d9 [rlsw] Some platform fixes (#5720)
* fix drm with rlsw

* fix window resizing with sdl

* fix window resizing with win32
2026-04-04 16:47:33 +02:00
Ray
6ff51d3a2a Update audio_amp_envelope.c 2026-04-04 11:13:29 +02:00
Ray
ea6292e27a REVIEWED: example: audio_amp_envelope, code formating to follow raylib code conventions #5713 2026-04-04 11:12:30 +02:00
bb7b8d70e9 Example/audio adsr (#5713)
* add  audio_amp_envelope example

* Change 1.0f to env->sustainLevel in case the user
release the spacebar before attack state done
2026-04-04 11:04:24 +02:00
43 changed files with 7056 additions and 513 deletions

View File

@ -6,7 +6,7 @@ Some people ported raylib to other languages in the form of bindings or wrappers
| Name | raylib Version | Language | License | | Name | raylib Version | Language | License |
| :--------------------------------------------------------------------------------------- | :--------------: | :------------------------------------------------------------------: | :------------------: | | :--------------------------------------------------------------------------------------- | :--------------: | :------------------------------------------------------------------: | :------------------: |
| [raylib](https://github.com/raysan5/raylib) | **5.5** | [C/C++](https://en.wikipedia.org/wiki/C_(programming_language)) | Zlib | | [raylib](https://github.com/raysan5/raylib) | **6.0** | [C/C++](https://en.wikipedia.org/wiki/C_(programming_language)) | Zlib |
| [raylib-ada](https://github.com/Fabien-Chouteau/raylib-ada) | **5.5** | [Ada](https://en.wikipedia.org/wiki/Ada_(programming_language)) | MIT | | [raylib-ada](https://github.com/Fabien-Chouteau/raylib-ada) | **5.5** | [Ada](https://en.wikipedia.org/wiki/Ada_(programming_language)) | MIT |
| [raylib-beef](https://github.com/Starpelly/raylib-beef) | **5.5** | [Beef](https://www.beeflang.org) | MIT | | [raylib-beef](https://github.com/Starpelly/raylib-beef) | **5.5** | [Beef](https://www.beeflang.org) | MIT |
| [raybit](https://github.com/Alex-Velez/raybit) | **5.0** | [Brainfuck](https://en.wikipedia.org/wiki/Brainfuck) | MIT | | [raybit](https://github.com/Alex-Velez/raybit) | **5.0** | [Brainfuck](https://en.wikipedia.org/wiki/Brainfuck) | MIT |
@ -33,6 +33,7 @@ Some people ported raylib to other languages in the form of bindings or wrappers
| [rayex](https://github.com/shiryel/rayex) | 3.7 | [elixir](https://elixir-lang.org) | Apache-2.0 | | [rayex](https://github.com/shiryel/rayex) | 3.7 | [elixir](https://elixir-lang.org) | Apache-2.0 |
| [raylib-elle](https://github.com/acquitelol/elle/blob/rewrite/std/raylib.le) | **5.5** | [Elle](https://github.com/acquitelol/elle) | GPL-3.0 | | [raylib-elle](https://github.com/acquitelol/elle/blob/rewrite/std/raylib.le) | **5.5** | [Elle](https://github.com/acquitelol/elle) | GPL-3.0 |
| [raylib-factor](https://github.com/factor/factor/blob/master/extra/raylib/raylib.factor) | 5.5 | [Factor](https://factorcode.org) | BSD | | [raylib-factor](https://github.com/factor/factor/blob/master/extra/raylib/raylib.factor) | 5.5 | [Factor](https://factorcode.org) | BSD |
| [raylib4fb](https://github.com/mudhairless/raylib4fb) | **5.5** | [FreeBASIC](https://www.freebasic.net) | Zlib |
| [raylib-freebasic](https://github.com/WIITD/raylib-freebasic) | **5.0** | [FreeBASIC](https://www.freebasic.net) | MIT | | [raylib-freebasic](https://github.com/WIITD/raylib-freebasic) | **5.0** | [FreeBASIC](https://www.freebasic.net) | MIT |
| [raylib.f](https://github.com/cthulhuology/raylib.f) | **5.5** | [Forth](https://forth.com) | Zlib | | [raylib.f](https://github.com/cthulhuology/raylib.f) | **5.5** | [Forth](https://forth.com) | Zlib |
| [fortran-raylib](https://github.com/interkosmos/fortran-raylib) | **5.5** | [Fortran](https://fortran-lang.org) | ISC | | [fortran-raylib](https://github.com/interkosmos/fortran-raylib) | **5.5** | [Fortran](https://fortran-lang.org) | ISC |

View File

@ -1,10 +1,10 @@
changelog changelog
--------- ---------
Current Release: raylib 5.5 (18 November 2024) Current Release: raylib 6.0 (23 April 2026)
------------------------------------------------------------------------- -------------------------------------------------------------------------
Release: raylib 6.0 (?? March 2026) Release: raylib 6.0 (23 April 2026)
------------------------------------------------------------------------- -------------------------------------------------------------------------
KEY CHANGES: KEY CHANGES:
- New Software Renderer backend [rlsw] - New Software Renderer backend [rlsw]
@ -221,6 +221,7 @@ Detailed changes:
[rlsw] REVIEWED: C++ support (#5291) by @alexgb0 [rlsw] REVIEWED: C++ support (#5291) by @alexgb0
[rshapes] ADDED: `DrawLineDashed()` (#5222) by @luis605 [rshapes] ADDED: `DrawLineDashed()` (#5222) by @luis605
[rshapes] ADDED: `DrawEllipseV()` and `DrawEllipseLinesV()` (#4963) by @meowstr [rshapes] ADDED: `DrawEllipseV()` and `DrawEllipseLinesV()` (#4963) by @meowstr
[rshapes] REDESIGNED: `DrawCircleGradient()` to use Vector2 as center parameter by @raysan5 -WARNING-
[rshapes] REVIEWED: `DrawLine()`, fix pixel offset issue on drawing (#4666) by @Bigfoot71 [rshapes] REVIEWED: `DrawLine()`, fix pixel offset issue on drawing (#4666) by @Bigfoot71
[rshapes] REVIEWED: `DrawRectangleGradientEx()`, incorrect parameter names (#4980) by @vincent [rshapes] REVIEWED: `DrawRectangleGradientEx()`, incorrect parameter names (#4980) by @vincent
[rshapes] REVIEWED: `DrawRectangleLines`, fix pixel offset issue (#4669) by @Bigfoot71 [rshapes] REVIEWED: `DrawRectangleLines`, fix pixel offset issue (#4669) by @Bigfoot71
@ -285,6 +286,7 @@ Detailed changes:
[rtext] REVIEWED: `TextToFloat()`, remove removed inaccurate comment (#4596) by @hexmaster111 [rtext] REVIEWED: `TextToFloat()`, remove removed inaccurate comment (#4596) by @hexmaster111
[rtext] REDESIGNED: `LoadFontData()`, added input parameter by @raysan5 -WARNING- [rtext] REDESIGNED: `LoadFontData()`, added input parameter by @raysan5 -WARNING-
[rmodels] ADDED: Support CPU animation in OpenGL 1.1 (#4925) by @JeffM2501 [rmodels] ADDED: Support CPU animation in OpenGL 1.1 (#4925) by @JeffM2501
[rmodels] REMOVED: `DrawModelPoints()` and `DrawModelPointsEx()`, moved to an example (#5697) by @maiconpintoabreu -WARNING-
[rmodels] RENAMED: Skinning shader variables (new default naming) by @raysan5 [rmodels] RENAMED: Skinning shader variables (new default naming) by @raysan5
[rmodels] REVIEWED: glTF animation framerate calculation (#4472, #5445) by @TheLazyIndianTechie [rmodels] REVIEWED: glTF animation framerate calculation (#4472, #5445) by @TheLazyIndianTechie
[rmodels] REVIEWED: Assign meshes without bone weights to the bone they are attached to so they animate by @Jeffm2501 [rmodels] REVIEWED: Assign meshes without bone weights to the bone they are attached to so they animate by @Jeffm2501
@ -311,6 +313,7 @@ Detailed changes:
[rmodels] REVIEWED: `LoadModelAnimationsGLTF()`, properly load 1 frame animations (#5561) by @arlez80 [rmodels] REVIEWED: `LoadModelAnimationsGLTF()`, properly load 1 frame animations (#5561) by @arlez80
[rmodels] REVIEWED: `LoadModelAnimationsGLTF()`, anim correctly inherits world transform (#5206) by @ArmanOmmid [rmodels] REVIEWED: `LoadModelAnimationsGLTF()`, anim correctly inherits world transform (#5206) by @ArmanOmmid
[rmodels] REVIEWED: `UploadMesh()`, improve default normal and tangent values (#4763) by @Bigfoot71 [rmodels] REVIEWED: `UploadMesh()`, improve default normal and tangent values (#4763) by @Bigfoot71
[rmodels] REVIEWED: `UplaodMesh()`, fix for devices without VAO support (#5692) by @psxdev
[rmodels] REVIEWED: `GenMeshTangents()`, improvements (#4937) by @Bigfoot71 [rmodels] REVIEWED: `GenMeshTangents()`, improvements (#4937) by @Bigfoot71
[rmodels] REVIEWED: `UpdateModelAnimation()` optimization (#5244) by @Arrangemonk [rmodels] REVIEWED: `UpdateModelAnimation()` optimization (#5244) by @Arrangemonk
[rmodels] REVIEWED: `UpdateModelAnimationBones()`, break on first mesh found and formating by @raysan5 [rmodels] REVIEWED: `UpdateModelAnimationBones()`, break on first mesh found and formating by @raysan5
@ -322,6 +325,7 @@ Detailed changes:
[rmodels] REVIEWED: `DrawMeshInstanced()`, breaking if instanceTransform was unused (#5469) by @al13n321 [rmodels] REVIEWED: `DrawMeshInstanced()`, breaking if instanceTransform was unused (#5469) by @al13n321
[rmodels] REVIEWED: `DrawSphereEx()`, normals support (#4926) by @karl-zylinski [rmodels] REVIEWED: `DrawSphereEx()`, normals support (#4926) by @karl-zylinski
[rmodels] REVIEWED: `ExportMesh()`, improve OBJ vertex data precision and lower memory usage (#4496) by @mikeemm [rmodels] REVIEWED: `ExportMesh()`, improve OBJ vertex data precision and lower memory usage (#4496) by @mikeemm
[rmodels] REVIEWED: `CheckCollisionSpheres()`, simplified using `Vector3DistanceSqr()` (#5695) by @Bigfoot71
[raudio] REVIEWED: Fix a glitch at the end of a sound (#5578) by @mackron [raudio] REVIEWED: Fix a glitch at the end of a sound (#5578) by @mackron
[raudio] REVIEWED: Improvements to device configuration (#5577) by @mackron [raudio] REVIEWED: Improvements to device configuration (#5577) by @mackron
[raudio] REVIEWED: Initialize sound alias properties as if it was a new sound (#5123) by @JeffM2501 [raudio] REVIEWED: Initialize sound alias properties as if it was a new sound (#5123) by @JeffM2501

View File

@ -6,7 +6,7 @@ if(EMSCRIPTEN)
# When configuring web builds with "emcmake cmake -B build -S .", set PLATFORM to Web by default # When configuring web builds with "emcmake cmake -B build -S .", set PLATFORM to Web by default
SET(PLATFORM Web CACHE STRING "Platform to build for.") SET(PLATFORM Web CACHE STRING "Platform to build for.")
endif() endif()
enum_option(PLATFORM "Desktop;Web;WebRGFW;Android;Raspberry Pi;DRM;SDL;RGFW" "Platform to build for.") enum_option(PLATFORM "Desktop;Web;WebRGFW;Android;Raspberry Pi;DRM;SDL;RGFW;Memory" "Platform to build for.")
enum_option(OPENGL_VERSION "OFF;4.3;3.3;2.1;1.1;ES 2.0;ES 3.0;Software" "Force a specific OpenGL Version?") enum_option(OPENGL_VERSION "OFF;4.3;3.3;2.1;1.1;ES 2.0;ES 3.0;Software" "Force a specific OpenGL Version?")

View File

@ -526,26 +526,79 @@ Last but not least, I want to thank **raylib sponsors and all the raylib communi
notes on raylib 6.0 notes on raylib 6.0
------------------- -------------------
A new raylib release is finally ready, after almost 1.5 years since last release. This is the biggest release ever with many improvements to the library, thanks to the support of many amazing contributors and also thanks to the financial support of NLnet/NGI0 funds. A new `raylib` release is finally ready and, again, this is the **biggest `raylib` release ever**! Thanks to the support of many amazing contributors this release comes packed with many new features and improvements, also thanks to the financial support of [NLnet](https://nlnet.nl/) and the [NGI Zero Commond Fund](https://nlnet.nl/NGI0/) that allow me to work on this project mostly fulltime for the past few months.
Some astonishing numbers for this release: Some astonishing numbers for this release:
- **+320** closed issues (for a TOTAL of **+2130**!) - **+320** closed issues (for a TOTAL of **+2140**!)
- **+1800** commits since previous RELEASE (for a TOTAL of **+9600**!) - **+1950** commits since previous RELEASE (for a TOTAL of **+9700**!)
- **18** functions ADDED to raylib API (for a TOTAL of **599**!) - **+20** new functions ADDED to raylib API (for a TOTAL of **600**!)
- **+50** new examples to learn from (for a TOTAL of **212**!) - **+50** new examples to learn from (for a TOTAL of **+210**!)
- **+200** new contributors (for a TOTAL of **+840**!) - **+210** new contributors (for a TOTAL of **+850**!)
Highlights for `raylib 6.0`: Highlights for `raylib 6.0`:
- New Software Renderer backend [rlsw] - **`NEW` Software Renderer - [`rlsw`](https://github.com/raysan5/raylib/blob/master/src/external/rlsw.h)**: The biggest addition of this new release. A new software renderer backend, that allows raylib to run purely on CPU, with no neeed for a GPU. It finally closes the circle of my search for a portable self-contained, with **no-external-dependencies**, graphics library, able to run on any device providing some CPU-power and some RAM memory. It has been possible thanks to the amazing work of **Le Juez Victor** ([@Bigfoot71](https://github.com/Bigfoot71)), who created [`rlsw`](https://github.com/raysan5/raylib/blob/master/src/external/rlsw.h), a single-file header-only library implementing OpenGL 1.1+ specification, tailored to fit into raylib [`rlgl`](https://github.com/raysan5/raylib/blob/master/src/rlgl.h) OpenGL wrapper, and allowing to run raylib seamlessly over CPU with **no code changes required on user side**. As expected, software rendering is slower than hardware-accelerated rendering but it is still fast enough to run basic application at 30-60 fps. Actually, it already proved it usefulness on a new [raylib port for ESP32](https://components.espressif.com/components/georgik/raylib/versions/6.0.0/readme) microcontroller by Espressif, useful for industrial applications, and opens the door to the upcoming RISC-V powered devices that start arriving to the marked, and many times come with no GPU. Along the new software renderer, some of the existing platform backends have been adapted to support it (SDL, RGFW, DRM) and also **new platforms backends have been created** to accomodate it (Win32, Emscripten), incluing a new `PLATFORM_MEMORY`, that allows direct rendering to a memory framebuffer.
- New rcore platform backend: Memory (memory buffer)
- New rcore platform backend: Win32 (experimental)
- New rcore platform backend: Emscripten (experimental)
- Redesigned Skeletal Animation System
- Redesigned fullscreen modes and high-dpi content scaling
- Redesigned Build Config System [config.h]
- New File System API
- New Text Management API
- New tool: [rexm] raylib examples manager
- **`NEW` Platform backend: Memory - [`rcore_memory`](https://github.com/raysan5/raylib/blob/master/src/platforms/rcore_memory.c)**: This new platform has been added along the **software renderer** backend, allowing 2d and 3d rendering over a **platform-agnostic memory framebuffer**, it can run headless and output frames can be directly exported to images. This new backend could also be useful for graphics rendering on servers or process images directly using the memory buffer.
- **`NEW` Platform backend: Win32 - [`rcore_desktop_win32`](https://github.com/raysan5/raylib/blob/master/src/platforms/rcore_desktop_win32.c)**: A new **Windows platform backend** and the first step towards a potential replacement/alternative to the platform libraries currently used by raylib (GLFW/SDL/RGFW). This backend follows same API template structure than the other raylib backends, but directly implementing Win32 API calls. It allows initializing OpenGL GPU-accelerated windows and also GDI based windows, useful for the software renderer backend. This new backend approach, following a common template-structure and separating the platform logic by specific OS/Windowing system, will simplify code, improve maintenance, readability and portability for raylib, setting some bases for the future. *NOTE: This backend is new and it could require further testing, use it as an experimental backend for now.*
- **`NEW` Platform backend: Emscripten - [`rcore_web_emscripten`](https://github.com/raysan5/raylib/blob/master/src/platforms/rcore_web_emscripten.c)**: In the same line as Win32 backend, this new web backend moves away from `libglfw.js` and **directly implements Emscripten/JS functionality**, with **no other dependencies**, adding support for the new software renderer to draw directly on a **non-accelerated 2d canvas** but also supporting a WebGL-hardware-accelerated canvas when required. *NOTE: This backend is new and it could require further testing, use it as an experimental backend for now.*
- **`REDESIGNED` Fullscreen modes and High-DPI content scaling**: After many years and many related issues, the full-screen and high-dpi content scaling support has been **completely redesigned** from scratch. New design prioritizes **borderless fullscreen modes** and automatically detects current monitor content scaling configuration to scale window and framebuffer accordingly when required. Still, High-DPI support must be requested by user if desired enabling `FLAG_WINDOW_HIGHDPI` on window creation. This new system has been carefully tested on Windows, Linux (X11, Wayland), macOS with multiple monitors and multiple resolutions, including 4K monitors.
- **`REDESIGNED` Skeletal Animation System**: A new animation system for 3d models has been created to support animation blending, between single frames but also between differents frames on different animations, to allow easy **timed transitions** between animations. This redesign implied reviewing several raylib structures to better accomodate animation data: `Model`, `ModelSkeleton`, `ModelAnimation`, but the API was simplified and support for GPU-skinning was improved with multiple optimizations.
- **`REDESIGNED` Build Config System - [`config.h`](https://github.com/raysan5/raylib/blob/master/src/config.h)**: raylib allows lot of customization for specific needs (i.e. disabling modules not needed for specific applications like rmodels or raudio) but previous implementation did not allow easely disabling some features from **custom build systems**. New design not only allows disabling features with simple `-DSUPPORT_FILEFORMAT_OBJ=0` on building command-line but also the full system has been reviewed, removing useless flags and exposing new ones.
- **`NEW` File System API**: Along the years, multiple filesystem functions have been added to raylib API as required but it felt somewhat inconsistent with some pieces missing. In this new release, the full filesystem API has beeen reviewed and reorganized, compiling all the functionality single module: [rcore](https://github.com/raysan5/raylib/blob/master/src/raylib.h#L1126), consequently `utils` module has been removed and build system has been simplified even more; **only 6-7 modules (.c) need to be compiled containing the full raylib library**. This new filesystem API will allow raylib to be used on the creation of custom build systems, as already demostrated with the new `rexm` tool for examples management. At the moment raylib includes **+40 file system management functions**, here a list with the new functions added:
```c
int FileRename(const char *fileName, const char *fileRename); // Rename file (if exists)
int FileRemove(const char *fileName); // Remove file (if exists)
int FileCopy(const char *srcPath, const char *dstPath); // Copy file from one path to another, dstPath created if it doesn't exist
int FileMove(const char *srcPath, const char *dstPath); // Move file from one directory to another, dstPath created if it doesn't exist
int FileTextReplace(const char *fileName, const char *search, const char *replacement); // Replace text in an existing file
int FileTextFindIndex(const char *fileName, const char *search); // Find text in existing file
```
- **`NEW` Text Management API**: Along with the new file system functionality, a new set of text management functions has been added, also very useful for text procesing and also used in custom build systems creation using raylib. At the moment raylib includes **+30 text management functions**, here a list with the new functions added:
```c
char **LoadTextLines(const char *text, int *count); // Load text as separate lines ('\n')
void UnloadTextLines(char **text, int lineCount); // Unload text lines
const char *TextRemoveSpaces(const char *text); // Remove text spaces, concat words
char *GetTextBetween(const char *text, const char *begin, const char *end); // Get text between two strings
char *TextReplace(const char *text, const char *search, const char *replacement); // Replace text string with new string
char *TextReplaceAlloc(const char *text, const char *search, const char *replacement); // Replace text string with new string, memory must be MemFree()
char *TextReplaceBetween(const char *text, const char *begin, const char *end, const char *replacement); // Replace text between two specific strings
char *TextReplaceBetweenAlloc(const char *text, const char *begin, const char *end, const char *replacement); // Replace text between two specific strings, memory must be MemFree()
char *TextInsertAlloc(const char *text, const char *insert, int position); // Insert text in a defined byte position, memory must be MemFree()
```
- **`NEW` tool: raylib examples manager - [rexm](https://github.com/raysan5/raylib/tree/master/tools/rexm)**: raylib examples collection is huge, with **more than 200 examples** it was quite difficult to manage: adding, removing, renaming examples was a very costly process involving many files to be modified (including build systems), also the examples did not follow a common header convention neither a structure conventions. For that reason, a new support tool has been created: **rexm**, a raylib examples manager that allows to easely add/remove/rename examples, automatically fix inconsistencies and even **building and automated testing** on multiple platforms.
```
USAGE:
> rexm <command> <example_name> [<example_rename>]
COMMANDS:
create <new_example_name> : Creates an empty example, from internal template
add <example_name> : Add existing example to collection
rename <old_examples_name> <new_example_name> : Rename an existing example
remove <example_name> : Remove an existing example from collection
build <example_name> : Build example for Desktop and Web platforms
test <example_name> : Build and Test example for Desktop and Web platforms
validate : Validate examples collection, generates report
update : Validate and update examples collection, generates report
```
- **`NEW` +50 new examples**: Thanks to `rexm` and the simplification on examples management, this new raylib release includes +50 new examples to leearn from, most of them contributed by community.
Make sure to check raylib [CHANGELOG](https://github.com/raysan5/raylib/blob/master/CHANGELOG) for a detailed list of changes!
I want to **thank all the contributors (+850!**) that along the years have **greatly improved raylib** and pushed it further and better day after day. And **many thanks to raylib community and all raylib users** for supporting the library along those many years.
Finally, I want to thank [puffer.ai](https://puffer.ai/) and [comma.ai](https://comma.ai/) for **supporting and sponsoring the project** as platinum sponsors, along many others individuals that have been sponsoring raylib along the years. Thanks to all of you for allowing me to keep working on this library!
**After +12 years of development, `raylib 6.0` is today one of the bests libraries to enjoy games/tools/graphic programming!**
**Enjoy graphics programming with raylib!** :)

View File

@ -202,8 +202,10 @@ fn compileRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.
raylib.root_module.addCMacro("GRAPHICS_API_OPENGL_ES2", ""); raylib.root_module.addCMacro("GRAPHICS_API_OPENGL_ES2", "");
} }
raylib.root_module.linkSystemLibrary("EGL", .{}); if (options.opengl_version != .gl_soft) {
raylib.root_module.linkSystemLibrary("gbm", .{}); raylib.root_module.linkSystemLibrary("EGL", .{});
raylib.root_module.linkSystemLibrary("gbm", .{});
}
raylib.root_module.linkSystemLibrary("libdrm", .{ .use_pkg_config = .force }); raylib.root_module.linkSystemLibrary("libdrm", .{ .use_pkg_config = .force });
raylib.root_module.addCMacro("PLATFORM_DRM", ""); raylib.root_module.addCMacro("PLATFORM_DRM", "");
@ -416,6 +418,7 @@ pub const Options = struct {
pub const OpenglVersion = enum { pub const OpenglVersion = enum {
auto, auto,
gl_soft,
gl_1_1, gl_1_1,
gl_2_1, gl_2_1,
gl_3_3, gl_3_3,
@ -426,6 +429,7 @@ pub const OpenglVersion = enum {
pub fn toCMacroStr(self: @This()) []const u8 { pub fn toCMacroStr(self: @This()) []const u8 {
switch (self) { switch (self) {
.auto => @panic("OpenglVersion.auto cannot be turned into a C macro string"), .auto => @panic("OpenglVersion.auto cannot be turned into a C macro string"),
.gl_soft => return "GRAPHICS_API_OPENGL_SOFTWARE",
.gl_1_1 => return "GRAPHICS_API_OPENGL_11", .gl_1_1 => return "GRAPHICS_API_OPENGL_11",
.gl_2_1 => return "GRAPHICS_API_OPENGL_21", .gl_2_1 => return "GRAPHICS_API_OPENGL_21",
.gl_3_3 => return "GRAPHICS_API_OPENGL_33", .gl_3_3 => return "GRAPHICS_API_OPENGL_33",

View File

@ -96,21 +96,30 @@ elseif (${PLATFORM} STREQUAL "Android")
elseif ("${PLATFORM}" STREQUAL "DRM") elseif ("${PLATFORM}" STREQUAL "DRM")
set(PLATFORM_CPP "PLATFORM_DRM") set(PLATFORM_CPP "PLATFORM_DRM")
set(GRAPHICS "GRAPHICS_API_OPENGL_ES2")
add_definitions(-D_DEFAULT_SOURCE) add_definitions(-D_DEFAULT_SOURCE)
add_definitions(-DEGL_NO_X11)
add_definitions(-DPLATFORM_DRM) add_definitions(-DPLATFORM_DRM)
find_library(GLESV2 GLESv2)
find_library(EGL EGL)
find_library(DRM drm) find_library(DRM drm)
find_library(GBM gbm)
if (NOT CMAKE_CROSSCOMPILING OR NOT CMAKE_SYSROOT) if (NOT CMAKE_CROSSCOMPILING OR NOT CMAKE_SYSROOT)
include_directories(/usr/include/libdrm) include_directories(/usr/include/libdrm)
endif () endif ()
set(LIBS_PRIVATE ${GLESV2} ${EGL} ${DRM} ${GBM} atomic pthread dl)
if ("${OPENGL_VERSION}" STREQUAL "Software")
# software rendering does not require EGL/GBM.
set(GRAPHICS "GRAPHICS_API_OPENGL_SOFTWARE")
set(LIBS_PRIVATE ${DRM} atomic pthread dl)
else ()
set(GRAPHICS "GRAPHICS_API_OPENGL_ES2")
add_definitions(-DEGL_NO_X11)
find_library(GLESV2 GLESv2)
find_library(EGL EGL)
find_library(GBM gbm)
set(LIBS_PRIVATE ${GLESV2} ${EGL} ${DRM} ${GBM} atomic pthread dl)
endif ()
set(LIBS_PUBLIC m) set(LIBS_PUBLIC m)
elseif ("${PLATFORM}" STREQUAL "SDL") elseif ("${PLATFORM}" STREQUAL "SDL")
@ -147,6 +156,7 @@ elseif ("${PLATFORM}" STREQUAL "SDL")
add_compile_definitions(USING_SDL2_PACKAGE) add_compile_definitions(USING_SDL2_PACKAGE)
endif() endif()
endif() endif()
elseif ("${PLATFORM}" STREQUAL "RGFW") elseif ("${PLATFORM}" STREQUAL "RGFW")
set(PLATFORM_CPP "PLATFORM_DESKTOP_RGFW") set(PLATFORM_CPP "PLATFORM_DESKTOP_RGFW")
@ -172,6 +182,15 @@ elseif ("${PLATFORM}" STREQUAL "WebRGFW")
set(PLATFORM_CPP "PLATFORM_WEB_RGFW") set(PLATFORM_CPP "PLATFORM_WEB_RGFW")
set(GRAPHICS "GRAPHICS_API_OPENGL_ES2") set(GRAPHICS "GRAPHICS_API_OPENGL_ES2")
set(CMAKE_STATIC_LIBRARY_SUFFIX ".a") set(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
elseif ("${PLATFORM}" STREQUAL "Memory")
set(PLATFORM_CPP "PLATFORM_MEMORY")
set(GRAPHICS "GRAPHICS_API_OPENGL_SOFTWARE")
set(OPENGL_VERSION "Software")
if(WIN32 OR CMAKE_C_COMPILER MATCHES "mingw|mingw32|mingw64")
set(LIBS_PRIVATE winmm)
endif()
endif () endif ()
if (NOT ${OPENGL_VERSION} MATCHES "OFF") if (NOT ${OPENGL_VERSION} MATCHES "OFF")

View File

@ -105,6 +105,9 @@ elseif ("${PLATFORM}" STREQUAL "DRM")
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/others/rlgl_standalone.c) list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/others/rlgl_standalone.c)
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/others/raylib_opengl_interop.c) list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/others/raylib_opengl_interop.c)
elseif ("${PLATFORM}" MATCHES "Memory")
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/others/raylib_opengl_interop.c)
elseif ("${OPENGL_VERSION}" STREQUAL "Software") elseif ("${OPENGL_VERSION}" STREQUAL "Software")
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/others/rlgl_standalone.c) list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/others/rlgl_standalone.c)
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/others/raylib_opengl_interop.c) list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/others/raylib_opengl_interop.c)

View File

@ -2,7 +2,7 @@
# #
# raylib makefile for Android project (APK building) # raylib makefile for Android project (APK building)
# #
# Copyright (c) 2017-2025 Ramon Santamaria (@raysan5) # Copyright (c) 2017-2026 Ramon Santamaria (@raysan5)
# #
# This software is provided "as-is", without any express or implied warranty. In no event # This software is provided "as-is", without any express or implied warranty. In no event
# will the authors be held liable for any damages arising from the use of this software. # will the authors be held liable for any damages arising from the use of this software.

View File

@ -0,0 +1,238 @@
/*******************************************************************************************
*
* raylib [audio] example - amp envelope
*
* Example complexity rating: [★☆☆☆] 1/4
*
* Example originally created with raylib 6.0, last time updated with raylib 6.0
*
* Example contributed by Arbinda Rizki Muhammad (@arbipink) and reviewed by Ramon Santamaria (@raysan5)
*
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software
*
* Copyright (c) 2026 Arbinda Rizki Muhammad (@arbipink)
*
********************************************************************************************/
#include "raylib.h"
#define RAYGUI_IMPLEMENTATION
#include "raygui.h"
#include <math.h> // Required for: sinf()
#define BUFFER_SIZE 4096
#define SAMPLE_RATE 44100
// Wave state
typedef enum {
IDLE,
ATTACK,
DECAY,
SUSTAIN,
RELEASE
} ADSRState;
// Grouping all ADSR parameters and state into a struct
typedef struct {
float attackTime;
float decayTime;
float sustainLevel;
float releaseTime;
float currentValue;
ADSRState state;
} Envelope;
//------------------------------------------------------------------------------------
// Module Functions Declaration
//------------------------------------------------------------------------------------
static void FillAudioBuffer(int i, float *buffer, float envelopeValue, float *audioTime);
static void UpdateEnvelope(Envelope *env);
static void DrawADSRGraph(Envelope *env, Rectangle bounds);
//------------------------------------------------------------------------------------
// Program main entry point
//------------------------------------------------------------------------------------
int main(void)
{
// Initialization
//--------------------------------------------------------------------------------------
const int screenWidth = 800;
const int screenHeight = 450;
InitWindow(screenWidth, screenHeight, "raylib [audio] example - amp envelope");
InitAudioDevice();
// Set the number of samples the stream will keep in memory at a time to BUFFER_SIZE
SetAudioStreamBufferSizeDefault(BUFFER_SIZE);
float buffer[BUFFER_SIZE] = { 0 };
// Init raw audio stream (sample rate: 44100, sample size: 32bit-float, channels: 1-mono)
AudioStream stream = LoadAudioStream(SAMPLE_RATE, 32, 1);
// Init Phase
float audioTime = 0.0f;
// Initialize the struct
Envelope env = {
.attackTime = 1.0f,
.decayTime = 1.0f,
.sustainLevel = 0.5f,
.releaseTime = 1.0f,
.currentValue = 0.0f,
.state = IDLE
};
SetTargetFPS(60);
//--------------------------------------------------------------------------------------
// Main game loop
while (!WindowShouldClose())
{
// Update
//----------------------------------------------------------------------------------
if (IsKeyPressed(KEY_SPACE)) env.state = ATTACK;
if (IsKeyReleased(KEY_SPACE) && (env.state != IDLE)) env.state = RELEASE;
if (IsAudioStreamProcessed(stream))
{
if ((env.state != IDLE) || (env.currentValue > 0.0f))
{
for (int i = 0; i < BUFFER_SIZE; i++)
{
UpdateEnvelope(&env);
FillAudioBuffer(i, buffer, env.currentValue, &audioTime);
}
}
else
{
// Clear buffer if silent to avoid looping noise
for (int i = 0; i < BUFFER_SIZE; i++) buffer[i] = 0;
audioTime = 0.0f;
}
UpdateAudioStream(stream, buffer, BUFFER_SIZE);
}
if (!IsAudioStreamPlaying(stream)) PlayAudioStream(stream);
//----------------------------------------------------------------------------------
// Draw
//----------------------------------------------------------------------------------
BeginDrawing();
ClearBackground(RAYWHITE);
GuiSliderBar((Rectangle){ 100, 60, 400, 30 }, "Attack (s)", TextFormat("%2.2fs", env.attackTime), &env.attackTime, 0.1f, 3.0f);
GuiSliderBar((Rectangle){ 100, 100, 400, 30 }, "Decay (s)", TextFormat("%2.2fs", env.decayTime), &env.decayTime, 0.1f, 3.0f);
GuiSliderBar((Rectangle){ 100, 140, 400, 30 }, "Sustain", TextFormat("%2.2f", env.sustainLevel), &env.sustainLevel, 0.0f, 1.0f);
GuiSliderBar((Rectangle){ 100, 180, 400, 30 }, "Release (s)", TextFormat("%2.2fs", env.releaseTime), &env.releaseTime, 0.1f, 3.0f);
DrawADSRGraph(&env, (Rectangle){ 100, 250, 400, 100 });
DrawCircleV((Vector2){ 520, 350 - (env.currentValue * 100) }, 5, MAROON);
DrawText(TextFormat("Current Gain: %2.2f", env.currentValue), 535, 345 - (env.currentValue * 100), 10, MAROON);
DrawText("Press SPACE to PLAY the sound!", 200, 400, 20, LIGHTGRAY);
EndDrawing();
//----------------------------------------------------------------------------------
}
// De-Initialization
//--------------------------------------------------------------------------------------
UnloadAudioStream(stream);
CloseAudioDevice();
CloseWindow();
//--------------------------------------------------------------------------------------
return 0;
}
//------------------------------------------------------------------------------------
// Module Functions Definition
//------------------------------------------------------------------------------------
static void FillAudioBuffer(int i, float *buffer, float envelopeValue, float *audioTime)
{
int frequency = 440;
buffer[i] = envelopeValue*sinf(2.0f*PI*frequency*(*audioTime));
*audioTime += (1.0f/SAMPLE_RATE);
}
static void UpdateEnvelope(Envelope *env)
{
// Calculate the time delta for ONE sample (1/44100)
float sampleTime = 1.0f/SAMPLE_RATE;
switch(env->state)
{
case ATTACK:
{
env->currentValue += (1.0f/env->attackTime)*sampleTime;
if (env->currentValue >= 1.0f)
{
env->currentValue = 1.0f;
env->state = DECAY;
}
} break;
case DECAY:
{
env->currentValue -= ((1.0f - env->sustainLevel)/env->decayTime)*sampleTime;
if (env->currentValue <= env->sustainLevel)
{
env->currentValue = env->sustainLevel;
env->state = SUSTAIN;
}
} break;
case SUSTAIN:
{
env->currentValue = env->sustainLevel;
} break;
case RELEASE:
{
env->currentValue -= (env->sustainLevel/env->releaseTime)*sampleTime;
if (env->currentValue <= 0.001f) // Use a small threshold to avoid infinite tail
{
env->currentValue = 0.0f;
env->state = IDLE;
}
} break;
default: break;
}
}
static void DrawADSRGraph(Envelope *env, Rectangle bounds)
{
DrawRectangleRec(bounds, Fade(LIGHTGRAY, 0.3f));
DrawRectangleLinesEx(bounds, 1, GRAY);
// Fixed visual width for sustain stage since it's an amplitude not a time value
float sustainWidth = 1.0f;
// Total time to visualize (sum of A, D, R + a padding for Sustain)
float totalTime = env->attackTime + env->decayTime + sustainWidth + env->releaseTime;
float scaleX = bounds.width/totalTime;
float scaleY = bounds.height;
Vector2 start = { bounds.x, bounds.y + bounds.height };
Vector2 peak = { start.x + (env->attackTime*scaleX), bounds.y };
Vector2 sustain = { peak.x + (env->decayTime*scaleX), bounds.y + (1.0f - env->sustainLevel)*scaleY };
Vector2 rel = { sustain.x + (sustainWidth*scaleX), sustain.y };
Vector2 end = { rel.x + (env->releaseTime*scaleX), bounds.y + bounds.height };
DrawLineV(start, peak, SKYBLUE);
DrawLineV(peak, sustain, BLUE);
DrawLineV(sustain, rel, DARKBLUE);
DrawLineV(rel, end, ORANGE);
DrawText("ADSR Visualizer", bounds.x, bounds.y - 20, 10, DARKGRAY);
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

6051
examples/audio/raygui.h Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,8 @@
GLFW_ICON ICON "raylib.ico" GLFW_ICON ICON "raylib.ico"
1 VERSIONINFO 1 VERSIONINFO
FILEVERSION 5,5,0,0 FILEVERSION 6,0,0,0
PRODUCTVERSION 5,5,0,0 PRODUCTVERSION 6,0,0,0
BEGIN BEGIN
BLOCK "StringFileInfo" BLOCK "StringFileInfo"
BEGIN BEGIN
@ -11,12 +11,12 @@ BEGIN
BEGIN BEGIN
VALUE "CompanyName", "raylib technologies" VALUE "CompanyName", "raylib technologies"
VALUE "FileDescription", "raylib application (www.raylib.com)" VALUE "FileDescription", "raylib application (www.raylib.com)"
VALUE "FileVersion", "5.5.0" VALUE "FileVersion", "6.0.0"
VALUE "InternalName", "raylib-example" VALUE "InternalName", "raylib-example"
VALUE "LegalCopyright", "(c) 2025 Ramon Santamaria (@raysan5)" VALUE "LegalCopyright", "(c) 2026 Ramon Santamaria (@raysan5)"
VALUE "OriginalFilename", "raylib-example" VALUE "OriginalFilename", "raylib-example"
VALUE "ProductName", "raylib-example" VALUE "ProductName", "raylib-example"
VALUE "ProductVersion", "5.5.0" VALUE "ProductVersion", "6.0.0"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"

View File

@ -69,7 +69,7 @@ int main(void)
DrawText("USING DEFAULT SHADER", 20, 40, 10, RED); DrawText("USING DEFAULT SHADER", 20, 40, 10, RED);
DrawCircle(80, 120, 35, DARKBLUE); DrawCircle(80, 120, 35, DARKBLUE);
DrawCircleGradient(80, 220, 60, GREEN, SKYBLUE); DrawCircleGradient((Vector2){ 80.0f, 220.0f }, 60, GREEN, SKYBLUE);
DrawCircleLines(80, 340, 80, DARKBLUE); DrawCircleLines(80, 340, 80, DARKBLUE);

View File

@ -50,7 +50,7 @@ int main(void)
// Circle shapes and lines // Circle shapes and lines
DrawCircle(screenWidth/5, 120, 35, DARKBLUE); DrawCircle(screenWidth/5, 120, 35, DARKBLUE);
DrawCircleGradient(screenWidth/5, 220, 60, GREEN, SKYBLUE); DrawCircleGradient((Vector2){ screenWidth/5.0f, 220.0f }, 60, GREEN, SKYBLUE);
DrawCircleLines(screenWidth/5, 340, 80, DARKBLUE); DrawCircleLines(screenWidth/5, 340, 80, DARKBLUE);
DrawEllipse(screenWidth/5, 120, 25, 20, YELLOW); DrawEllipse(screenWidth/5, 120, 25, 20, YELLOW);
DrawEllipseLines(screenWidth/5, 120, 30, 25, YELLOW); DrawEllipseLines(screenWidth/5, 120, 30, 25, YELLOW);

View File

@ -341,7 +341,7 @@ static void DrawLightMask(int slot)
rlSetBlendMode(BLEND_CUSTOM); rlSetBlendMode(BLEND_CUSTOM);
// If we are valid, then draw the light radius to the alpha mask // If we are valid, then draw the light radius to the alpha mask
if (lights[slot].valid) DrawCircleGradient((int)lights[slot].position.x, (int)lights[slot].position.y, lights[slot].outerRadius, ColorAlpha(WHITE, 0), WHITE); if (lights[slot].valid) DrawCircleGradient(lights[slot].position, lights[slot].outerRadius, ColorAlpha(WHITE, 0), WHITE);
rlDrawRenderBatchActive(); rlDrawRenderBatchActive();

View File

@ -5,7 +5,7 @@ project(example)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# Dependencies # Dependencies
set(RAYLIB_VERSION 5.5) set(RAYLIB_VERSION 6.0)
find_package(raylib ${RAYLIB_VERSION} QUIET) # QUIET or REQUIRED find_package(raylib ${RAYLIB_VERSION} QUIET) # QUIET or REQUIRED
if (NOT raylib_FOUND) # If there's none, fetch and build raylib if (NOT raylib_FOUND) # If there's none, fetch and build raylib
include(FetchContent) include(FetchContent)

View File

@ -191,7 +191,7 @@
<Overload retVal="const char" descr="Get clipboard text content"></Overload> <Overload retVal="const char" descr="Get clipboard text content"></Overload>
</KeyWord> </KeyWord>
<KeyWord name="GetClipboardImage" func="yes"> <KeyWord name="GetClipboardImage" func="yes">
<Overload retVal="Image" descr="Get clipboard image"></Overload> <Overload retVal="Image" descr="Get clipboard image content"></Overload>
</KeyWord> </KeyWord>
<KeyWord name="EnableEventWaiting" func="yes"> <KeyWord name="EnableEventWaiting" func="yes">
<Overload retVal="void" descr="Enable waiting for events on EndDrawing(), no automatic event polling"></Overload> <Overload retVal="void" descr="Enable waiting for events on EndDrawing(), no automatic event polling"></Overload>
@ -360,7 +360,7 @@
</Overload> </Overload>
</KeyWord> </KeyWord>
<KeyWord name="SetShaderValueTexture" func="yes"> <KeyWord name="SetShaderValueTexture" func="yes">
<Overload retVal="void" descr="Set shader uniform value for texture (sampler2d)"> <Overload retVal="void" descr="Set shader uniform value and bind the texture (sampler2d)">
<Param name="Shader shader" /> <Param name="Shader shader" />
<Param name="int locIndex" /> <Param name="int locIndex" />
<Param name="Texture2D texture" /> <Param name="Texture2D texture" />
@ -498,8 +498,12 @@
</Overload> </Overload>
</KeyWord> </KeyWord>
<!-- NOTE: Following functions implemented in module [utils] --> <!-- Logging system -->
<!-------------------------------------------------------------------- --> <KeyWord name="SetTraceLogLevel" func="yes">
<Overload retVal="void" descr="Set the current threshold (minimum) log level">
<Param name="int logLevel" />
</Overload>
</KeyWord>
<KeyWord name="TraceLog" func="yes"> <KeyWord name="TraceLog" func="yes">
<Overload retVal="void" descr="Show trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR...)"> <Overload retVal="void" descr="Show trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR...)">
<Param name="int logLevel" /> <Param name="int logLevel" />
@ -507,11 +511,13 @@
<Param name="..." /> <Param name="..." />
</Overload> </Overload>
</KeyWord> </KeyWord>
<KeyWord name="SetTraceLogLevel" func="yes"> <KeyWord name="SetTraceLogCallback" func="yes">
<Overload retVal="void" descr="Set the current threshold (minimum) log level"> <Overload retVal="void" descr="Set custom trace log">
<Param name="int logLevel" /> <Param name="TraceLogCallback callback" />
</Overload> </Overload>
</KeyWord> </KeyWord>
<!-- Memory management, using internal allocators -->
<KeyWord name="MemAlloc" func="yes"> <KeyWord name="MemAlloc" func="yes">
<Overload retVal="void" descr="Internal memory allocator"> <Overload retVal="void" descr="Internal memory allocator">
<Param name="unsigned int size" /> <Param name="unsigned int size" />
@ -524,35 +530,7 @@
<Overload retVal="void" descr="Internal memory free"></Overload> <Overload retVal="void" descr="Internal memory free"></Overload>
</KeyWord> </KeyWord>
<!-- Set custom callbacks --> <!-- File system management functions -->
<!-- WARNING: Callbacks setup is intended for advanced users -->
<KeyWord name="SetTraceLogCallback" func="yes">
<Overload retVal="void" descr="Set custom trace log">
<Param name="TraceLogCallback callback" />
</Overload>
</KeyWord>
<KeyWord name="SetLoadFileDataCallback" func="yes">
<Overload retVal="void" descr="Set custom file binary data loader">
<Param name="LoadFileDataCallback callback" />
</Overload>
</KeyWord>
<KeyWord name="SetSaveFileDataCallback" func="yes">
<Overload retVal="void" descr="Set custom file binary data saver">
<Param name="SaveFileDataCallback callback" />
</Overload>
</KeyWord>
<KeyWord name="SetLoadFileTextCallback" func="yes">
<Overload retVal="void" descr="Set custom file text data loader">
<Param name="LoadFileTextCallback callback" />
</Overload>
</KeyWord>
<KeyWord name="SetSaveFileTextCallback" func="yes">
<Overload retVal="void" descr="Set custom file text data saver">
<Param name="SaveFileTextCallback callback" />
</Overload>
</KeyWord>
<!-- Files management functions -->
<KeyWord name="char *LoadFileData" func="yes"> <KeyWord name="char *LoadFileData" func="yes">
<Overload retVal="unsigned" descr="Load file data as byte array (read)"> <Overload retVal="unsigned" descr="Load file data as byte array (read)">
<Param name="const char *fileName" /> <Param name="const char *fileName" />
@ -588,12 +566,69 @@
<KeyWord name="SaveFileText" func="yes"> <KeyWord name="SaveFileText" func="yes">
<Overload retVal="bool" descr="Save text data to file (write), string must be '\0' terminated, returns true on success"> <Overload retVal="bool" descr="Save text data to file (write), string must be '\0' terminated, returns true on success">
<Param name="const char *fileName" /> <Param name="const char *fileName" />
<Param name="char *text" /> <Param name="const char *text" />
</Overload> </Overload>
</KeyWord> </KeyWord>
<!-------------------------------------------------------------------- -->
<!-- File system functions --> <!-- File access custom callbacks -->
<!-- WARNING: Callbacks setup is intended for advanced users -->
<KeyWord name="SetLoadFileDataCallback" func="yes">
<Overload retVal="void" descr="Set custom file binary data loader">
<Param name="LoadFileDataCallback callback" />
</Overload>
</KeyWord>
<KeyWord name="SetSaveFileDataCallback" func="yes">
<Overload retVal="void" descr="Set custom file binary data saver">
<Param name="SaveFileDataCallback callback" />
</Overload>
</KeyWord>
<KeyWord name="SetLoadFileTextCallback" func="yes">
<Overload retVal="void" descr="Set custom file text data loader">
<Param name="LoadFileTextCallback callback" />
</Overload>
</KeyWord>
<KeyWord name="SetSaveFileTextCallback" func="yes">
<Overload retVal="void" descr="Set custom file text data saver">
<Param name="SaveFileTextCallback callback" />
</Overload>
</KeyWord>
<KeyWord name="FileRename" func="yes">
<Overload retVal="int" descr="Rename file (if exists)">
<Param name="const char *fileName" />
<Param name="const char *fileRename" />
</Overload>
</KeyWord>
<KeyWord name="FileRemove" func="yes">
<Overload retVal="int" descr="Remove file (if exists)">
<Param name="const char *fileName" />
</Overload>
</KeyWord>
<KeyWord name="FileCopy" func="yes">
<Overload retVal="int" descr="Copy file from one path to another, dstPath created if it doesn't exist">
<Param name="const char *srcPath" />
<Param name="const char *dstPath" />
</Overload>
</KeyWord>
<KeyWord name="FileMove" func="yes">
<Overload retVal="int" descr="Move file from one directory to another, dstPath created if it doesn't exist">
<Param name="const char *srcPath" />
<Param name="const char *dstPath" />
</Overload>
</KeyWord>
<KeyWord name="FileTextReplace" func="yes">
<Overload retVal="int" descr="Replace text in an existing file">
<Param name="const char *fileName" />
<Param name="const char *search" />
<Param name="const char *replacement" />
</Overload>
</KeyWord>
<KeyWord name="FileTextFindIndex" func="yes">
<Overload retVal="int" descr="Find text in existing file">
<Param name="const char *fileName" />
<Param name="const char *search" />
</Overload>
</KeyWord>
<KeyWord name="FileExists" func="yes"> <KeyWord name="FileExists" func="yes">
<Overload retVal="bool" descr="Check if file exists"> <Overload retVal="bool" descr="Check if file exists">
<Param name="const char *fileName" /> <Param name="const char *fileName" />
@ -605,7 +640,7 @@
</Overload> </Overload>
</KeyWord> </KeyWord>
<KeyWord name="IsFileExtension" func="yes"> <KeyWord name="IsFileExtension" func="yes">
<Overload retVal="bool" descr="Check file extension (including point: .png, .wav)"> <Overload retVal="bool" descr="Check file extension (recommended include point: .png, .wav)">
<Param name="const char *fileName" /> <Param name="const char *fileName" />
<Param name="const char *ext" /> <Param name="const char *ext" />
</Overload> </Overload>
@ -615,6 +650,11 @@
<Param name="const char *fileName" /> <Param name="const char *fileName" />
</Overload> </Overload>
</KeyWord> </KeyWord>
<KeyWord name="GetFileModTime" func="yes">
<Overload retVal="long" descr="Get file modification time (last write time)">
<Param name="const char *fileName" />
</Overload>
</KeyWord>
<KeyWord name="GetFileExtension" func="yes"> <KeyWord name="GetFileExtension" func="yes">
<Overload retVal="const char" descr="Get pointer to extension for a filename string (includes dot: '.png')"> <Overload retVal="const char" descr="Get pointer to extension for a filename string (includes dot: '.png')">
<Param name="const char *fileName" /> <Param name="const char *fileName" />
@ -653,7 +693,7 @@
</KeyWord> </KeyWord>
<KeyWord name="ChangeDirectory" func="yes"> <KeyWord name="ChangeDirectory" func="yes">
<Overload retVal="bool" descr="Change working directory, return true on success"> <Overload retVal="bool" descr="Change working directory, return true on success">
<Param name="const char *dir" /> <Param name="const char *dirPath" />
</Overload> </Overload>
</KeyWord> </KeyWord>
<KeyWord name="IsPathFile" func="yes"> <KeyWord name="IsPathFile" func="yes">
@ -667,12 +707,12 @@
</Overload> </Overload>
</KeyWord> </KeyWord>
<KeyWord name="LoadDirectoryFiles" func="yes"> <KeyWord name="LoadDirectoryFiles" func="yes">
<Overload retVal="FilePathList" descr="Load directory filepaths"> <Overload retVal="FilePathList" descr="Load directory filepaths, files and directories, no subdirs scan">
<Param name="const char *dirPath" /> <Param name="const char *dirPath" />
</Overload> </Overload>
</KeyWord> </KeyWord>
<KeyWord name="LoadDirectoryFilesEx" func="yes"> <KeyWord name="LoadDirectoryFilesEx" func="yes">
<Overload retVal="FilePathList" descr="Load directory filepaths with extension filtering and recursive directory scan. Use 'DIR' in the filter string to include directories in the result"> <Overload retVal="FilePathList" descr="Load directory filepaths with extension filtering and subdir scan; some filters available: "*.*", "FILES*", "DIRS*"">
<Param name="const char *basePath" /> <Param name="const char *basePath" />
<Param name="const char *filter" /> <Param name="const char *filter" />
<Param name="bool scanSubdirs" /> <Param name="bool scanSubdirs" />
@ -694,9 +734,16 @@
<Param name="FilePathList files" /> <Param name="FilePathList files" />
</Overload> </Overload>
</KeyWord> </KeyWord>
<KeyWord name="GetFileModTime" func="yes"> <KeyWord name="int GetDirectoryFileCount" func="yes">
<Overload retVal="long" descr="Get file modification time (last write time)"> <Overload retVal="unsigned" descr="Get the file count in a directory">
<Param name="const char *fileName" /> <Param name="const char *dirPath" />
</Overload>
</KeyWord>
<KeyWord name="int GetDirectoryFileCountEx" func="yes">
<Overload retVal="unsigned" descr="Get the file count in a directory with extension filtering and recursive directory scan. Use 'DIR' in the filter string to include directories in the result">
<Param name="const char *basePath" />
<Param name="const char *filter" />
<Param name="bool scanSubdirs" />
</Overload> </Overload>
</KeyWord> </KeyWord>
@ -716,15 +763,15 @@
</Overload> </Overload>
</KeyWord> </KeyWord>
<KeyWord name="EncodeDataBase64" func="yes"> <KeyWord name="EncodeDataBase64" func="yes">
<Overload retVal="char" descr="Encode data to Base64 string, memory must be MemFree()"> <Overload retVal="char" descr="Encode data to Base64 string (includes NULL terminator), memory must be MemFree()">
<Param name="const unsigned char" /> <Param name="const unsigned char" />
<Param name="int dataSize" /> <Param name="int dataSize" />
<Param name="int *outputSize" /> <Param name="int *outputSize" />
</Overload> </Overload>
</KeyWord> </KeyWord>
<KeyWord name="char *DecodeDataBase64" func="yes"> <KeyWord name="char *DecodeDataBase64" func="yes">
<Overload retVal="unsigned" descr="Decode Base64 string data, memory must be MemFree()"> <Overload retVal="unsigned" descr="Decode Base64 string (expected NULL terminated), memory must be MemFree()">
<Param name="const unsigned char" /> <Param name="const char *text" />
<Param name="int *outputSize" /> <Param name="int *outputSize" />
</Overload> </Overload>
</KeyWord> </KeyWord>
@ -746,7 +793,12 @@
<Param name="int dataSize" /> <Param name="int dataSize" />
</Overload> </Overload>
</KeyWord> </KeyWord>
<KeyWord name="int *ComputeSHA256" func="yes">
<Overload retVal="unsigned" descr="Compute SHA256 hash code, returns static int[8] (32 bytes)">
<Param name="unsigned char *data" />
<Param name="int dataSize" />
</Overload>
</KeyWord>
<!-- Automation events functionality --> <!-- Automation events functionality -->
<KeyWord name="LoadAutomationEventList" func="yes"> <KeyWord name="LoadAutomationEventList" func="yes">
@ -823,6 +875,11 @@
<KeyWord name="GetCharPressed" func="yes"> <KeyWord name="GetCharPressed" func="yes">
<Overload retVal="int" descr="Get char pressed (unicode), call it multiple times for chars queued, returns 0 when the queue is empty"></Overload> <Overload retVal="int" descr="Get char pressed (unicode), call it multiple times for chars queued, returns 0 when the queue is empty"></Overload>
</KeyWord> </KeyWord>
<KeyWord name="GetKeyName" func="yes">
<Overload retVal="const char" descr="Get name of a QWERTY key on the current keyboard layout (eg returns string 'q' for KEY_A on an AZERTY keyboard)">
<Param name="int key" />
</Overload>
</KeyWord>
<KeyWord name="SetExitKey" func="yes"> <KeyWord name="SetExitKey" func="yes">
<Overload retVal="void" descr="Set a custom key to exit program (default is ESC)"> <Overload retVal="void" descr="Set a custom key to exit program (default is ESC)">
<Param name="int key" /> <Param name="int key" />
@ -868,12 +925,12 @@
<Overload retVal="int" descr="Get the last gamepad button pressed"></Overload> <Overload retVal="int" descr="Get the last gamepad button pressed"></Overload>
</KeyWord> </KeyWord>
<KeyWord name="GetGamepadAxisCount" func="yes"> <KeyWord name="GetGamepadAxisCount" func="yes">
<Overload retVal="int" descr="Get gamepad axis count for a gamepad"> <Overload retVal="int" descr="Get axis count for a gamepad">
<Param name="int gamepad" /> <Param name="int gamepad" />
</Overload> </Overload>
</KeyWord> </KeyWord>
<KeyWord name="GetGamepadAxisMovement" func="yes"> <KeyWord name="GetGamepadAxisMovement" func="yes">
<Overload retVal="float" descr="Get axis movement value for a gamepad axis"> <Overload retVal="float" descr="Get movement value for a gamepad axis">
<Param name="int gamepad" /> <Param name="int gamepad" />
<Param name="int axis" /> <Param name="int axis" />
</Overload> </Overload>
@ -1098,6 +1155,15 @@
<Param name="Color color" /> <Param name="Color color" />
</Overload> </Overload>
</KeyWord> </KeyWord>
<KeyWord name="DrawLineDashed" func="yes">
<Overload retVal="void" descr="Draw a dashed line">
<Param name="Vector2 startPos" />
<Param name="Vector2 endPos" />
<Param name="int dashSize" />
<Param name="int spaceSize" />
<Param name="Color color" />
</Overload>
</KeyWord>
<KeyWord name="DrawCircle" func="yes"> <KeyWord name="DrawCircle" func="yes">
<Overload retVal="void" descr="Draw a color-filled circle"> <Overload retVal="void" descr="Draw a color-filled circle">
<Param name="int centerX" /> <Param name="int centerX" />
@ -1106,6 +1172,21 @@
<Param name="Color color" /> <Param name="Color color" />
</Overload> </Overload>
</KeyWord> </KeyWord>
<KeyWord name="DrawCircleV" func="yes">
<Overload retVal="void" descr="Draw a color-filled circle (Vector version)">
<Param name="Vector2 center" />
<Param name="float radius" />
<Param name="Color color" />
</Overload>
</KeyWord>
<KeyWord name="DrawCircleGradient" func="yes">
<Overload retVal="void" descr="Draw a gradient-filled circle">
<Param name="Vector2 center" />
<Param name="float radius" />
<Param name="Color inner" />
<Param name="Color outer" />
</Overload>
</KeyWord>
<KeyWord name="DrawCircleSector" func="yes"> <KeyWord name="DrawCircleSector" func="yes">
<Overload retVal="void" descr="Draw a piece of a circle"> <Overload retVal="void" descr="Draw a piece of a circle">
<Param name="Vector2 center" /> <Param name="Vector2 center" />
@ -1126,22 +1207,6 @@
<Param name="Color color" /> <Param name="Color color" />
</Overload> </Overload>
</KeyWord> </KeyWord>
<KeyWord name="DrawCircleGradient" func="yes">
<Overload retVal="void" descr="Draw a gradient-filled circle">
<Param name="int centerX" />
<Param name="int centerY" />
<Param name="float radius" />
<Param name="Color inner" />
<Param name="Color outer" />
</Overload>
</KeyWord>
<KeyWord name="DrawCircleV" func="yes">
<Overload retVal="void" descr="Draw a color-filled circle (Vector version)">
<Param name="Vector2 center" />
<Param name="float radius" />
<Param name="Color color" />
</Overload>
</KeyWord>
<KeyWord name="DrawCircleLines" func="yes"> <KeyWord name="DrawCircleLines" func="yes">
<Overload retVal="void" descr="Draw circle outline"> <Overload retVal="void" descr="Draw circle outline">
<Param name="int centerX" /> <Param name="int centerX" />
@ -1166,6 +1231,14 @@
<Param name="Color color" /> <Param name="Color color" />
</Overload> </Overload>
</KeyWord> </KeyWord>
<KeyWord name="DrawEllipseV" func="yes">
<Overload retVal="void" descr="Draw ellipse (Vector version)">
<Param name="Vector2 center" />
<Param name="float radiusH" />
<Param name="float radiusV" />
<Param name="Color color" />
</Overload>
</KeyWord>
<KeyWord name="DrawEllipseLines" func="yes"> <KeyWord name="DrawEllipseLines" func="yes">
<Overload retVal="void" descr="Draw ellipse outline"> <Overload retVal="void" descr="Draw ellipse outline">
<Param name="int centerX" /> <Param name="int centerX" />
@ -1175,6 +1248,14 @@
<Param name="Color color" /> <Param name="Color color" />
</Overload> </Overload>
</KeyWord> </KeyWord>
<KeyWord name="DrawEllipseLinesV" func="yes">
<Overload retVal="void" descr="Draw ellipse outline (Vector version)">
<Param name="Vector2 center" />
<Param name="float radiusH" />
<Param name="float radiusV" />
<Param name="Color color" />
</Overload>
</KeyWord>
<KeyWord name="DrawRing" func="yes"> <KeyWord name="DrawRing" func="yes">
<Overload retVal="void" descr="Draw ring"> <Overload retVal="void" descr="Draw ring">
<Param name="Vector2 center" /> <Param name="Vector2 center" />
@ -1252,8 +1333,8 @@
<Param name="Rectangle rec" /> <Param name="Rectangle rec" />
<Param name="Color topLeft" /> <Param name="Color topLeft" />
<Param name="Color bottomLeft" /> <Param name="Color bottomLeft" />
<Param name="Color topRight" />
<Param name="Color bottomRight" /> <Param name="Color bottomRight" />
<Param name="Color topRight" />
</Overload> </Overload>
</KeyWord> </KeyWord>
<KeyWord name="DrawRectangleLines" func="yes"> <KeyWord name="DrawRectangleLines" func="yes">
@ -1637,7 +1718,7 @@
</Overload> </Overload>
</KeyWord> </KeyWord>
<KeyWord name="char *ExportImageToMemory" func="yes"> <KeyWord name="char *ExportImageToMemory" func="yes">
<Overload retVal="unsigned" descr="Export image to memory buffer"> <Overload retVal="unsigned" descr="Export image to memory buffer, memory must be MemFree()">
<Param name="Image image" /> <Param name="Image image" />
<Param name="const char *fileType" /> <Param name="const char *fileType" />
<Param name="int *fileSize" /> <Param name="int *fileSize" />
@ -2099,7 +2180,7 @@
<KeyWord name="ImageDrawTriangleFan" func="yes"> <KeyWord name="ImageDrawTriangleFan" func="yes">
<Overload retVal="void" descr="Draw a triangle fan defined by points within an image (first vertex is the center)"> <Overload retVal="void" descr="Draw a triangle fan defined by points within an image (first vertex is the center)">
<Param name="Image *dst" /> <Param name="Image *dst" />
<Param name="Vector2 *points" /> <Param name="const Vector2 *points" />
<Param name="int pointCount" /> <Param name="int pointCount" />
<Param name="Color color" /> <Param name="Color color" />
</Overload> </Overload>
@ -2107,7 +2188,7 @@
<KeyWord name="ImageDrawTriangleStrip" func="yes"> <KeyWord name="ImageDrawTriangleStrip" func="yes">
<Overload retVal="void" descr="Draw a triangle strip defined by points within an image"> <Overload retVal="void" descr="Draw a triangle strip defined by points within an image">
<Param name="Image *dst" /> <Param name="Image *dst" />
<Param name="Vector2 *points" /> <Param name="const Vector2 *points" />
<Param name="int pointCount" /> <Param name="int pointCount" />
<Param name="Color color" /> <Param name="Color color" />
</Overload> </Overload>
@ -2188,13 +2269,13 @@
</Overload> </Overload>
</KeyWord> </KeyWord>
<KeyWord name="UpdateTexture" func="yes"> <KeyWord name="UpdateTexture" func="yes">
<Overload retVal="void" descr="Update GPU texture with new data"> <Overload retVal="void" descr="Update GPU texture with new data (pixels should be able to fill texture)">
<Param name="Texture2D texture" /> <Param name="Texture2D texture" />
<Param name="const void *pixels" /> <Param name="const void *pixels" />
</Overload> </Overload>
</KeyWord> </KeyWord>
<KeyWord name="UpdateTextureRec" func="yes"> <KeyWord name="UpdateTextureRec" func="yes">
<Overload retVal="void" descr="Update GPU texture rectangle with new data"> <Overload retVal="void" descr="Update GPU texture rectangle with new data (pixels and rec should fit in texture)">
<Param name="Texture2D texture" /> <Param name="Texture2D texture" />
<Param name="Rectangle rec" /> <Param name="Rectangle rec" />
<Param name="const void *pixels" /> <Param name="const void *pixels" />
@ -2388,7 +2469,7 @@
<Overload retVal="Font" descr="Load font from file with extended parameters, use NULL for codepoints and 0 for codepointCount to load the default character set, font size is provided in pixels height"> <Overload retVal="Font" descr="Load font from file with extended parameters, use NULL for codepoints and 0 for codepointCount to load the default character set, font size is provided in pixels height">
<Param name="const char *fileName" /> <Param name="const char *fileName" />
<Param name="int fontSize" /> <Param name="int fontSize" />
<Param name="int *codepoints" /> <Param name="const int *codepoints" />
<Param name="int codepointCount" /> <Param name="int codepointCount" />
</Overload> </Overload>
</KeyWord> </KeyWord>
@ -2405,7 +2486,7 @@
<Param name="const unsigned char" /> <Param name="const unsigned char" />
<Param name="int dataSize" /> <Param name="int dataSize" />
<Param name="int fontSize" /> <Param name="int fontSize" />
<Param name="int *codepoints" /> <Param name="const int *codepoints" />
<Param name="int codepointCount" /> <Param name="int codepointCount" />
</Overload> </Overload>
</KeyWord> </KeyWord>
@ -2419,9 +2500,10 @@
<Param name="const unsigned char" /> <Param name="const unsigned char" />
<Param name="int dataSize" /> <Param name="int dataSize" />
<Param name="int fontSize" /> <Param name="int fontSize" />
<Param name="int *codepoints" /> <Param name="const int *codepoints" />
<Param name="int codepointCount" /> <Param name="int codepointCount" />
<Param name="int type" /> <Param name="int type" />
<Param name="int *glyphCount" />
</Overload> </Overload>
</KeyWord> </KeyWord>
<KeyWord name="GenImageFontAtlas" func="yes"> <KeyWord name="GenImageFontAtlas" func="yes">
@ -2531,6 +2613,15 @@
<Param name="float spacing" /> <Param name="float spacing" />
</Overload> </Overload>
</KeyWord> </KeyWord>
<KeyWord name="MeasureTextCodepoints" func="yes">
<Overload retVal="Vector2" descr="Measure string size for an existing array of codepoints for Font">
<Param name="Font font" />
<Param name="const int *codepoints" />
<Param name="int length" />
<Param name="float fontSize" />
<Param name="float spacing" />
</Overload>
</KeyWord>
<KeyWord name="GetGlyphIndex" func="yes"> <KeyWord name="GetGlyphIndex" func="yes">
<Overload retVal="int" descr="Get glyph index position in font for a codepoint (unicode character), fallback to '?' if not found"> <Overload retVal="int" descr="Get glyph index position in font for a codepoint (unicode character), fallback to '?' if not found">
<Param name="Font font" /> <Param name="Font font" />
@ -2604,7 +2695,20 @@
</KeyWord> </KeyWord>
<!-- Text strings management functions (no UTF-8 strings, only byte chars) --> <!-- Text strings management functions (no UTF-8 strings, only byte chars) -->
<!-- NOTE: Some strings allocate memory internally for returned strings, just be careful! --> <!-- WARNING 1: Most of these functions use internal static buffers[], it's recommended to store returned data on user-side for re-use -->
<!-- WARNING 2: Some functions allocate memory internally for the returned strings, those strings must be freed by user using MemFree() -->
<KeyWord name="LoadTextLines" func="yes">
<Overload retVal="char" descr="Load text as separate lines ('\n')">
<Param name="const char *text" />
<Param name="int *count" />
</Overload>
</KeyWord>
<KeyWord name="UnloadTextLines" func="yes">
<Overload retVal="void" descr="Unload text lines">
<Param name="char **text" />
<Param name="int lineCount" />
</Overload>
</KeyWord>
<KeyWord name="TextCopy" func="yes"> <KeyWord name="TextCopy" func="yes">
<Overload retVal="int" descr="Copy one string to another, returns bytes copied"> <Overload retVal="int" descr="Copy one string to another, returns bytes copied">
<Param name="char *dst" /> <Param name="char *dst" />
@ -2635,80 +2739,121 @@
<Param name="int length" /> <Param name="int length" />
</Overload> </Overload>
</KeyWord> </KeyWord>
<KeyWord name="TextReplace" func="yes"> <KeyWord name="TextRemoveSpaces" func="yes">
<Overload retVal="char" descr="Replace text string (WARNING: memory must be freed!)"> <Overload retVal="const char" descr="Remove text spaces, concat words">
<Param name="const char *text" /> <Param name="const char *text" />
<Param name="const char *replace" /> </Overload>
<Param name="const char *by" /> </KeyWord>
<KeyWord name="GetTextBetween" func="yes">
<Overload retVal="char" descr="Get text between two strings">
<Param name="const char *text" />
<Param name="const char *begin" />
<Param name="const char *end" />
</Overload>
</KeyWord>
<KeyWord name="TextReplace" func="yes">
<Overload retVal="char" descr="Replace text string with new string">
<Param name="const char *text" />
<Param name="const char *search" />
<Param name="const char *replacement" />
</Overload>
</KeyWord>
<KeyWord name="TextReplaceAlloc" func="yes">
<Overload retVal="char" descr="Replace text string with new string, memory must be MemFree()">
<Param name="const char *text" />
<Param name="const char *search" />
<Param name="const char *replacement" />
</Overload>
</KeyWord>
<KeyWord name="TextReplaceBetween" func="yes">
<Overload retVal="char" descr="Replace text between two specific strings">
<Param name="const char *text" />
<Param name="const char *begin" />
<Param name="const char *end" />
<Param name="const char *replacement" />
</Overload>
</KeyWord>
<KeyWord name="TextReplaceBetweenAlloc" func="yes">
<Overload retVal="char" descr="Replace text between two specific strings, memory must be MemFree()">
<Param name="const char *text" />
<Param name="const char *begin" />
<Param name="const char *end" />
<Param name="const char *replacement" />
</Overload> </Overload>
</KeyWord> </KeyWord>
<KeyWord name="TextInsert" func="yes"> <KeyWord name="TextInsert" func="yes">
<Overload retVal="char" descr="Insert text in a position (WARNING: memory must be freed!)"> <Overload retVal="char" descr="Insert text in a defined byte position">
<Param name="const char *text" />
<Param name="const char *insert" />
<Param name="int position" />
</Overload>
</KeyWord>
<KeyWord name="TextInsertAlloc" func="yes">
<Overload retVal="char" descr="Insert text in a defined byte position, memory must be MemFree()">
<Param name="const char *text" /> <Param name="const char *text" />
<Param name="const char *insert" /> <Param name="const char *insert" />
<Param name="int position" /> <Param name="int position" />
</Overload> </Overload>
</KeyWord> </KeyWord>
<KeyWord name="TextJoin" func="yes"> <KeyWord name="TextJoin" func="yes">
<Overload retVal="const char" descr="Join text strings with delimiter"> <Overload retVal="char" descr="Join text strings with delimiter">
<Param name="const char **textList" /> <Param name="char **textList" />
<Param name="int count" /> <Param name="int count" />
<Param name="const char *delimiter" /> <Param name="const char *delimiter" />
</Overload> </Overload>
</KeyWord> </KeyWord>
<KeyWord name="TextSplit" func="yes"> <KeyWord name="TextSplit" func="yes">
<Overload retVal="const char" descr="Split text into multiple strings"> <Overload retVal="char" descr="Split text into multiple strings, using MAX_TEXTSPLIT_COUNT static strings">
<Param name="const char *text" /> <Param name="const char *text" />
<Param name="char delimiter" /> <Param name="char delimiter" />
<Param name="int *count" /> <Param name="int *count" />
</Overload> </Overload>
</KeyWord> </KeyWord>
<KeyWord name="TextAppend" func="yes"> <KeyWord name="TextAppend" func="yes">
<Overload retVal="void" descr="Append text at specific position and move cursor!"> <Overload retVal="void" descr="Append text at specific position and move cursor">
<Param name="char *text" /> <Param name="char *text" />
<Param name="const char *append" /> <Param name="const char *append" />
<Param name="int *position" /> <Param name="int *position" />
</Overload> </Overload>
</KeyWord> </KeyWord>
<KeyWord name="TextFindIndex" func="yes"> <KeyWord name="TextFindIndex" func="yes">
<Overload retVal="int" descr="Find first text occurrence within a string"> <Overload retVal="int" descr="Find first text occurrence within a string, -1 if not found">
<Param name="const char *text" /> <Param name="const char *text" />
<Param name="const char *find" /> <Param name="const char *search" />
</Overload> </Overload>
</KeyWord> </KeyWord>
<KeyWord name="TextToUpper" func="yes"> <KeyWord name="TextToUpper" func="yes">
<Overload retVal="const char" descr="Get upper case version of provided string"> <Overload retVal="char" descr="Get upper case version of provided string">
<Param name="const char *text" /> <Param name="const char *text" />
</Overload> </Overload>
</KeyWord> </KeyWord>
<KeyWord name="TextToLower" func="yes"> <KeyWord name="TextToLower" func="yes">
<Overload retVal="const char" descr="Get lower case version of provided string"> <Overload retVal="char" descr="Get lower case version of provided string">
<Param name="const char *text" /> <Param name="const char *text" />
</Overload> </Overload>
</KeyWord> </KeyWord>
<KeyWord name="TextToPascal" func="yes"> <KeyWord name="TextToPascal" func="yes">
<Overload retVal="const char" descr="Get Pascal case notation version of provided string"> <Overload retVal="char" descr="Get Pascal case notation version of provided string">
<Param name="const char *text" /> <Param name="const char *text" />
</Overload> </Overload>
</KeyWord> </KeyWord>
<KeyWord name="TextToSnake" func="yes"> <KeyWord name="TextToSnake" func="yes">
<Overload retVal="const char" descr="Get Snake case notation version of provided string"> <Overload retVal="char" descr="Get Snake case notation version of provided string">
<Param name="const char *text" /> <Param name="const char *text" />
</Overload> </Overload>
</KeyWord> </KeyWord>
<KeyWord name="TextToCamel" func="yes"> <KeyWord name="TextToCamel" func="yes">
<Overload retVal="const char" descr="Get Camel case notation version of provided string"> <Overload retVal="char" descr="Get Camel case notation version of provided string">
<Param name="const char *text" /> <Param name="const char *text" />
</Overload> </Overload>
</KeyWord> </KeyWord>
<KeyWord name="TextToInteger" func="yes"> <KeyWord name="TextToInteger" func="yes">
<Overload retVal="int" descr="Get integer value from text (negative values not supported)"> <Overload retVal="int" descr="Get integer value from text">
<Param name="const char *text" /> <Param name="const char *text" />
</Overload> </Overload>
</KeyWord> </KeyWord>
<KeyWord name="TextToFloat" func="yes"> <KeyWord name="TextToFloat" func="yes">
<Overload retVal="float" descr="Get float value from text (negative values not supported)"> <Overload retVal="float" descr="Get float value from text">
<Param name="const char *text" /> <Param name="const char *text" />
</Overload> </Overload>
</KeyWord> </KeyWord>
@ -2995,7 +3140,7 @@
<Param name="Vector2 size" /> <Param name="Vector2 size" />
<Param name="Vector2 origin" /> <Param name="Vector2 origin" />
<Param name="float rotation" /> <Param name="float rotation" />
<Param name="<EFBFBD><EFBFBD>_)% " /> <Param name="Color tint" />
</Overload> </Overload>
</KeyWord> </KeyWord>
@ -3180,22 +3325,20 @@
</Overload> </Overload>
</KeyWord> </KeyWord>
<KeyWord name="UpdateModelAnimation" func="yes"> <KeyWord name="UpdateModelAnimation" func="yes">
<Overload retVal="void" descr="Update model animation pose (CPU)"> <Overload retVal="void" descr="Update model animation pose (vertex buffers and bone matrices)">
<Param name="Model model" /> <Param name="Model model" />
<Param name="ModelAnimation anim" /> <Param name="ModelAnimation anim" />
<Param name="int frame" /> <Param name="float frame" />
</Overload> </Overload>
</KeyWord> </KeyWord>
<KeyWord name="UpdateModelAnimationBones" func="yes"> <KeyWord name="UpdateModelAnimationEx" func="yes">
<Overload retVal="void" descr="Update model animation mesh bone matrices (GPU skinning)"> <Overload retVal="void" descr="Update model animation pose, blending two animations">
<Param name="Model model" /> <Param name="Model model" />
<Param name="ModelAnimation anim" /> <Param name="ModelAnimation animA" />
<Param name="int frame" /> <Param name="float frameA" />
</Overload> <Param name="ModelAnimation animB" />
</KeyWord> <Param name="float frameB" />
<KeyWord name="UnloadModelAnimation" func="yes"> <Param name="float blend" />
<Overload retVal="void" descr="Unload animation data">
<Param name="ModelAnimation anim" />
</Overload> </Overload>
</KeyWord> </KeyWord>
<KeyWord name="UnloadModelAnimations" func="yes"> <KeyWord name="UnloadModelAnimations" func="yes">
@ -3333,7 +3476,7 @@
</Overload> </Overload>
</KeyWord> </KeyWord>
<KeyWord name="UpdateSound" func="yes"> <KeyWord name="UpdateSound" func="yes">
<Overload retVal="void" descr="Update sound buffer with new data"> <Overload retVal="void" descr="Update sound buffer with new data (default data format: 32 bit float, stereo)">
<Param name="Sound sound" /> <Param name="Sound sound" />
<Param name="const void *data" /> <Param name="const void *data" />
<Param name="int sampleCount" /> <Param name="int sampleCount" />
@ -3406,7 +3549,7 @@
</Overload> </Overload>
</KeyWord> </KeyWord>
<KeyWord name="SetSoundPan" func="yes"> <KeyWord name="SetSoundPan" func="yes">
<Overload retVal="void" descr="Set pan for a sound (0.5 is center)"> <Overload retVal="void" descr="Set pan for a sound (-1.0 left, 0.0 center, 1.0 right)">
<Param name="Sound sound" /> <Param name="Sound sound" />
<Param name="float pan" /> <Param name="float pan" />
</Overload> </Overload>
@ -3514,7 +3657,7 @@
</Overload> </Overload>
</KeyWord> </KeyWord>
<KeyWord name="SetMusicPan" func="yes"> <KeyWord name="SetMusicPan" func="yes">
<Overload retVal="void" descr="Set pan for a music (0.5 is center)"> <Overload retVal="void" descr="Set pan for a music (-1.0 left, 0.0 center, 1.0 right)">
<Param name="Music music" /> <Param name="Music music" />
<Param name="float pan" /> <Param name="float pan" />
</Overload> </Overload>
@ -3598,7 +3741,7 @@
</Overload> </Overload>
</KeyWord> </KeyWord>
<KeyWord name="SetAudioStreamPan" func="yes"> <KeyWord name="SetAudioStreamPan" func="yes">
<Overload retVal="void" descr="Set pan for audio stream (0.5 is centered)"> <Overload retVal="void" descr="Set pan for audio stream (-1.0 to 1.0 range, 0.0 is centered)">
<Param name="AudioStream stream" /> <Param name="AudioStream stream" />
<Param name="float pan" /> <Param name="float pan" />
</Overload> </Overload>
@ -3638,5 +3781,3 @@
<Param name="AudioCallback processor" /> <Param name="AudioCallback processor" />
</Overload> </Overload>
</KeyWord> </KeyWord>

View File

@ -49,7 +49,7 @@ RLAPI Vector2 GetWindowScaleDPI(void); // Get window
RLAPI const char *GetMonitorName(int monitor); // Get the human-readable, UTF-8 encoded name of the specified monitor RLAPI const char *GetMonitorName(int monitor); // Get the human-readable, UTF-8 encoded name of the specified monitor
RLAPI void SetClipboardText(const char *text); // Set clipboard text content RLAPI void SetClipboardText(const char *text); // Set clipboard text content
RLAPI const char *GetClipboardText(void); // Get clipboard text content RLAPI const char *GetClipboardText(void); // Get clipboard text content
RLAPI Image GetClipboardImage(void); // Get clipboard image RLAPI Image GetClipboardImage(void); // Get clipboard image content
RLAPI void EnableEventWaiting(void); // Enable waiting for events on EndDrawing(), no automatic event polling RLAPI void EnableEventWaiting(void); // Enable waiting for events on EndDrawing(), no automatic event polling
RLAPI void DisableEventWaiting(void); // Disable waiting for events on EndDrawing(), automatic events polling RLAPI void DisableEventWaiting(void); // Disable waiting for events on EndDrawing(), automatic events polling
@ -91,10 +91,10 @@ RLAPI Shader LoadShaderFromMemory(const char *vsCode, const char *fsCode); // Lo
RLAPI bool IsShaderValid(Shader shader); // Check if a shader is valid (loaded on GPU) RLAPI bool IsShaderValid(Shader shader); // Check if a shader is valid (loaded on GPU)
RLAPI int GetShaderLocation(Shader shader, const char *uniformName); // Get shader uniform location RLAPI int GetShaderLocation(Shader shader, const char *uniformName); // Get shader uniform location
RLAPI int GetShaderLocationAttrib(Shader shader, const char *attribName); // Get shader attribute location RLAPI int GetShaderLocationAttrib(Shader shader, const char *attribName); // Get shader attribute location
RLAPI void SetShaderValue(Shader shader, int locIndex, const void *value, int uniformType); // Set shader uniform value RLAPI void SetShaderValue(Shader shader, int locIndex, const void *value, int uniformType); // Set shader uniform value
RLAPI void SetShaderValueV(Shader shader, int locIndex, const void *value, int uniformType, int count); // Set shader uniform value vector RLAPI void SetShaderValueV(Shader shader, int locIndex, const void *value, int uniformType, int count); // Set shader uniform value vector
RLAPI void SetShaderValueMatrix(Shader shader, int locIndex, Matrix mat); // Set shader uniform value (matrix 4x4) RLAPI void SetShaderValueMatrix(Shader shader, int locIndex, Matrix mat); // Set shader uniform value (matrix 4x4)
RLAPI void SetShaderValueTexture(Shader shader, int locIndex, Texture2D texture); // Set shader uniform value for texture (sampler2d) RLAPI void SetShaderValueTexture(Shader shader, int locIndex, Texture2D texture); // Set shader uniform value and bind the texture (sampler2d)
RLAPI void UnloadShader(Shader shader); // Unload shader from GPU memory (VRAM) RLAPI void UnloadShader(Shader shader); // Unload shader from GPU memory (VRAM)
// Screen-space-related functions // Screen-space-related functions
@ -109,99 +109,106 @@ RLAPI Matrix GetCameraMatrix(Camera camera); // Get c
RLAPI Matrix GetCameraMatrix2D(Camera2D camera); // Get camera 2d transform matrix RLAPI Matrix GetCameraMatrix2D(Camera2D camera); // Get camera 2d transform matrix
// Timing-related functions // Timing-related functions
RLAPI void SetTargetFPS(int fps); // Set target FPS (maximum) RLAPI void SetTargetFPS(int fps); // Set target FPS (maximum)
RLAPI float GetFrameTime(void); // Get time in seconds for last frame drawn (delta time) RLAPI float GetFrameTime(void); // Get time in seconds for last frame drawn (delta time)
RLAPI double GetTime(void); // Get elapsed time in seconds since InitWindow() RLAPI double GetTime(void); // Get elapsed time in seconds since InitWindow()
RLAPI int GetFPS(void); // Get current FPS RLAPI int GetFPS(void); // Get current FPS
// Custom frame control functions // Custom frame control functions
// NOTE: Those functions are intended for advanced users that want full control over the frame processing // NOTE: Those functions are intended for advanced users that want full control over the frame processing
// By default EndDrawing() does this job: draws everything + SwapScreenBuffer() + manage frame timing + PollInputEvents() // By default EndDrawing() does this job: draws everything + SwapScreenBuffer() + manage frame timing + PollInputEvents()
// To avoid that behaviour and control frame processes manually, enable in config.h: SUPPORT_CUSTOM_FRAME_CONTROL // To avoid that behaviour and control frame processes manually, enable in config.h: SUPPORT_CUSTOM_FRAME_CONTROL
RLAPI void SwapScreenBuffer(void); // Swap back buffer with front buffer (screen drawing) RLAPI void SwapScreenBuffer(void); // Swap back buffer with front buffer (screen drawing)
RLAPI void PollInputEvents(void); // Register all input events RLAPI void PollInputEvents(void); // Register all input events
RLAPI void WaitTime(double seconds); // Wait for some time (halt program execution) RLAPI void WaitTime(double seconds); // Wait for some time (halt program execution)
// Random values generation functions // Random values generation functions
RLAPI void SetRandomSeed(unsigned int seed); // Set the seed for the random number generator RLAPI void SetRandomSeed(unsigned int seed); // Set the seed for the random number generator
RLAPI int GetRandomValue(int min, int max); // Get a random value between min and max (both included) RLAPI int GetRandomValue(int min, int max); // Get a random value between min and max (both included)
RLAPI int *LoadRandomSequence(unsigned int count, int min, int max); // Load random values sequence, no values repeated RLAPI int *LoadRandomSequence(unsigned int count, int min, int max); // Load random values sequence, no values repeated
RLAPI void UnloadRandomSequence(int *sequence); // Unload random values sequence RLAPI void UnloadRandomSequence(int *sequence); // Unload random values sequence
// Misc. functions // Misc. functions
RLAPI void TakeScreenshot(const char *fileName); // Takes a screenshot of current screen (filename extension defines format) RLAPI void TakeScreenshot(const char *fileName); // Takes a screenshot of current screen (filename extension defines format)
RLAPI void SetConfigFlags(unsigned int flags); // Setup init configuration flags (view FLAGS) RLAPI void SetConfigFlags(unsigned int flags); // Setup init configuration flags (view FLAGS)
RLAPI void OpenURL(const char *url); // Open URL with default system browser (if available) RLAPI void OpenURL(const char *url); // Open URL with default system browser (if available)
// NOTE: Following functions implemented in module [utils] // Logging system
//------------------------------------------------------------------ RLAPI void SetTraceLogLevel(int logLevel); // Set the current threshold (minimum) log level
RLAPI void TraceLog(int logLevel, const char *text, ...); // Show trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR...) RLAPI void TraceLog(int logLevel, const char *text, ...); // Show trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR...)
RLAPI void SetTraceLogLevel(int logLevel); // Set the current threshold (minimum) log level RLAPI void SetTraceLogCallback(TraceLogCallback callback); // Set custom trace log
RLAPI void *MemAlloc(unsigned int size); // Internal memory allocator
RLAPI void *MemRealloc(void *ptr, unsigned int size); // Internal memory reallocator
RLAPI void MemFree(void *ptr); // Internal memory free
// Set custom callbacks // Memory management, using internal allocators
// WARNING: Callbacks setup is intended for advanced users RLAPI void *MemAlloc(unsigned int size); // Internal memory allocator
RLAPI void SetTraceLogCallback(TraceLogCallback callback); // Set custom trace log RLAPI void *MemRealloc(void *ptr, unsigned int size); // Internal memory reallocator
RLAPI void SetLoadFileDataCallback(LoadFileDataCallback callback); // Set custom file binary data loader RLAPI void MemFree(void *ptr); // Internal memory free
RLAPI void SetSaveFileDataCallback(SaveFileDataCallback callback); // Set custom file binary data saver
RLAPI void SetLoadFileTextCallback(LoadFileTextCallback callback); // Set custom file text data loader
RLAPI void SetSaveFileTextCallback(SaveFileTextCallback callback); // Set custom file text data saver
// Files management functions // File system management functions
RLAPI unsigned char *LoadFileData(const char *fileName, int *dataSize); // Load file data as byte array (read) RLAPI unsigned char *LoadFileData(const char *fileName, int *dataSize); // Load file data as byte array (read)
RLAPI void UnloadFileData(unsigned char *data); // Unload file data allocated by LoadFileData() RLAPI void UnloadFileData(unsigned char *data); // Unload file data allocated by LoadFileData()
RLAPI bool SaveFileData(const char *fileName, void *data, int dataSize); // Save data to file from byte array (write), returns true on success RLAPI bool SaveFileData(const char *fileName, void *data, int dataSize); // Save data to file from byte array (write), returns true on success
RLAPI bool ExportDataAsCode(const unsigned char *data, int dataSize, const char *fileName); // Export data to code (.h), returns true on success RLAPI bool ExportDataAsCode(const unsigned char *data, int dataSize, const char *fileName); // Export data to code (.h), returns true on success
RLAPI char *LoadFileText(const char *fileName); // Load text data from file (read), returns a '\0' terminated string RLAPI char *LoadFileText(const char *fileName); // Load text data from file (read), returns a '\0' terminated string
RLAPI void UnloadFileText(char *text); // Unload file text data allocated by LoadFileText() RLAPI void UnloadFileText(char *text); // Unload file text data allocated by LoadFileText()
RLAPI bool SaveFileText(const char *fileName, char *text); // Save text data to file (write), string must be '\0' terminated, returns true on success RLAPI bool SaveFileText(const char *fileName, const char *text); // Save text data to file (write), string must be '\0' terminated, returns true on success
//------------------------------------------------------------------
// File system functions // File access custom callbacks
RLAPI bool FileExists(const char *fileName); // Check if file exists // WARNING: Callbacks setup is intended for advanced users
RLAPI bool DirectoryExists(const char *dirPath); // Check if a directory path exists RLAPI void SetLoadFileDataCallback(LoadFileDataCallback callback); // Set custom file binary data loader
RLAPI bool IsFileExtension(const char *fileName, const char *ext); // Check file extension (including point: .png, .wav) RLAPI void SetSaveFileDataCallback(SaveFileDataCallback callback); // Set custom file binary data saver
RLAPI int GetFileLength(const char *fileName); // Get file length in bytes (NOTE: GetFileSize() conflicts with windows.h) RLAPI void SetLoadFileTextCallback(LoadFileTextCallback callback); // Set custom file text data loader
RLAPI const char *GetFileExtension(const char *fileName); // Get pointer to extension for a filename string (includes dot: '.png') RLAPI void SetSaveFileTextCallback(SaveFileTextCallback callback); // Set custom file text data saver
RLAPI const char *GetFileName(const char *filePath); // Get pointer to filename for a path string
RLAPI const char *GetFileNameWithoutExt(const char *filePath); // Get filename string without extension (uses static string) RLAPI int FileRename(const char *fileName, const char *fileRename); // Rename file (if exists)
RLAPI const char *GetDirectoryPath(const char *filePath); // Get full path for a given fileName with path (uses static string) RLAPI int FileRemove(const char *fileName); // Remove file (if exists)
RLAPI const char *GetPrevDirectoryPath(const char *dirPath); // Get previous directory path for a given path (uses static string) RLAPI int FileCopy(const char *srcPath, const char *dstPath); // Copy file from one path to another, dstPath created if it doesn't exist
RLAPI const char *GetWorkingDirectory(void); // Get current working directory (uses static string) RLAPI int FileMove(const char *srcPath, const char *dstPath); // Move file from one directory to another, dstPath created if it doesn't exist
RLAPI const char *GetApplicationDirectory(void); // Get the directory of the running application (uses static string) RLAPI int FileTextReplace(const char *fileName, const char *search, const char *replacement); // Replace text in an existing file
RLAPI int MakeDirectory(const char *dirPath); // Create directories (including full path requested), returns 0 on success RLAPI int FileTextFindIndex(const char *fileName, const char *search); // Find text in existing file
RLAPI bool ChangeDirectory(const char *dir); // Change working directory, return true on success RLAPI bool FileExists(const char *fileName); // Check if file exists
RLAPI bool IsPathFile(const char *path); // Check if a given path is a file or a directory RLAPI bool DirectoryExists(const char *dirPath); // Check if a directory path exists
RLAPI bool IsFileNameValid(const char *fileName); // Check if fileName is valid for the platform/OS RLAPI bool IsFileExtension(const char *fileName, const char *ext); // Check file extension (recommended include point: .png, .wav)
RLAPI FilePathList LoadDirectoryFiles(const char *dirPath); // Load directory filepaths RLAPI int GetFileLength(const char *fileName); // Get file length in bytes (NOTE: GetFileSize() conflicts with windows.h)
RLAPI FilePathList LoadDirectoryFilesEx(const char *basePath, const char *filter, bool scanSubdirs); // Load directory filepaths with extension filtering and recursive directory scan. Use 'DIR' in the filter string to include directories in the result RLAPI long GetFileModTime(const char *fileName); // Get file modification time (last write time)
RLAPI void UnloadDirectoryFiles(FilePathList files); // Unload filepaths RLAPI const char *GetFileExtension(const char *fileName); // Get pointer to extension for a filename string (includes dot: '.png')
RLAPI bool IsFileDropped(void); // Check if a file has been dropped into window RLAPI const char *GetFileName(const char *filePath); // Get pointer to filename for a path string
RLAPI FilePathList LoadDroppedFiles(void); // Load dropped filepaths RLAPI const char *GetFileNameWithoutExt(const char *filePath); // Get filename string without extension (uses static string)
RLAPI void UnloadDroppedFiles(FilePathList files); // Unload dropped filepaths RLAPI const char *GetDirectoryPath(const char *filePath); // Get full path for a given fileName with path (uses static string)
RLAPI long GetFileModTime(const char *fileName); // Get file modification time (last write time) RLAPI const char *GetPrevDirectoryPath(const char *dirPath); // Get previous directory path for a given path (uses static string)
RLAPI const char *GetWorkingDirectory(void); // Get current working directory (uses static string)
RLAPI const char *GetApplicationDirectory(void); // Get the directory of the running application (uses static string)
RLAPI int MakeDirectory(const char *dirPath); // Create directories (including full path requested), returns 0 on success
RLAPI bool ChangeDirectory(const char *dirPath); // Change working directory, return true on success
RLAPI bool IsPathFile(const char *path); // Check if a given path is a file or a directory
RLAPI bool IsFileNameValid(const char *fileName); // Check if fileName is valid for the platform/OS
RLAPI FilePathList LoadDirectoryFiles(const char *dirPath); // Load directory filepaths, files and directories, no subdirs scan
RLAPI FilePathList LoadDirectoryFilesEx(const char *basePath, const char *filter, bool scanSubdirs); // Load directory filepaths with extension filtering and subdir scan; some filters available: "*.*", "FILES*", "DIRS*"
RLAPI void UnloadDirectoryFiles(FilePathList files); // Unload filepaths
RLAPI bool IsFileDropped(void); // Check if a file has been dropped into window
RLAPI FilePathList LoadDroppedFiles(void); // Load dropped filepaths
RLAPI void UnloadDroppedFiles(FilePathList files); // Unload dropped filepaths
RLAPI unsigned int GetDirectoryFileCount(const char *dirPath); // Get the file count in a directory
RLAPI unsigned int GetDirectoryFileCountEx(const char *basePath, const char *filter, bool scanSubdirs); // Get the file count in a directory with extension filtering and recursive directory scan. Use 'DIR' in the filter string to include directories in the result
// Compression/Encoding functionality // Compression/Encoding functionality
RLAPI unsigned char *CompressData(const unsigned char *data, int dataSize, int *compDataSize); // Compress data (DEFLATE algorithm), memory must be MemFree() RLAPI unsigned char *CompressData(const unsigned char *data, int dataSize, int *compDataSize); // Compress data (DEFLATE algorithm), memory must be MemFree()
RLAPI unsigned char *DecompressData(const unsigned char *compData, int compDataSize, int *dataSize); // Decompress data (DEFLATE algorithm), memory must be MemFree() RLAPI unsigned char *DecompressData(const unsigned char *compData, int compDataSize, int *dataSize); // Decompress data (DEFLATE algorithm), memory must be MemFree()
RLAPI char *EncodeDataBase64(const unsigned char *data, int dataSize, int *outputSize); // Encode data to Base64 string, memory must be MemFree() RLAPI char *EncodeDataBase64(const unsigned char *data, int dataSize, int *outputSize); // Encode data to Base64 string (includes NULL terminator), memory must be MemFree()
RLAPI unsigned char *DecodeDataBase64(const unsigned char *data, int *outputSize); // Decode Base64 string data, memory must be MemFree() RLAPI unsigned char *DecodeDataBase64(const char *text, int *outputSize); // Decode Base64 string (expected NULL terminated), memory must be MemFree()
RLAPI unsigned int ComputeCRC32(unsigned char *data, int dataSize); // Compute CRC32 hash code RLAPI unsigned int ComputeCRC32(unsigned char *data, int dataSize); // Compute CRC32 hash code
RLAPI unsigned int *ComputeMD5(unsigned char *data, int dataSize); // Compute MD5 hash code, returns static int[4] (16 bytes) RLAPI unsigned int *ComputeMD5(unsigned char *data, int dataSize); // Compute MD5 hash code, returns static int[4] (16 bytes)
RLAPI unsigned int *ComputeSHA1(unsigned char *data, int dataSize); // Compute SHA1 hash code, returns static int[5] (20 bytes) RLAPI unsigned int *ComputeSHA1(unsigned char *data, int dataSize); // Compute SHA1 hash code, returns static int[5] (20 bytes)
RLAPI unsigned int *ComputeSHA256(unsigned char *data, int dataSize); // Compute SHA256 hash code, returns static int[8] (32 bytes)
// Automation events functionality // Automation events functionality
RLAPI AutomationEventList LoadAutomationEventList(const char *fileName); // Load automation events list from file, NULL for empty list, capacity = MAX_AUTOMATION_EVENTS RLAPI AutomationEventList LoadAutomationEventList(const char *fileName); // Load automation events list from file, NULL for empty list, capacity = MAX_AUTOMATION_EVENTS
RLAPI void UnloadAutomationEventList(AutomationEventList list); // Unload automation events list from file RLAPI void UnloadAutomationEventList(AutomationEventList list); // Unload automation events list from file
RLAPI bool ExportAutomationEventList(AutomationEventList list, const char *fileName); // Export automation events list as text file RLAPI bool ExportAutomationEventList(AutomationEventList list, const char *fileName); // Export automation events list as text file
RLAPI void SetAutomationEventList(AutomationEventList *list); // Set automation event list to record to RLAPI void SetAutomationEventList(AutomationEventList *list); // Set automation event list to record to
RLAPI void SetAutomationEventBaseFrame(int frame); // Set automation event internal base frame to start recording RLAPI void SetAutomationEventBaseFrame(int frame); // Set automation event internal base frame to start recording
RLAPI void StartAutomationEventRecording(void); // Start recording automation events (AutomationEventList must be set) RLAPI void StartAutomationEventRecording(void); // Start recording automation events (AutomationEventList must be set)
RLAPI void StopAutomationEventRecording(void); // Stop recording automation events RLAPI void StopAutomationEventRecording(void); // Stop recording automation events
RLAPI void PlayAutomationEvent(AutomationEvent event); // Play a recorded automation event RLAPI void PlayAutomationEvent(AutomationEvent event); // Play a recorded automation event
//------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------
// Input Handling Functions (Module: core) // Input Handling Functions (Module: core)
@ -215,20 +222,20 @@ RLAPI bool IsKeyReleased(int key); // Check if a key
RLAPI bool IsKeyUp(int key); // Check if a key is NOT being pressed RLAPI bool IsKeyUp(int key); // Check if a key is NOT being pressed
RLAPI int GetKeyPressed(void); // Get key pressed (keycode), call it multiple times for keys queued, returns 0 when the queue is empty RLAPI int GetKeyPressed(void); // Get key pressed (keycode), call it multiple times for keys queued, returns 0 when the queue is empty
RLAPI int GetCharPressed(void); // Get char pressed (unicode), call it multiple times for chars queued, returns 0 when the queue is empty RLAPI int GetCharPressed(void); // Get char pressed (unicode), call it multiple times for chars queued, returns 0 when the queue is empty
RLAPI const char *GetKeyName(int key); // Get name of a QWERTY key on the current keyboard layout (eg returns string 'q' for KEY_A on an AZERTY keyboard)
RLAPI void SetExitKey(int key); // Set a custom key to exit program (default is ESC) RLAPI void SetExitKey(int key); // Set a custom key to exit program (default is ESC)
RLAPI const char *GetKeyName(int key); // Get name of a QWERTY key on the current keyboard layout (eg returns string "q" for KEY_A on an AZERTY keyboard)
// Input-related functions: gamepads // Input-related functions: gamepads
RLAPI bool IsGamepadAvailable(int gamepad); // Check if a gamepad is available RLAPI bool IsGamepadAvailable(int gamepad); // Check if a gamepad is available
RLAPI const char *GetGamepadName(int gamepad); // Get gamepad internal name id RLAPI const char *GetGamepadName(int gamepad); // Get gamepad internal name id
RLAPI bool IsGamepadButtonPressed(int gamepad, int button); // Check if a gamepad button has been pressed once RLAPI bool IsGamepadButtonPressed(int gamepad, int button); // Check if a gamepad button has been pressed once
RLAPI bool IsGamepadButtonDown(int gamepad, int button); // Check if a gamepad button is being pressed RLAPI bool IsGamepadButtonDown(int gamepad, int button); // Check if a gamepad button is being pressed
RLAPI bool IsGamepadButtonReleased(int gamepad, int button); // Check if a gamepad button has been released once RLAPI bool IsGamepadButtonReleased(int gamepad, int button); // Check if a gamepad button has been released once
RLAPI bool IsGamepadButtonUp(int gamepad, int button); // Check if a gamepad button is NOT being pressed RLAPI bool IsGamepadButtonUp(int gamepad, int button); // Check if a gamepad button is NOT being pressed
RLAPI int GetGamepadButtonPressed(void); // Get the last gamepad button pressed RLAPI int GetGamepadButtonPressed(void); // Get the last gamepad button pressed
RLAPI int GetGamepadAxisCount(int gamepad); // Get gamepad axis count for a gamepad RLAPI int GetGamepadAxisCount(int gamepad); // Get axis count for a gamepad
RLAPI float GetGamepadAxisMovement(int gamepad, int axis); // Get axis movement value for a gamepad axis RLAPI float GetGamepadAxisMovement(int gamepad, int axis); // Get movement value for a gamepad axis
RLAPI int SetGamepadMappings(const char *mappings); // Set internal gamepad mappings (SDL_GameControllerDB) RLAPI int SetGamepadMappings(const char *mappings); // Set internal gamepad mappings (SDL_GameControllerDB)
RLAPI void SetGamepadVibration(int gamepad, float leftMotor, float rightMotor, float duration); // Set gamepad vibration for both motors (duration in seconds) RLAPI void SetGamepadVibration(int gamepad, float leftMotor, float rightMotor, float duration); // Set gamepad vibration for both motors (duration in seconds)
// Input-related functions: mouse // Input-related functions: mouse
@ -257,19 +264,19 @@ RLAPI int GetTouchPointCount(void); // Get number of t
//------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------
// Gestures and Touch Handling Functions (Module: rgestures) // Gestures and Touch Handling Functions (Module: rgestures)
//------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------
RLAPI void SetGesturesEnabled(unsigned int flags); // Enable a set of gestures using flags RLAPI void SetGesturesEnabled(unsigned int flags); // Enable a set of gestures using flags
RLAPI bool IsGestureDetected(unsigned int gesture); // Check if a gesture have been detected RLAPI bool IsGestureDetected(unsigned int gesture); // Check if a gesture have been detected
RLAPI int GetGestureDetected(void); // Get latest detected gesture RLAPI int GetGestureDetected(void); // Get latest detected gesture
RLAPI float GetGestureHoldDuration(void); // Get gesture hold time in seconds RLAPI float GetGestureHoldDuration(void); // Get gesture hold time in seconds
RLAPI Vector2 GetGestureDragVector(void); // Get gesture drag vector RLAPI Vector2 GetGestureDragVector(void); // Get gesture drag vector
RLAPI float GetGestureDragAngle(void); // Get gesture drag angle RLAPI float GetGestureDragAngle(void); // Get gesture drag angle
RLAPI Vector2 GetGesturePinchVector(void); // Get gesture pinch delta RLAPI Vector2 GetGesturePinchVector(void); // Get gesture pinch delta
RLAPI float GetGesturePinchAngle(void); // Get gesture pinch angle RLAPI float GetGesturePinchAngle(void); // Get gesture pinch angle
//------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------
// Camera System Functions (Module: rcamera) // Camera System Functions (Module: rcamera)
//------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------
RLAPI void UpdateCamera(Camera *camera, int mode); // Update camera position for selected mode RLAPI void UpdateCamera(Camera *camera, int mode); // Update camera position for selected mode
RLAPI void UpdateCameraPro(Camera *camera, Vector3 movement, Vector3 rotation, float zoom); // Update camera movement/rotation RLAPI void UpdateCameraPro(Camera *camera, Vector3 movement, Vector3 rotation, float zoom); // Update camera movement/rotation
//------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------
@ -278,9 +285,9 @@ RLAPI void UpdateCameraPro(Camera *camera, Vector3 movement, Vector3 rotation, f
// Set texture and rectangle to be used on shapes drawing // Set texture and rectangle to be used on shapes drawing
// NOTE: It can be useful when using basic shapes and one single font, // NOTE: It can be useful when using basic shapes and one single font,
// defining a font char white rectangle would allow drawing everything in a single draw call // defining a font char white rectangle would allow drawing everything in a single draw call
RLAPI void SetShapesTexture(Texture2D texture, Rectangle source); // Set texture and rectangle to be used on shapes drawing RLAPI void SetShapesTexture(Texture2D texture, Rectangle source); // Set texture and rectangle to be used on shapes drawing
RLAPI Texture2D GetShapesTexture(void); // Get texture that is used for shapes drawing RLAPI Texture2D GetShapesTexture(void); // Get texture that is used for shapes drawing
RLAPI Rectangle GetShapesTextureRectangle(void); // Get texture source rectangle that is used for shapes drawing RLAPI Rectangle GetShapesTextureRectangle(void); // Get texture source rectangle that is used for shapes drawing
// Basic shapes drawing functions // Basic shapes drawing functions
RLAPI void DrawPixel(int posX, int posY, Color color); // Draw a pixel using geometry [Can be slow, use with care] RLAPI void DrawPixel(int posX, int posY, Color color); // Draw a pixel using geometry [Can be slow, use with care]
@ -290,24 +297,27 @@ RLAPI void DrawLineV(Vector2 startPos, Vector2 endPos, Color color);
RLAPI void DrawLineEx(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw a line (using triangles/quads) RLAPI void DrawLineEx(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw a line (using triangles/quads)
RLAPI void DrawLineStrip(const Vector2 *points, int pointCount, Color color); // Draw lines sequence (using gl lines) RLAPI void DrawLineStrip(const Vector2 *points, int pointCount, Color color); // Draw lines sequence (using gl lines)
RLAPI void DrawLineBezier(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw line segment cubic-bezier in-out interpolation RLAPI void DrawLineBezier(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw line segment cubic-bezier in-out interpolation
RLAPI void DrawLineDashed(Vector2 startPos, Vector2 endPos, int dashSize, int spaceSize, Color color); // Draw a dashed line
RLAPI void DrawCircle(int centerX, int centerY, float radius, Color color); // Draw a color-filled circle RLAPI void DrawCircle(int centerX, int centerY, float radius, Color color); // Draw a color-filled circle
RLAPI void DrawCircleSector(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color); // Draw a piece of a circle
RLAPI void DrawCircleSectorLines(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color); // Draw circle sector outline
RLAPI void DrawCircleGradient(int centerX, int centerY, float radius, Color inner, Color outer); // Draw a gradient-filled circle
RLAPI void DrawCircleV(Vector2 center, float radius, Color color); // Draw a color-filled circle (Vector version) RLAPI void DrawCircleV(Vector2 center, float radius, Color color); // Draw a color-filled circle (Vector version)
RLAPI void DrawCircleGradient(Vector2 center, float radius, Color inner, Color outer); // Draw a gradient-filled circle
RLAPI void DrawCircleSector(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color); // Draw a piece of a circle
RLAPI void DrawCircleSectorLines(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color); // Draw circle sector outline
RLAPI void DrawCircleLines(int centerX, int centerY, float radius, Color color); // Draw circle outline RLAPI void DrawCircleLines(int centerX, int centerY, float radius, Color color); // Draw circle outline
RLAPI void DrawCircleLinesV(Vector2 center, float radius, Color color); // Draw circle outline (Vector version) RLAPI void DrawCircleLinesV(Vector2 center, float radius, Color color); // Draw circle outline (Vector version)
RLAPI void DrawEllipse(int centerX, int centerY, float radiusH, float radiusV, Color color); // Draw ellipse RLAPI void DrawEllipse(int centerX, int centerY, float radiusH, float radiusV, Color color); // Draw ellipse
RLAPI void DrawEllipseV(Vector2 center, float radiusH, float radiusV, Color color); // Draw ellipse (Vector version)
RLAPI void DrawEllipseLines(int centerX, int centerY, float radiusH, float radiusV, Color color); // Draw ellipse outline RLAPI void DrawEllipseLines(int centerX, int centerY, float radiusH, float radiusV, Color color); // Draw ellipse outline
RLAPI void DrawEllipseLinesV(Vector2 center, float radiusH, float radiusV, Color color); // Draw ellipse outline (Vector version)
RLAPI void DrawRing(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color); // Draw ring RLAPI void DrawRing(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color); // Draw ring
RLAPI void DrawRingLines(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color); // Draw ring outline RLAPI void DrawRingLines(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color); // Draw ring outline
RLAPI void DrawRectangle(int posX, int posY, int width, int height, Color color); // Draw a color-filled rectangle RLAPI void DrawRectangle(int posX, int posY, int width, int height, Color color); // Draw a color-filled rectangle
RLAPI void DrawRectangleV(Vector2 position, Vector2 size, Color color); // Draw a color-filled rectangle (Vector version) RLAPI void DrawRectangleV(Vector2 position, Vector2 size, Color color); // Draw a color-filled rectangle (Vector version)
RLAPI void DrawRectangleRec(Rectangle rec, Color color); // Draw a color-filled rectangle RLAPI void DrawRectangleRec(Rectangle rec, Color color); // Draw a color-filled rectangle
RLAPI void DrawRectanglePro(Rectangle rec, Vector2 origin, float rotation, Color color); // Draw a color-filled rectangle with pro parameters RLAPI void DrawRectanglePro(Rectangle rec, Vector2 origin, float rotation, Color color); // Draw a color-filled rectangle with pro parameters
RLAPI void DrawRectangleGradientV(int posX, int posY, int width, int height, Color top, Color bottom); // Draw a vertical-gradient-filled rectangle RLAPI void DrawRectangleGradientV(int posX, int posY, int width, int height, Color top, Color bottom); // Draw a vertical-gradient-filled rectangle
RLAPI void DrawRectangleGradientH(int posX, int posY, int width, int height, Color left, Color right); // Draw a horizontal-gradient-filled rectangle RLAPI void DrawRectangleGradientH(int posX, int posY, int width, int height, Color left, Color right); // Draw a horizontal-gradient-filled rectangle
RLAPI void DrawRectangleGradientEx(Rectangle rec, Color topLeft, Color bottomLeft, Color topRight, Color bottomRight); // Draw a gradient-filled rectangle with custom vertex colors RLAPI void DrawRectangleGradientEx(Rectangle rec, Color topLeft, Color bottomLeft, Color bottomRight, Color topRight); // Draw a gradient-filled rectangle with custom vertex colors
RLAPI void DrawRectangleLines(int posX, int posY, int width, int height, Color color); // Draw rectangle outline RLAPI void DrawRectangleLines(int posX, int posY, int width, int height, Color color); // Draw rectangle outline
RLAPI void DrawRectangleLinesEx(Rectangle rec, float lineThick, Color color); // Draw rectangle outline with extended parameters RLAPI void DrawRectangleLinesEx(Rectangle rec, float lineThick, Color color); // Draw rectangle outline with extended parameters
RLAPI void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color color); // Draw rectangle with rounded edges RLAPI void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color color); // Draw rectangle with rounded edges
@ -322,11 +332,11 @@ RLAPI void DrawPolyLines(Vector2 center, int sides, float radius, float rotation
RLAPI void DrawPolyLinesEx(Vector2 center, int sides, float radius, float rotation, float lineThick, Color color); // Draw a polygon outline of n sides with extended parameters RLAPI void DrawPolyLinesEx(Vector2 center, int sides, float radius, float rotation, float lineThick, Color color); // Draw a polygon outline of n sides with extended parameters
// Splines drawing functions // Splines drawing functions
RLAPI void DrawSplineLinear(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Linear, minimum 2 points RLAPI void DrawSplineLinear(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Linear, minimum 2 points
RLAPI void DrawSplineBasis(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: B-Spline, minimum 4 points RLAPI void DrawSplineBasis(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: B-Spline, minimum 4 points
RLAPI void DrawSplineCatmullRom(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Catmull-Rom, minimum 4 points RLAPI void DrawSplineCatmullRom(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Catmull-Rom, minimum 4 points
RLAPI void DrawSplineBezierQuadratic(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Quadratic Bezier, minimum 3 points (1 control point): [p1, c2, p3, c4...] RLAPI void DrawSplineBezierQuadratic(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Quadratic Bezier, minimum 3 points (1 control point): [p1, c2, p3, c4...]
RLAPI void DrawSplineBezierCubic(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Cubic Bezier, minimum 4 points (2 control points): [p1, c2, c3, p4, c5, c6...] RLAPI void DrawSplineBezierCubic(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Cubic Bezier, minimum 4 points (2 control points): [p1, c2, c3, p4, c5, c6...]
RLAPI void DrawSplineSegmentLinear(Vector2 p1, Vector2 p2, float thick, Color color); // Draw spline segment: Linear, 2 points RLAPI void DrawSplineSegmentLinear(Vector2 p1, Vector2 p2, float thick, Color color); // Draw spline segment: Linear, 2 points
RLAPI void DrawSplineSegmentBasis(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float thick, Color color); // Draw spline segment: B-Spline, 4 points RLAPI void DrawSplineSegmentBasis(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float thick, Color color); // Draw spline segment: B-Spline, 4 points
RLAPI void DrawSplineSegmentCatmullRom(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float thick, Color color); // Draw spline segment: Catmull-Rom, 4 points RLAPI void DrawSplineSegmentCatmullRom(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float thick, Color color); // Draw spline segment: Catmull-Rom, 4 points
@ -369,7 +379,7 @@ RLAPI Image LoadImageFromScreen(void);
RLAPI bool IsImageValid(Image image); // Check if an image is valid (data and parameters) RLAPI bool IsImageValid(Image image); // Check if an image is valid (data and parameters)
RLAPI void UnloadImage(Image image); // Unload image from CPU memory (RAM) RLAPI void UnloadImage(Image image); // Unload image from CPU memory (RAM)
RLAPI bool ExportImage(Image image, const char *fileName); // Export image data to file, returns true on success RLAPI bool ExportImage(Image image, const char *fileName); // Export image data to file, returns true on success
RLAPI unsigned char *ExportImageToMemory(Image image, const char *fileType, int *fileSize); // Export image to memory buffer RLAPI unsigned char *ExportImageToMemory(Image image, const char *fileType, int *fileSize); // Export image to memory buffer, memory must be MemFree()
RLAPI bool ExportImageAsCode(Image image, const char *fileName); // Export image as code file defining an array of bytes, returns true on success RLAPI bool ExportImageAsCode(Image image, const char *fileName); // Export image as code file defining an array of bytes, returns true on success
// Image generation functions // Image generation functions
@ -399,7 +409,7 @@ RLAPI void ImageAlphaPremultiply(Image *image);
RLAPI void ImageBlurGaussian(Image *image, int blurSize); // Apply Gaussian blur using a box blur approximation RLAPI void ImageBlurGaussian(Image *image, int blurSize); // Apply Gaussian blur using a box blur approximation
RLAPI void ImageKernelConvolution(Image *image, const float *kernel, int kernelSize); // Apply custom square convolution kernel to image RLAPI void ImageKernelConvolution(Image *image, const float *kernel, int kernelSize); // Apply custom square convolution kernel to image
RLAPI void ImageResize(Image *image, int newWidth, int newHeight); // Resize image (Bicubic scaling algorithm) RLAPI void ImageResize(Image *image, int newWidth, int newHeight); // Resize image (Bicubic scaling algorithm)
RLAPI void ImageResizeNN(Image *image, int newWidth,int newHeight); // Resize image (Nearest-Neighbor scaling algorithm) RLAPI void ImageResizeNN(Image *image, int newWidth, int newHeight); // Resize image (Nearest-Neighbor scaling algorithm)
RLAPI void ImageResizeCanvas(Image *image, int newWidth, int newHeight, int offsetX, int offsetY, Color fill); // Resize canvas and fill with color RLAPI void ImageResizeCanvas(Image *image, int newWidth, int newHeight, int offsetX, int offsetY, Color fill); // Resize canvas and fill with color
RLAPI void ImageMipmaps(Image *image); // Compute all mipmap levels for a provided image RLAPI void ImageMipmaps(Image *image); // Compute all mipmap levels for a provided image
RLAPI void ImageDither(Image *image, int rBpp, int gBpp, int bBpp, int aBpp); // Dither image data to 16bpp or lower (Floyd-Steinberg dithering) RLAPI void ImageDither(Image *image, int rBpp, int gBpp, int bBpp, int aBpp); // Dither image data to 16bpp or lower (Floyd-Steinberg dithering)
@ -440,8 +450,8 @@ RLAPI void ImageDrawRectangleLines(Image *dst, Rectangle rec, int thick, Color c
RLAPI void ImageDrawTriangle(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle within an image RLAPI void ImageDrawTriangle(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle within an image
RLAPI void ImageDrawTriangleEx(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color c1, Color c2, Color c3); // Draw triangle with interpolated colors within an image RLAPI void ImageDrawTriangleEx(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color c1, Color c2, Color c3); // Draw triangle with interpolated colors within an image
RLAPI void ImageDrawTriangleLines(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle outline within an image RLAPI void ImageDrawTriangleLines(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle outline within an image
RLAPI void ImageDrawTriangleFan(Image *dst, const Vector2 *points, int pointCount, Color color); // Draw a triangle fan defined by points within an image (first vertex is the center) RLAPI void ImageDrawTriangleFan(Image *dst, const Vector2 *points, int pointCount, Color color); // Draw a triangle fan defined by points within an image (first vertex is the center)
RLAPI void ImageDrawTriangleStrip(Image *dst, const Vector2 *points, int pointCount, Color color); // Draw a triangle strip defined by points within an image RLAPI void ImageDrawTriangleStrip(Image *dst, const Vector2 *points, int pointCount, Color color); // Draw a triangle strip defined by points within an image
RLAPI void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec, Color tint); // Draw a source image within a destination image (tint applied to source) RLAPI void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec, Color tint); // Draw a source image within a destination image (tint applied to source)
RLAPI void ImageDrawText(Image *dst, const char *text, int posX, int posY, int fontSize, Color color); // Draw text (using default font) within an image (destination) RLAPI void ImageDrawText(Image *dst, const char *text, int posX, int posY, int fontSize, Color color); // Draw text (using default font) within an image (destination)
RLAPI void ImageDrawTextEx(Image *dst, Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint); // Draw text (custom sprite font) within an image (destination) RLAPI void ImageDrawTextEx(Image *dst, Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint); // Draw text (custom sprite font) within an image (destination)
@ -456,8 +466,8 @@ RLAPI bool IsTextureValid(Texture2D texture);
RLAPI void UnloadTexture(Texture2D texture); // Unload texture from GPU memory (VRAM) RLAPI void UnloadTexture(Texture2D texture); // Unload texture from GPU memory (VRAM)
RLAPI bool IsRenderTextureValid(RenderTexture2D target); // Check if a render texture is valid (loaded in GPU) RLAPI bool IsRenderTextureValid(RenderTexture2D target); // Check if a render texture is valid (loaded in GPU)
RLAPI void UnloadRenderTexture(RenderTexture2D target); // Unload render texture from GPU memory (VRAM) RLAPI void UnloadRenderTexture(RenderTexture2D target); // Unload render texture from GPU memory (VRAM)
RLAPI void UpdateTexture(Texture2D texture, const void *pixels); // Update GPU texture with new data RLAPI void UpdateTexture(Texture2D texture, const void *pixels); // Update GPU texture with new data (pixels should be able to fill texture)
RLAPI void UpdateTextureRec(Texture2D texture, Rectangle rec, const void *pixels); // Update GPU texture rectangle with new data RLAPI void UpdateTextureRec(Texture2D texture, Rectangle rec, const void *pixels); // Update GPU texture rectangle with new data (pixels and rec should fit in texture)
// Texture configuration functions // Texture configuration functions
RLAPI void GenTextureMipmaps(Texture2D *texture); // Generate GPU mipmaps for a texture RLAPI void GenTextureMipmaps(Texture2D *texture); // Generate GPU mipmaps for a texture
@ -498,11 +508,11 @@ RLAPI int GetPixelDataSize(int width, int height, int format); // G
// Font loading/unloading functions // Font loading/unloading functions
RLAPI Font GetFontDefault(void); // Get the default Font RLAPI Font GetFontDefault(void); // Get the default Font
RLAPI Font LoadFont(const char *fileName); // Load font from file into GPU memory (VRAM) RLAPI Font LoadFont(const char *fileName); // Load font from file into GPU memory (VRAM)
RLAPI Font LoadFontEx(const char *fileName, int fontSize, int *codepoints, int codepointCount); // Load font from file with extended parameters, use NULL for codepoints and 0 for codepointCount to load the default character set, font size is provided in pixels height RLAPI Font LoadFontEx(const char *fileName, int fontSize, const int *codepoints, int codepointCount); // Load font from file with extended parameters, use NULL for codepoints and 0 for codepointCount to load the default character set, font size is provided in pixels height
RLAPI Font LoadFontFromImage(Image image, Color key, int firstChar); // Load font from Image (XNA style) RLAPI Font LoadFontFromImage(Image image, Color key, int firstChar); // Load font from Image (XNA style)
RLAPI Font LoadFontFromMemory(const char *fileType, const unsigned char *fileData, int dataSize, int fontSize, int *codepoints, int codepointCount); // Load font from memory buffer, fileType refers to extension: i.e. '.ttf' RLAPI Font LoadFontFromMemory(const char *fileType, const unsigned char *fileData, int dataSize, int fontSize, const int *codepoints, int codepointCount); // Load font from memory buffer, fileType refers to extension: i.e. '.ttf'
RLAPI bool IsFontValid(Font font); // Check if a font is valid (font data loaded, WARNING: GPU texture not checked) RLAPI bool IsFontValid(Font font); // Check if a font is valid (font data loaded, WARNING: GPU texture not checked)
RLAPI GlyphInfo *LoadFontData(const unsigned char *fileData, int dataSize, int fontSize, int *codepoints, int codepointCount, int type); // Load font data for further use RLAPI GlyphInfo *LoadFontData(const unsigned char *fileData, int dataSize, int fontSize, const int *codepoints, int codepointCount, int type, int *glyphCount); // Load font data for further use
RLAPI Image GenImageFontAtlas(const GlyphInfo *glyphs, Rectangle **glyphRecs, int glyphCount, int fontSize, int padding, int packMethod); // Generate image font atlas using chars info RLAPI Image GenImageFontAtlas(const GlyphInfo *glyphs, Rectangle **glyphRecs, int glyphCount, int fontSize, int padding, int packMethod); // Generate image font atlas using chars info
RLAPI void UnloadFontData(GlyphInfo *glyphs, int glyphCount); // Unload font chars info data (RAM) RLAPI void UnloadFontData(GlyphInfo *glyphs, int glyphCount); // Unload font chars info data (RAM)
RLAPI void UnloadFont(Font font); // Unload font from GPU memory (VRAM) RLAPI void UnloadFont(Font font); // Unload font from GPU memory (VRAM)
@ -520,42 +530,51 @@ RLAPI void DrawTextCodepoints(Font font, const int *codepoints, int codepointCou
RLAPI void SetTextLineSpacing(int spacing); // Set vertical line spacing when drawing with line-breaks RLAPI void SetTextLineSpacing(int spacing); // Set vertical line spacing when drawing with line-breaks
RLAPI int MeasureText(const char *text, int fontSize); // Measure string width for default font RLAPI int MeasureText(const char *text, int fontSize); // Measure string width for default font
RLAPI Vector2 MeasureTextEx(Font font, const char *text, float fontSize, float spacing); // Measure string size for Font RLAPI Vector2 MeasureTextEx(Font font, const char *text, float fontSize, float spacing); // Measure string size for Font
RLAPI Vector2 MeasureTextCodepoints(Font font, const int *codepoints, int length, float fontSize, float spacing); // Measure string size for an existing array of codepoints for Font
RLAPI int GetGlyphIndex(Font font, int codepoint); // Get glyph index position in font for a codepoint (unicode character), fallback to '?' if not found RLAPI int GetGlyphIndex(Font font, int codepoint); // Get glyph index position in font for a codepoint (unicode character), fallback to '?' if not found
RLAPI GlyphInfo GetGlyphInfo(Font font, int codepoint); // Get glyph font info data for a codepoint (unicode character), fallback to '?' if not found RLAPI GlyphInfo GetGlyphInfo(Font font, int codepoint); // Get glyph font info data for a codepoint (unicode character), fallback to '?' if not found
RLAPI Rectangle GetGlyphAtlasRec(Font font, int codepoint); // Get glyph rectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found RLAPI Rectangle GetGlyphAtlasRec(Font font, int codepoint); // Get glyph rectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found
// Text codepoints management functions (unicode characters) // Text codepoints management functions (unicode characters)
RLAPI char *LoadUTF8(const int *codepoints, int length); // Load UTF-8 text encoded from codepoints array RLAPI char *LoadUTF8(const int *codepoints, int length); // Load UTF-8 text encoded from codepoints array
RLAPI void UnloadUTF8(char *text); // Unload UTF-8 text encoded from codepoints array RLAPI void UnloadUTF8(char *text); // Unload UTF-8 text encoded from codepoints array
RLAPI int *LoadCodepoints(const char *text, int *count); // Load all codepoints from a UTF-8 text string, codepoints count returned by parameter RLAPI int *LoadCodepoints(const char *text, int *count); // Load all codepoints from a UTF-8 text string, codepoints count returned by parameter
RLAPI void UnloadCodepoints(int *codepoints); // Unload codepoints data from memory RLAPI void UnloadCodepoints(int *codepoints); // Unload codepoints data from memory
RLAPI int GetCodepointCount(const char *text); // Get total number of codepoints in a UTF-8 encoded string RLAPI int GetCodepointCount(const char *text); // Get total number of codepoints in a UTF-8 encoded string
RLAPI int GetCodepoint(const char *text, int *codepointSize); // Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure RLAPI int GetCodepoint(const char *text, int *codepointSize); // Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure
RLAPI int GetCodepointNext(const char *text, int *codepointSize); // Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure RLAPI int GetCodepointNext(const char *text, int *codepointSize); // Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure
RLAPI int GetCodepointPrevious(const char *text, int *codepointSize); // Get previous codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure RLAPI int GetCodepointPrevious(const char *text, int *codepointSize); // Get previous codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure
RLAPI const char *CodepointToUTF8(int codepoint, int *utf8Size); // Encode one codepoint into UTF-8 byte array (array length returned as parameter) RLAPI const char *CodepointToUTF8(int codepoint, int *utf8Size); // Encode one codepoint into UTF-8 byte array (array length returned as parameter)
// Text strings management functions (no UTF-8 strings, only byte chars) // Text strings management functions (no UTF-8 strings, only byte chars)
// NOTE: Some strings allocate memory internally for returned strings, just be careful! // WARNING 1: Most of these functions use internal static buffers[], it's recommended to store returned data on user-side for re-use
// WARNING 2: Some functions allocate memory internally for the returned strings, those strings must be freed by user using MemFree()
RLAPI char **LoadTextLines(const char *text, int *count); // Load text as separate lines ('\n')
RLAPI void UnloadTextLines(char **text, int lineCount); // Unload text lines
RLAPI int TextCopy(char *dst, const char *src); // Copy one string to another, returns bytes copied RLAPI int TextCopy(char *dst, const char *src); // Copy one string to another, returns bytes copied
RLAPI bool TextIsEqual(const char *text1, const char *text2); // Check if two text string are equal RLAPI bool TextIsEqual(const char *text1, const char *text2); // Check if two text string are equal
RLAPI unsigned int TextLength(const char *text); // Get text length, checks for '\0' ending RLAPI unsigned int TextLength(const char *text); // Get text length, checks for '\0' ending
RLAPI const char *TextFormat(const char *text, ...); // Text formatting with variables (sprintf() style) RLAPI const char *TextFormat(const char *text, ...); // Text formatting with variables (sprintf() style)
RLAPI const char *TextSubtext(const char *text, int position, int length); // Get a piece of a text string RLAPI const char *TextSubtext(const char *text, int position, int length); // Get a piece of a text string
RLAPI char *TextReplace(const char *text, const char *replace, const char *by); // Replace text string (WARNING: memory must be freed!) RLAPI const char *TextRemoveSpaces(const char *text); // Remove text spaces, concat words
RLAPI char *TextInsert(const char *text, const char *insert, int position); // Insert text in a position (WARNING: memory must be freed!) RLAPI char *GetTextBetween(const char *text, const char *begin, const char *end); // Get text between two strings
RLAPI const char *TextJoin(const char **textList, int count, const char *delimiter); // Join text strings with delimiter RLAPI char *TextReplace(const char *text, const char *search, const char *replacement); // Replace text string with new string
RLAPI const char **TextSplit(const char *text, char delimiter, int *count); // Split text into multiple strings RLAPI char *TextReplaceAlloc(const char *text, const char *search, const char *replacement); // Replace text string with new string, memory must be MemFree()
RLAPI void TextAppend(char *text, const char *append, int *position); // Append text at specific position and move cursor! RLAPI char *TextReplaceBetween(const char *text, const char *begin, const char *end, const char *replacement); // Replace text between two specific strings
RLAPI int TextFindIndex(const char *text, const char *find); // Find first text occurrence within a string RLAPI char *TextReplaceBetweenAlloc(const char *text, const char *begin, const char *end, const char *replacement); // Replace text between two specific strings, memory must be MemFree()
RLAPI const char *TextToUpper(const char *text); // Get upper case version of provided string RLAPI char *TextInsert(const char *text, const char *insert, int position); // Insert text in a defined byte position
RLAPI const char *TextToLower(const char *text); // Get lower case version of provided string RLAPI char *TextInsertAlloc(const char *text, const char *insert, int position); // Insert text in a defined byte position, memory must be MemFree()
RLAPI const char *TextToPascal(const char *text); // Get Pascal case notation version of provided string RLAPI char *TextJoin(char **textList, int count, const char *delimiter); // Join text strings with delimiter
RLAPI const char *TextToSnake(const char *text); // Get Snake case notation version of provided string RLAPI char **TextSplit(const char *text, char delimiter, int *count); // Split text into multiple strings, using MAX_TEXTSPLIT_COUNT static strings
RLAPI const char *TextToCamel(const char *text); // Get Camel case notation version of provided string RLAPI void TextAppend(char *text, const char *append, int *position); // Append text at specific position and move cursor
RLAPI int TextFindIndex(const char *text, const char *search); // Find first text occurrence within a string, -1 if not found
RLAPI int TextToInteger(const char *text); // Get integer value from text (negative values not supported) RLAPI char *TextToUpper(const char *text); // Get upper case version of provided string
RLAPI float TextToFloat(const char *text); // Get float value from text (negative values not supported) RLAPI char *TextToLower(const char *text); // Get lower case version of provided string
RLAPI char *TextToPascal(const char *text); // Get Pascal case notation version of provided string
RLAPI char *TextToSnake(const char *text); // Get Snake case notation version of provided string
RLAPI char *TextToCamel(const char *text); // Get Camel case notation version of provided string
RLAPI int TextToInteger(const char *text); // Get integer value from text
RLAPI float TextToFloat(const char *text); // Get float value from text
//------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------
// Basic 3d Shapes Drawing Functions (Module: models) // Basic 3d Shapes Drawing Functions (Module: models)
@ -601,7 +620,7 @@ RLAPI void DrawModelEx(Model model, Vector3 position, Vector3 rotationAxis, floa
RLAPI void DrawModelWires(Model model, Vector3 position, float scale, Color tint); // Draw a model wires (with texture if set) RLAPI void DrawModelWires(Model model, Vector3 position, float scale, Color tint); // Draw a model wires (with texture if set)
RLAPI void DrawModelWiresEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model wires (with texture if set) with extended parameters RLAPI void DrawModelWiresEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model wires (with texture if set) with extended parameters
RLAPI void DrawBoundingBox(BoundingBox box, Color color); // Draw bounding box (wires) RLAPI void DrawBoundingBox(BoundingBox box, Color color); // Draw bounding box (wires)
RLAPI void DrawBillboard(Camera camera, Texture2D texture, Vector3 position, float scale, Color tint); // Draw a billboard texture RLAPI void DrawBillboard(Camera camera, Texture2D texture, Vector3 position, float scale, Color tint); // Draw a billboard texture
RLAPI void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector2 size, Color tint); // Draw a billboard texture defined by source RLAPI void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector2 size, Color tint); // Draw a billboard texture defined by source
RLAPI void DrawBillboardPro(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector3 up, Vector2 size, Vector2 origin, float rotation, Color tint); // Draw a billboard texture defined by source and rotation RLAPI void DrawBillboardPro(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector3 up, Vector2 size, Vector2 origin, float rotation, Color tint); // Draw a billboard texture defined by source and rotation
@ -639,21 +658,20 @@ RLAPI void SetModelMeshMaterial(Model *model, int meshId, int materialId);
// Model animations loading/unloading functions // Model animations loading/unloading functions
RLAPI ModelAnimation *LoadModelAnimations(const char *fileName, int *animCount); // Load model animations from file RLAPI ModelAnimation *LoadModelAnimations(const char *fileName, int *animCount); // Load model animations from file
RLAPI void UpdateModelAnimation(Model model, ModelAnimation anim, int frame); // Update model animation pose (CPU) RLAPI void UpdateModelAnimation(Model model, ModelAnimation anim, float frame); // Update model animation pose (vertex buffers and bone matrices)
RLAPI void UpdateModelAnimationBones(Model model, ModelAnimation anim, int frame); // Update model animation mesh bone matrices (GPU skinning) RLAPI void UpdateModelAnimationEx(Model model, ModelAnimation animA, float frameA, ModelAnimation animB, float frameB, float blend); // Update model animation pose, blending two animations
RLAPI void UnloadModelAnimation(ModelAnimation anim); // Unload animation data
RLAPI void UnloadModelAnimations(ModelAnimation *animations, int animCount); // Unload animation array data RLAPI void UnloadModelAnimations(ModelAnimation *animations, int animCount); // Unload animation array data
RLAPI bool IsModelAnimationValid(Model model, ModelAnimation anim); // Check model animation skeleton match RLAPI bool IsModelAnimationValid(Model model, ModelAnimation anim); // Check model animation skeleton match
// Collision detection functions // Collision detection functions
RLAPI bool CheckCollisionSpheres(Vector3 center1, float radius1, Vector3 center2, float radius2); // Check collision between two spheres RLAPI bool CheckCollisionSpheres(Vector3 center1, float radius1, Vector3 center2, float radius2); // Check collision between two spheres
RLAPI bool CheckCollisionBoxes(BoundingBox box1, BoundingBox box2); // Check collision between two bounding boxes RLAPI bool CheckCollisionBoxes(BoundingBox box1, BoundingBox box2); // Check collision between two bounding boxes
RLAPI bool CheckCollisionBoxSphere(BoundingBox box, Vector3 center, float radius); // Check collision between box and sphere RLAPI bool CheckCollisionBoxSphere(BoundingBox box, Vector3 center, float radius); // Check collision between box and sphere
RLAPI RayCollision GetRayCollisionSphere(Ray ray, Vector3 center, float radius); // Get collision info between ray and sphere RLAPI RayCollision GetRayCollisionSphere(Ray ray, Vector3 center, float radius); // Get collision info between ray and sphere
RLAPI RayCollision GetRayCollisionBox(Ray ray, BoundingBox box); // Get collision info between ray and box RLAPI RayCollision GetRayCollisionBox(Ray ray, BoundingBox box); // Get collision info between ray and box
RLAPI RayCollision GetRayCollisionMesh(Ray ray, Mesh mesh, Matrix transform); // Get collision info between ray and mesh RLAPI RayCollision GetRayCollisionMesh(Ray ray, Mesh mesh, Matrix transform); // Get collision info between ray and mesh
RLAPI RayCollision GetRayCollisionTriangle(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3); // Get collision info between ray and triangle RLAPI RayCollision GetRayCollisionTriangle(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3); // Get collision info between ray and triangle
RLAPI RayCollision GetRayCollisionQuad(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3, Vector3 p4); // Get collision info between ray and quad RLAPI RayCollision GetRayCollisionQuad(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3, Vector3 p4); // Get collision info between ray and quad
//------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------
// Audio Loading and Playing Functions (Module: audio) // Audio Loading and Playing Functions (Module: audio)
@ -675,7 +693,7 @@ RLAPI Sound LoadSound(const char *fileName); // Load so
RLAPI Sound LoadSoundFromWave(Wave wave); // Load sound from wave data RLAPI Sound LoadSoundFromWave(Wave wave); // Load sound from wave data
RLAPI Sound LoadSoundAlias(Sound source); // Create a new sound that shares the same sample data as the source sound, does not own the sound data RLAPI Sound LoadSoundAlias(Sound source); // Create a new sound that shares the same sample data as the source sound, does not own the sound data
RLAPI bool IsSoundValid(Sound sound); // Checks if a sound is valid (data loaded and buffers initialized) RLAPI bool IsSoundValid(Sound sound); // Checks if a sound is valid (data loaded and buffers initialized)
RLAPI void UpdateSound(Sound sound, const void *data, int sampleCount); // Update sound buffer with new data RLAPI void UpdateSound(Sound sound, const void *data, int sampleCount); // Update sound buffer with new data (default data format: 32 bit float, stereo)
RLAPI void UnloadWave(Wave wave); // Unload wave data RLAPI void UnloadWave(Wave wave); // Unload wave data
RLAPI void UnloadSound(Sound sound); // Unload sound RLAPI void UnloadSound(Sound sound); // Unload sound
RLAPI void UnloadSoundAlias(Sound alias); // Unload a sound alias (does not deallocate sample data) RLAPI void UnloadSoundAlias(Sound alias); // Unload a sound alias (does not deallocate sample data)
@ -690,7 +708,7 @@ RLAPI void ResumeSound(Sound sound); // Resume
RLAPI bool IsSoundPlaying(Sound sound); // Check if a sound is currently playing RLAPI bool IsSoundPlaying(Sound sound); // Check if a sound is currently playing
RLAPI void SetSoundVolume(Sound sound, float volume); // Set volume for a sound (1.0 is max level) RLAPI void SetSoundVolume(Sound sound, float volume); // Set volume for a sound (1.0 is max level)
RLAPI void SetSoundPitch(Sound sound, float pitch); // Set pitch for a sound (1.0 is base level) RLAPI void SetSoundPitch(Sound sound, float pitch); // Set pitch for a sound (1.0 is base level)
RLAPI void SetSoundPan(Sound sound, float pan); // Set pan for a sound (0.5 is center) RLAPI void SetSoundPan(Sound sound, float pan); // Set pan for a sound (-1.0 left, 0.0 center, 1.0 right)
RLAPI Wave WaveCopy(Wave wave); // Copy a wave to a new wave RLAPI Wave WaveCopy(Wave wave); // Copy a wave to a new wave
RLAPI void WaveCrop(Wave *wave, int initFrame, int finalFrame); // Crop a wave to defined frames range RLAPI void WaveCrop(Wave *wave, int initFrame, int finalFrame); // Crop a wave to defined frames range
RLAPI void WaveFormat(Wave *wave, int sampleRate, int sampleSize, int channels); // Convert wave data to desired format RLAPI void WaveFormat(Wave *wave, int sampleRate, int sampleSize, int channels); // Convert wave data to desired format
@ -711,7 +729,7 @@ RLAPI void ResumeMusicStream(Music music); // Resume
RLAPI void SeekMusicStream(Music music, float position); // Seek music to a position (in seconds) RLAPI void SeekMusicStream(Music music, float position); // Seek music to a position (in seconds)
RLAPI void SetMusicVolume(Music music, float volume); // Set volume for music (1.0 is max level) RLAPI void SetMusicVolume(Music music, float volume); // Set volume for music (1.0 is max level)
RLAPI void SetMusicPitch(Music music, float pitch); // Set pitch for a music (1.0 is base level) RLAPI void SetMusicPitch(Music music, float pitch); // Set pitch for a music (1.0 is base level)
RLAPI void SetMusicPan(Music music, float pan); // Set pan for a music (0.5 is center) RLAPI void SetMusicPan(Music music, float pan); // Set pan for a music (-1.0 left, 0.0 center, 1.0 right)
RLAPI float GetMusicTimeLength(Music music); // Get music time length (in seconds) RLAPI float GetMusicTimeLength(Music music); // Get music time length (in seconds)
RLAPI float GetMusicTimePlayed(Music music); // Get current music time played (in seconds) RLAPI float GetMusicTimePlayed(Music music); // Get current music time played (in seconds)
@ -728,7 +746,7 @@ RLAPI bool IsAudioStreamPlaying(AudioStream stream); // Check i
RLAPI void StopAudioStream(AudioStream stream); // Stop audio stream RLAPI void StopAudioStream(AudioStream stream); // Stop audio stream
RLAPI void SetAudioStreamVolume(AudioStream stream, float volume); // Set volume for audio stream (1.0 is max level) RLAPI void SetAudioStreamVolume(AudioStream stream, float volume); // Set volume for audio stream (1.0 is max level)
RLAPI void SetAudioStreamPitch(AudioStream stream, float pitch); // Set pitch for audio stream (1.0 is base level) RLAPI void SetAudioStreamPitch(AudioStream stream, float pitch); // Set pitch for audio stream (1.0 is base level)
RLAPI void SetAudioStreamPan(AudioStream stream, float pan); // Set pan for audio stream (0.5 is centered) RLAPI void SetAudioStreamPan(AudioStream stream, float pan); // Set pan for audio stream (-1.0 to 1.0 range, 0.0 is centered)
RLAPI void SetAudioStreamBufferSizeDefault(int size); // Default size for new audio streams RLAPI void SetAudioStreamBufferSizeDefault(int size); // Default size for new audio streams
RLAPI void SetAudioStreamCallback(AudioStream stream, AudioCallback callback); // Audio thread callback to request new data RLAPI void SetAudioStreamCallback(AudioStream stream, AudioCallback callback); // Audio thread callback to request new data
@ -737,4 +755,3 @@ RLAPI void DetachAudioStreamProcessor(AudioStream stream, AudioCallback processo
RLAPI void AttachAudioMixedProcessor(AudioCallback processor); // Attach audio stream processor to the entire audio pipeline, receives frames x 2 samples as 'float' (stereo) RLAPI void AttachAudioMixedProcessor(AudioCallback processor); // Attach audio stream processor to the entire audio pipeline, receives frames x 2 samples as 'float' (stereo)
RLAPI void DetachAudioMixedProcessor(AudioCallback processor); // Detach audio stream processor from the entire audio pipeline RLAPI void DetachAudioMixedProcessor(AudioCallback processor); // Detach audio stream processor from the entire audio pipeline

View File

@ -284,6 +284,10 @@ ifeq ($(TARGET_PLATFORM),PLATFORM_ANDROID)
# By default use OpenGL ES 2.0 on Android # By default use OpenGL ES 2.0 on Android
GRAPHICS ?= GRAPHICS_API_OPENGL_ES2 GRAPHICS ?= GRAPHICS_API_OPENGL_ES2
endif endif
ifeq ($(TARGET_PLATFORM),PLATFORM_MEMORY)
# By default use OpenGL Software
GRAPHICS = GRAPHICS_API_OPENGL_SOFTWARE
endif
# Define default C compiler and archiver to pack library: CC, AR # Define default C compiler and archiver to pack library: CC, AR
#------------------------------------------------------------------------------------------------ #------------------------------------------------------------------------------------------------
@ -320,7 +324,12 @@ ifeq ($(TARGET_PLATFORM),PLATFORM_DRM)
AR = $(RPI_TOOLCHAIN)/bin/$(RPI_TOOLCHAIN_NAME)-ar AR = $(RPI_TOOLCHAIN)/bin/$(RPI_TOOLCHAIN_NAME)-ar
endif endif
endif endif
ifeq ($(TARGET_PLATFORM),$(filter $(TARGET_PLATFORM),PLATFORM_WEB PLATFORM_WEB_RGFW)) ifeq ($(TARGET_PLATFORM),PLATFORM_WEB)
# HTML5 emscripten compiler
CC = emcc
AR = emar
endif
ifeq ($(TARGET_PLATFORM),PLATFORM_WEB_RGFW)
# HTML5 emscripten compiler # HTML5 emscripten compiler
CC = emcc CC = emcc
AR = emar AR = emar
@ -364,7 +373,6 @@ ifneq ($(RAYLIB_CONFIG_FLAGS), NONE)
endif endif
ifeq ($(TARGET_PLATFORM),$(filter $(TARGET_PLATFORM),PLATFORM_WEB PLATFORM_WEB_RGFW)) ifeq ($(TARGET_PLATFORM),$(filter $(TARGET_PLATFORM),PLATFORM_WEB PLATFORM_WEB_RGFW))
# NOTE: When using multi-threading in the user code, it requires -pthread enabled
CFLAGS += -std=gnu99 CFLAGS += -std=gnu99
else else
CFLAGS += -std=c99 CFLAGS += -std=c99
@ -383,12 +391,15 @@ ifeq ($(RAYLIB_BUILD_MODE),DEBUG)
endif endif
ifeq ($(RAYLIB_BUILD_MODE),RELEASE) ifeq ($(RAYLIB_BUILD_MODE),RELEASE)
ifeq ($(TARGET_PLATFORM),$(filter $(TARGET_PLATFORM),PLATFORM_WEB PLATFORM_WEB_RGFW))
CFLAGS += -Os
endif
ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW) ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW)
CFLAGS += -O1 CFLAGS += -O1
endif endif
ifeq ($(TARGET_PLATFORM),PLATFORM_WEB)
CFLAGS += -Os
endif
ifeq ($(TARGET_PLATFORM),PLATFORM_WEB_RGFW)
CFLAGS += -Os
endif
ifeq ($(TARGET_PLATFORM),PLATFORM_ANDROID) ifeq ($(TARGET_PLATFORM),PLATFORM_ANDROID)
CFLAGS += -O2 CFLAGS += -O2
endif endif
@ -402,23 +413,12 @@ endif
ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW) ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW)
CFLAGS += -Werror=implicit-function-declaration CFLAGS += -Werror=implicit-function-declaration
endif endif
ifeq ($(TARGET_PLATFORM),$(filter $(TARGET_PLATFORM),PLATFORM_WEB PLATFORM_WEB_RGFW)) ifeq ($(TARGET_PLATFORM),PLATFORM_WEB)
# -Os # size optimization ifeq ($(RAYLIB_BUILD_MODE),DEBUG)
# -O2 # optimization level 2, if used, also set --memory-init-file 0 CFLAGS += --profiling
# -sUSE_GLFW=3 # Use glfw3 library (context/input management) endif
# -sALLOW_MEMORY_GROWTH=1 # to allow memory resizing -> WARNING: Audio buffers could FAIL! endif
# -sTOTAL_MEMORY=16777216 # to specify heap memory size (default = 16MB) (67108864 = 64MB) ifeq ($(TARGET_PLATFORM),PLATFORM_WEB_RGFW)
# -sUSE_PTHREADS=1 # multithreading support
# -sWASM=0 # disable Web Assembly, emitted by default
# -sASYNCIFY # lets synchronous C/C++ code interact with asynchronous JS
# -sFORCE_FILESYSTEM=1 # force filesystem to load/save files data
# -sASSERTIONS=1 # enable runtime checks for common memory allocation errors (-O1 and above turn it off)
# -sMINIFY_HTML=0 # minify generated html from shell.html
# --profiling # include information for code profiling
# --memory-init-file 0 # to avoid an external memory initialization code file (.mem)
# --preload-file resources # specify a resources folder for data compilation
# --source-map-base # allow debugging in browser with source map
# --shell-file shell.html # define a custom shell .html and output extension
ifeq ($(RAYLIB_BUILD_MODE),DEBUG) ifeq ($(RAYLIB_BUILD_MODE),DEBUG)
CFLAGS += --profiling CFLAGS += --profiling
endif endif
@ -768,7 +768,6 @@ all: raylib
raylib: $(OBJS) raylib: $(OBJS)
ifeq ($(TARGET_PLATFORM),$(filter $(TARGET_PLATFORM),PLATFORM_WEB PLATFORM_WEB_RGFW)) ifeq ($(TARGET_PLATFORM),$(filter $(TARGET_PLATFORM),PLATFORM_WEB PLATFORM_WEB_RGFW))
# Compile raylib libray for web # Compile raylib libray for web
#$(CC) $(OBJS) -r -o $(RAYLIB_RELEASE_PATH)/lib$(RAYLIB_LIB_NAME).bc
ifeq ($(RAYLIB_LIBTYPE),SHARED) ifeq ($(RAYLIB_LIBTYPE),SHARED)
@echo "WARNING: $(TARGET_PLATFORM) does not support SHARED libraries. Generating STATIC library." @echo "WARNING: $(TARGET_PLATFORM) does not support SHARED libraries. Generating STATIC library."
endif endif

12
src/external/rlsw.h vendored
View File

@ -2357,7 +2357,8 @@ static inline bool sw_texture_alloc(sw_texture_t *texture, const void *data, int
sw_pixel_read_color8_f readColor8 = NULL; sw_pixel_read_color8_f readColor8 = NULL;
sw_pixel_read_color_f readColor = NULL; sw_pixel_read_color_f readColor = NULL;
if (!isDepth) { if (!isDepth)
{
readColor8 = sw_pixel_get_read_color8_func(format); readColor8 = sw_pixel_get_read_color8_func(format);
readColor = sw_pixel_get_read_color_func(format); readColor = sw_pixel_get_read_color_func(format);
} }
@ -2416,7 +2417,7 @@ static inline void sw_texture_sample_nearest(float *SW_RESTRICT color, const sw_
static inline void sw_texture_sample_linear(float *SW_RESTRICT color, const sw_texture_t *SW_RESTRICT tex, float u, float v) static inline void sw_texture_sample_linear(float *SW_RESTRICT color, const sw_texture_t *SW_RESTRICT tex, float u, float v)
{ {
// TODO: With a bit more cleverness thee number of operations can // TODO: With a bit more cleverness the number of operations can
// be clearly reduced, but for now it works fine // be clearly reduced, but for now it works fine
float xf = (u*tex->width) - 0.5f; float xf = (u*tex->width) - 0.5f;
@ -2803,7 +2804,8 @@ static const sw_blend_f SW_BLEND_TABLE[SW_BLEND_FACTOR_COUNT][SW_BLEND_FACTOR_CO
// Maps a GL blend factor enum to its compact table index // Maps a GL blend factor enum to its compact table index
static inline int sw_blend_factor_index(SWfactor f) static inline int sw_blend_factor_index(SWfactor f)
{ {
switch (f) { switch (f)
{
case SW_ZERO: return 0; case SW_ZERO: return 0;
case SW_ONE: return 1; case SW_ONE: return 1;
case SW_SRC_COLOR: return 2; case SW_SRC_COLOR: return 2;
@ -2821,7 +2823,8 @@ static inline int sw_blend_factor_index(SWfactor f)
static bool sw_blend_factor_needs_alpha(SWfactor f) static bool sw_blend_factor_needs_alpha(SWfactor f)
{ {
switch (f) { switch (f)
{
case SW_SRC_ALPHA: case SW_SRC_ALPHA:
case SW_ONE_MINUS_SRC_ALPHA: case SW_ONE_MINUS_SRC_ALPHA:
case SW_DST_ALPHA: case SW_DST_ALPHA:
@ -2829,6 +2832,7 @@ static bool sw_blend_factor_needs_alpha(SWfactor f)
case SW_SRC_ALPHA_SATURATE: return true; case SW_SRC_ALPHA_SATURATE: return true;
default: break; default: break;
} }
return false; return false;
} }

View File

@ -723,7 +723,7 @@ void SetWindowIcon(Image image)
TRACELOG(LOG_WARNING, "RGFW: Window icon image must be in R8G8B8A8 pixel format"); TRACELOG(LOG_WARNING, "RGFW: Window icon image must be in R8G8B8A8 pixel format");
return; return;
} }
RGFW_window_setIcon(platform.window, (u8 *)image.data, image.width, image.height, 4); RGFW_window_setIcon(platform.window, (u8 *)image.data, image.width, image.height, RGFW_formatRGBA8);
} }
// Set icon for window // Set icon for window
@ -749,8 +749,8 @@ void SetWindowIcons(Image *images, int count)
if ((smallIcon == NULL) || ((images[i].width < smallIcon->width) && (images[i].height > smallIcon->height))) smallIcon = &images[i]; if ((smallIcon == NULL) || ((images[i].width < smallIcon->width) && (images[i].height > smallIcon->height))) smallIcon = &images[i];
} }
if (smallIcon != NULL) RGFW_window_setIconEx(platform.window, (u8 *)smallIcon->data, smallIcon->width, smallIcon->height, 4, RGFW_iconWindow); if (smallIcon != NULL) RGFW_window_setIconEx(platform.window, (u8 *)smallIcon->data, smallIcon->width, smallIcon->height, RGFW_formatRGBA8, RGFW_iconWindow);
if (bigIcon != NULL) RGFW_window_setIconEx(platform.window, (u8 *)bigIcon->data, bigIcon->width, bigIcon->height, 4, RGFW_iconTaskbar); if (bigIcon != NULL) RGFW_window_setIconEx(platform.window, (u8 *)bigIcon->data, bigIcon->width, bigIcon->height, RGFW_formatRGBA8, RGFW_iconTaskbar);
} }
} }

View File

@ -1528,6 +1528,10 @@ void PollInputEvents(void)
if ((width + borderLeft + borderRight != usableBounds.w) && (height + borderTop + borderBottom != usableBounds.h)) FLAG_CLEAR(CORE.Window.flags, FLAG_WINDOW_MAXIMIZED); if ((width + borderLeft + borderRight != usableBounds.w) && (height + borderTop + borderBottom != usableBounds.h)) FLAG_CLEAR(CORE.Window.flags, FLAG_WINDOW_MAXIMIZED);
} }
#endif #endif
#if defined(GRAPHICS_API_OPENGL_SOFTWARE)
swResize(width, height);
#endif
} break; } break;
case SDL_WINDOWEVENT_ENTER: CORE.Input.Mouse.cursorOnScreen = true; break; case SDL_WINDOWEVENT_ENTER: CORE.Input.Mouse.cursorOnScreen = true; break;

View File

@ -1063,14 +1063,14 @@ Vector2 GetMonitorPosition(int monitor)
// Get selected monitor width (currently used by monitor) // Get selected monitor width (currently used by monitor)
int GetMonitorWidth(int monitor) int GetMonitorWidth(int monitor)
{ {
TRACELOG(LOG_WARNING, "GetMonitorWidth not implemented"); //TRACELOG(LOG_WARNING, "GetMonitorWidth not implemented");
return 0; return 0;
} }
// Get selected monitor height (currently used by monitor) // Get selected monitor height (currently used by monitor)
int GetMonitorHeight(int monitor) int GetMonitorHeight(int monitor)
{ {
TRACELOG(LOG_WARNING, "GetMonitorHeight not implemented"); //TRACELOG(LOG_WARNING, "GetMonitorHeight not implemented");
return 0; return 0;
} }
@ -1105,7 +1105,7 @@ const char *GetMonitorName(int monitor)
// Get window position XY on monitor // Get window position XY on monitor
Vector2 GetWindowPosition(void) Vector2 GetWindowPosition(void)
{ {
TRACELOG(LOG_WARNING, "GetWindowPosition not implemented"); //TRACELOG(LOG_WARNING, "GetWindowPosition not implemented");
return (Vector2){ 0, 0 }; return (Vector2){ 0, 0 };
} }
@ -1760,13 +1760,31 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lpara
memset(CORE.Input.Keyboard.previousKeyState, 0, sizeof(CORE.Input.Keyboard.previousKeyState)); memset(CORE.Input.Keyboard.previousKeyState, 0, sizeof(CORE.Input.Keyboard.previousKeyState));
memset(CORE.Input.Keyboard.currentKeyState, 0, sizeof(CORE.Input.Keyboard.currentKeyState)); memset(CORE.Input.Keyboard.currentKeyState, 0, sizeof(CORE.Input.Keyboard.currentKeyState));
} break; } break;
case WM_SIZING: case WM_SIZING: // Sent to a window that the user is resizing
{ {
if (!(CORE.Window.flags & FLAG_WINDOW_RESIZABLE)) if (CORE.Window.flags & FLAG_WINDOW_RESIZABLE)
TRACELOG(LOG_WARNING, "WIN32: WINDOW: Trying to resize a non-resizable window"); {
//HandleWindowResize(hwnd, &platform.appScreenWidth, &platform.appScreenHeight);
}
result = TRUE; result = TRUE;
} break; } break;
case WM_SIZE:
{
// WARNING: Don't trust the docs, they say this message can not be obtained if not calling DefWindowProc()
// in response to WM_WINDOWPOSCHANGED but looks like when a window is created,
// this message can be obtained without getting WM_WINDOWPOSCHANGED
#if defined(GRAPHICS_API_OPENGL_SOFTWARE)
// WARNING: Waiting two frames before resizing because software-renderer backend is initilized with swInit() later
// than InitPlatform(), that triggers WM_SIZE, so avoid crashing
if (CORE.Time.frameCounter > 2) HandleWindowResize(hwnd, &platform.appScreenWidth, &platform.appScreenHeight);
#else
// NOTE: This message is only triggered on window creation
HandleWindowResize(hwnd, &platform.appScreenWidth, &platform.appScreenHeight);
#endif
result = 0; // If an application processes WM_SIZE message, it should return zero
} break;
case WM_GETMINMAXINFO: case WM_GETMINMAXINFO:
{ {
DWORD style = MakeWindowStyle(platform.desiredFlags); DWORD style = MakeWindowStyle(platform.desiredFlags);
@ -1865,19 +1883,13 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lpara
default: break; default: break;
} }
} break; } break;
case WM_SIZE: //case WM_MOVE: break;
{
// WARNING: Don't trust the docs, they say this message can not be obtained if not calling DefWindowProc()
// in response to WM_WINDOWPOSCHANGED but looks like when a window is created,
// this message can be obtained without getting WM_WINDOWPOSCHANGED
// WARNING: This call fails for Software-Renderer backend
//HandleWindowResize(hwnd, &platform.appScreenWidth, &platform.appScreenHeight);
} break;
//case WM_MOVE
case WM_WINDOWPOSCHANGED: case WM_WINDOWPOSCHANGED:
{ {
WINDOWPOS *pos = (WINDOWPOS*)lparam; WINDOWPOS *pos = (WINDOWPOS*)lparam;
if (!(pos->flags & SWP_NOSIZE)) HandleWindowResize(hwnd, &platform.appScreenWidth, &platform.appScreenHeight); if (!(pos->flags & SWP_NOSIZE)) HandleWindowResize(hwnd, &platform.appScreenWidth, &platform.appScreenHeight);
DefWindowProc(hwnd, msg, wparam, lparam);
} break; } break;
case WM_GETDPISCALEDSIZE: case WM_GETDPISCALEDSIZE:
{ {
@ -2091,6 +2103,10 @@ static void HandleWindowResize(HWND hwnd, int *width, int *height)
CORE.Window.screenScale = MatrixScale( (float)CORE.Window.render.width/CORE.Window.screen.width, CORE.Window.screenScale = MatrixScale( (float)CORE.Window.render.width/CORE.Window.screen.width,
(float)CORE.Window.render.height/CORE.Window.screen.height, 1.0f); (float)CORE.Window.render.height/CORE.Window.screen.height, 1.0f);
#if defined(GRAPHICS_API_OPENGL_SOFTWARE)
swResize(clientSize.cx, clientSize.cy);
#endif
} }
// Update window style // Update window style

View File

@ -837,14 +837,8 @@ void SwapScreenBuffer(void)
uint32_t height = mode->vdisplay; uint32_t height = mode->vdisplay;
// Dumb buffers use a fixed format based on bpp // Dumb buffers use a fixed format based on bpp
#if SW_COLOR_BUFFER_BITS == 24
const uint32_t bpp = 32; // 32 bits per pixel (XRGB8888 format) const uint32_t bpp = 32; // 32 bits per pixel (XRGB8888 format)
const uint32_t depth = 24; // Color depth, here only 24 bits, alpha is not used const uint32_t depth = 24; // Color depth, here only 24 bits, alpha is not used
#else
// REVIEW: Not sure how it will be interpreted (RGB or RGBA?)
const uint32_t bpp = SW_COLOR_BUFFER_BITS;
const uint32_t depth = SW_COLOR_BUFFER_BITS;
#endif
// Create a dumb buffer for software rendering // Create a dumb buffer for software rendering
struct drm_mode_create_dumb creq = { 0 }; struct drm_mode_create_dumb creq = { 0 };
@ -899,7 +893,7 @@ void SwapScreenBuffer(void)
// Copy the software rendered buffer to the dumb buffer with scaling if needed // Copy the software rendered buffer to the dumb buffer with scaling if needed
// NOTE: RLSW will make a simple copy if the dimensions match // NOTE: RLSW will make a simple copy if the dimensions match
swBlitFramebuffer(0, 0, width, height, 0, 0, width, height, SW_RGBA, SW_UNSIGNED_BYTE, dumbBuffer); swBlitPixels(0, 0, width, height, 0, 0, width, height, SW_RGBA, SW_UNSIGNED_BYTE, dumbBuffer);
// Unmap the buffer // Unmap the buffer
munmap(dumbBuffer, creq.size); munmap(dumbBuffer, creq.size);

View File

@ -1763,6 +1763,8 @@ bool IsMusicValid(Music music)
// Unload music stream // Unload music stream
void UnloadMusicStream(Music music) void UnloadMusicStream(Music music)
{ {
if (IsMusicStreamPlaying(music)) StopMusicStream(music);
UnloadAudioStream(music.stream); UnloadAudioStream(music.stream);
if (music.ctxData != NULL) if (music.ctxData != NULL)

View File

@ -1,8 +1,8 @@
GLFW_ICON ICON "raylib.ico" GLFW_ICON ICON "raylib.ico"
1 VERSIONINFO 1 VERSIONINFO
FILEVERSION 5,5,0,0 FILEVERSION 6,0,0,0
PRODUCTVERSION 5,5,0,0 PRODUCTVERSION 6,0,0,0
BEGIN BEGIN
BLOCK "StringFileInfo" BLOCK "StringFileInfo"
BEGIN BEGIN
@ -11,12 +11,12 @@ BEGIN
BEGIN BEGIN
VALUE "CompanyName", "raylib technologies" VALUE "CompanyName", "raylib technologies"
VALUE "FileDescription", "raylib dynamic library (www.raylib.com)" VALUE "FileDescription", "raylib dynamic library (www.raylib.com)"
VALUE "FileVersion", "5.5.0" VALUE "FileVersion", "6.0.0"
VALUE "InternalName", "raylib.dll" VALUE "InternalName", "raylib.dll"
VALUE "LegalCopyright", "(c) 2025 Ramon Santamaria (@raysan5)" VALUE "LegalCopyright", "(c) 2026 Ramon Santamaria (@raysan5)"
VALUE "OriginalFilename", "raylib.dll" VALUE "OriginalFilename", "raylib.dll"
VALUE "ProductName", "raylib" VALUE "ProductName", "raylib"
VALUE "ProductVersion", "5.5.0" VALUE "ProductVersion", "6.0.0"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"

Binary file not shown.

View File

@ -1071,9 +1071,9 @@ RLAPI Shader LoadShaderFromMemory(const char *vsCode, const char *fsCode); // Lo
RLAPI bool IsShaderValid(Shader shader); // Check if a shader is valid (loaded on GPU) RLAPI bool IsShaderValid(Shader shader); // Check if a shader is valid (loaded on GPU)
RLAPI int GetShaderLocation(Shader shader, const char *uniformName); // Get shader uniform location RLAPI int GetShaderLocation(Shader shader, const char *uniformName); // Get shader uniform location
RLAPI int GetShaderLocationAttrib(Shader shader, const char *attribName); // Get shader attribute location RLAPI int GetShaderLocationAttrib(Shader shader, const char *attribName); // Get shader attribute location
RLAPI void SetShaderValue(Shader shader, int locIndex, const void *value, int uniformType); // Set shader uniform value RLAPI void SetShaderValue(Shader shader, int locIndex, const void *value, int uniformType); // Set shader uniform value
RLAPI void SetShaderValueV(Shader shader, int locIndex, const void *value, int uniformType, int count); // Set shader uniform value vector RLAPI void SetShaderValueV(Shader shader, int locIndex, const void *value, int uniformType, int count); // Set shader uniform value vector
RLAPI void SetShaderValueMatrix(Shader shader, int locIndex, Matrix mat); // Set shader uniform value (matrix 4x4) RLAPI void SetShaderValueMatrix(Shader shader, int locIndex, Matrix mat); // Set shader uniform value (matrix 4x4)
RLAPI void SetShaderValueTexture(Shader shader, int locIndex, Texture2D texture); // Set shader uniform value and bind the texture (sampler2d) RLAPI void SetShaderValueTexture(Shader shader, int locIndex, Texture2D texture); // Set shader uniform value and bind the texture (sampler2d)
RLAPI void UnloadShader(Shader shader); // Unload shader from GPU memory (VRAM) RLAPI void UnloadShader(Shader shader); // Unload shader from GPU memory (VRAM)
@ -1175,10 +1175,10 @@ RLAPI unsigned char *CompressData(const unsigned char *data, int dataSize, int *
RLAPI unsigned char *DecompressData(const unsigned char *compData, int compDataSize, int *dataSize); // Decompress data (DEFLATE algorithm), memory must be MemFree() RLAPI unsigned char *DecompressData(const unsigned char *compData, int compDataSize, int *dataSize); // Decompress data (DEFLATE algorithm), memory must be MemFree()
RLAPI char *EncodeDataBase64(const unsigned char *data, int dataSize, int *outputSize); // Encode data to Base64 string (includes NULL terminator), memory must be MemFree() RLAPI char *EncodeDataBase64(const unsigned char *data, int dataSize, int *outputSize); // Encode data to Base64 string (includes NULL terminator), memory must be MemFree()
RLAPI unsigned char *DecodeDataBase64(const char *text, int *outputSize); // Decode Base64 string (expected NULL terminated), memory must be MemFree() RLAPI unsigned char *DecodeDataBase64(const char *text, int *outputSize); // Decode Base64 string (expected NULL terminated), memory must be MemFree()
RLAPI unsigned int ComputeCRC32(unsigned char *data, int dataSize); // Compute CRC32 hash code RLAPI unsigned int ComputeCRC32(unsigned char *data, int dataSize); // Compute CRC32 hash code
RLAPI unsigned int *ComputeMD5(unsigned char *data, int dataSize); // Compute MD5 hash code, returns static int[4] (16 bytes) RLAPI unsigned int *ComputeMD5(unsigned char *data, int dataSize); // Compute MD5 hash code, returns static int[4] (16 bytes)
RLAPI unsigned int *ComputeSHA1(unsigned char *data, int dataSize); // Compute SHA1 hash code, returns static int[5] (20 bytes) RLAPI unsigned int *ComputeSHA1(unsigned char *data, int dataSize); // Compute SHA1 hash code, returns static int[5] (20 bytes)
RLAPI unsigned int *ComputeSHA256(unsigned char *data, int dataSize); // Compute SHA256 hash code, returns static int[8] (32 bytes) RLAPI unsigned int *ComputeSHA256(unsigned char *data, int dataSize); // Compute SHA256 hash code, returns static int[8] (32 bytes)
// Automation events functionality // Automation events functionality
RLAPI AutomationEventList LoadAutomationEventList(const char *fileName); // Load automation events list from file, NULL for empty list, capacity = MAX_AUTOMATION_EVENTS RLAPI AutomationEventList LoadAutomationEventList(const char *fileName); // Load automation events list from file, NULL for empty list, capacity = MAX_AUTOMATION_EVENTS
@ -1279,10 +1279,10 @@ RLAPI void DrawLineStrip(const Vector2 *points, int pointCount, Color color);
RLAPI void DrawLineBezier(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw line segment cubic-bezier in-out interpolation RLAPI void DrawLineBezier(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw line segment cubic-bezier in-out interpolation
RLAPI void DrawLineDashed(Vector2 startPos, Vector2 endPos, int dashSize, int spaceSize, Color color); // Draw a dashed line RLAPI void DrawLineDashed(Vector2 startPos, Vector2 endPos, int dashSize, int spaceSize, Color color); // Draw a dashed line
RLAPI void DrawCircle(int centerX, int centerY, float radius, Color color); // Draw a color-filled circle RLAPI void DrawCircle(int centerX, int centerY, float radius, Color color); // Draw a color-filled circle
RLAPI void DrawCircleSector(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color); // Draw a piece of a circle
RLAPI void DrawCircleSectorLines(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color); // Draw circle sector outline
RLAPI void DrawCircleGradient(int centerX, int centerY, float radius, Color inner, Color outer); // Draw a gradient-filled circle
RLAPI void DrawCircleV(Vector2 center, float radius, Color color); // Draw a color-filled circle (Vector version) RLAPI void DrawCircleV(Vector2 center, float radius, Color color); // Draw a color-filled circle (Vector version)
RLAPI void DrawCircleGradient(Vector2 center, float radius, Color inner, Color outer); // Draw a gradient-filled circle
RLAPI void DrawCircleSector(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color); // Draw a piece of a circle
RLAPI void DrawCircleSectorLines(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color); // Draw circle sector outline
RLAPI void DrawCircleLines(int centerX, int centerY, float radius, Color color); // Draw circle outline RLAPI void DrawCircleLines(int centerX, int centerY, float radius, Color color); // Draw circle outline
RLAPI void DrawCircleLinesV(Vector2 center, float radius, Color color); // Draw circle outline (Vector version) RLAPI void DrawCircleLinesV(Vector2 center, float radius, Color color); // Draw circle outline (Vector version)
RLAPI void DrawEllipse(int centerX, int centerY, float radiusH, float radiusV, Color color); // Draw ellipse RLAPI void DrawEllipse(int centerX, int centerY, float radiusH, float radiusV, Color color); // Draw ellipse
@ -1290,7 +1290,7 @@ RLAPI void DrawEllipseV(Vector2 center, float radiusH, float radiusV, Color colo
RLAPI void DrawEllipseLines(int centerX, int centerY, float radiusH, float radiusV, Color color); // Draw ellipse outline RLAPI void DrawEllipseLines(int centerX, int centerY, float radiusH, float radiusV, Color color); // Draw ellipse outline
RLAPI void DrawEllipseLinesV(Vector2 center, float radiusH, float radiusV, Color color); // Draw ellipse outline (Vector version) RLAPI void DrawEllipseLinesV(Vector2 center, float radiusH, float radiusV, Color color); // Draw ellipse outline (Vector version)
RLAPI void DrawRing(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color); // Draw ring RLAPI void DrawRing(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color); // Draw ring
RLAPI void DrawRingLines(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color); // Draw ring outline RLAPI void DrawRingLines(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color); // Draw ring outline
RLAPI void DrawRectangle(int posX, int posY, int width, int height, Color color); // Draw a color-filled rectangle RLAPI void DrawRectangle(int posX, int posY, int width, int height, Color color); // Draw a color-filled rectangle
RLAPI void DrawRectangleV(Vector2 position, Vector2 size, Color color); // Draw a color-filled rectangle (Vector version) RLAPI void DrawRectangleV(Vector2 position, Vector2 size, Color color); // Draw a color-filled rectangle (Vector version)
RLAPI void DrawRectangleRec(Rectangle rec, Color color); // Draw a color-filled rectangle RLAPI void DrawRectangleRec(Rectangle rec, Color color); // Draw a color-filled rectangle
@ -1539,11 +1539,11 @@ RLAPI const char *TextSubtext(const char *text, int position, int length);
RLAPI const char *TextRemoveSpaces(const char *text); // Remove text spaces, concat words RLAPI const char *TextRemoveSpaces(const char *text); // Remove text spaces, concat words
RLAPI char *GetTextBetween(const char *text, const char *begin, const char *end); // Get text between two strings RLAPI char *GetTextBetween(const char *text, const char *begin, const char *end); // Get text between two strings
RLAPI char *TextReplace(const char *text, const char *search, const char *replacement); // Replace text string with new string RLAPI char *TextReplace(const char *text, const char *search, const char *replacement); // Replace text string with new string
RLAPI char *TextReplaceAlloc(const char *text, const char *search, const char *replacement); // Replace text string with new string, memory must be MemFree() RLAPI char *TextReplaceAlloc(const char *text, const char *search, const char *replacement); // Replace text string with new string, memory must be MemFree()
RLAPI char *TextReplaceBetween(const char *text, const char *begin, const char *end, const char *replacement); // Replace text between two specific strings RLAPI char *TextReplaceBetween(const char *text, const char *begin, const char *end, const char *replacement); // Replace text between two specific strings
RLAPI char *TextReplaceBetweenAlloc(const char *text, const char *begin, const char *end, const char *replacement); // Replace text between two specific strings, memory must be MemFree() RLAPI char *TextReplaceBetweenAlloc(const char *text, const char *begin, const char *end, const char *replacement); // Replace text between two specific strings, memory must be MemFree()
RLAPI char *TextInsert(const char *text, const char *insert, int position); // Insert text in a defined byte position RLAPI char *TextInsert(const char *text, const char *insert, int position); // Insert text in a defined byte position
RLAPI char *TextInsertAlloc(const char *text, const char *insert, int position); // Insert text in a defined byte position, memory must be MemFree() RLAPI char *TextInsertAlloc(const char *text, const char *insert, int position); // Insert text in a defined byte position, memory must be MemFree()
RLAPI char *TextJoin(char **textList, int count, const char *delimiter); // Join text strings with delimiter RLAPI char *TextJoin(char **textList, int count, const char *delimiter); // Join text strings with delimiter
RLAPI char **TextSplit(const char *text, char delimiter, int *count); // Split text into multiple strings, using MAX_TEXTSPLIT_COUNT static strings RLAPI char **TextSplit(const char *text, char delimiter, int *count); // Split text into multiple strings, using MAX_TEXTSPLIT_COUNT static strings
RLAPI void TextAppend(char *text, const char *append, int *position); // Append text at specific position and move cursor RLAPI void TextAppend(char *text, const char *append, int *position); // Append text at specific position and move cursor
@ -1600,7 +1600,7 @@ RLAPI void DrawModelEx(Model model, Vector3 position, Vector3 rotationAxis, floa
RLAPI void DrawModelWires(Model model, Vector3 position, float scale, Color tint); // Draw a model wires (with texture if set) RLAPI void DrawModelWires(Model model, Vector3 position, float scale, Color tint); // Draw a model wires (with texture if set)
RLAPI void DrawModelWiresEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model wires (with texture if set) with extended parameters RLAPI void DrawModelWiresEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model wires (with texture if set) with extended parameters
RLAPI void DrawBoundingBox(BoundingBox box, Color color); // Draw bounding box (wires) RLAPI void DrawBoundingBox(BoundingBox box, Color color); // Draw bounding box (wires)
RLAPI void DrawBillboard(Camera camera, Texture2D texture, Vector3 position, float scale, Color tint); // Draw a billboard texture RLAPI void DrawBillboard(Camera camera, Texture2D texture, Vector3 position, float scale, Color tint); // Draw a billboard texture
RLAPI void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector2 size, Color tint); // Draw a billboard texture defined by source RLAPI void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector2 size, Color tint); // Draw a billboard texture defined by source
RLAPI void DrawBillboardPro(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector3 up, Vector2 size, Vector2 origin, float rotation, Color tint); // Draw a billboard texture defined by source and rotation RLAPI void DrawBillboardPro(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector3 up, Vector2 size, Vector2 origin, float rotation, Color tint); // Draw a billboard texture defined by source and rotation

View File

@ -1,8 +1,8 @@
GLFW_ICON ICON "raylib.ico" GLFW_ICON ICON "raylib.ico"
1 VERSIONINFO 1 VERSIONINFO
FILEVERSION 5,5,0,0 FILEVERSION 6,0,0,0
PRODUCTVERSION 5,5,0,0 PRODUCTVERSION 6,0,0,0
BEGIN BEGIN
BLOCK "StringFileInfo" BLOCK "StringFileInfo"
BEGIN BEGIN
@ -11,12 +11,12 @@ BEGIN
BEGIN BEGIN
VALUE "CompanyName", "raylib technologies" VALUE "CompanyName", "raylib technologies"
VALUE "FileDescription", "raylib application (www.raylib.com)" VALUE "FileDescription", "raylib application (www.raylib.com)"
VALUE "FileVersion", "5.5.0" VALUE "FileVersion", "6.0.0"
VALUE "InternalName", "raylib" VALUE "InternalName", "raylib"
VALUE "LegalCopyright", "(c) 2025 Ramon Santamaria (@raysan5)" VALUE "LegalCopyright", "(c) 2026 Ramon Santamaria (@raysan5)"
VALUE "OriginalFilename", "raylib" VALUE "OriginalFilename", "raylib"
VALUE "ProductName", "raylib app" VALUE "ProductName", "raylib app"
VALUE "ProductVersion", "5.5.0" VALUE "ProductVersion", "6.0.0"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"

Binary file not shown.

View File

@ -1015,9 +1015,7 @@ RLAPI void rlLoadDrawQuad(void); // Load and draw a quad
#ifndef RL_DEFAULT_SHADER_ATTRIB_NAME_BONEWEIGHTS #ifndef RL_DEFAULT_SHADER_ATTRIB_NAME_BONEWEIGHTS
#define RL_DEFAULT_SHADER_ATTRIB_NAME_BONEWEIGHTS "vertexBoneWeights" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_BONEWEIGHTS #define RL_DEFAULT_SHADER_ATTRIB_NAME_BONEWEIGHTS "vertexBoneWeights" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_BONEWEIGHTS
#endif #endif
#ifndef RL_DEFAULT_SHADER_UNIFORM_NAME_BONEMATRICES
#define RL_DEFAULT_SHADER_UNIFORM_NAME_BONEMATRICES "boneMatrices" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_BONEMATRICES
#endif
#ifndef RL_DEFAULT_SHADER_ATTRIB_NAME_INSTANCETRANSFORM #ifndef RL_DEFAULT_SHADER_ATTRIB_NAME_INSTANCETRANSFORM
#define RL_DEFAULT_SHADER_ATTRIB_NAME_INSTANCETRANSFORM "instanceTransform" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_INSTANCETRANSFORM #define RL_DEFAULT_SHADER_ATTRIB_NAME_INSTANCETRANSFORM "instanceTransform" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_INSTANCETRANSFORM
#endif #endif
@ -3687,6 +3685,8 @@ void rlUnloadTexture(unsigned int id)
// NOTE: Only supports GPU mipmap generation // NOTE: Only supports GPU mipmap generation
void rlGenTextureMipmaps(unsigned int id, int width, int height, int format, int *mipmaps) void rlGenTextureMipmaps(unsigned int id, int width, int height, int format, int *mipmaps)
{ {
if (!isGpuReady) { TRACELOG(RL_LOG_WARNING, "GL: GPU is not ready to load data, trying to load before InitWindow()?"); return; }
#if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2) #if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2)
glBindTexture(GL_TEXTURE_2D, id); glBindTexture(GL_TEXTURE_2D, id);

View File

@ -324,6 +324,22 @@ void DrawCircleV(Vector2 center, float radius, Color color)
DrawCircleSector(center, radius, 0, 360, 36, color); DrawCircleSector(center, radius, 0, 360, 36, color);
} }
// Draw a gradient-filled circle
void DrawCircleGradient(Vector2 center, float radius, Color inner, Color outer)
{
rlBegin(RL_TRIANGLES);
for (int i = 0; i < 360; i += 10)
{
rlColor4ub(inner.r, inner.g, inner.b, inner.a);
rlVertex2f(center.x, center.y);
rlColor4ub(outer.r, outer.g, outer.b, outer.a);
rlVertex2f(center.x + cosf(DEG2RAD*(i + 10))*radius, center.y + sinf(DEG2RAD*(i + 10))*radius);
rlColor4ub(outer.r, outer.g, outer.b, outer.a);
rlVertex2f(center.x + cosf(DEG2RAD*i)*radius, center.y + sinf(DEG2RAD*i)*radius);
}
rlEnd();
}
// Draw a piece of a circle // Draw a piece of a circle
void DrawCircleSector(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color) void DrawCircleSector(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color)
{ {
@ -473,22 +489,6 @@ void DrawCircleSectorLines(Vector2 center, float radius, float startAngle, float
rlEnd(); rlEnd();
} }
// Draw a gradient-filled circle
void DrawCircleGradient(int centerX, int centerY, float radius, Color inner, Color outer)
{
rlBegin(RL_TRIANGLES);
for (int i = 0; i < 360; i += 10)
{
rlColor4ub(inner.r, inner.g, inner.b, inner.a);
rlVertex2f((float)centerX, (float)centerY);
rlColor4ub(outer.r, outer.g, outer.b, outer.a);
rlVertex2f((float)centerX + cosf(DEG2RAD*(i + 10))*radius, (float)centerY + sinf(DEG2RAD*(i + 10))*radius);
rlColor4ub(outer.r, outer.g, outer.b, outer.a);
rlVertex2f((float)centerX + cosf(DEG2RAD*i)*radius, (float)centerY + sinf(DEG2RAD*i)*radius);
}
rlEnd();
}
// Draw circle outline // Draw circle outline
void DrawCircleLines(int centerX, int centerY, float radius, Color color) void DrawCircleLines(int centerX, int centerY, float radius, Color color)
{ {

View File

@ -1,4 +1,4 @@
Copyright (c) 2025 Ramon Santamaria (@raysan5) Copyright (c) 2026 Ramon Santamaria (@raysan5)
This software is provided "as-is", without any express or implied warranty. In no event This software is provided "as-is", without any express or implied warranty. In no event
will the authors be held liable for any damages arising from the use of this software. will the authors be held liable for any damages arising from the use of this software.

View File

@ -2,7 +2,7 @@
# #
# raylib makefile for Desktop platforms, Web (Wasm), Raspberry Pi (DRM mode) and Android # raylib makefile for Desktop platforms, Web (Wasm), Raspberry Pi (DRM mode) and Android
# #
# Copyright (c) 2013-2025 Ramon Santamaria (@raysan5) # Copyright (c) 2013-2026 Ramon Santamaria (@raysan5)
# #
# This software is provided "as-is", without any express or implied warranty. In no event # This software is provided "as-is", without any express or implied warranty. In no event
# will the authors be held liable for any damages arising from the use of this software. # will the authors be held liable for any damages arising from the use of this software.

View File

@ -474,8 +474,8 @@ int main(int argc, char *argv[])
exTextUpdated[1] = TextReplaceAlloc(exTextUpdated[0], "<name>", exName + strlen(exCategory) + 1); exTextUpdated[1] = TextReplaceAlloc(exTextUpdated[0], "<name>", exName + strlen(exCategory) + 1);
//TextReplaceAlloc(newExample, "<user_name>", "Ray"); //TextReplaceAlloc(newExample, "<user_name>", "Ray");
//TextReplaceAlloc(newExample, "@<user_github>", "@raysan5"); //TextReplaceAlloc(newExample, "@<user_github>", "@raysan5");
//TextReplaceAlloc(newExample, "<year_created>", 2025); //TextReplaceAlloc(newExample, "<year_created>", 2026);
//TextReplaceAlloc(newExample, "<year_updated>", 2025); //TextReplaceAlloc(newExample, "<year_updated>", 2026);
SaveFileText(TextFormat("%s/%s/%s.c", exBasePath, exCategory, exName), exTextUpdated[1]); SaveFileText(TextFormat("%s/%s/%s.c", exBasePath, exCategory, exName), exTextUpdated[1]);
for (int i = 0; i < 6; i++) { MemFree(exTextUpdated[i]); exTextUpdated[i] = NULL; } for (int i = 0; i < 6; i++) { MemFree(exTextUpdated[i]); exTextUpdated[i] = NULL; }
@ -1875,7 +1875,7 @@ int main(int argc, char *argv[])
printf("\n////////////////////////////////////////////////////////////////////////////////////////////\n"); printf("\n////////////////////////////////////////////////////////////////////////////////////////////\n");
printf("// //\n"); printf("// //\n");
printf("// rexm [raylib examples manager] - A simple command-line tool to manage raylib examples //\n"); printf("// rexm [raylib examples manager] - A simple command-line tool to manage raylib examples //\n");
printf("// powered by raylib v5.6-dev //\n"); printf("// powered by raylib v6.0 //\n");
printf("// //\n"); printf("// //\n");
printf("// Copyright (c) 2025-2026 Ramon Santamaria (@raysan5) //\n"); printf("// Copyright (c) 2025-2026 Ramon Santamaria (@raysan5) //\n");
printf("// //\n"); printf("// //\n");

View File

@ -13,7 +13,7 @@ BEGIN
VALUE "FileDescription", "rexm | raylib examples manager" VALUE "FileDescription", "rexm | raylib examples manager"
VALUE "FileVersion", "1.0" VALUE "FileVersion", "1.0"
VALUE "InternalName", "rexm" VALUE "InternalName", "rexm"
VALUE "LegalCopyright", "(c) 2025 Ramon Santamaria" VALUE "LegalCopyright", "(c) 2026 Ramon Santamaria"
//VALUE "OriginalFilename", "rexm.exe" //VALUE "OriginalFilename", "rexm.exe"
VALUE "rexm", "rexm" VALUE "rexm", "rexm"
VALUE "ProductVersion", "1.0" VALUE "ProductVersion", "1.0"

View File

@ -5698,6 +5698,48 @@
} }
] ]
}, },
{
"name": "DrawCircleV",
"description": "Draw a color-filled circle (Vector version)",
"returnType": "void",
"params": [
{
"type": "Vector2",
"name": "center"
},
{
"type": "float",
"name": "radius"
},
{
"type": "Color",
"name": "color"
}
]
},
{
"name": "DrawCircleGradient",
"description": "Draw a gradient-filled circle",
"returnType": "void",
"params": [
{
"type": "Vector2",
"name": "center"
},
{
"type": "float",
"name": "radius"
},
{
"type": "Color",
"name": "inner"
},
{
"type": "Color",
"name": "outer"
}
]
},
{ {
"name": "DrawCircleSector", "name": "DrawCircleSector",
"description": "Draw a piece of a circle", "description": "Draw a piece of a circle",
@ -5760,52 +5802,6 @@
} }
] ]
}, },
{
"name": "DrawCircleGradient",
"description": "Draw a gradient-filled circle",
"returnType": "void",
"params": [
{
"type": "int",
"name": "centerX"
},
{
"type": "int",
"name": "centerY"
},
{
"type": "float",
"name": "radius"
},
{
"type": "Color",
"name": "inner"
},
{
"type": "Color",
"name": "outer"
}
]
},
{
"name": "DrawCircleV",
"description": "Draw a color-filled circle (Vector version)",
"returnType": "void",
"params": [
{
"type": "Vector2",
"name": "center"
},
{
"type": "float",
"name": "radius"
},
{
"type": "Color",
"name": "color"
}
]
},
{ {
"name": "DrawCircleLines", "name": "DrawCircleLines",
"description": "Draw circle outline", "description": "Draw circle outline",

View File

@ -4861,6 +4861,27 @@ return {
{type = "Color", name = "color"} {type = "Color", name = "color"}
} }
}, },
{
name = "DrawCircleV",
description = "Draw a color-filled circle (Vector version)",
returnType = "void",
params = {
{type = "Vector2", name = "center"},
{type = "float", name = "radius"},
{type = "Color", name = "color"}
}
},
{
name = "DrawCircleGradient",
description = "Draw a gradient-filled circle",
returnType = "void",
params = {
{type = "Vector2", name = "center"},
{type = "float", name = "radius"},
{type = "Color", name = "inner"},
{type = "Color", name = "outer"}
}
},
{ {
name = "DrawCircleSector", name = "DrawCircleSector",
description = "Draw a piece of a circle", description = "Draw a piece of a circle",
@ -4887,28 +4908,6 @@ return {
{type = "Color", name = "color"} {type = "Color", name = "color"}
} }
}, },
{
name = "DrawCircleGradient",
description = "Draw a gradient-filled circle",
returnType = "void",
params = {
{type = "int", name = "centerX"},
{type = "int", name = "centerY"},
{type = "float", name = "radius"},
{type = "Color", name = "inner"},
{type = "Color", name = "outer"}
}
},
{
name = "DrawCircleV",
description = "Draw a color-filled circle (Vector version)",
returnType = "void",
params = {
{type = "Vector2", name = "center"},
{type = "float", name = "radius"},
{type = "Color", name = "color"}
}
},
{ {
name = "DrawCircleLines", name = "DrawCircleLines",
description = "Draw circle outline", description = "Draw circle outline",

View File

@ -2262,7 +2262,22 @@ Function 230: DrawCircle() (4 input parameters)
Param[2]: centerY (type: int) Param[2]: centerY (type: int)
Param[3]: radius (type: float) Param[3]: radius (type: float)
Param[4]: color (type: Color) Param[4]: color (type: Color)
Function 231: DrawCircleSector() (6 input parameters) Function 231: DrawCircleV() (3 input parameters)
Name: DrawCircleV
Return type: void
Description: Draw a color-filled circle (Vector version)
Param[1]: center (type: Vector2)
Param[2]: radius (type: float)
Param[3]: color (type: Color)
Function 232: DrawCircleGradient() (4 input parameters)
Name: DrawCircleGradient
Return type: void
Description: Draw a gradient-filled circle
Param[1]: center (type: Vector2)
Param[2]: radius (type: float)
Param[3]: inner (type: Color)
Param[4]: outer (type: Color)
Function 233: DrawCircleSector() (6 input parameters)
Name: DrawCircleSector Name: DrawCircleSector
Return type: void Return type: void
Description: Draw a piece of a circle Description: Draw a piece of a circle
@ -2272,7 +2287,7 @@ Function 231: DrawCircleSector() (6 input parameters)
Param[4]: endAngle (type: float) Param[4]: endAngle (type: float)
Param[5]: segments (type: int) Param[5]: segments (type: int)
Param[6]: color (type: Color) Param[6]: color (type: Color)
Function 232: DrawCircleSectorLines() (6 input parameters) Function 234: DrawCircleSectorLines() (6 input parameters)
Name: DrawCircleSectorLines Name: DrawCircleSectorLines
Return type: void Return type: void
Description: Draw circle sector outline Description: Draw circle sector outline
@ -2282,22 +2297,6 @@ Function 232: DrawCircleSectorLines() (6 input parameters)
Param[4]: endAngle (type: float) Param[4]: endAngle (type: float)
Param[5]: segments (type: int) Param[5]: segments (type: int)
Param[6]: color (type: Color) Param[6]: color (type: Color)
Function 233: DrawCircleGradient() (5 input parameters)
Name: DrawCircleGradient
Return type: void
Description: Draw a gradient-filled circle
Param[1]: centerX (type: int)
Param[2]: centerY (type: int)
Param[3]: radius (type: float)
Param[4]: inner (type: Color)
Param[5]: outer (type: Color)
Function 234: DrawCircleV() (3 input parameters)
Name: DrawCircleV
Return type: void
Description: Draw a color-filled circle (Vector version)
Param[1]: center (type: Vector2)
Param[2]: radius (type: float)
Param[3]: color (type: Color)
Function 235: DrawCircleLines() (4 input parameters) Function 235: DrawCircleLines() (4 input parameters)
Name: DrawCircleLines Name: DrawCircleLines
Return type: void Return type: void

View File

@ -1409,6 +1409,17 @@
<Param type="float" name="radius" desc="" /> <Param type="float" name="radius" desc="" />
<Param type="Color" name="color" desc="" /> <Param type="Color" name="color" desc="" />
</Function> </Function>
<Function name="DrawCircleV" retType="void" paramCount="3" desc="Draw a color-filled circle (Vector version)">
<Param type="Vector2" name="center" desc="" />
<Param type="float" name="radius" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="DrawCircleGradient" retType="void" paramCount="4" desc="Draw a gradient-filled circle">
<Param type="Vector2" name="center" desc="" />
<Param type="float" name="radius" desc="" />
<Param type="Color" name="inner" desc="" />
<Param type="Color" name="outer" desc="" />
</Function>
<Function name="DrawCircleSector" retType="void" paramCount="6" desc="Draw a piece of a circle"> <Function name="DrawCircleSector" retType="void" paramCount="6" desc="Draw a piece of a circle">
<Param type="Vector2" name="center" desc="" /> <Param type="Vector2" name="center" desc="" />
<Param type="float" name="radius" desc="" /> <Param type="float" name="radius" desc="" />
@ -1425,18 +1436,6 @@
<Param type="int" name="segments" desc="" /> <Param type="int" name="segments" desc="" />
<Param type="Color" name="color" desc="" /> <Param type="Color" name="color" desc="" />
</Function> </Function>
<Function name="DrawCircleGradient" retType="void" paramCount="5" desc="Draw a gradient-filled circle">
<Param type="int" name="centerX" desc="" />
<Param type="int" name="centerY" desc="" />
<Param type="float" name="radius" desc="" />
<Param type="Color" name="inner" desc="" />
<Param type="Color" name="outer" desc="" />
</Function>
<Function name="DrawCircleV" retType="void" paramCount="3" desc="Draw a color-filled circle (Vector version)">
<Param type="Vector2" name="center" desc="" />
<Param type="float" name="radius" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="DrawCircleLines" retType="void" paramCount="4" desc="Draw circle outline"> <Function name="DrawCircleLines" retType="void" paramCount="4" desc="Draw circle outline">
<Param type="int" name="centerX" desc="" /> <Param type="int" name="centerX" desc="" />
<Param type="int" name="centerY" desc="" /> <Param type="int" name="centerY" desc="" />

View File

@ -1,7 +1,7 @@
IDI_APP_ICON ICON "rlparser.ico" IDI_APP_ICON ICON "rlparser.ico"
1 VERSIONINFO 1 VERSIONINFO
FILEVERSION 5,5,0,0 FILEVERSION 6,0,0,0
PRODUCTVERSION 5,5,0,0 PRODUCTVERSION 6,0,0,0
BEGIN BEGIN
BLOCK "StringFileInfo" BLOCK "StringFileInfo"
BEGIN BEGIN
@ -11,7 +11,7 @@ BEGIN
VALUE "FileDescription", "rlparser | raylib header API parser" VALUE "FileDescription", "rlparser | raylib header API parser"
VALUE "FileVersion", "1.0" VALUE "FileVersion", "1.0"
VALUE "InternalName", "rlparser" VALUE "InternalName", "rlparser"
VALUE "LegalCopyright", "(c) 2025 Ramon Santamaria (@raysan5)" VALUE "LegalCopyright", "(c) 2026 Ramon Santamaria (@raysan5)"
VALUE "OriginalFilename", "rlparser" VALUE "OriginalFilename", "rlparser"
VALUE "ProductName", "rlparser" VALUE "ProductName", "rlparser"
VALUE "ProductVersion", "1.0" VALUE "ProductVersion", "1.0"