Merge branch 'master' of github.com:raysan5/raylib

This commit is contained in:
criss 2026-03-14 20:53:18 +01:00
commit d6ac5d9de4
134 changed files with 30201 additions and 14799 deletions

5
.gitignore vendored
View File

@ -132,3 +132,8 @@ tools/rexm/rexm
# CI # CI
emsdk-cache/ emsdk-cache/
raylib.com/ raylib.com/
# Wayland files
src/*protocol.h
src/*protocol-code.h
src/*protocol-code.c

View File

@ -32,7 +32,7 @@ Some people ported raylib to other languages in the form of bindings or wrappers
| [DenoRaylib550](https://github.com/JJLDonley/DenoRaylib550) | **5.5** | [Deno](https://deno.land) | MIT | | [DenoRaylib550](https://github.com/JJLDonley/DenoRaylib550) | **5.5** | [Deno](https://deno.land) | MIT |
| [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) | 4.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 |
| [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 |
@ -59,7 +59,7 @@ Some people ported raylib to other languages in the form of bindings or wrappers
| [raylib-bindings](https://github.com/vaiorabbit/raylib-bindings) | 5.6-dev | [Ruby](https://www.ruby-lang.org/en) | Zlib | | [raylib-bindings](https://github.com/vaiorabbit/raylib-bindings) | 5.6-dev | [Ruby](https://www.ruby-lang.org/en) | Zlib |
| [naylib](https://github.com/planetis-m/naylib) | **5.6-dev** | [Nim](https://nim-lang.org) | MIT | | [naylib](https://github.com/planetis-m/naylib) | **5.6-dev** | [Nim](https://nim-lang.org) | MIT |
| [node-raylib](https://github.com/RobLoach/node-raylib) | 4.5 | [Node.js](https://nodejs.org/en) | Zlib | | [node-raylib](https://github.com/RobLoach/node-raylib) | 4.5 | [Node.js](https://nodejs.org/en) | Zlib |
| [raylib-odin](https://github.com/odin-lang/Odin/tree/master/vendor/raylib) | **5.5** | [Odin](https://odin-lang.org) | BSD-3Clause | | [raylib-odin](https://github.com/odin-lang/Odin/tree/master/vendor/raylib) | **5.5** | [Odin](https://odin-lang.org) | Zlib |
| [raylib_odin_bindings](https://github.com/Deathbat2190/raylib_odin_bindings) | 4.0-dev | [Odin](https://odin-lang.org) | MIT | | [raylib_odin_bindings](https://github.com/Deathbat2190/raylib_odin_bindings) | 4.0-dev | [Odin](https://odin-lang.org) | MIT |
| [raylib-ocaml](https://github.com/tjammer/raylib-ocaml) | **5.0** | [OCaml](https://ocaml.org) | MIT | | [raylib-ocaml](https://github.com/tjammer/raylib-ocaml) | **5.0** | [OCaml](https://ocaml.org) | MIT |
| [TurboRaylib](https://github.com/turborium/TurboRaylib) | 4.5 | [Object Pascal](https://en.wikipedia.org/wiki/Object_Pascal) | MIT | | [TurboRaylib](https://github.com/turborium/TurboRaylib) | 4.5 | [Object Pascal](https://en.wikipedia.org/wiki/Object_Pascal) | MIT |
@ -103,6 +103,7 @@ Some people ported raylib to other languages in the form of bindings or wrappers
| [raylib-jai](https://github.com/ahmedqarmout2/raylib-jai) | **5.5** | [Jai](https://github.com/BSVino/JaiPrimer/blob/master/JaiPrimer.md) | MIT | | [raylib-jai](https://github.com/ahmedqarmout2/raylib-jai) | **5.5** | [Jai](https://github.com/BSVino/JaiPrimer/blob/master/JaiPrimer.md) | MIT |
| [fnl-raylib](https://github.com/0riginaln0/fnl-raylib) | **5.5** | [Fennel](https://fennel-lang.org/) | MIT | | [fnl-raylib](https://github.com/0riginaln0/fnl-raylib) | **5.5** | [Fennel](https://fennel-lang.org/) | MIT |
| [Rayua](https://github.com/uiua-lang/rayua) | **5.5** | [Uiua](https://www.uiua.org/) | **???** | | [Rayua](https://github.com/uiua-lang/rayua) | **5.5** | [Uiua](https://www.uiua.org/) | **???** |
| [Target](https://github.com/FinnDemonCat/Target/tree/main/libs/raylib) | **5.5** | [Dart](https://dart.dev/) | Apache-2.0 license |
### Utility Wrapers ### Utility Wrapers

325
CHANGELOG
View File

@ -3,6 +3,25 @@ changelog
Current Release: raylib 5.5 (18 November 2024) Current Release: raylib 5.5 (18 November 2024)
-------------------------------------------------------------------------
Release: raylib 6.0 (?? March 2026)
-------------------------------------------------------------------------
KEY CHANGES:
- New Software Renderer backend [rlsw]
- 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
Detailed changes:
TODO...
------------------------------------------------------------------------- -------------------------------------------------------------------------
Release: raylib 5.5 (18 November 2024) Release: raylib 5.5 (18 November 2024)
------------------------------------------------------------------------- -------------------------------------------------------------------------
@ -15,36 +34,34 @@ KEY CHANGES:
Detailed changes: Detailed changes:
WIP: Last update with commit from 02-Nov-2024 [rcore] ADDED: Working directory info at initialization by @raysan5
[rcore] ADDED: Working directory info at initialization by @Ray
[rcore] ADDED: `GetClipboardImage()`, supported by multiple backends (#4459) by @evertonse [rcore] ADDED: `GetClipboardImage()`, supported by multiple backends (#4459) by @evertonse
[rcore] ADDED: `MakeDirectory()`, supporting recursive directory creation by @Ray [rcore] ADDED: `MakeDirectory()`, supporting recursive directory creation by @raysan5
[rcore] ADDED: `ComputeSHA1()` (#4390) by @Anthony Carbajal [rcore] ADDED: `ComputeSHA1()` (#4390) by @Anthony Carbajal
[rcore] ADDED: `ComputeCRC32()` and `ComputeMD5()` by @Ray [rcore] ADDED: `ComputeCRC32()` and `ComputeMD5()` by @raysan5
[rcore] ADDED: `GetKeyName()` (#4161) by @MrScautHD [rcore] ADDED: `GetKeyName()` (#4161) by @MrScautHD
[rcore] ADDED: `IsFileNameValid()` by @Ray [rcore] ADDED: `IsFileNameValid()` by @raysan5
[rcore] ADDED: `GetViewRay()`, viewport independent raycast (#3709) by @Luís Almeida [rcore] ADDED: `GetViewRay()`, viewport independent raycast (#3709) by @luis605
[rcore] RENAMED: `GetMouseRay()` to `GetScreenToWorldRay()` (#3830) by @Ray [rcore] RENAMED: `GetMouseRay()` to `GetScreenToWorldRay()` (#3830) by @raysan5
[rcore] RENAMED: `GetViewRay()` to `GetScreenToWorldRayEx()` (#3830) by @Ray [rcore] RENAMED: `GetViewRay()` to `GetScreenToWorldRayEx()` (#3830) by @raysan5
[rcore] REVIEWED: `GetApplicationDirectory()` for FreeBSD (#4318) by @base [rcore] REVIEWED: `GetApplicationDirectory()` for FreeBSD (#4318) by @git
[rcore] REVIEWED: `LoadDirectoryFilesEx()`/`ScanDirectoryFiles()`, support directory on filter (#4302) by @foxblock [rcore] REVIEWED: `LoadDirectoryFilesEx()`/`ScanDirectoryFiles()`, support directory on filter (#4302) by @foxblock
[rcore] REVIEWED: Update comments on fullscreen and boderless window to describe what they do (#4280) by @Jeffery Myers [rcore] REVIEWED: Update comments on fullscreen and boderless window to describe what they do (#4280) by @Jeffm2501
[rcore] REVIEWED: Correct processing of mouse wheel on Automation events #4263 by @Ray [rcore] REVIEWED: Correct processing of mouse wheel on Automation events #4263 by @raysan5
[rcore] REVIEWED: Fix gamepad axis movement and its automation event recording (#4184) by @maxmutant [rcore] REVIEWED: Fix gamepad axis movement and its automation event recording (#4184) by @maxmutant
[rcore] REVIEWED: Do not set RL_TEXTURE_FILTER_LINEAR when high dpi flag is enabled (#4189) by @Dave Green [rcore] REVIEWED: Do not set RL_TEXTURE_FILTER_LINEAR when high dpi flag is enabled (#4189) by @Dave Green
[rcore] REVIEWED: `GetScreenWidth()`/`GetScreenHeight()` (#4074) by @Anthony Carbajal [rcore] REVIEWED: `GetScreenWidth()`/`GetScreenHeight()` (#4074) by @Anthony Carbajal
[rcore] REVIEWED: Initial window dimensions checks (#3950) by @Christian Haas [rcore] REVIEWED: Initial window dimensions checks (#3950) by @Christian Haas
[rcore] REVIEWED: Set default init values for random #3954 by @Ray [rcore] REVIEWED: Set default init values for random #3954 by @raysan5
[rcore] REVIEWED: Window positioning, avoid out-of-screen window-bar by @Ray [rcore] REVIEWED: Window positioning, avoid out-of-screen window-bar by @raysan5
[rcore] REVIEWED: Fix framerate recording for .gif (#3894) by @RobLoach [rcore] REVIEWED: Fix framerate recording for .gif (#3894) by @RobLoach
[rcore] REVIEWED: Screen space related functions consistency (#3830) by @aiafrasinei [rcore] REVIEWED: Screen space related functions consistency (#3830) by @aiafrasinei
[rcore] REVIEWED: `GetFileNameWithoutExt()` (#3771) by @oblerion [rcore] REVIEWED: `GetFileNameWithoutExt()` (#3771) by @oblerion
[rcore] REVIEWED: `GetWindowScaleDPI()`, simplified (#3701) by @Karl Zylinski [rcore] REVIEWED: `GetWindowScaleDPI()`, simplified (#3701) by @karl
[rcore] REVIEWED: `UnloadAutomationEventList()` (#3658) by @Antonis Geralis [rcore] REVIEWED: `UnloadAutomationEventList()` (#3658) by @planetis-m
[rcore] REVIEWED: Flip VR screens (#3633) by @Matthew Oros [rcore] REVIEWED: Flip VR screens (#3633) by @Matthew Oros
[rcore] REVIEWED: Remove unused vScreenCenter (#3632) by @Matthew Oros [rcore] REVIEWED: Remove unused vScreenCenter (#3632) by @Matthew Oros
[rcore] REVIEWED: `LoadRandomSequence()`, issue in sequence generation #3612 by @Ray [rcore] REVIEWED: `LoadRandomSequence()`, issue in sequence generation #3612 by @raysan5
[rcore] REVIEWED: `IsMouseButtonUp()` (#3609) by @Kenneth M [rcore] REVIEWED: `IsMouseButtonUp()` (#3609) by @Kenneth M
[rcore] REVIEWED: Fix typos in src/platforms/rcore_*.c (#3581) by @RadsammyT [rcore] REVIEWED: Fix typos in src/platforms/rcore_*.c (#3581) by @RadsammyT
[rcore] REVIEWED: `ExportDataAsCode()`, change sanitization check (#3837) by @Laurentino Luna [rcore] REVIEWED: `ExportDataAsCode()`, change sanitization check (#3837) by @Laurentino Luna
@ -52,17 +69,17 @@ WIP: Last update with commit from 02-Nov-2024
[rcore] REVIEWED: `GetScreenWidth()`/`GetScreenHeight()` align with all platforms (#4451) by @Arche Washi [rcore] REVIEWED: `GetScreenWidth()`/`GetScreenHeight()` align with all platforms (#4451) by @Arche Washi
[rcore] REVIEWED: `SetGamepadVibration()`, added duration parameter (#4410) by @Asdqwe -WARNING- [rcore] REVIEWED: `SetGamepadVibration()`, added duration parameter (#4410) by @Asdqwe -WARNING-
[rcore] REVIEWED: `GetGamepadAxisMovement()`, fix #4405 (#4420) by @Asdqwe [rcore] REVIEWED: `GetGamepadAxisMovement()`, fix #4405 (#4420) by @Asdqwe
[rcore] REVIEWED: `GetGestureHoldDuration()` comments by @Ray [rcore] REVIEWED: `GetGestureHoldDuration()` comments by @raysan5
[rcore][rlgl] REVIEWED: Fix scale issues when ending a view mode (#3746) by @Jeffery Myers [rcore][rlgl] REVIEWED: Fix scale issues when ending a view mode (#3746) by @Jeffm2501
[rcore][GLFW] REVIEWED: Keep CORE.Window.position properly in sync with glfw window position (#4190) by @Dave Green [rcore][GLFW] REVIEWED: Keep CORE.Window.position properly in sync with glfw window position (#4190) by @Dave Green
[rcore][GLFW] REVIEWED: Set AUTO_ICONIFY flag to false per default (#4188) by @Dave Green [rcore][GLFW] REVIEWED: Set AUTO_ICONIFY flag to false per default (#4188) by @Dave Green
[rcore][GLFW] REVIEWED: `InitPlatform()`, add workaround for NetBSD (#4139) by @NishiOwO [rcore][GLFW] REVIEWED: `InitPlatform()`, add workaround for NetBSD (#4139) by @NishiOwO
[rcore][GLFW] REVIEWED: Fix window not initializing on primary monitor (#3923) by @Rafael Bordoni [rcore][GLFW] REVIEWED: Fix window not initializing on primary monitor (#3923) by @Rafael Bordoni
[rcore][GLFW] REVIEWED: Set relative mouse mode when the cursor is disabled (#3874) by @Jeffery Myers [rcore][GLFW] REVIEWED: Set relative mouse mode when the cursor is disabled (#3874) by @Jeffm2501
[rcore][GLFW] REVIEWED: Remove GLFW mouse passthrough hack and increase GLFW version in CMake (#3852) by @Alexandre Almeida [rcore][GLFW] REVIEWED: Remove GLFW mouse passthrough hack and increase GLFW version in CMake (#3852) by @M374LX
[rcore][GLFW] REVIEWED: Updated GLFW to 3.4 (#3827) by @Alexandre Almeida [rcore][GLFW] REVIEWED: Updated GLFW to 3.4 (#3827) by @M374LX
[rcore][GLFW] REVIEWED: Feature test macros before include (#3737) by @John [rcore][GLFW] REVIEWED: Feature test macros before include (#3737) by @John
[rcore][GLFW] REVIEWED: Fix inconsistent dll linkage warning on windows (#4447) by @Jeffery Myers [rcore][GLFW] REVIEWED: Fix inconsistent dll linkage warning on windows (#4447) by @Jeffm2501
[rcore][Web] ADDED: `SetWindowOpacity()` implementation (#4403) by @Asdqwe [rcore][Web] ADDED: `SetWindowOpacity()` implementation (#4403) by @Asdqwe
[rcore][Web] ADDED: `MaximizeWindow()` and `RestoreWindow()` implementations (#4397) by @Asdqwe [rcore][Web] ADDED: `MaximizeWindow()` and `RestoreWindow()` implementations (#4397) by @Asdqwe
[rcore][Web] ADDED: `ToggleFullscreen()` implementation (#3634) by @ubkp [rcore][Web] ADDED: `ToggleFullscreen()` implementation (#3634) by @ubkp
@ -75,21 +92,21 @@ WIP: Last update with commit from 02-Nov-2024
[rcore][Web] REVIEWED: `ShowCursor()`, `HideCursor()` and `SetMouseCursor()` (#3647) by @ubkp [rcore][Web] REVIEWED: `ShowCursor()`, `HideCursor()` and `SetMouseCursor()` (#3647) by @ubkp
[rcore][Web] REVIEWED: Fix CORE.Input.Mouse.cursorHidden with callbacks (#3644) by @ubkp [rcore][Web] REVIEWED: Fix CORE.Input.Mouse.cursorHidden with callbacks (#3644) by @ubkp
[rcore][Web] REVIEWED: Fix `IsMouseButtonUp()` (#3611) by @ubkp [rcore][Web] REVIEWED: Fix `IsMouseButtonUp()` (#3611) by @ubkp
[rcore][Web] REVIEWED: HighDPI support #3372 by @Ray [rcore][Web] REVIEWED: HighDPI support #3372 by @raysan5
[rcore][Web] REVIEWED: `SetWindowSize()` (#4452) by @Asdqwe [rcore][Web] REVIEWED: `SetWindowSize()` (#4452) by @Asdqwe
[rcore][Web] REVIEWED: `EmscriptenResizeCallback()`, simplified (#4415) by @Asdqwe [rcore][Web] REVIEWED: `EmscriptenResizeCallback()`, simplified (#4415) by @Asdqwe
[rcore][SDL] ADDED: `IsCursorOnScreen()` (#3862) by @Peter0x44 [rcore][SDL] ADDED: `IsCursorOnScreen()` (#3862) by @Peter0x44
[rcore][SDL] ADDED: Gamepad rumble/vibration support (#3819) by @GideonSerf [rcore][SDL] ADDED: Gamepad rumble/vibration support (#3819) by @gdserf.gs
[rcore][SDL] REVIEWED: Gamepad support (#3776) by @A [rcore][SDL] REVIEWED: Gamepad support (#3776) by @A
[rcore][SDL] REVIEWED: `GetWorkingDirectory()`, return correct path (#4392) by @Asdqwe [rcore][SDL] REVIEWED: `GetWorkingDirectory()`, return correct path (#4392) by @Asdqwe
[rcore][SDL] REVIEWED: `GetClipboardText()`, fix memory leak (#4354) by @Asdqwe [rcore][SDL] REVIEWED: `GetClipboardText()`, fix memory leak (#4354) by @Asdqwe
[rcore][SDL] REVIEWED: Change SDL_Joystick to SDL_GameController (#4129) by @Frank Kartheuser [rcore][SDL] REVIEWED: Change SDL_Joystick to SDL_GameController (#4129) by @Frank Kartheuser
[rcore][SDL] REVIEWED: Update storage base path, use provided SDL base path by @Ray [rcore][SDL] REVIEWED: Update storage base path, use provided SDL base path by @raysan5
[rcore][SDL] REVIEWED: Call SDL_GL_SetSwapInterval() after GL context creation (#3997) by @JupiterRider [rcore][SDL] REVIEWED: Call SDL_GL_SetSwapInterval() after GL context creation (#3997) by @JupiterRider
[rcore][SDL] REVIEWED: `GetKeyPressed()` (#3869) by @Arthur [rcore][SDL] REVIEWED: `GetKeyPressed()` (#3869) by @Arthur
[rcore][SDL] REVIEWED: Fix SDL multitouch tracking (#3810) by @mooff [rcore][SDL] REVIEWED: Fix SDL multitouch tracking (#3810) by @mooff
[rcore][SDL] REVIEWED: Fix `SUPPORT_WINMM_HIGHRES_TIMER` (#3679) by @ubkp [rcore][SDL] REVIEWED: Fix `SUPPORT_WINMM_HIGHRES_TIMER` (#3679) by @ubkp
[rcore][SDL] REVIEWED: SDL text input to Unicode codepoints #3650 by @Ray [rcore][SDL] REVIEWED: SDL text input to Unicode codepoints #3650 by @raysan5
[rcore][SDL] REVIEWED: `IsMouseButtonUp()` and add touch events (#3610) by @ubkp [rcore][SDL] REVIEWED: `IsMouseButtonUp()` and add touch events (#3610) by @ubkp
[rcore][SDL] REVIEWED: Fix real touch gestures (#3614) by @ubkp [rcore][SDL] REVIEWED: Fix real touch gestures (#3614) by @ubkp
[rcore][SDL] REVIEWED: `IsKeyPressedRepeat()` (#3605) by @ubkp [rcore][SDL] REVIEWED: `IsKeyPressedRepeat()` (#3605) by @ubkp
@ -101,7 +118,7 @@ WIP: Last update with commit from 02-Nov-2024
[rcore][Android] REVIEWED: Allow main() to return it its caller on configuration changes (#4288) by @Hesham Abourgheba [rcore][Android] REVIEWED: Allow main() to return it its caller on configuration changes (#4288) by @Hesham Abourgheba
[rcore][Android] REVIEWED: Replace deprecated Android function ALooper_pollAll with ALooper_pollOnce (#4275) by @Menno van der Graaf [rcore][Android] REVIEWED: Replace deprecated Android function ALooper_pollAll with ALooper_pollOnce (#4275) by @Menno van der Graaf
[rcore][Android] REVIEWED: `PollInputEvents()`, register previous gamepad events (#3910) by @Aria [rcore][Android] REVIEWED: `PollInputEvents()`, register previous gamepad events (#3910) by @Aria
[rcore][Android] REVIEWED: Fix Android keycode translation and duplicate key constants (#3733) by @Alexandre Almeida [rcore][Android] REVIEWED: Fix Android keycode translation and duplicate key constants (#3733) by @M374LX
[rcore][DRM] ADDED: uConsole keys mapping (#4297) by @carverdamien [rcore][DRM] ADDED: uConsole keys mapping (#4297) by @carverdamien
[rcore][DRM] ADDED: `GetMonitorWidth/Height()` (#3956) by @gabriel-marques [rcore][DRM] ADDED: `GetMonitorWidth/Height()` (#3956) by @gabriel-marques
[rcore][DRM] REVIEWED: `IsMouseButtonUp()` (#3611) by @ubkp [rcore][DRM] REVIEWED: `IsMouseButtonUp()` (#3611) by @ubkp
@ -111,124 +128,124 @@ WIP: Last update with commit from 02-Nov-2024
[rcore][DRM] REVIEWED: DRM backend to only use one api to allow for more devices (#3879) by @MrMugame [rcore][DRM] REVIEWED: DRM backend to only use one api to allow for more devices (#3879) by @MrMugame
[rcore][DRM] REVIEWED: Avoid separate thread when polling for gamepad events (#3641) by @Cinghy Creations [rcore][DRM] REVIEWED: Avoid separate thread when polling for gamepad events (#3641) by @Cinghy Creations
[rcore][DRM] REVIEWED: Connector status reported as UNKNOWN but should be considered as CONNECTED (#4305) by @Michał Jaskólski [rcore][DRM] REVIEWED: Connector status reported as UNKNOWN but should be considered as CONNECTED (#4305) by @Michał Jaskólski
[rcore][RGFW] ADDED: RGFW, new rcore backend platform (#3941) by @Colleague Riley [rcore][RGFW] ADDED: RGFW, new rcore backend platform (#3941) by @colleagueRiley
[rcore][RGFW] REVIEWED: RGFW 1.0 (#4144) by @Colleague Riley [rcore][RGFW] REVIEWED: RGFW 1.0 (#4144) by @colleagueRiley
[rcore][RGFW] REVIEWED: Fix errors when compiling with mingw (#4282) by @Colleague Riley [rcore][RGFW] REVIEWED: Fix errors when compiling with mingw (#4282) by @colleagueRiley
[rcore][RGFW] REVIEWED: Replace long switch with a lookup table (#4108) by @Colleague Riley [rcore][RGFW] REVIEWED: Replace long switch with a lookup table (#4108) by @colleagueRiley
[rcore][RGFW] REVIEWED: Fix MSVC build errors (#4441) by @Colleague Riley [rcore][RGFW] REVIEWED: Fix MSVC build errors (#4441) by @colleagueRiley
[rlgl] ADDED: More uniform data type options #4137 by @Ray [rlgl] ADDED: More uniform data type options #4137 by @raysan5
[rlgl] ADDED: Vertex normals for RLGL immediate drawing mode (#3866) by @bohonghuang -WARNING- [rlgl] ADDED: Vertex normals for RLGL immediate drawing mode (#3866) by @bohonghuang -WARNING-
[rlgl] ADDED: `rlCullDistance*()` variables and getters (#3912) by @KotzaBoss [rlgl] ADDED: `rlCullDistance*()` variables and getters (#3912) by @KotzaBoss
[rlgl] ADDED: `rlSetClipPlanes()` function (#3912) by @KotzaBoss [rlgl] ADDED: `rlSetClipPlanes()` function (#3912) by @KotzaBoss
[rlgl] ADDED: `isGpuReady` flag, allow font loading with no GPU acceleration by @Ray -WARNING- [rlgl] ADDED: `isGpuReady` flag, allow font loading with no GPU acceleration by @Ray -WARNING-
[rlgl] REVIEWED: Changed RLGL_VERSION from 4.5 to 5.0 (#3914) by @Mute [rlgl] REVIEWED: Changed RLGL_VERSION from 4.5 to 5.0 (#3914) by @rsteinke1111
[rlgl] REVIEWED: Shader load failing returns 0, instead of fallback by @Ray -WARNING- [rlgl] REVIEWED: Shader load failing returns 0, instead of fallback by @Ray -WARNING-
[rlgl] REVIEWED: Standalone mode default flags (#4334) by @Asdqwe [rlgl] REVIEWED: Standalone mode default flags (#4334) by @Asdqwe
[rlgl] REVIEWED: Fix hardcoded index values in vboID array (#4312) by @Jett [rlgl] REVIEWED: Fix hardcoded index values in vboID array (#4312) by @JettMonstersGoBoom
[rlgl] REVIEWED: GLint64 did not exist before OpenGL 3.2 (#4284) by @Tchan0 [rlgl] REVIEWED: GLint64 did not exist before OpenGL 3.2 (#4284) by @Tchan0
[rlgl] REVIEWED: Extra warnings in case OpenGL 4.3 is not enabled (#4202) by @Maxim Knyazkin [rlgl] REVIEWED: Extra warnings in case OpenGL 4.3 is not enabled (#4202) by @Maxim Knyazkin
[rlgl] REVIEWED: Using GLint64 for glGetBufferParameteri64v() (#4197) by @Randy Palamar [rlgl] REVIEWED: Using GLint64 for glGetBufferParameteri64v() (#4197) by @Randy Palamar
[rlgl] REVIEWED: Replace `glGetInteger64v()` with `glGetBufferParameteri64v()` (#4154) by @Kai Kitagawa-Jones [rlgl] REVIEWED: Replace `glGetInteger64v()` with `glGetBufferParameteri64v()` (#4154) by @Kai Kitagawa-Jones
[rlgl] REVIEWED: `rlMultMatrixf()`, fix matrix multiplication order (#3935) by @bohonghuang [rlgl] REVIEWED: `rlMultMatrixf()`, fix matrix multiplication order (#3935) by @bohonghuang
[rlgl] REVIEWED: `rlSetVertexAttribute()`, define last parameter as offset #3800 by @Ray [rlgl] REVIEWED: `rlSetVertexAttribute()`, define last parameter as offset #3800 by @raysan5
[rlgl] REVIEWED: `rlDisableVertexAttribute()`, remove redundat calls for SHADER_LOC_VERTEX_COLOR (#3871) by @Kacper Zybała [rlgl] REVIEWED: `rlDisableVertexAttribute()`, remove redundat calls for SHADER_LOC_VERTEX_COLOR (#3871) by @zyperpl
[rlgl] REVIEWED: `rlLoadTextureCubemap()`, load mipmaps for cubemaps (#4429) by @Nikolas [rlgl] REVIEWED: `rlLoadTextureCubemap()`, load mipmaps for cubemaps (#4429) by @Not-Nik
[rlgl] REVIEWED: `rlLoadFramebuffer()`, parameters not required by @Ray [rlgl] REVIEWED: `rlLoadFramebuffer()`, parameters not required by @raysan5
[rlgl] REVIEWED: `rlSetUniformSampler()` (#3759) by @veins1 [rlgl] REVIEWED: `rlSetUniformSampler()` (#3759) by @veins1
[rlgl] REVIEWED: Renamed near/far variables (#4039) by @jgabaut [rlgl] REVIEWED: Renamed near/far variables (#4039) by @jgabaut
[rlgl] REVIEWED: Expose OpenGL symbols (#3588) by @Peter0x44 [rlgl] REVIEWED: Expose OpenGL symbols (#3588) by @Peter0x44
[rlgl] REVIEWED: Fix OpenGL 1.1 build issues (#3876) by @Ray [rlgl] REVIEWED: Fix OpenGL 1.1 build issues (#3876) by @raysan5
[rlgl] REVIEWED: Fixed compilation for OpenGL ES (#4243) by @Maxim Knyazkin [rlgl] REVIEWED: Fixed compilation for OpenGL ES (#4243) by @Maxim Knyazkin
[rlgl] REVIEWED: rlgl function description and comments by @Ray [rlgl] REVIEWED: rlgl function description and comments by @raysan5
[rlgl] REVIEWED: Expose glad functions when building raylib as a shared lib (#3572) by @Peter0x44 [rlgl] REVIEWED: Expose glad functions when building raylib as a shared lib (#3572) by @Peter0x44
[rlgl] REVIEWED: Fix version info in rlgl.h (#3558) by @Steven Schveighoffer [rlgl] REVIEWED: Fix version info in rlgl.h (#3558) by @schveiguy
[rlgl] REVIEWED: Use the vertex color to the base shader in GLSL330 (#4431) by @Jeffery Myers [rlgl] REVIEWED: Use the vertex color to the base shader in GLSL330 (#4431) by @Jeffm2501
[rcamera] REVIEWED: Make camera movement independant of framerate (#4247) by @hanaxars -WARNING- [rcamera] REVIEWED: Make camera movement independant of framerate (#4247) by @hanaxars -WARNING-
[rcamera] REVIEWED: Updated camera speeds with GetFrameTime() (#4362) by @Anthony Carbajal [rcamera] REVIEWED: Updated camera speeds with GetFrameTime() (#4362) by @Anthony Carbajal
[rcamera] REVIEWED: `UpdateCamera()`, added CAMERA_CUSTOM check (#3938) by @Tomas Fabrizio Orsi [rcamera] REVIEWED: `UpdateCamera()`, added CAMERA_CUSTOM check (#3938) by @Tomas Fabrizio Orsi
[rcamera] REVIEWED: Support mouse/keyboard and gamepad coexistence for input (#3579) by @ubkp [rcamera] REVIEWED: Support mouse/keyboard and gamepad coexistence for input (#3579) by @ubkp
[rcamera] REVIEWED: Cleaned away unused macros(#3762) by @Brian E [rcamera] REVIEWED: Cleaned away unused macros(#3762) by @Brian-ED
[rcamera] REVIEWED: Fix for free camera mode (#3603) by @lesleyrs [rcamera] REVIEWED: Fix for free camera mode (#3603) by @lesleyrs
[rcamera] REVIEWED: `GetCameraRight()` (#3784) by @Danil [rcamera] REVIEWED: `GetCameraRight()` (#3784) by @Danil
[raymath] ADDED: C++ operator overloads for common math function (#4385) by @Jeffery Myers -WARNING- [raymath] ADDED: C++ operator overloads for common math function (#4385) by @Jeffery Myers -WARNING-
[raymath] ADDED: Vector4 math functions and Vector2 variants of some Vector3 functions (#3828) by @Bowserinator [raymath] ADDED: Vector4 math functions and Vector2 variants of some Vector3 functions (#3828) by @Bowserinator
[raymath] REVIEWED: Fix MSVC warnings/errors in C++ (#4125) by @Jeffery Myers [raymath] REVIEWED: Fix MSVC warnings/errors in C++ (#4125) by @Jeffm2501
[raymath] REVIEWED: Add extern "C" to raymath header for C++ (#3978) by @Jeffery Myers [raymath] REVIEWED: Add extern "C" to raymath header for C++ (#3978) by @Jeffm2501
[raymath] REVIEWED: `QuaternionFromAxisAngle()`, remove redundant axis length calculation (#3900) by @jtainer [raymath] REVIEWED: `QuaternionFromAxisAngle()`, remove redundant axis length calculation (#3900) by @jtainer
[raymath] REVIEWED: `Vector3Perpendicular()`, avoid implicit conversion from float to double (#3799) by @João Foscarini [raymath] REVIEWED: `Vector3Perpendicular()`, avoid implicit conversion from float to double (#3799) by @João Foscarini
[raymath] REVIEWED: `MatrixDecompose()`, incorrect output for certain scale and rotations (#4461) by @waveydave [raymath] REVIEWED: `MatrixDecompose()`, incorrect output for certain scale and rotations (#4461) by @waveydave
[raymath] REVIEWED: Small code refactor (#3753) by @Idir Carlos Aliane [raymath] REVIEWED: Small code refactor (#3753) by @Idir Carlos Aliane
[rshapes] ADDED: `CheckCollisionCircleLine()` (#4018) by @kai-z99 [rshapes] ADDED: `CheckCollisionCircleLine()` (#4018) by @kai-z99
[rshapes] REVIEWED: Multisegment Bezier splines (#3744) by @Santiago Pelufo [rshapes] REVIEWED: Multisegment Bezier splines (#3744) by @Santiago Pelufo
[rshapes] REVIEWED: Expose shapes drawing texture and rectangle (#3677) by @Jeffery Myers [rshapes] REVIEWED: Expose shapes drawing texture and rectangle (#3677) by @Jeffm2501
[rshapes] REVIEWED: `DrawLine()` #4075 by @Ray [rshapes] REVIEWED: `DrawLine()` #4075 by @raysan5
[rshapes] REVIEWED: `DrawPixel()` drawing by @Ray [rshapes] REVIEWED: `DrawPixel()` drawing by @raysan5
[rshapes] REVIEWED: `DrawLine()` to avoid pixel rounding issues #3931 by @Ray [rshapes] REVIEWED: `DrawLine()` to avoid pixel rounding issues #3931 by @raysan5
[rshapes] REVIEWED: `DrawRectangleLines()`, considering view matrix for lines "alignment" by @Ray [rshapes] REVIEWED: `DrawRectangleLines()`, considering view matrix for lines "alignment" by @raysan5
[rshapes] REVIEWED: `DrawRectangleLines()`, pixel offset (#4261) by @RadsammyT [rshapes] REVIEWED: `DrawRectangleLines()`, pixel offset (#4261) by @RadsammyT
[rshapes] REVIEWED: `DrawRectangleLines()`, pixel offset when scaling (#3884) by @Ray [rshapes] REVIEWED: `DrawRectangleLines()`, pixel offset when scaling (#3884) by @raysan5
[rshapes] REVIEWED: `DrawRectangleLinesEx()`, make sure accounts for square tiles (#4382) by @Jojaby [rshapes] REVIEWED: `DrawRectangleLinesEx()`, make sure accounts for square tiles (#4382) by @Jojaby
[rshapes] REVIEWED: `Draw*Gradient()` color parameter names (#4270) by @Paperdomo101 [rshapes] REVIEWED: `Draw*Gradient()` color parameter names (#4270) by @Paperdomo101
[rshapes] REVIEWED: `DrawGrid()`, remove duplicate color calls (#4148) by @Jeffery Myers [rshapes] REVIEWED: `DrawGrid()`, remove duplicate color calls (#4148) by @Jeffm2501
[rshapes] REVIEWED: `DrawSplineLinear()` to `SUPPORT_SPLINE_MITERS` by @Ray [rshapes] REVIEWED: `DrawSplineLinear()` to `SUPPORT_SPLINE_MITERS` by @raysan5
[rshapes] REVIEWED: `DrawSplineLinear()`, implement miters (#3585) by @Toctave [rshapes] REVIEWED: `DrawSplineLinear()`, implement miters (#3585) by @Toctave
[rshapes] REVIEWED: `CheckCollisionPointRec()` by @Ray [rshapes] REVIEWED: `CheckCollisionPointRec()` by @raysan5
[rshapes] REVIEWED: `CheckCollisionPointCircle()`, new implementation (#4135) by @kai-z99 [rshapes] REVIEWED: `CheckCollisionPointCircle()`, new implementation (#4135) by @kai-z99
[rshapes] REVIEWED: `CheckCollisionCircles()`, optimized (#4065) by @kai-z99 [rshapes] REVIEWED: `CheckCollisionCircles()`, optimized (#4065) by @kai-z99
[rshapes] REVIEWED: `CheckCollisionPointPoly()` (#3750) by @Antonio Raúl [rshapes] REVIEWED: `CheckCollisionPointPoly()` (#3750) by @Antonio Raúl
[rshapes] REVIEWED: `CheckCollisionCircleRec()` (#3584) by @ubkp [rshapes] REVIEWED: `CheckCollisionCircleRec()` (#3584) by @ubkp
[rshapes] REVIEWED: Add more detail to function comment (#4344) by @Jeffery Myers [rshapes] REVIEWED: Add more detail to function comment (#4344) by @Jeffm2501
[rshapes] REVIEWED: Functions that draw point arrays take them as const (#4051) by @Jeffery Myers [rshapes] REVIEWED: Functions that draw point arrays take them as const (#4051) by @Jeffm2501
[rtextures] ADDED: `ColorIsEqual()` by @Ray [rtextures] ADDED: `ColorIsEqual()` by @raysan5
[rtextures] ADDED: `ColorLerp()`, to mix 2 colors together (#4310) by @SusgUY446 [rtextures] ADDED: `ColorLerp()`, to mix 2 colors together (#4310) by @SusgUY446
[rtextures] ADDED: `LoadImageAnimFromMemory()` (#3681) by @IoIxD [rtextures] ADDED: `LoadImageAnimFromMemory()` (#3681) by @IoIxD
[rtextures] ADDED: `ImageKernelConvolution()` (#3528) by @Karim [rtextures] ADDED: `ImageKernelConvolution()` (#3528) by @Karim
[rtextures] ADDED: `ImageFromChannel()` (#4105) by @Bruno Cabral [rtextures] ADDED: `ImageFromChannel()` (#4105) by @brccabral
[rtextures] ADDED: `ImageDrawLineEx()` (#4097) by @Le Juez Victor [rtextures] ADDED: `ImageDrawLineEx()` (#4097) by @Bigfoot71
[rtextures] ADDED: `ImageDrawTriangle()` (#4094) by @Le Juez Victor [rtextures] ADDED: `ImageDrawTriangle()` (#4094) by @Bigfoot71
[rtextures] REMOVED: SVG files loading and drawing, moving it to raylib-extras by @Ray -WARNING- [rtextures] REMOVED: SVG files loading and drawing, moving it to raylib-extras by @Ray -WARNING-
[rtextures] REVIEWED: `LoadImage()`, added support for 3-channel QOI images (#4384) by @R-YaTian [rtextures] REVIEWED: `LoadImage()`, added support for 3-channel QOI images (#4384) by @R-YaTian
[rtextures] REVIEWED: `LoadImageRaw()` #3926 by @Ray [rtextures] REVIEWED: `LoadImageRaw()` #3926 by @raysan5
[rtextures] REVIEWED: `LoadImageColors()`, advance k in loop (#4120) by @Bruno Cabral [rtextures] REVIEWED: `LoadImageColors()`, advance k in loop (#4120) by @brccabral
[rtextures] REVIEWED: `LoadTextureCubemap()`, added `mipmaps` #3665 by @Ray [rtextures] REVIEWED: `LoadTextureCubemap()`, added `mipmaps` #3665 by @raysan5
[rtextures] REVIEWED: `LoadTextureCubemap()`, assign format to cubemap (#3823) by @Gary M [rtextures] REVIEWED: `LoadTextureCubemap()`, assign format to cubemap (#3823) by @Gary M
[rtextures] REVIEWED: `LoadTextureCubemap()`, load mipmaps for cubemaps (#4429) by @Nikolas [rtextures] REVIEWED: `LoadTextureCubemap()`, load mipmaps for cubemaps (#4429) by @Not-Nik
[rtextures] REVIEWED: `LoadTextureCubemap()`, avoid dangling re-allocated pointers (#4439) by @Nikolas [rtextures] REVIEWED: `LoadTextureCubemap()`, avoid dangling re-allocated pointers (#4439) by @Not-Nik
[rtextures] REVIEWED: `LoadImageFromScreen()`, fix scaling (#3881) by @proberge-dev [rtextures] REVIEWED: `LoadImageFromScreen()`, fix scaling (#3881) by @proberge-dev
[rtextures] REVIEWED: `LoadImageFromMemory()`, warnings on invalid image data (#4179) by @Jutastre [rtextures] REVIEWED: `LoadImageFromMemory()`, warnings on invalid image data (#4179) by @Jutastre
[rtextures] REVIEWED: `LoadImageAnimFromMemory()`, added security checks (#3924) by @Ray [rtextures] REVIEWED: `LoadImageAnimFromMemory()`, added security checks (#3924) by @raysan5
[rtextures] REVIEWED: `ImageColorTint()` and `ColorTint()`, optimized (#4015) by @Le Juez Victor [rtextures] REVIEWED: `ImageColorTint()` and `ColorTint()`, optimized (#4015) by @Bigfoot71
[rtextures] REVIEWED: `ImageKernelConvolution()`, formating and warnings by @Ray [rtextures] REVIEWED: `ImageKernelConvolution()`, formating and warnings by @raysan5
[rtextures] REVIEWED: `ImageDrawRectangleRec`, fix bounds check (#3732) by @Blockguy24 [rtextures] REVIEWED: `ImageDrawRectangleRec`, fix bounds check (#3732) by @Blockguy24
[rtextures] REVIEWED: `ImageResizeCanvas()`, implemented fill color (#3720) by @Lieven Petersen [rtextures] REVIEWED: `ImageResizeCanvas()`, implemented fill color (#3720) by @Lieven Petersen
[rtextures] REVIEWED: `ImageDrawRectangleRec()` (#3721) by @Le Juez Victor [rtextures] REVIEWED: `ImageDrawRectangleRec()` (#3721) by @Bigfoot71
[rtextures] REVIEWED: `ImageDraw()`, don't try to blend images without alpha (#4395) by @Nikolas [rtextures] REVIEWED: `ImageDraw()`, don't try to blend images without alpha (#4395) by @Not-Nik
[rtextures] REVIEWED: `GenImagePerlinNoise()` being stretched (#4276) by @Bugsia [rtextures] REVIEWED: `GenImagePerlinNoise()` being stretched (#4276) by @Bugsia
[rtextures] REVIEWED: `GenImageGradientLinear()`, fix some angles (#4462) by @decromo [rtextures] REVIEWED: `GenImageGradientLinear()`, fix some angles (#4462) by @decromo
[rtextures] REVIEWED: `DrawTexturePro()` to avoid negative dest rec #4316 by @Ray [rtextures] REVIEWED: `DrawTexturePro()` to avoid negative dest rec #4316 by @raysan5
[rtextures] REVIEWED: `ColorToInt()`, fix undefined behaviour (#3996) by @OetkenPurveyorOfCode [rtextures] REVIEWED: `ColorToInt()`, fix undefined behaviour (#3996) by @OetkenPurveyorOfCode
[rtextures] REVIEWED: Remove panorama cubemap layout option (#4425) by @Jeffery Myers [rtextures] REVIEWED: Remove panorama cubemap layout option (#4425) by @Jeffm2501
[rtextures] REVIEWED: Removed unneeded module check, `rtextures` should not depend on `rtext` by @Ray [rtextures] REVIEWED: Removed unneeded module check, `rtextures` should not depend on `rtext` by @raysan5
[rtextures] REVIEWED: Simplified for loop for some image manipulation functions (#3712) by @Alice Nyaa [rtextures] REVIEWED: Simplified for loop for some image manipulation functions (#3712) by @Alice Nyaa
[rtext] ADDED: BDF fonts support (#3735) by @Stanley Fuller -WARNING- [rtext] ADDED: BDF fonts support (#3735) by @Stanley Fuller -WARNING-
[rtext] ADDED: `TextToCamel()` (#4033) by @IoIxD [rtext] ADDED: `TextToCamel()` (#4033) by @IoIxD
[rtext] ADDED: `TextToSnake()` (#4033) by @IoIxD [rtext] ADDED: `TextToSnake()` (#4033) by @IoIxD
[rtext] ADDED: `TextToFloat()` (#3627) by @Benjamin Schmid Ties [rtext] ADDED: `TextToFloat()` (#3627) by @Benjamin Schmid Ties
[rtext] REDESIGNED: `SetTextLineSpacing()` by @Ray -WARNING- [rtext] REDESIGNED: `SetTextLineSpacing()` by @Ray -WARNING-
[rtext] REVIEWED: `LoadFontDataBDF()` name and formating by @Ray [rtext] REVIEWED: `LoadFontDataBDF()` name and formating by @raysan5
[rtext] REVIEWED: `LoadFontDefault()`, initialize glyphs and recs to zero #4319 by @Ray [rtext] REVIEWED: `LoadFontDefault()`, initialize glyphs and recs to zero #4319 by @raysan5
[rtext] REVIEWED: `LoadFontEx()`, avoid default font fallback (#4077) by @Peter0x44 -WARNING- [rtext] REVIEWED: `LoadFontEx()`, avoid default font fallback (#4077) by @Peter0x44 -WARNING-
[rtext] REVIEWED: `LoadBMFont()`, extended functionality (#3536) by @Dongkun Lee [rtext] REVIEWED: `LoadBMFont()`, extended functionality (#3536) by @Dongkun Lee
[rtext] REVIEWED: `LoadBMFont()`, issue on not glyph data initialized by @Ray [rtext] REVIEWED: `LoadBMFont()`, issue on not glyph data initialized by @raysan5
[rtext] REVIEWED: `LoadFontFromMemory()`, use strncpy() to fix buffer overflow (#3795) by @Mingjie Shen [rtext] REVIEWED: `LoadFontFromMemory()`, use strncpy() to fix buffer overflow (#3795) by @Mingjie Shen
[rtext] REVIEWED: `LoadCodepoints()` returning a freed ptr when count is 0 (#4089) by @Alice Nyaa [rtext] REVIEWED: `LoadCodepoints()` returning a freed ptr when count is 0 (#4089) by @Alice Nyaa
[rtext] REVIEWED: `LoadFontData()` avoid fallback glyphs by @Ray -WARNING- [rtext] REVIEWED: `LoadFontData()` avoid fallback glyphs by @Ray -WARNING-
[rtext] REVIEWED: `LoadFontData()`, load image only if glyph has been found in font by @Ray [rtext] REVIEWED: `LoadFontData()`, load image only if glyph has been found in font by @raysan5
[rtext] REVIEWED: `ExportFontAsCode()`, fix C++ compiler errors (#4013) by @DarkAssassin23 [rtext] REVIEWED: `ExportFontAsCode()`, fix C++ compiler errors (#4013) by @DarkAssassin23
[rtext] REVIEWED: `MeasureTextEx()` height calculation (#3770) by @Marrony Neris [rtext] REVIEWED: `MeasureTextEx()` height calculation (#3770) by @Marrony Neris
[rtext] REVIEWED: `MeasureTextEx()`, additional check for empty input string (#4448) by @mpv-enjoyer [rtext] REVIEWED: `MeasureTextEx()`, additional check for empty input string (#4448) by @mpv-enjoyer
[rtext] REVIEWED: `CodepointToUTF8()`, clean static buffer #4379 by @Ray [rtext] REVIEWED: `CodepointToUTF8()`, clean static buffer #4379 by @raysan5
[rtext] REVIEWED: `TextToFloat()`, always multiply by sign (#4273) by @listeria [rtext] REVIEWED: `TextToFloat()`, always multiply by sign (#4273) by @ListeriaM
[rtext] REVIEWED: `TextReplace()` const correctness (#3678) by @maverikou [rtext] REVIEWED: `TextReplace()` const correctness (#3678) by @maverikou
[rtext] REVIEWED: `TextToFloat()`, coding style (#3627) by @Benjamin Schmid Ties [rtext] REVIEWED: `TextToFloat()`, coding style (#3627) by @Benjamin Schmid Ties
[rtext] REVIEWED: Some comments to align to style (#3756) by @Idir Carlos Aliane [rtext] REVIEWED: Some comments to align to style (#3756) by @Idir Carlos Aliane
@ -237,23 +254,23 @@ WIP: Last update with commit from 02-Nov-2024
[rmodels] ADDED: Support 16-bit unsigned short vec4 format for gltf joint loading (#3821) by @Gary M [rmodels] ADDED: Support 16-bit unsigned short vec4 format for gltf joint loading (#3821) by @Gary M
[rmodels] ADDED: Support animation names for the m3d model format (#3714) by @kolunmi [rmodels] ADDED: Support animation names for the m3d model format (#3714) by @kolunmi
[rmodels] ADDED: `DrawModelPoints()`, more performant point cloud rendering (#4203) by @Reese Gallagher [rmodels] ADDED: `DrawModelPoints()`, more performant point cloud rendering (#4203) by @Reese Gallagher
[rmodels] ADDED: `ExportMeshAsCode()` by @Ray [rmodels] ADDED: `ExportMeshAsCode()` by @raysan5
[rmodels] REVIEWED: Multiple updates to gltf loading, improved macro (#4373) by @Harald Scheirich [rmodels] REVIEWED: Multiple updates to gltf loading, improved macro (#4373) by @Harald Scheirich
[rmodels] REVIEWED: `LoadOBJ()`, correctly split obj meshes by material (#4285) by @Jeffery Myers [rmodels] REVIEWED: `LoadOBJ()`, correctly split obj meshes by material (#4285) by @Jeffm2501
[rmodels] REVIEWED: `LoadOBJ()`, add warning when loading an OBJ with multiple materials (#4271) by @Jeffery Myers [rmodels] REVIEWED: `LoadOBJ()`, add warning when loading an OBJ with multiple materials (#4271) by @Jeffm2501
[rmodels] REVIEWED: `LoadOBJ()`, fix bug that fragmented the loaded meshes (#4494) by @Eike Decker [rmodels] REVIEWED: `LoadOBJ()`, fix bug that fragmented the loaded meshes (#4494) by @zet23t
[rmodels] REVIEWED: `LoadIQM()`, set model.meshMaterial[] (#4092) by @SuperUserNameMan [rmodels] REVIEWED: `LoadIQM()`, set model.meshMaterial[] (#4092) by @SuperUserNameMan
[rmodels] REVIEWED: `LoadIQM()`, attempt to load texture from IQM at loadtime (#4029) by @Jett [rmodels] REVIEWED: `LoadIQM()`, attempt to load texture from IQM at loadtime (#4029) by @JettMonstersGoBoom
[rmodels] REVIEWED: `LoadM3D(), fix vertex colors for m3d files (#3859) by @Jeffery Myers [rmodels] REVIEWED: `LoadM3D(), fix vertex colors for m3d files (#3859) by @Jeffm2501
[rmodels] REVIEWED: `LoadGLTF()`, supporting additional vertex data formats (#3546) by @MrScautHD [rmodels] REVIEWED: `LoadGLTF()`, supporting additional vertex data formats (#3546) by @MrScautHD
[rmodels] REVIEWED: `LoadGLTF()`, correctly handle the node hierarchy in a glTF file (#4037) by @Paul Melis [rmodels] REVIEWED: `LoadGLTF()`, correctly handle the node hierarchy in a glTF file (#4037) by @Paul Melis
[rmodels] REVIEWED: `LoadGLTF()`, replaced SQUAD quat interpolation with cubic hermite (gltf 2.0 specs) (#3920) by @Benji [rmodels] REVIEWED: `LoadGLTF()`, replaced SQUAD quat interpolation with cubic hermite (gltf 2.0 specs) (#3920) by @Benji
[rmodels] REVIEWED: `LoadGLTF()`, support 2nd texture coordinates loading by @Ray [rmodels] REVIEWED: `LoadGLTF()`, support 2nd texture coordinates loading by @raysan5
[rmodels] REVIEWED: `LoadGLTF()`, support additional vertex attributes data formats #3890 by @Ray [rmodels] REVIEWED: `LoadGLTF()`, support additional vertex attributes data formats #3890 by @raysan5
[rmodels] REVIEWED: `LoadGLTF()`, set cgltf callbacks to use `LoadFileData()` and `UnloadFileData()` (#3652) by @kolunmi [rmodels] REVIEWED: `LoadGLTF()`, set cgltf callbacks to use `LoadFileData()` and `UnloadFileData()` (#3652) by @kolunmi
[rmodels] REVIEWED: `LoadGLTF()`, JOINTS loading #3836 by @Ray [rmodels] REVIEWED: `LoadGLTF()`, JOINTS loading #3836 by @raysan5
[rmodels] REVIEWED: `LoadImageFromCgltfImage()`, fix base64 padding support (#4112) by @SuperUserNameMan [rmodels] REVIEWED: `LoadImageFromCgltfImage()`, fix base64 padding support (#4112) by @SuperUserNameMan
[rmodels] REVIEWED: `LoadModelAnimationsIQM()`, fix corrupted animation names (#4026) by @Jett [rmodels] REVIEWED: `LoadModelAnimationsIQM()`, fix corrupted animation names (#4026) by @JettMonstersGoBoom
[rmodels] REVIEWED: `LoadModelAnimationsGLTF()`, load animations with 1 frame (#3804) by @Nikita Blizniuk [rmodels] REVIEWED: `LoadModelAnimationsGLTF()`, load animations with 1 frame (#3804) by @Nikita Blizniuk
[rmodels] REVIEWED: `LoadModelAnimationsGLTF()`, added missing interpolation types (#3919) by @Benji [rmodels] REVIEWED: `LoadModelAnimationsGLTF()`, added missing interpolation types (#3919) by @Benji
[rmodels] REVIEWED: `LoadModelAnimationsGLTF()` (#4107) by @VitoTringolo [rmodels] REVIEWED: `LoadModelAnimationsGLTF()` (#4107) by @VitoTringolo
@ -266,19 +283,19 @@ WIP: Last update with commit from 02-Nov-2024
[rmodels] REVIEWED: `DrawCylinder()`, fix drawing of cap (#4478) by @JeffM2501 [rmodels] REVIEWED: `DrawCylinder()`, fix drawing of cap (#4478) by @JeffM2501
[rmodels] REVIEWED: `DrawMesh()`, send full matModel to shader in DrawMesh (#4005) (#4022) by @David Holland [rmodels] REVIEWED: `DrawMesh()`, send full matModel to shader in DrawMesh (#4005) (#4022) by @David Holland
[rmodels] REVIEWED: `DrawMesh()`, fix material specular map retrieval (#3758) by @Victor Gallet [rmodels] REVIEWED: `DrawMesh()`, fix material specular map retrieval (#3758) by @Victor Gallet
[rmodels] REVIEWED: `DrawModelEx()`, simplified multiplication of colors (#4002) by @Le Juez Victor [rmodels] REVIEWED: `DrawModelEx()`, simplified multiplication of colors (#4002) by @Bigfoot71
[rmodels] REVIEWED: `DrawBillboardPro()`, to be consistend with `DrawTexturePro()` (#4132) by @bohonghuang [rmodels] REVIEWED: `DrawBillboardPro()`, to be consistend with `DrawTexturePro()` (#4132) by @bohonghuang
[rmodels] REVIEWED: `DrawSphereEx()` optimization (#4106) by @smalltimewizard [rmodels] REVIEWED: `DrawSphereEx()` optimization (#4106) by @smalltimewizard
[raudio] REVIEWED: `LoadMusicStreamFromMemory()`, support 24-bit FLACs (#4279) by @konstruktor227 [raudio] REVIEWED: `LoadMusicStreamFromMemory()`, support 24-bit FLACs (#4279) by @konstruktor227
[raudio] REVIEWED: `LoadWaveSamples()`, fix mapping of wave data (#4062) by @listeria [raudio] REVIEWED: `LoadWaveSamples()`, fix mapping of wave data (#4062) by @ListeriaM
[raudio] REVIEWED: `LoadMusicStream()`, remove drwav_uninit() (#3986) by @FishingHacks [raudio] REVIEWED: `LoadMusicStream()`, remove drwav_uninit() (#3986) by @FishingHacks
[raudio] REVIEWED: `LoadMusicStream()` qoa and wav loading (#3966) by @veins1 [raudio] REVIEWED: `LoadMusicStream()` qoa and wav loading (#3966) by @veins1
[raudio] REVIEWED: `ExportWaveAsCode()`, segfault (#3769) by @IoIxD [raudio] REVIEWED: `ExportWaveAsCode()`, segfault (#3769) by @IoIxD
[raudio] REVIEWED: `WaveCrop()`, fix issues and use frames instead of samples (#3994) by @listeria [raudio] REVIEWED: `WaveCrop()`, fix issues and use frames instead of samples (#3994) by @ListeriaM
[raudio] REVIEWED: Crash from multithreading issues (#3907) by @Christian Haas [raudio] REVIEWED: Crash from multithreading issues (#3907) by @Christian Haas
[raudio] REVIEWED: Reset music.ctxType if loading wasn't succesful (#3917) by @veins1 [raudio] REVIEWED: Reset music.ctxType if loading wasn't succesful (#3917) by @veins1
[raudio] REVIEWED: Added missing functions in "standalone" mode (#3760) by @Alessandro Nikolaev [raudio] REVIEWED: Added missing functions in "standalone" mode (#3760) by @Alessandro Nikolaev
[raudio] REVIEWED: Disable unused miniaudio features (#3544) by @Alexandre Almeida [raudio] REVIEWED: Disable unused miniaudio features (#3544) by @M374LX
[raudio] REVIEWED: Fix crash when switching playback device at runtime (#4102) by @jkaup [raudio] REVIEWED: Fix crash when switching playback device at runtime (#4102) by @jkaup
[raudio] REVIEWED: Support 24 bits samples for FLAC format (#4058) by @Alexey Kutepov [raudio] REVIEWED: Support 24 bits samples for FLAC format (#4058) by @Alexey Kutepov
[examples] ADDED: `core_random_sequence` (#3846) by @Dalton Overmyer [examples] ADDED: `core_random_sequence` (#3846) by @Dalton Overmyer
@ -287,36 +304,36 @@ WIP: Last update with commit from 02-Nov-2024
[examples] ADDED: `models_bone_socket` (#3833) by @iP [examples] ADDED: `models_bone_socket` (#3833) by @iP
[examples] ADDED: `shaders_vertex_displacement` (#4186) by @Alex ZH [examples] ADDED: `shaders_vertex_displacement` (#4186) by @Alex ZH
[examples] ADDED: `shaders_shadowmap` (#3653) by @TheManTheMythTheGameDev [examples] ADDED: `shaders_shadowmap` (#3653) by @TheManTheMythTheGameDev
[examples] REVIEWED: `core_2d_camera_platformer` by @Ray [examples] REVIEWED: `core_2d_camera_platformer` by @raysan5
[examples] REVIEWED: `core_2d_camera_mouse_zoom`, use logarithmic scaling for a 2d zoom functionality (#3977) by @Mike Will [examples] REVIEWED: `core_2d_camera_mouse_zoom`, use logarithmic scaling for a 2d zoom functionality (#3977) by @myQwil
[examples] REVIEWED: `core_input_gamepad_info`, all buttons displayed within the window (#4241) by @Asdqwe [examples] REVIEWED: `core_input_gamepad_info`, all buttons displayed within the window (#4241) by @Asdqwe
[examples] REVIEWED: `core_input_gamepad_info`, show ps3 controller (#4040) by @Konrad Gutvik Grande [examples] REVIEWED: `core_input_gamepad_info`, show ps3 controller (#4040) by @Konrad Gutvik Grande
[examples] REVIEWED: `core_input_gamepad`, add drawing for generic gamepad (#4424) by @Asdqwe [examples] REVIEWED: `core_input_gamepad`, add drawing for generic gamepad (#4424) by @Asdqwe
[examples] REVIEWED: `core_input_gamepad`, add deadzone handling (#4422) by @Asdqwe [examples] REVIEWED: `core_input_gamepad`, add deadzone handling (#4422) by @Asdqwe
[examples] REVIEWED: `shapes_bouncing_ball` (#4226) by @Anthony Carbajal [examples] REVIEWED: `shapes_bouncing_ball` (#4226) by @Anthony Carbajal
[examples] REVIEWED: `shapes_following_eyes` (#3710) by @Hongyu Ouyang [examples] REVIEWED: `shapes_following_eyes` (#3710) by @Hongyu Ouyang
[examples] REVIEWED: `shapes_draw_rectangle_rounded` by @Ray [examples] REVIEWED: `shapes_draw_rectangle_rounded` by @raysan5
[examples] REVIEWED: `shapes_draw_ring`, fix other examples (#4211) by @kai-z99 [examples] REVIEWED: `shapes_draw_ring`, fix other examples (#4211) by @kai-z99
[examples] REVIEWED: `shapes_lines_bezier` by @Ray [examples] REVIEWED: `shapes_lines_bezier` by @raysan5
[examples] REVIEWED: `textures_image_kernel` #3556 by @Ray [examples] REVIEWED: `textures_image_kernel` #3556 by @raysan5
[examples] REVIEWED: `text_input_box` (#4229) by @Anthony Carbajal [examples] REVIEWED: `text_input_box` (#4229) by @Anthony Carbajal
[examples] REVIEWED: `text_writing_anim` (#4230) by @Anthony Carbajal [examples] REVIEWED: `text_writing_anim` (#4230) by @Anthony Carbajal
[examples] REVIEWED: `models_billboard` by @Ray [examples] REVIEWED: `models_billboard` by @raysan5
[examples] REVIEWED: `models_cubicmap` by @Ray [examples] REVIEWED: `models_cubicmap` by @raysan5
[examples] REVIEWED: `models_point_rendering` by @Ray [examples] REVIEWED: `models_point_rendering` by @raysan5
[examples] REVIEWED: `models_box_collisions` (#4224) by @Anthony Carbajal [examples] REVIEWED: `models_box_collisions` (#4224) by @Anthony Carbajal
[examples] REVIEWED: `models_skybox`, do not use HDR by default (#4115) by @Jeffery Myers [examples] REVIEWED: `models_skybox`, do not use HDR by default (#4115) by @Jeffm2501
[examples] REVIEWED: `shaders_basic_pbr` (#4225) by @Anthony Carbajal [examples] REVIEWED: `shaders_basic_pbr` (#4225) by @Anthony Carbajal
[examples] REVIEWED: `shaders_palette_switch` by @Ray [examples] REVIEWED: `shaders_palette_switch` by @raysan5
[examples] REVIEWED: `shaders_hybrid_render` (#3908) by @Yousif [examples] REVIEWED: `shaders_hybrid_render` (#3908) by @Yousif
[examples] REVIEWED: `shaders_lighting_instancing`, fix vertex shader (#4056) by @Karl Zylinski [examples] REVIEWED: `shaders_lighting_instancing`, fix vertex shader (#4056) by @karl
[examples] REVIEWED: `shaders_raymarching`, add `raymarching.fs` for GLSL120 (#4183) by @CDM15y [examples] REVIEWED: `shaders_raymarching`, add `raymarching.fs` for GLSL120 (#4183) by @CDM15y
[examples] REVIEWED: `shaders_shadowmap`, fix shaders for GLSL 1.20 (#4167) by @CDM15y [examples] REVIEWED: `shaders_shadowmap`, fix shaders for GLSL 1.20 (#4167) by @CDM15y
[examples] REVIEWED: `shaders_deferred_render` (#3655) by @Jett [examples] REVIEWED: `shaders_deferred_render` (#3655) by @JettMonstersGoBoom
[examples] REVIEWED: `shaders_basic_pbr` (#3621) by @devdad [examples] REVIEWED: `shaders_basic_pbr` (#3621) by @afanolovcic
[examples] REVIEWED: `shaders_basic_pbr`, remove dependencies (#3649) by @TheManTheMythTheGameDev [examples] REVIEWED: `shaders_basic_pbr`, remove dependencies (#3649) by @TheManTheMythTheGameDev
[examples] REVIEWED: `shaders_basic_pbr`, added more comments by @Ray [examples] REVIEWED: `shaders_basic_pbr`, added more comments by @raysan5
[examples] REVIEWED: `shaders_gpu_skinning`, to work with OpenGL ES 2.0 #4412 by @Ray [examples] REVIEWED: `shaders_gpu_skinning`, to work with OpenGL ES 2.0 #4412 by @raysan5
[examples] REVIEWED: `shaders_model_shader`, use free camera (#4428) by @IcyLeave6109 [examples] REVIEWED: `shaders_model_shader`, use free camera (#4428) by @IcyLeave6109
[examples] REVIEWED: `audio_stream_effects` (#3618) by @lipx [examples] REVIEWED: `audio_stream_effects` (#3618) by @lipx
[examples] REVIEWED: `audio_raw_stream` (#3624) by @riadbettole [examples] REVIEWED: `audio_raw_stream` (#3624) by @riadbettole
@ -325,21 +342,21 @@ WIP: Last update with commit from 02-Nov-2024
[examples] REVIEWED: Update examples missing UnloadTexture() calls (#4234) by @Anthony Carbajal [examples] REVIEWED: Update examples missing UnloadTexture() calls (#4234) by @Anthony Carbajal
[examples] REVIEWED: Added GLSL 100 and 120 shaders to lightmap example (#3543) by @Jussi Viitala [examples] REVIEWED: Added GLSL 100 and 120 shaders to lightmap example (#3543) by @Jussi Viitala
[examples] REVIEWED: Set FPS to always 60 in all exampels (#4235) by @Anthony Carbajal [examples] REVIEWED: Set FPS to always 60 in all exampels (#4235) by @Anthony Carbajal
[build] REVIEWED: Makefile by @Ray [build] REVIEWED: Makefile by @raysan5
[build] REVIEWED: Makefile, fix wrong flag #3593 by @Ray [build] REVIEWED: Makefile, fix wrong flag #3593 by @raysan5
[build] REVIEWED: Makefile, disable wayland by default (#4369) by @Anthony Carbajal [build] REVIEWED: Makefile, disable wayland by default (#4369) by @Anthony Carbajal
[build] REVIEWED: Makefile, VSCode, fix to support multiple .c files (#4391) by @Alan Arrecis [build] REVIEWED: Makefile, VSCode, fix to support multiple .c files (#4391) by @Alan Arrecis
[build] REVIEWED: Makefile, fix -Wstringop-truncation warning (#4096) by @Peter0x44 [build] REVIEWED: Makefile, fix -Wstringop-truncation warning (#4096) by @Peter0x44
[build] REVIEWED: Makefile, fix issues for RGFW on Linux/macOS (#3969) by @Colleague Riley [build] REVIEWED: Makefile, fix issues for RGFW on Linux/macOS (#3969) by @colleagueRiley
[build] REVIEWED: Makefile, update RAYLIB_VERSION (#3901) by @Belllg [build] REVIEWED: Makefile, update RAYLIB_VERSION (#3901) by @Belllg
[build] REVIEWED: Makefile, use mingw32-make for Windows (#4436) by @Asdqwe [build] REVIEWED: Makefile, use mingw32-make for Windows (#4436) by @Asdqwe
[build] REVIEWED: Makefile, move CUSTOM_CFLAGS for better visibility (#4054) by @Lázaro Albuquerque [build] REVIEWED: Makefile, move CUSTOM_CFLAGS for better visibility (#4054) by @Lázaro Albuquerque
[build] REVIEWED: Makefile, update emsdk paths to latest versions by @Ray [build] REVIEWED: Makefile, update emsdk paths to latest versions by @raysan5
[build] REVIEWED: Makefile examples, align /usr/local with /src Makefile (#4286) by @Tchan0 [build] REVIEWED: Makefile examples, align /usr/local with /src Makefile (#4286) by @Tchan0
[build] REVIEWED: Makefile examples, added `textures_image_kernel` (#3555) by @Sergey Zapunidi [build] REVIEWED: Makefile examples, added `textures_image_kernel` (#3555) by @Sergey Zapunidi
[build] REVIEWED: Makefile examples (#4209) by @Anthony Carbajal [build] REVIEWED: Makefile examples (#4209) by @Anthony Carbajal
[build] REVIEWED: Makefile examples, to work on NetBSD (#4438) by @NishiOwO [build] REVIEWED: Makefile examples, to work on NetBSD (#4438) by @NishiOwO
[build] REVIEWED: Makefile examples, WebGL2 (OpenGL ES 3.0) backend flags #4330 by @Ray [build] REVIEWED: Makefile examples, WebGL2 (OpenGL ES 3.0) backend flags #4330 by @raysan5
[build] REVIEWED: Makefile examples, web building (#4434) by @Asdqwe [build] REVIEWED: Makefile examples, web building (#4434) by @Asdqwe
[build] REVIEWED: build.zig, fix various issues around `-Dconfig` (#4398) by @Sage Hane [build] REVIEWED: build.zig, fix various issues around `-Dconfig` (#4398) by @Sage Hane
[build] REVIEWED: build.zig, fix type mismatch (#4383) by @yuval_dev [build] REVIEWED: build.zig, fix type mismatch (#4383) by @yuval_dev
@ -348,15 +365,15 @@ WIP: Last update with commit from 02-Nov-2024
[build] REVIEWED: build.zig, improve logic (#4375) by @Sage Hane [build] REVIEWED: build.zig, improve logic (#4375) by @Sage Hane
[build] REVIEWED: build.zig, issues (#4374) by @William Culver [build] REVIEWED: build.zig, issues (#4374) by @William Culver
[build] REVIEWED: build.zig, issues (#4366) by @Visen [build] REVIEWED: build.zig, issues (#4366) by @Visen
[build] REVIEWED: build.zig, support desktop backend change (#4358) by @Nikolas [build] REVIEWED: build.zig, support desktop backend change (#4358) by @Not-Nik
[build] REVIEWED: build.zig, use zig fmt (#4242) by @freakmangd [build] REVIEWED: build.zig, use zig fmt (#4242) by @freakmangd
[build] REVIEWED: build.zig, check if wayland-scanner is installed (#4217) by @lnc3l0t [build] REVIEWED: build.zig, check if wayland-scanner is installed (#4217) by @lnc3l0t
[build] REVIEWED: build.zig, override config.h definitions (#4193) by @lnc3l0t [build] REVIEWED: build.zig, override config.h definitions (#4193) by @lnc3l0t
[build] REVIEWED: build.zig, support GLFW platform detection (#4150) by @InventorXtreme [build] REVIEWED: build.zig, support GLFW platform detection (#4150) by @InventorXtreme
[build] REVIEWED: build.zig, make emscripten build compatible with Zig 0.13.0 (#4121) by @Mike Will [build] REVIEWED: build.zig, make emscripten build compatible with Zig 0.13.0 (#4121) by @myQwil
[build] REVIEWED: build.zig, pass the real build.zig file (#4113) by @InKryption [build] REVIEWED: build.zig, pass the real build.zig file (#4113) by @InKryption
[build] REVIEWED: build.zig, leverage `dependencyFromBuildZig` (#4109) by @InKryption [build] REVIEWED: build.zig, leverage `dependencyFromBuildZig` (#4109) by @InKryption
[build] REVIEWED: build.zig, run examples from their directories (#4063) by @Mike Will [build] REVIEWED: build.zig, run examples from their directories (#4063) by @myQwil
[build] REVIEWED: build.zig, fix raygui build when using addRaygui externally (#4027) by @Viktor Pocedulić [build] REVIEWED: build.zig, fix raygui build when using addRaygui externally (#4027) by @Viktor Pocedulić
[build] REVIEWED: build.zig, fix emscripten build (#4012) by @Dylan [build] REVIEWED: build.zig, fix emscripten build (#4012) by @Dylan
[build] REVIEWED: build.zig, update to zig 0.12.0dev while keeping 0.11.0 compatibility (#3715) by @freakmangd [build] REVIEWED: build.zig, update to zig 0.12.0dev while keeping 0.11.0 compatibility (#3715) by @freakmangd
@ -372,7 +389,7 @@ WIP: Last update with commit from 02-Nov-2024
[build] REVIEWED: build.zig, improve cross-compilation (#4468) by @deathbeam [build] REVIEWED: build.zig, improve cross-compilation (#4468) by @deathbeam
[build] REVIEWED: CMake, update to raylib 5.0 (#3623) by @Peter0x44 [build] REVIEWED: CMake, update to raylib 5.0 (#3623) by @Peter0x44
[build] REVIEWED: CMake, added PLATFORM option for Desktop SDL (#3809) by @mooff [build] REVIEWED: CMake, added PLATFORM option for Desktop SDL (#3809) by @mooff
[build] REVIEWED: CMake, fix GRAPHICS_* check (#4359) by @Kacper Zybała [build] REVIEWED: CMake, fix GRAPHICS_* check (#4359) by @zyperpl
[build] REVIEWED: CMake, examples projects (#4332) by @Ridge3Dproductions [build] REVIEWED: CMake, examples projects (#4332) by @Ridge3Dproductions
[build] REVIEWED: CMake, fix warnings in projects/CMake/CMakeLists.txt (#4278) by @Peter0x44 [build] REVIEWED: CMake, fix warnings in projects/CMake/CMakeLists.txt (#4278) by @Peter0x44
[build] REVIEWED: CMake, delete BuildOptions.cmake (#4277) by @Peter0x44 [build] REVIEWED: CMake, delete BuildOptions.cmake (#4277) by @Peter0x44
@ -383,52 +400,52 @@ WIP: Last update with commit from 02-Nov-2024
[build] REVIEWED: CMake, pass -sFULL_ES3 instead of -sFULL_ES3=1 (#4090) by @manuel5975p [build] REVIEWED: CMake, pass -sFULL_ES3 instead of -sFULL_ES3=1 (#4090) by @manuel5975p
[build] REVIEWED: CMake, SDL build link the glfw dependency (#3860) by @RobLoach [build] REVIEWED: CMake, SDL build link the glfw dependency (#3860) by @RobLoach
[build] REVIEWED: CMake, infer CMAKE_MODULE_PATH in super-build (#4042) by @fruzitent [build] REVIEWED: CMake, infer CMAKE_MODULE_PATH in super-build (#4042) by @fruzitent
[build] REVIEWED: CMake, remove USE_WAYLAND option (#3851) by @Alexandre Almeida [build] REVIEWED: CMake, remove USE_WAYLAND option (#3851) by @M374LX
[build] REVIEWED: CMake, disable SDL rlgl_standalone example (#3861) by @RobLoach [build] REVIEWED: CMake, disable SDL rlgl_standalone example (#3861) by @RobLoach
[build] REVIEWED: CMake, bump version required to avoid deprecated #3639 by @Ray [build] REVIEWED: CMake, bump version required to avoid deprecated #3639 by @raysan5
[build] REVIEWED: CMake, fix examples linking -DPLATFORM=SDL (#3825) by @Peter0x44 [build] REVIEWED: CMake, fix examples linking -DPLATFORM=SDL (#3825) by @Peter0x44
[build] REVIEWED: CMake, don't build for wayland by default (#4432) by @Peter0x44 [build] REVIEWED: CMake, don't build for wayland by default (#4432) by @Peter0x44
[build] REVIEWED: VS2022, misc improvements by @Ray [build] REVIEWED: VS2022, misc improvements by @raysan5
[build] REVIEWED: VS2022, fix build warnings (#4095) by @Jeffery Myers [build] REVIEWED: VS2022, fix build warnings (#4095) by @Jeffm2501
[build] REVIEWED: VS2022, added new examples (#4492) by @Jeffery Myers [build] REVIEWED: VS2022, added new examples (#4492) by @Jeffm2501
[build] REVIEWED: Fix fix-build-paths (#3849) by @Caleb Barger [build] REVIEWED: Fix fix-build-paths (#3849) by @Caleb Barger
[build] REVIEWED: Fix build paths (#3835) by @Steve Biedermann [build] REVIEWED: Fix build paths (#3835) by @Steve Biedermann
[build] REVIEWED: Fix VSCode sample project for macOS (#3666) by @Tim Romero [build] REVIEWED: Fix VSCode sample project for macOS (#3666) by @Tim Romero
[build] REVIEWED: Fix some warnings on web builds and remove some redundant flags (#4069) by @Lázaro Albuquerque [build] REVIEWED: Fix some warnings on web builds and remove some redundant flags (#4069) by @Lázaro Albuquerque
[build] REVIEWED: Fix examples not building with gestures system disabled (#4020) by @Sprix [build] REVIEWED: Fix examples not building with gestures system disabled (#4020) by @Sprix
[build] REVIEWED: Fix GLFW runtime platform detection (#3863) by @Alexandre Almeida [build] REVIEWED: Fix GLFW runtime platform detection (#3863) by @M374LX
[build] REVIEWED: Fix DRM cross-compile without sysroot (#3839) by @Christian W. Zuckschwerdt [build] REVIEWED: Fix DRM cross-compile without sysroot (#3839) by @Christian W. Zuckschwerdt
[build] REVIEWED: Fix cmake-built libraylib.a to properly include GLFW's object files (#3598) by @Peter0x44 [build] REVIEWED: Fix cmake-built libraylib.a to properly include GLFW's object files (#3598) by @Peter0x44
[build] REVIEWED: Hide unneeded internal symbols when building raylib as an so or dylib (#3573) by @Peter0x44 [build] REVIEWED: Hide unneeded internal symbols when building raylib as an so or dylib (#3573) by @Peter0x44
[build] REVIEWED: Corrected the path of android ndk toolchains for OSX platforms (#3574) by @Emmanuel Méra [build] REVIEWED: Corrected the path of android ndk toolchains for OSX platforms (#3574) by @Emmanuel Méra
[build][CI] ADDED: Automatic update for raylib_api.* (#3692) by @seiren [build][CI] ADDED: Automatic update for raylib_api.* (#3692) by @seiren
[build][CI] REVIEWED: Update workflows to use latest actions/upload-artifact by @Ray [build][CI] REVIEWED: Update workflows to use latest actions/upload-artifact by @raysan5
[build][CI] REVIEWED: CodeQL minor tweaks to avoid some warnings by @Ray [build][CI] REVIEWED: CodeQL minor tweaks to avoid some warnings by @raysan5
[build][CI] REVIEWED: Update linux_examples.yml by @Ray [build][CI] REVIEWED: Update linux_examples.yml by @raysan5
[build][CI] REVIEWED: Update linux.yml by @Ray [build][CI] REVIEWED: Update linux.yml by @raysan5
[build][CI] REVIEWED: Update webassembly.yml by @Ray [build][CI] REVIEWED: Update webassembly.yml by @raysan5
[build][CI] REVIEWED: Update cmake.yml by @Ray [build][CI] REVIEWED: Update cmake.yml by @raysan5
[build][CI] REVIEWED: Update codeql.yml, exclude src/external files by @Ray [build][CI] REVIEWED: Update codeql.yml, exclude src/external files by @raysan5
[bindings] ADDED: raylib-APL (#4253) by @Brian E [bindings] ADDED: raylib-APL (#4253) by @Brian-ED
[bindings] ADDED: raylib-bqn, moved rayed-bqn (#4331) by @Brian E [bindings] ADDED: raylib-bqn, moved rayed-bqn (#4331) by @Brian-ED
[bindings] ADDED: brainfuck binding (#4169) by @_Tradam [bindings] ADDED: brainfuck binding (#4169) by @_Tradam
[bindings] ADDED: raylib-zig-bindings (#4004) by @Lionel Briand [bindings] ADDED: raylib-zig-bindings (#4004) by @Lionel Briand
[bindings] ADDED: Raylib-CSharp wrapper (#3963) by @MrScautHD [bindings] ADDED: Raylib-CSharp wrapper (#3963) by @MrScautHD
[bindings] ADDED: COBOL binding (#3661) by @glowiak [bindings] ADDED: COBOL binding (#3661) by @glowiak
[bindings] ADDED: raylib-beef binding (#3640) by @Braedon Lewis [bindings] ADDED: raylib-beef binding (#3640) by @Braedon Lewis
[bindings] ADDED: Raylib-CSharp-Vinculum (#3571) by @Danil [bindings] ADDED: Raylib-CSharp-Vinculum (#3571) by @Danil
[bindings] REVIEWED: Remove broken-link bindings #3899 by @Ray [bindings] REVIEWED: Remove broken-link bindings #3899 by @raysan5
[bindings] REVIEWED: Updated some versions on BINDINGS.md by @Ray [bindings] REVIEWED: Updated some versions on BINDINGS.md by @raysan5
[bindings] REVIEWED: Removed umaintained repos (#3999) by @Antonis Geralis [bindings] REVIEWED: Removed umaintained repos (#3999) by @planetis-m
[bindings] REDESIGNED: Add binding link to name, instead of separate column (#3995) by @Carmine Pietroluongo [bindings] REDESIGNED: Add binding link to name, instead of separate column (#3995) by @Carmine Pietroluongo
[bindings] UPDATED: h-raylib (#4378) by @Anand Swaroop [bindings] UPDATED: h-raylib (#4378) by @Anand Swaroop
[bindings] UPDATED: Raylib.lean, to master version (#4337) by @Daniil Kisel [bindings] UPDATED: Raylib.lean, to master version (#4337) by @Daniil Kisel
[bindings] UPDATED: raybit, to latest master (#4311) by @Alex [bindings] UPDATED: raybit, to latest master (#4311) by @Alex
[bindings] UPDATED: dray binding (#4163) by @red thing [bindings] UPDATED: dray binding (#4163) by @red thing
[bindings] UPDATED: Julia (#4068) by @ShalokShalom [bindings] UPDATED: Julia (#4068) by @ShalokShalom
[bindings] UPDATED: nim to latest master (#3999) by @Antonis Geralis [bindings] UPDATED: nim to latest master (#3999) by @planetis-m
[bindings] UPDATED: raylib-rs (#3991) by @IoIxD [bindings] UPDATED: raylib-rs (#3991) by @IoIxD
[bindings] UPDATED: raylib-zig version (#3902) by @Nikolas [bindings] UPDATED: raylib-zig version (#3902) by @Not-Nik
[bindings] UPDATED: raylib-odin (#3868) by @joyousblunder [bindings] UPDATED: raylib-odin (#3868) by @joyousblunder
[bindings] UPDATED: Raylib VAPI (#3829) by @Alex Macafee [bindings] UPDATED: Raylib VAPI (#3829) by @Alex Macafee
[bindings] UPDATED: Raylib-cs (#3774) by @Brandon Baker [bindings] UPDATED: Raylib-cs (#3774) by @Brandon Baker
@ -438,20 +455,20 @@ WIP: Last update with commit from 02-Nov-2024
[bindings] UPDATED: ray-cyber to 5.0 (#3654) by @fubark [bindings] UPDATED: ray-cyber to 5.0 (#3654) by @fubark
[bindings] UPDATED: raylib-freebasic binding (#3591) by @WIITD [bindings] UPDATED: raylib-freebasic binding (#3591) by @WIITD
[bindings] UPDATED: SmallBASIC (#3562) by @Chris Warren-Smith [bindings] UPDATED: SmallBASIC (#3562) by @Chris Warren-Smith
[bindings] UPDATED: Python raylib-py v5.0.0beta1 (#3557) by @Jorge A. Gomes [bindings] UPDATED: Python raylib-py v5.0.0beta1 (#3557) by @jorgegomes83
[bindings] UPDATED: raylib-d binding (#3561) by @Steven Schveighoffer [bindings] UPDATED: raylib-d binding (#3561) by @schveiguy
[bindings] UPDATED: Janet (#3553) by @Dmitry Matveyev [bindings] UPDATED: Janet (#3553) by @Dmitry Matveyev
[bindings] UPDATED: Raylib.nelua (#3552) by @Auz [bindings] UPDATED: Raylib.nelua (#3552) by @guy.smith764
[bindings] UPDATED: raylib-cpp to 5.0 (#3551) by @RobLoach [bindings] UPDATED: raylib-cpp to 5.0 (#3551) by @RobLoach
[bindings] UPDATED: Pascal binding (#3548) by @Gunko Vadim [bindings] UPDATED: Pascal binding (#3548) by @Gunko Vadim
[external] UPDATED: stb_truetype.h to latest version by @Ray [external] UPDATED: stb_truetype.h to latest version by @raysan5
[external] UPDATED: stb_image_resize2.h to latest version by @Ray [external] UPDATED: stb_image_resize2.h to latest version by @raysan5
[external] UPDATED: stb_image.h to latest version by @Ray [external] UPDATED: stb_image.h to latest version by @raysan5
[external] UPDATED: qoa.h to latest version by @Ray [external] UPDATED: qoa.h to latest version by @raysan5
[external] UPDATED: dr_wav.h to latest version by @Ray [external] UPDATED: dr_wav.h to latest version by @raysan5
[external] UPDATED: dr_mp3.h to latest version by @Ray [external] UPDATED: dr_mp3.h to latest version by @raysan5
[external] UPDATED: cgltf.h to latest version by @Ray [external] UPDATED: cgltf.h to latest version by @raysan5
[external] REVIEWED: rl_gputex, correctly load mipmaps from DDS files (#4399) by @Nikolas [external] REVIEWED: rl_gputex, correctly load mipmaps from DDS files (#4399) by @Not-Nik
[external] REVIEWED: stb_image_resize2, dix vld1q_f16 undeclared in arm (#4309) by @masnm [external] REVIEWED: stb_image_resize2, dix vld1q_f16 undeclared in arm (#4309) by @masnm
[external] REVIEWED: miniaudio, fix library and Makefile for NetBSD (#4212) by @NishiOwO [external] REVIEWED: miniaudio, fix library and Makefile for NetBSD (#4212) by @NishiOwO
[external] REVIEWED: raygui, update to latest version 4.5-dev (#4238) by @Anthony Carbajal [external] REVIEWED: raygui, update to latest version 4.5-dev (#4238) by @Anthony Carbajal
@ -462,17 +479,17 @@ WIP: Last update with commit from 02-Nov-2024
[parser] REVIEWED: Don't crash for files that don't end in newlines (#3981) by @Peter0x44 [parser] REVIEWED: Don't crash for files that don't end in newlines (#3981) by @Peter0x44
[parser] REVIEWED: Issues in usage example help text (#4084) by @Peter0x44 [parser] REVIEWED: Issues in usage example help text (#4084) by @Peter0x44
[parser] REVIEWED: Fix parsing of empty parentheses (#3974) by @Filyus [parser] REVIEWED: Fix parsing of empty parentheses (#3974) by @Filyus
[parser] REVIEWED: Address parsing issue when generating XML #3893 by @Ray [parser] REVIEWED: Address parsing issue when generating XML #3893 by @raysan5
[parser] REVIEWED: `MemoryCopy()`, prevent buffer overflow by replacing hard-coded arguments (#4011) by @avx0 [parser] REVIEWED: `MemoryCopy()`, prevent buffer overflow by replacing hard-coded arguments (#4011) by @avx0
[misc] ADDED: Create logo/raylib.icns by @Ray [misc] ADDED: Create logo/raylib.icns by @raysan5
[misc] ADDED: Create logo/raylib_1024x1024.png by @Ray [misc] ADDED: Create logo/raylib_1024x1024.png by @raysan5
[misc] ADDED: Default vertex/fragment shader for OpenGL ES 3.0 (#4178) by @Lázaro Albuquerque [misc] ADDED: Default vertex/fragment shader for OpenGL ES 3.0 (#4178) by @Lázaro Albuquerque
[misc] REVIEWED: README.md, fix Reddit badge (#4136) by @Ninad Sachania [misc] REVIEWED: README.md, fix Reddit badge (#4136) by @Ninad Sachania
[misc] REVIEWED: .gitignore, ignore compiled dll binaries (#3628) by @2Bear [misc] REVIEWED: .gitignore, ignore compiled dll binaries (#3628) by @2Bear
[misc] REVIEWED: Fix undesired scrollbars on web shell files (#4104) by @jspast [misc] REVIEWED: Fix undesired scrollbars on web shell files (#4104) by @jspast
[misc] REVIEWED: Made comments on raylib.h match comments in rcamera.h (#3942) by @Tomas Fabrizio Orsi [misc] REVIEWED: Made comments on raylib.h match comments in rcamera.h (#3942) by @Tomas Fabrizio Orsi
[misc] REVIEWED: Make raylib/raygui work better on touchscreen (#3728) by @Hongyu Ouyang [misc] REVIEWED: Make raylib/raygui work better on touchscreen (#3728) by @Hongyu Ouyang
[misc] REVIEWED: Update config.h by @Ray [misc] REVIEWED: Update config.h by @raysan5
------------------------------------------------------------------------- -------------------------------------------------------------------------
Release: raylib 5.0 - 10th Anniversary Edition (18 November 2023) Release: raylib 5.0 - 10th Anniversary Edition (18 November 2023)

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;Android;Raspberry Pi;DRM;SDL;RGFW" "Platform to build for.") enum_option(PLATFORM "Desktop;Web;WebRGFW;Android;Raspberry Pi;DRM;SDL;RGFW" "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

@ -522,3 +522,30 @@ Last but not least, I want to thank **raylib sponsors and all the raylib communi
**After 11 years of development, `raylib 5.5` is the best raylib ever.** **After 11 years of development, `raylib 5.5` is the best raylib ever.**
**Enjoy programming with raylib!** :) **Enjoy programming with raylib!** :)
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.
Some astonishing numbers for this release:
- **+320** closed issues (for a TOTAL of **+2130**!)
- **+1800** commits since previous RELEASE (for a TOTAL of **+9600**!)
- **18** functions ADDED to raylib API (for a TOTAL of **599**!)
- **??** functions REVIEWED with fixes and improvements
- **+200** new contributors (for a TOTAL of **+840**!)
Highlights for `raylib 6.0`:
- New Software Renderer backend [rlsw]
- 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

View File

@ -16,10 +16,9 @@ _Current version of raylib is complete and functional but there is always room f
**raylib 5.x** **raylib 5.x**
- [ ] `rcore`: Support additional platforms: iOS, consoles? - [ ] `rcore`: Support additional platforms: iOS, consoles?
- [x] `rcore_web`: Avoid GLFW dependency, functionality can be directly implemented using emscripten SDK - [x] `rcore_web`: Avoid GLFW dependency, functionality can be directly implemented using emscripten SDK
- [ ] `rlgl`: Review GLSL shaders naming conventions for consistency - [x] `rlgl`: Review GLSL shaders naming conventions for consistency
- [ ] `textures`: Improve compressed textures support, loading and saving - [ ] `textures`: Improve compressed textures support, loading and saving
- [ ] `rmodels`: Improve 3d objects loading, specially animations (obj, gltf) - [x] `rmodels`: Improve 3d objects loading, specially animations (obj, gltf)
- [ ] `raudio`: Implement miniaudio high-level provided features
- [x] `examples`: Review all examples, add more and better code explanations - [x] `examples`: Review all examples, add more and better code explanations
- [x] Software renderer backend? Maybe using `Image` provided API - [x] Software renderer backend? Maybe using `Image` provided API

103
build.zig
View File

@ -90,41 +90,7 @@ fn setDesktopPlatform(raylib: *std.Build.Step.Compile, platform: PlatformBackend
} }
} }
/// A list of all flags from `src/config.h` that one may override
const config_h_flags = outer: {
// Set this value higher if compile errors happen as `src/config.h` gets larger
@setEvalBranchQuota(1 << 20);
const config_h = @embedFile("src/config.h");
var flags: [std.mem.count(u8, config_h, "\n") + 1][]const u8 = undefined;
var i = 0;
var lines = std.mem.tokenizeScalar(u8, config_h, '\n');
while (lines.next()) |line| {
if (!std.mem.containsAtLeast(u8, line, 1, "SUPPORT")) continue;
if (std.mem.containsAtLeast(u8, line, 1, "MODULE")) continue;
if (std.mem.startsWith(u8, line, "//")) continue;
if (std.mem.startsWith(u8, line, "#if")) continue;
var flag = std.mem.trimStart(u8, line, " \t"); // Trim whitespace
flag = flag["#define ".len - 1 ..]; // Remove #define
flag = std.mem.trimStart(u8, flag, " \t"); // Trim whitespace
flag = flag[0 .. std.mem.indexOf(u8, flag, " ") orelse continue]; // Flag is only one word, so capture till space
flag = "-D" ++ flag; // Prepend with -D
flags[i] = flag;
i += 1;
}
// Uncomment this to check what flags normally get passed
//@compileLog(flags[0..i].*);
break :outer flags[0..i].*;
};
fn compileRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.builtin.OptimizeMode, options: Options) !*std.Build.Step.Compile { fn compileRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.builtin.OptimizeMode, options: Options) !*std.Build.Step.Compile {
var raylib_flags_arr: std.ArrayList([]const u8) = .empty;
defer raylib_flags_arr.deinit(b.allocator);
const raylib = b.addLibrary(.{ const raylib = b.addLibrary(.{
.name = "raylib", .name = "raylib",
.linkage = options.linkage, .linkage = options.linkage,
@ -135,29 +101,27 @@ fn compileRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.
}), }),
}); });
try raylib_flags_arr.appendSlice( raylib.root_module.addCMacro("_GNU_SOURCE", "");
raylib.root_module.addCMacro("GL_SILENCE_DEPRECATION", "199309L");
var raylib_flags_arr: std.ArrayList([]const u8) = .empty;
defer raylib_flags_arr.deinit(b.allocator);
try raylib_flags_arr.append(
b.allocator, b.allocator,
&[_][]const u8{
"-std=gnu99", "-std=gnu99",
"-D_GNU_SOURCE",
"-DGL_SILENCE_DEPRECATION=199309L",
"-fno-sanitize=undefined", // https://github.com/raysan5/raylib/issues/3674
},
); );
if (options.linkage == .dynamic) { if (options.linkage == .dynamic) {
try raylib_flags_arr.appendSlice( try raylib_flags_arr.append(
b.allocator, b.allocator,
&[_][]const u8{
"-fPIC", "-fPIC",
"-DBUILD_LIBTYPE_SHARED",
},
); );
raylib.root_module.addCMacro("BUILD_LIBTYPE_SHARED", "");
} }
if (options.config.len > 0) { if (options.config.len > 0) {
// Sets a flag indicating the use of a custom `config.h`
try raylib_flags_arr.append(b.allocator, "-DEXTERNAL_CONFIG_FLAGS");
// Splits a space-separated list of config flags into multiple flags // Splits a space-separated list of config flags into multiple flags
// //
// Note: This means certain flags like `-x c++` won't be processed properly. // Note: This means certain flags like `-x c++` won't be processed properly.
@ -165,30 +129,9 @@ fn compileRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.
var config_iter = std.mem.tokenizeScalar(u8, options.config, ' '); var config_iter = std.mem.tokenizeScalar(u8, options.config, ' ');
// Apply config flags supplied by the user // Apply config flags supplied by the user
while (config_iter.next()) |config_flag|
try raylib_flags_arr.append(b.allocator, config_flag);
// Apply all relevant configs from `src/config.h` *except* the user-specified ones
//
// Note: Currently using a suboptimal `O(m*n)` time algorithm where:
// `m` corresponds roughly to the number of lines in `src/config.h`
// `n` corresponds to the number of user-specified flags
outer: for (config_h_flags) |flag| {
// If a user already specified the flag, skip it
config_iter.reset();
while (config_iter.next()) |config_flag| { while (config_iter.next()) |config_flag| {
// For a user-specified flag to match, it must share the same prefix and have the try raylib_flags_arr.append(b.allocator, config_flag);
// same length or be followed by an equals sign
if (!std.mem.startsWith(u8, config_flag, flag)) continue;
if (config_flag.len == flag.len or config_flag[flag.len] == '=') continue :outer;
} }
// Otherwise, append default value from config.h to compile flags
try raylib_flags_arr.append(b.allocator, flag);
}
} else {
// Set default config if no custom config got set
try raylib_flags_arr.appendSlice(b.allocator, &config_h_flags);
} }
// No GLFW required on PLATFORM_DRM // No GLFW required on PLATFORM_DRM
@ -200,24 +143,38 @@ fn compileRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.
c_source_files.appendSliceAssumeCapacity(&.{"src/rcore.c"}); c_source_files.appendSliceAssumeCapacity(&.{"src/rcore.c"});
if (options.rshapes) { if (options.rshapes) {
raylib.root_module.addCMacro("SUPPORT_MODULE_RSHAPES", "1");
try c_source_files.append(b.allocator, "src/rshapes.c"); try c_source_files.append(b.allocator, "src/rshapes.c");
try raylib_flags_arr.append(b.allocator, "-DSUPPORT_MODULE_RSHAPES"); } else {
raylib.root_module.addCMacro("SUPPORT_MODULE_RSHAPES", "0");
} }
if (options.rtextures) { if (options.rtextures) {
raylib.root_module.addCMacro("SUPPORT_MODULE_RTEXTURES", "1");
try c_source_files.append(b.allocator, "src/rtextures.c"); try c_source_files.append(b.allocator, "src/rtextures.c");
try raylib_flags_arr.append(b.allocator, "-DSUPPORT_MODULE_RTEXTURES"); } else {
raylib.root_module.addCMacro("SUPPORT_MODULE_RTEXTURES", "0");
} }
if (options.rtext) { if (options.rtext) {
raylib.root_module.addCMacro("SUPPORT_MODULE_RTEXT", "1");
try c_source_files.append(b.allocator, "src/rtext.c"); try c_source_files.append(b.allocator, "src/rtext.c");
try raylib_flags_arr.append(b.allocator, "-DSUPPORT_MODULE_RTEXT"); } else {
raylib.root_module.addCMacro("SUPPORT_MODULE_RTEXT", "0");
} }
if (options.rmodels) { if (options.rmodels) {
raylib.root_module.addCMacro("SUPPORT_MODULE_RMODELS", "1");
try c_source_files.append(b.allocator, "src/rmodels.c"); try c_source_files.append(b.allocator, "src/rmodels.c");
try raylib_flags_arr.append(b.allocator, "-DSUPPORT_MODULE_RMODELS"); } else {
raylib.root_module.addCMacro("SUPPORT_MODULE_RMODELS", "0");
} }
if (options.raudio) { if (options.raudio) {
raylib.root_module.addCMacro("SUPPORT_MODULE_RAUDIO", "1");
try c_source_files.append(b.allocator, "src/raudio.c"); try c_source_files.append(b.allocator, "src/raudio.c");
try raylib_flags_arr.append(b.allocator, "-DSUPPORT_MODULE_RAUDIO"); } else {
raylib.root_module.addCMacro("SUPPORT_MODULE_RAUDIO", "0");
} }
if (options.opengl_version != .auto) { if (options.opengl_version != .auto) {

View File

@ -143,7 +143,7 @@ elseif ("${PLATFORM}" MATCHES "SDL")
message(STATUS "Found SDL2 via find_package()") message(STATUS "Found SDL2 via find_package()")
set(PLATFORM_CPP "PLATFORM_DESKTOP_SDL") set(PLATFORM_CPP "PLATFORM_DESKTOP_SDL")
set(LIBS_PUBLIC SDL2::SDL2) set(LIBS_PUBLIC SDL2::SDL2)
set(RAYLIB_DEPENDENCIES "${RAYLIB_DEPENDENCIES}\nfind_dependency(SDL3 REQUIRED)") set(RAYLIB_DEPENDENCIES "${RAYLIB_DEPENDENCIES}\nfind_dependency(SDL2 REQUIRED)")
add_compile_definitions(USING_SDL2_PACKAGE) add_compile_definitions(USING_SDL2_PACKAGE)
endif() endif()
endif() endif()
@ -167,6 +167,11 @@ elseif ("${PLATFORM}" MATCHES "RGFW")
set(LIBS_PRIVATE ${X11_LIBRARIES} ${OPENGL_LIBRARIES}) set(LIBS_PRIVATE ${X11_LIBRARIES} ${OPENGL_LIBRARIES})
endif () endif ()
elseif ("${PLATFORM}" MATCHES "WebRGFW")
set(PLATFORM_CPP "PLATFORM_WEB_RGFW")
set(GRAPHICS "GRAPHICS_API_OPENGL_ES2")
set(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
endif () endif ()
if (NOT ${OPENGL_VERSION} MATCHES "OFF") if (NOT ${OPENGL_VERSION} MATCHES "OFF")

View File

@ -189,6 +189,18 @@ foreach (example_source ${example_sources})
target_link_libraries(${example_name} "-framework OpenGL") target_link_libraries(${example_name} "-framework OpenGL")
endif() endif()
elseif (${PLATFORM} MATCHES "RGFW")
if (APPLE)
target_link_libraries(${example_name} "-framework IOKit")
target_link_libraries(${example_name} "-framework Cocoa")
target_link_libraries(${example_name} "-framework OpenGL")
elseif (WIN32)
target_link_libraries(${example_name} "-lgdi32")
target_link_libraries(${example_name} "-lwinmm")
elseif (UNIX)
target_link_libraries(${example_name} "-lX11")
target_link_libraries(${example_name} "-lXrandr")
endif()
endif () endif ()
endforeach () endforeach ()

View File

@ -69,7 +69,7 @@ endif
# Define required raylib variables # Define required raylib variables
PROJECT_NAME ?= raylib_examples PROJECT_NAME ?= raylib_examples
RAYLIB_VERSION ?= 5.5.0 RAYLIB_VERSION ?= 6.0.0
RAYLIB_PATH ?= .. RAYLIB_PATH ?= ..
# Define raylib source code path # Define raylib source code path
@ -90,6 +90,16 @@ BUILD_MODE ?= RELEASE
# Use external GLFW library instead of rglfw module # Use external GLFW library instead of rglfw module
USE_EXTERNAL_GLFW ?= FALSE USE_EXTERNAL_GLFW ?= FALSE
# Enable support for X11 by default on Linux when using GLFW
# NOTE: Wayland is disabled by default, only enable if you are sure
GLFW_LINUX_ENABLE_WAYLAND ?= FALSE
GLFW_LINUX_ENABLE_X11 ?= TRUE
# Enable support for X11 by default on Linux when using GLFW
# NOTE: Wayland is disabled by default, only enable if you are sure
RGFW_LINUX_ENABLE_WAYLAND ?= FALSE
RGFW_LINUX_ENABLE_X11 ?= TRUE
# PLATFORM_DESKTOP_SDL: It requires SDL library to be provided externally # PLATFORM_DESKTOP_SDL: It requires SDL library to be provided externally
# WARNING: Library is not included in raylib, it MUST be configured by users # WARNING: Library is not included in raylib, it MUST be configured by users
SDL_INCLUDE_PATH ?= $(RAYLIB_SRC_PATH)/external/SDL2/include SDL_INCLUDE_PATH ?= $(RAYLIB_SRC_PATH)/external/SDL2/include
@ -145,15 +155,6 @@ ifeq ($(TARGET_PLATFORM),PLATFORM_DRM)
endif endif
endif endif
# RAYLIB_PATH adjustment for LINUX platform
# TODO: Do we really need this?
ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW)
ifeq ($(PLATFORM_OS),LINUX)
RAYLIB_PREFIX ?= ..
RAYLIB_PATH = $(realpath $(RAYLIB_PREFIX))
endif
endif
# Default path for raylib on Raspberry Pi # Default path for raylib on Raspberry Pi
ifeq ($(TARGET_PLATFORM),PLATFORM_DRM) ifeq ($(TARGET_PLATFORM),PLATFORM_DRM)
RAYLIB_PATH ?= /home/pi/raylib RAYLIB_PATH ?= /home/pi/raylib
@ -294,7 +295,7 @@ endif
# Define library paths containing required libs: LDFLAGS # Define library paths containing required libs: LDFLAGS
#------------------------------------------------------------------------------------------------ #------------------------------------------------------------------------------------------------
LDFLAGS = -L. -L$(RAYLIB_RELEASE_PATH) -L$(RAYLIB_PATH)/src LDFLAGS = -L. -L$(RAYLIB_RELEASE_PATH)
ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW) ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW)
ifeq ($(PLATFORM_OS),WINDOWS) ifeq ($(PLATFORM_OS),WINDOWS)
@ -394,9 +395,11 @@ ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW)
LDLIBS = -lraylib -lGL -lm -lpthread -ldl -lrt LDLIBS = -lraylib -lGL -lm -lpthread -ldl -lrt
# On Wayland, additional libraries requires # On Wayland, additional libraries requires
ifeq ($(USE_WAYLAND_DISPLAY),TRUE) ifeq ($(GLFW_LINUX_ENABLE_WAYLAND),TRUE)
LDLIBS += -lwayland-client -lwayland-cursor -lwayland-egl -lxkbcommon LDLIBS += -lwayland-client -lwayland-cursor -lwayland-egl -lxkbcommon
else endif
ifeq ($(GLFW_LINUX_ENABLE_X11),TRUE)
# On X11, additional libraries required # On X11, additional libraries required
LDLIBS += -lX11 LDLIBS += -lX11
# NOTE: It seems additional libraries are not required any more, latest GLFW just dlopen them # NOTE: It seems additional libraries are not required any more, latest GLFW just dlopen them
@ -468,7 +471,15 @@ ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_RGFW)
# Libraries for Debian GNU/Linux desktop compipling # Libraries for Debian GNU/Linux desktop compipling
# NOTE: Required packages: libegl1-mesa-dev # NOTE: Required packages: libegl1-mesa-dev
LDFLAGS += -L../src LDFLAGS += -L../src
LDLIBS = -lraylib -lGL -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor -lm -lpthread -ldl -lrt LDLIBS = -lraylib -lm
ifeq ($(RGFW_LINUX_ENABLE_X11),TRUE)
LDLIBS += -lGL -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor -lpthread -ldl -lrt
endif
ifeq ($(RGFW_LINUX_ENABLE_WAYLAND),TRUE)
LDLIBS += -lwayland-client -lwayland-cursor -lwayland-egl -lxkbcommon
endif
# Explicit link to libc # Explicit link to libc
ifeq ($(RAYLIB_LIBTYPE),SHARED) ifeq ($(RAYLIB_LIBTYPE),SHARED)
@ -657,10 +668,10 @@ TEXT = \
text/text_writing_anim text/text_writing_anim
MODELS = \ MODELS = \
models/models_animation_blend_custom \
models/models_animation_blending \ models/models_animation_blending \
models/models_animation_bone_blending \
models/models_animation_gpu_skinning \ models/models_animation_gpu_skinning \
models/models_animation_playing \ models/models_animation_timing \
models/models_basic_voxel \ models/models_basic_voxel \
models/models_billboard_rendering \ models/models_billboard_rendering \
models/models_bone_socket \ models/models_bone_socket \
@ -673,6 +684,7 @@ MODELS = \
models/models_heightmap_rendering \ models/models_heightmap_rendering \
models/models_loading \ models/models_loading \
models/models_loading_gltf \ models/models_loading_gltf \
models/models_loading_iqm \
models/models_loading_m3d \ models/models_loading_m3d \
models/models_loading_vox \ models/models_loading_vox \
models/models_mesh_generation \ models/models_mesh_generation \

View File

@ -69,7 +69,7 @@ endif
# Define required raylib variables # Define required raylib variables
PROJECT_NAME ?= raylib_examples PROJECT_NAME ?= raylib_examples
RAYLIB_VERSION ?= 5.5.0 RAYLIB_VERSION ?= 6.0.0
RAYLIB_PATH ?= .. RAYLIB_PATH ?= ..
# Define raylib source code path # Define raylib source code path
@ -642,10 +642,10 @@ TEXT = \
text/text_writing_anim text/text_writing_anim
MODELS = \ MODELS = \
models/models_animation_blend_custom \
models/models_animation_blending \ models/models_animation_blending \
models/models_animation_bone_blending \
models/models_animation_gpu_skinning \ models/models_animation_gpu_skinning \
models/models_animation_playing \ models/models_animation_timing \
models/models_basic_voxel \ models/models_basic_voxel \
models/models_billboard_rendering \ models/models_billboard_rendering \
models/models_bone_socket \ models/models_bone_socket \
@ -658,6 +658,7 @@ MODELS = \
models/models_heightmap_rendering \ models/models_heightmap_rendering \
models/models_loading \ models/models_loading \
models/models_loading_gltf \ models/models_loading_gltf \
models/models_loading_iqm \
models/models_loading_m3d \ models/models_loading_m3d \
models/models_loading_vox \ models/models_loading_vox \
models/models_mesh_generation \ models/models_mesh_generation \
@ -1199,15 +1200,15 @@ text/text_writing_anim: text/text_writing_anim.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
# Compile MODELS examples # Compile MODELS examples
models/models_animation_blending: models/models_animation_blending.c models/models_animation_blend_custom: models/models_animation_blend_custom.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \ $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
--preload-file models/resources/models/gltf/robot.glb@resources/models/gltf/robot.glb \ --preload-file models/resources/models/gltf/greenman.glb@resources/models/gltf/greenman.glb \
--preload-file models/resources/shaders/glsl100/skinning.vs@resources/shaders/glsl100/skinning.vs \ --preload-file models/resources/shaders/glsl100/skinning.vs@resources/shaders/glsl100/skinning.vs \
--preload-file models/resources/shaders/glsl100/skinning.fs@resources/shaders/glsl100/skinning.fs --preload-file models/resources/shaders/glsl100/skinning.fs@resources/shaders/glsl100/skinning.fs
models/models_animation_bone_blending: models/models_animation_bone_blending.c models/models_animation_blending: models/models_animation_blending.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \ $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
--preload-file models/resources/models/gltf/greenman.glb@resources/models/gltf/greenman.glb \ --preload-file models/resources/models/gltf/robot.glb@resources/models/gltf/robot.glb \
--preload-file models/resources/shaders/glsl100/skinning.vs@resources/shaders/glsl100/skinning.vs \ --preload-file models/resources/shaders/glsl100/skinning.vs@resources/shaders/glsl100/skinning.vs \
--preload-file models/resources/shaders/glsl100/skinning.fs@resources/shaders/glsl100/skinning.fs --preload-file models/resources/shaders/glsl100/skinning.fs@resources/shaders/glsl100/skinning.fs
@ -1217,11 +1218,9 @@ models/models_animation_gpu_skinning: models/models_animation_gpu_skinning.c
--preload-file models/resources/shaders/glsl100/skinning.vs@resources/shaders/glsl100/skinning.vs \ --preload-file models/resources/shaders/glsl100/skinning.vs@resources/shaders/glsl100/skinning.vs \
--preload-file models/resources/shaders/glsl100/skinning.fs@resources/shaders/glsl100/skinning.fs --preload-file models/resources/shaders/glsl100/skinning.fs@resources/shaders/glsl100/skinning.fs
models/models_animation_playing: models/models_animation_playing.c models/models_animation_timing: models/models_animation_timing.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \ $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
--preload-file models/resources/models/iqm/guy.iqm@resources/models/iqm/guy.iqm \ --preload-file models/resources/models/gltf/robot.glb@resources/models/gltf/robot.glb
--preload-file models/resources/models/iqm/guytex.png@resources/models/iqm/guytex.png \
--preload-file models/resources/models/iqm/guyanim.iqm@resources/models/iqm/guyanim.iqm
models/models_basic_voxel: models/models_basic_voxel.c models/models_basic_voxel: models/models_basic_voxel.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
@ -1276,6 +1275,12 @@ models/models_loading_gltf: models/models_loading_gltf.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \ $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
--preload-file models/resources/models/gltf/robot.glb@resources/models/gltf/robot.glb --preload-file models/resources/models/gltf/robot.glb@resources/models/gltf/robot.glb
models/models_loading_iqm: models/models_loading_iqm.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
--preload-file models/resources/models/iqm/guy.iqm@resources/models/iqm/guy.iqm \
--preload-file models/resources/models/iqm/guytex.png@resources/models/iqm/guytex.png \
--preload-file models/resources/models/iqm/guyanim.iqm@resources/models/iqm/guyanim.iqm
models/models_loading_m3d: models/models_loading_m3d.c models/models_loading_m3d: models/models_loading_m3d.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \ $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
--preload-file models/resources/models/m3d/cesium_man.m3d@resources/models/m3d/cesium_man.m3d --preload-file models/resources/models/m3d/cesium_man.m3d@resources/models/m3d/cesium_man.m3d

View File

@ -17,7 +17,7 @@ You may find it easier to use than other toolchains, especially when it comes to
- `zig build [module]` to compile all examples for a module (e.g. `zig build core`) - `zig build [module]` to compile all examples for a module (e.g. `zig build core`)
- `zig build [example]` to compile _and run_ a particular example (e.g. `zig build core_basic_window`) - `zig build [example]` to compile _and run_ a particular example (e.g. `zig build core_basic_window`)
## EXAMPLES COLLECTION [TOTAL: 207] ## EXAMPLES COLLECTION [TOTAL: 208]
### category: core [49] ### category: core [49]
@ -182,13 +182,13 @@ Examples using raylib text functionality, including sprite fonts loading/generat
| [text_words_alignment](text/text_words_alignment.c) | <img src="text/text_words_alignment.png" alt="text_words_alignment" width="80"> | ⭐☆☆☆ | 5.6-dev | 5.6-dev | [JP Mortiboys](https://github.com/themushroompirates) | | [text_words_alignment](text/text_words_alignment.c) | <img src="text/text_words_alignment.png" alt="text_words_alignment" width="80"> | ⭐☆☆☆ | 5.6-dev | 5.6-dev | [JP Mortiboys](https://github.com/themushroompirates) |
| [text_strings_management](text/text_strings_management.c) | <img src="text/text_strings_management.png" alt="text_strings_management" width="80"> | ⭐⭐⭐☆ | 5.6-dev | 5.6-dev | [David Buzatto](https://github.com/davidbuzatto) | | [text_strings_management](text/text_strings_management.c) | <img src="text/text_strings_management.png" alt="text_strings_management" width="80"> | ⭐⭐⭐☆ | 5.6-dev | 5.6-dev | [David Buzatto](https://github.com/davidbuzatto) |
### category: models [29] ### category: models [30]
Examples using raylib models functionality, including models loading/generation and drawing, provided by raylib [models](../src/rmodels.c) module. Examples using raylib models functionality, including models loading/generation and drawing, provided by raylib [models](../src/rmodels.c) module.
| example | image | difficulty<br>level | version<br>created | last version<br>updated | original<br>developer | | example | image | difficulty<br>level | version<br>created | last version<br>updated | original<br>developer |
|-----------|--------|:-------------------:|:------------------:|:-----------------------:|:----------------------| |-----------|--------|:-------------------:|:------------------:|:-----------------------:|:----------------------|
| [models_animation_playing](models/models_animation_playing.c) | <img src="models/models_animation_playing.png" alt="models_animation_playing" width="80"> | ⭐⭐☆☆ | 2.5 | 3.5 | [Culacant](https://github.com/culacant) | | [models_loading_iqm](models/models_loading_iqm.c) | <img src="models/models_loading_iqm.png" alt="models_loading_iqm" width="80"> | ⭐⭐☆☆ | 2.5 | 3.5 | [Culacant](https://github.com/culacant) |
| [models_billboard_rendering](models/models_billboard_rendering.c) | <img src="models/models_billboard_rendering.png" alt="models_billboard_rendering" width="80"> | ⭐⭐⭐☆ | 1.3 | 3.5 | [Ramon Santamaria](https://github.com/raysan5) | | [models_billboard_rendering](models/models_billboard_rendering.c) | <img src="models/models_billboard_rendering.png" alt="models_billboard_rendering" width="80"> | ⭐⭐⭐☆ | 1.3 | 3.5 | [Ramon Santamaria](https://github.com/raysan5) |
| [models_box_collisions](models/models_box_collisions.c) | <img src="models/models_box_collisions.png" alt="models_box_collisions" width="80"> | ⭐☆☆☆ | 1.3 | 3.5 | [Ramon Santamaria](https://github.com/raysan5) | | [models_box_collisions](models/models_box_collisions.c) | <img src="models/models_box_collisions.png" alt="models_box_collisions" width="80"> | ⭐☆☆☆ | 1.3 | 3.5 | [Ramon Santamaria](https://github.com/raysan5) |
| [models_cubicmap_rendering](models/models_cubicmap_rendering.c) | <img src="models/models_cubicmap_rendering.png" alt="models_cubicmap_rendering" width="80"> | ⭐⭐☆☆ | 1.8 | 3.5 | [Ramon Santamaria](https://github.com/raysan5) | | [models_cubicmap_rendering](models/models_cubicmap_rendering.c) | <img src="models/models_cubicmap_rendering.png" alt="models_cubicmap_rendering" width="80"> | ⭐⭐☆☆ | 1.8 | 3.5 | [Ramon Santamaria](https://github.com/raysan5) |
@ -215,8 +215,9 @@ Examples using raylib models functionality, including models loading/generation
| [models_rotating_cube](models/models_rotating_cube.c) | <img src="models/models_rotating_cube.png" alt="models_rotating_cube" width="80"> | ⭐☆☆☆ | 5.6-dev | 5.6-dev | [Jopestpe](https://github.com/jopestpe) | | [models_rotating_cube](models/models_rotating_cube.c) | <img src="models/models_rotating_cube.png" alt="models_rotating_cube" width="80"> | ⭐☆☆☆ | 5.6-dev | 5.6-dev | [Jopestpe](https://github.com/jopestpe) |
| [models_decals](models/models_decals.c) | <img src="models/models_decals.png" alt="models_decals" width="80"> | ⭐⭐⭐⭐️ | 5.6-dev | 5.6-dev | [JP Mortiboys](https://github.com/themushroompirates) | | [models_decals](models/models_decals.c) | <img src="models/models_decals.png" alt="models_decals" width="80"> | ⭐⭐⭐⭐️ | 5.6-dev | 5.6-dev | [JP Mortiboys](https://github.com/themushroompirates) |
| [models_directional_billboard](models/models_directional_billboard.c) | <img src="models/models_directional_billboard.png" alt="models_directional_billboard" width="80"> | ⭐⭐☆☆ | 5.6-dev | 5.6 | [Robin](https://github.com/RobinsAviary) | | [models_directional_billboard](models/models_directional_billboard.c) | <img src="models/models_directional_billboard.png" alt="models_directional_billboard" width="80"> | ⭐⭐☆☆ | 5.6-dev | 5.6 | [Robin](https://github.com/RobinsAviary) |
| [models_animation_bone_blending](models/models_animation_bone_blending.c) | <img src="models/models_animation_bone_blending.png" alt="models_animation_bone_blending" width="80"> | ⭐⭐⭐⭐️ | 5.5 | 5.5 | [dmitrii-brand](https://github.com/dmitrii-brand) | | [models_animation_blend_custom](models/models_animation_blend_custom.c) | <img src="models/models_animation_blend_custom.png" alt="models_animation_blend_custom" width="80"> | ⭐⭐⭐⭐️ | 5.5 | 5.5 | [dmitrii-brand](https://github.com/dmitrii-brand) |
| [models_animation_blending](models/models_animation_blending.c) | <img src="models/models_animation_blending.png" alt="models_animation_blending" width="80"> | ☆☆☆☆ | 5.5 | 5.6-dev | [Kirandeep](https://github.com/Kirandeep-Singh-Khehra) | | [models_animation_blending](models/models_animation_blending.c) | <img src="models/models_animation_blending.png" alt="models_animation_blending" width="80"> | ☆☆☆☆ | 5.5 | 5.6-dev | [Kirandeep](https://github.com/Kirandeep-Singh-Khehra) |
| [models_animation_timming](models/models_animation_timming.c) | <img src="models/models_animation_timming.png" alt="models_animation_timming" width="80"> | ⭐⭐☆☆ | 5.6 | 5.6 | [Ramon Santamaria](https://github.com/raysan5) |
### category: shaders [34] ### category: shaders [34]

View File

@ -4,53 +4,22 @@
* *
* Example complexity rating: [] 3/4 * Example complexity rating: [] 3/4
* *
* Example originally created with raylib 1.6, last time updated with raylib 4.2 * Example originally created with raylib 1.6, last time updated with raylib 6.0
* *
* Example created by Ramon Santamaria (@raysan5) and reviewed by James Hofmann (@triplefox) * Example created by Ramon Santamaria (@raysan5) and reviewed by James Hofmann (@triplefox)
* *
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified, * Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software * BSD-like license that allows static linking with closed source software
* *
* Copyright (c) 2015-2025 Ramon Santamaria (@raysan5) and James Hofmann (@triplefox) * Copyright (c) 2015-2026 Ramon Santamaria (@raysan5) and James Hofmann (@triplefox)
* *
********************************************************************************************/ ********************************************************************************************/
#include "raylib.h" #include "raylib.h"
#include <math.h>
#include <stdlib.h> // Required for: malloc(), free() #define BUFFER_SIZE 4096
#include <math.h> // Required for: sinf() #define SAMPLE_RATE 44100
#include <string.h> // Required for: memcpy()
#define MAX_SAMPLES 512
#define MAX_SAMPLES_PER_UPDATE 4096
// Cycles per second (hz)
float frequency = 440.0f;
// Audio frequency, for smoothing
float audioFrequency = 440.0f;
// Previous value, used to test if sine needs to be rewritten, and to smoothly modulate frequency
float oldFrequency = 1.0f;
// Index for audio rendering
float sineIdx = 0.0f;
// Audio input processing callback
void AudioInputCallback(void *buffer, unsigned int frames)
{
audioFrequency = frequency + (audioFrequency - frequency)*0.95f;
float incr = audioFrequency/44100.0f;
short *d = (short *)buffer;
for (unsigned int i = 0; i < frames; i++)
{
d[i] = (short)(32000.0f*sinf(2*PI*sineIdx));
sineIdx += incr;
if (sineIdx > 1.0f) sineIdx -= 1.0f;
}
}
//------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------
// Program main entry point // Program main entry point
@ -64,43 +33,24 @@ int main(void)
InitWindow(screenWidth, screenHeight, "raylib [audio] example - raw stream"); InitWindow(screenWidth, screenHeight, "raylib [audio] example - raw stream");
InitAudioDevice(); // Initialize audio device InitAudioDevice();
SetAudioStreamBufferSizeDefault(MAX_SAMPLES_PER_UPDATE); // Set the number of samples the stream will keep in memory at a time to BUFFER_SIZE
SetAudioStreamBufferSizeDefault(BUFFER_SIZE);
float buffer[BUFFER_SIZE] = {};
// Init raw audio stream (sample rate: 44100, sample size: 16bit-short, channels: 1-mono) // Init raw audio stream (sample rate: 44100, sample size: 32bit-float, channels: 1-mono)
AudioStream stream = LoadAudioStream(44100, 16, 1); AudioStream stream = LoadAudioStream(SAMPLE_RATE, 32, 1);
float pan = 0.0f;
SetAudioStreamPan(stream, pan);
PlayAudioStream(stream);
SetAudioStreamCallback(stream, AudioInputCallback); int sineFrequency = 440;
int newSineFrequency = 440;
int sineIndex = 0;
double sineStartTime = 0.0;
// Buffer for the single cycle waveform we are synthesizing SetTargetFPS(30);
short *data = (short *)malloc(sizeof(short)*MAX_SAMPLES);
// Frame buffer, describing the waveform when repeated over the course of a frame
short *writeBuf = (short *)malloc(sizeof(short)*MAX_SAMPLES_PER_UPDATE);
PlayAudioStream(stream); // Start processing stream buffer (no data loaded currently)
// Position read in to determine next frequency
Vector2 mousePosition = { -100.0f, -100.0f };
/*
// Cycles per second (hz)
float frequency = 440.0f;
// Previous value, used to test if sine needs to be rewritten, and to smoothly modulate frequency
float oldFrequency = 1.0f;
// Cursor to read and copy the samples of the sine wave buffer
int readCursor = 0;
*/
// Computed size in samples of the sine wave
int waveLength = 1;
Vector2 position = { 0, 0 };
SetTargetFPS(30); // Set our game to run at 30 frames-per-second
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
// Main game loop // Main game loop
@ -108,91 +58,76 @@ int main(void)
{ {
// Update // Update
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
mousePosition = GetMousePosition();
if (IsMouseButtonDown(MOUSE_BUTTON_LEFT)) if (IsKeyDown(KEY_UP))
{ {
float fp = (float)(mousePosition.y); newSineFrequency += 10;
frequency = 40.0f + (float)(fp); if (newSineFrequency > 12500) newSineFrequency = 12500;
}
float pan = (float)(mousePosition.x)/(float)screenWidth; if (IsKeyDown(KEY_DOWN))
{
newSineFrequency -= 10;
if (newSineFrequency < 20) newSineFrequency = 20;
}
if (IsKeyDown(KEY_LEFT))
{
pan -= 0.01f;
if (pan < -1.0f) pan = -1.0f;
SetAudioStreamPan(stream, pan); SetAudioStreamPan(stream, pan);
} }
// Rewrite the sine wave if (IsKeyDown(KEY_RIGHT))
// Compute two cycles to allow the buffer padding, simplifying any modulation, resampling, etc.
if (frequency != oldFrequency)
{ {
// Compute wavelength. Limit size in both directions pan += 0.01f;
//int oldWavelength = waveLength; if (pan > 1.0f) pan = 1.0f;
waveLength = (int)(22050/frequency); SetAudioStreamPan(stream, pan);
if (waveLength > MAX_SAMPLES/2) waveLength = MAX_SAMPLES/2;
if (waveLength < 1) waveLength = 1;
// Write sine wave
for (int i = 0; i < waveLength*2; i++)
{
data[i] = (short)(sinf(((2*PI*(float)i/waveLength)))*32000);
}
// Make sure the rest of the line is flat
for (int j = waveLength*2; j < MAX_SAMPLES; j++)
{
data[j] = (short)0;
} }
// Scale read cursor's position to minimize transition artifacts
//readCursor = (int)(readCursor*((float)waveLength/(float)oldWavelength));
oldFrequency = frequency;
}
/*
// Refill audio stream if required
if (IsAudioStreamProcessed(stream)) if (IsAudioStreamProcessed(stream))
{ {
// Synthesize a buffer that is exactly the requested size for (int i = 0; i < BUFFER_SIZE; i++)
int writeCursor = 0;
while (writeCursor < MAX_SAMPLES_PER_UPDATE)
{ {
// Start by trying to write the whole chunk at once int wavelength = SAMPLE_RATE/sineFrequency;
int writeLength = MAX_SAMPLES_PER_UPDATE-writeCursor; buffer[i] = sin(2*PI*sineIndex/wavelength);
sineIndex++;
// Limit to the maximum readable size if (sineIndex >= wavelength)
int readLength = waveLength-readCursor; {
sineFrequency = newSineFrequency;
if (writeLength > readLength) writeLength = readLength; sineIndex = 0;
sineStartTime = GetTime();
// Write the slice }
memcpy(writeBuf + writeCursor, data + readCursor, writeLength*sizeof(short));
// Update cursors and loop audio
readCursor = (readCursor + writeLength)%waveLength;
writeCursor += writeLength;
} }
// Copy finished frame to audio stream UpdateAudioStream(stream, buffer, BUFFER_SIZE);
UpdateAudioStream(stream, writeBuf, MAX_SAMPLES_PER_UPDATE);
} }
*/
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
// Draw // Draw
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
BeginDrawing(); BeginDrawing();
ClearBackground(RAYWHITE); ClearBackground(RAYWHITE);
DrawText(TextFormat("sine frequency: %i",(int)frequency), GetScreenWidth() - 220, 10, 20, RED); DrawText(TextFormat("sine frequency: %i", sineFrequency), screenWidth - 220, 10, 20, RED);
DrawText("click mouse button to change frequency or pan", 10, 10, 20, DARKGRAY); DrawText(TextFormat("pan: %.2f", pan), screenWidth - 220, 30, 20, RED);
DrawText("Up/down to change frequency", 10, 10, 20, DARKGRAY);
DrawText("Left/right to pan", 10, 30, 20, DARKGRAY);
// Draw the current buffer state proportionate to the screen int windowStart = (GetTime() - sineStartTime)*SAMPLE_RATE;
int windowSize = 0.1f*SAMPLE_RATE;
int wavelength = SAMPLE_RATE/sineFrequency;
// Draw a sine wave with the same frequency as the one being sent to the audio stream
for (int i = 0; i < screenWidth; i++) for (int i = 0; i < screenWidth; i++)
{ {
position.x = (float)i; int t0 = windowStart + i*windowSize/screenWidth;
position.y = 250 + 50*data[i*MAX_SAMPLES/screenWidth]/32000.0f; int t1 = windowStart + (i + 1)*windowSize/screenWidth;
Vector2 startPos = { i, 250 + 50*sin(2*PI*t0/wavelength) };
DrawPixelV(position, RED); Vector2 endPos = { i + 1, 250 + 50*sin(2*PI*t1/wavelength) };
DrawLineV(startPos, endPos, RED);
} }
EndDrawing(); EndDrawing();
@ -201,9 +136,6 @@ int main(void)
// De-Initialization // De-Initialization
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
free(data); // Unload sine wave data
free(writeBuf); // Unload write buffer
UnloadAudioStream(stream); // Close raw audio stream and delete buffers from RAM UnloadAudioStream(stream); // Close raw audio stream and delete buffers from RAM
CloseAudioDevice(); // Close audio device (music streaming is automatically stopped) CloseAudioDevice(); // Close audio device (music streaming is automatically stopped)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -115,7 +115,7 @@ int main(void)
.tapbackPos = 0.01f .tapbackPos = 0.01f
}; };
int wavCursor = 0; unsigned int wavCursor = 0;
const short *wavPCM16 = wav.data; const short *wavPCM16 = wav.data;
short chunkSamples[AUDIO_STREAM_RING_BUFFER_SIZE] = { 0 }; short chunkSamples[AUDIO_STREAM_RING_BUFFER_SIZE] = { 0 };
@ -274,8 +274,8 @@ static void CaptureFrame(FFTData *fftData, const float *audioSamples)
static void RenderFrame(const FFTData *fftData, Image *fftImage) static void RenderFrame(const FFTData *fftData, Image *fftImage)
{ {
double framesSinceTapback = floor(fftData->tapbackPos/WINDOW_TIME); float framesSinceTapback = floorf((float)(fftData->tapbackPos/WINDOW_TIME));
framesSinceTapback = Clamp(framesSinceTapback, 0.0, fftData->fftHistoryLen - 1); framesSinceTapback = Clamp(framesSinceTapback, 0.0f, (float)(fftData->fftHistoryLen - 1));
int historyPosition = (fftData->historyPos - 1 - (int)framesSinceTapback)%fftData->fftHistoryLen; int historyPosition = (fftData->historyPos - 1 - (int)framesSinceTapback)%fftData->fftHistoryLen;
if (historyPosition < 0) historyPosition += fftData->fftHistoryLen; if (historyPosition < 0) historyPosition += fftData->fftHistoryLen;

View File

@ -0,0 +1,236 @@
/*******************************************************************************************
*
* raylib [audio] example - stream callback
*
* Example complexity rating: [] 3/4
*
* Example originally created with raylib 6.0, last time updated with raylib 6.0
*
* Example created by Dan Hoang (@dan-hoang) and reviewed by
*
* 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) 2015-2026
*
********************************************************************************************/
#include "raylib.h"
#include <stdlib.h>
#include <math.h>
#define BUFFER_SIZE 4096
#define SAMPLE_RATE 44100
// This example sends a wave to the audio device
// The user gets the choice of four waves: sine, square, triangle, and sawtooth
// A stream is set up to play to the audio device
// The stream is hooked to a callback that generates a wave
// The callback used is determined by user choice
typedef enum
{
SINE,
SQUARE,
TRIANGLE,
SAWTOOTH
} WaveType;
int waveFrequency = 440;
int newWaveFrequency = 440;
int waveIndex = 0;
// Buffer for keeping the last second of uploaded audio, part of which will be drawn on the screen
float buffer[SAMPLE_RATE] = {};
void SineCallback(void *framesOut, unsigned int frameCount)
{
int wavelength = SAMPLE_RATE/waveFrequency;
// Synthesize the sine wave
for (int i = 0; i < frameCount; i++)
{
((float *)framesOut)[i] = sin(2*PI*waveIndex/wavelength);
waveIndex++;
if (waveIndex >= wavelength)
{
waveFrequency = newWaveFrequency;
waveIndex = 0;
}
}
// Save the synthesized samples for later drawing
for (int i = 0; i < SAMPLE_RATE - frameCount; i++) buffer[i] = buffer[i + frameCount];
for (int i = 0; i < frameCount; i++) buffer[SAMPLE_RATE - frameCount + i] = ((float *)framesOut)[i];
}
void SquareCallback(void *framesOut, unsigned int frameCount)
{
int wavelength = SAMPLE_RATE/waveFrequency;
// Synthesize the square wave
for (int i = 0; i < frameCount; i++)
{
((float *)framesOut)[i] = (waveIndex < wavelength/2)? 1 : -1;
waveIndex++;
if (waveIndex >= wavelength)
{
waveFrequency = newWaveFrequency;
waveIndex = 0;
}
}
// Save the synthesized samples for later drawing
for (int i = 0; i < SAMPLE_RATE - frameCount; i++) buffer[i] = buffer[i + frameCount];
for (int i = 0; i < frameCount; i++) buffer[SAMPLE_RATE - frameCount + i] = ((float *)framesOut)[i];
}
void TriangleCallback(void *framesOut, unsigned int frameCount)
{
int wavelength = SAMPLE_RATE/waveFrequency;
// Synthesize the triangle wave
for (int i = 0; i < frameCount; i++)
{
((float *)framesOut)[i] = (waveIndex < wavelength/2)? (-1 + 2.0f*waveIndex/(wavelength/2)) : (1 - 2.0f*(waveIndex - wavelength/2)/(wavelength/2));
waveIndex++;
if (waveIndex >= wavelength)
{
waveFrequency = newWaveFrequency;
waveIndex = 0;
}
}
// Save the synthesized samples for later drawing
for (int i = 0; i < SAMPLE_RATE - frameCount; i++) buffer[i] = buffer[i + frameCount];
for (int i = 0; i < frameCount; i++) buffer[SAMPLE_RATE - frameCount + i] = ((float *)framesOut)[i];
}
void SawtoothCallback(void *framesOut, unsigned int frameCount)
{
int wavelength = SAMPLE_RATE/waveFrequency;
// Synthesize the sawtooth wave
for (int i = 0; i < frameCount; i++)
{
((float *)framesOut)[i] = -1 + 2.0f*waveIndex/wavelength;
waveIndex++;
if (waveIndex >= wavelength)
{
waveFrequency = newWaveFrequency;
waveIndex = 0;
}
}
// Save the synthesized samples for later drawing
for (int i = 0; i < SAMPLE_RATE - frameCount; i++) buffer[i] = buffer[i + frameCount];
for (int i = 0; i < frameCount; i++) buffer[SAMPLE_RATE - frameCount + i] = ((float *)framesOut)[i];
}
AudioCallback waveCallbacks[] = { SineCallback, SquareCallback, TriangleCallback, SawtoothCallback };
char *waveTypesAsString[] = { "sine", "square", "triangle", "sawtooth" };
//------------------------------------------------------------------------------------
// Program main entry point
//------------------------------------------------------------------------------------
int main(void)
{
// Initialization
//--------------------------------------------------------------------------------------
const int screenWidth = 800;
const int screenHeight = 450;
InitWindow(screenWidth, screenHeight, "raylib [audio] example - stream callback");
InitAudioDevice();
// Set the number of samples the stream will keep in memory at a time to BUFFER_SIZE
SetAudioStreamBufferSizeDefault(BUFFER_SIZE);
// Init raw audio stream (sample rate: 44100, sample size: 32bit-float, channels: 1-mono)
AudioStream stream = LoadAudioStream(SAMPLE_RATE, 32, 1);
PlayAudioStream(stream);
// Configure it so that waveCallbacks[waveType] is called whenever stream is out of samples
WaveType waveType = SINE;
SetAudioStreamCallback(stream, waveCallbacks[waveType]);
SetTargetFPS(30);
//--------------------------------------------------------------------------------------
// Main game loop
while (!WindowShouldClose()) // Detect window close button or ESC key
{
// Update
//----------------------------------------------------------------------------------
if (IsKeyDown(KEY_UP))
{
newWaveFrequency += 10;
if (newWaveFrequency > 12500) newWaveFrequency = 12500;
}
if (IsKeyDown(KEY_DOWN))
{
newWaveFrequency -= 10;
if (newWaveFrequency < 20) newWaveFrequency = 20;
}
if (IsKeyPressed(KEY_LEFT))
{
if (waveType == SINE) waveType = SAWTOOTH;
else if (waveType == SQUARE) waveType = SINE;
else if (waveType == TRIANGLE) waveType = SQUARE;
else waveType = TRIANGLE;
SetAudioStreamCallback(stream, waveCallbacks[waveType]);
}
if (IsKeyPressed(KEY_RIGHT))
{
if (waveType == SINE) waveType = SQUARE;
else if (waveType == SQUARE) waveType = TRIANGLE;
else if (waveType == TRIANGLE) waveType = SAWTOOTH;
else waveType = SINE;
SetAudioStreamCallback(stream, waveCallbacks[waveType]);
}
//----------------------------------------------------------------------------------
// Draw
//----------------------------------------------------------------------------------
BeginDrawing();
ClearBackground(RAYWHITE);
DrawText(TextFormat("frequency: %i", newWaveFrequency), screenWidth - 220, 10, 20, RED);
DrawText(TextFormat("wave type: %s", waveTypesAsString[waveType]), screenWidth - 220, 30, 20, RED);
DrawText("Up/down to change frequency", 10, 10, 20, DARKGRAY);
DrawText("Left/right to change wave type", 10, 30, 20, DARKGRAY);
// Draw the last 10 ms of uploaded audio
for (int i = 0; i < screenWidth; i++)
{
Vector2 startPos = { i, 250 - 50*buffer[SAMPLE_RATE - SAMPLE_RATE/100 + i*SAMPLE_RATE/100/screenWidth] };
Vector2 endPos = { i + 1, 250 - 50*buffer[SAMPLE_RATE - SAMPLE_RATE/100 + (i + 1)*SAMPLE_RATE/100/screenWidth] };
DrawLineV(startPos, endPos, RED);
}
EndDrawing();
//----------------------------------------------------------------------------------
}
// De-Initialization
//--------------------------------------------------------------------------------------
UnloadAudioStream(stream); // Close raw audio stream and delete buffers from RAM
CloseAudioDevice(); // Close audio device (music streaming is automatically stopped)
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -60,7 +60,7 @@ int main(void)
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
if (btnComputeHashes) if (btnComputeHashes)
{ {
int textInputLen = strlen(textInput); int textInputLen = (int)strlen(textInput);
// Encode data to Base64 string (includes NULL terminator), memory must be MemFree() // Encode data to Base64 string (includes NULL terminator), memory must be MemFree()
base64Text = EncodeDataBase64((unsigned char *)textInput, textInputLen, &base64TextSize); base64Text = EncodeDataBase64((unsigned char *)textInput, textInputLen, &base64TextSize);

View File

@ -78,7 +78,7 @@ int main(void)
GuiSetStyle(LISTVIEW, TEXT_ALIGNMENT, TEXT_ALIGN_LEFT); GuiSetStyle(LISTVIEW, TEXT_ALIGNMENT, TEXT_ALIGN_LEFT);
GuiSetStyle(LISTVIEW, TEXT_PADDING, 40); GuiSetStyle(LISTVIEW, TEXT_PADDING, 40);
GuiListViewEx((Rectangle){ 0, 50, GetScreenWidth(), GetScreenHeight() - 50 }, GuiListViewEx((Rectangle){ 0, 50, (float)GetScreenWidth(), (float)GetScreenHeight() - 50 },
files.paths, files.count, &listScrollIndex, &listItemActive, &listItemFocused); files.paths, files.count, &listScrollIndex, &listItemActive, &listItemFocused);
EndDrawing(); EndDrawing();

View File

@ -86,10 +86,10 @@ int main(void)
// Draw mouse position // Draw mouse position
DrawCircleV(GetMousePosition(), 20, MAROON); DrawCircleV(GetMousePosition(), 20, MAROON);
DrawRectangle(mousePos.x - 25, mousePos.y, 50, 2, BLACK); DrawRectangleRec((Rectangle) { mousePos.x - 25, mousePos.y, 50, 2 }, BLACK);
DrawRectangle(mousePos.x, mousePos.y - 25, 2, 50, BLACK); DrawRectangleRec((Rectangle) { mousePos.x, mousePos.y - 25, 2, 50 }, BLACK);
DrawText(TextFormat("[%i,%i]", GetMouseX(), GetMouseY()), mousePos.x - 44, DrawText(TextFormat("[%i,%i]", GetMouseX(), GetMouseY()), mousePos.x - 44,
(mousePos.y > GetScreenHeight() - 60)? mousePos.y - 46 : mousePos.y + 30, 20, BLACK); (mousePos.y > GetScreenHeight() - 60)? (int)mousePos.y - 46 : (int)mousePos.y + 30, 20, BLACK);
EndDrawing(); EndDrawing();
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------

View File

@ -133,7 +133,7 @@ int main(void)
// ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, IMP, CLOSE // ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, IMP, CLOSE
for (int i = 0, recOffsetX = 0; i < 15; i++) for (int i = 0, recOffsetX = 0; i < 15; i++)
{ {
GuiKeyboardKey((Rectangle){ keyboardOffset.x + recOffsetX, keyboardOffset.y, line01KeyWidths[i], 30 }, line01Keys[i]); GuiKeyboardKey((Rectangle){ keyboardOffset.x + recOffsetX, keyboardOffset.y, (float)line01KeyWidths[i], 30.0f }, line01Keys[i]);
recOffsetX += line01KeyWidths[i] + KEY_REC_SPACING; recOffsetX += line01KeyWidths[i] + KEY_REC_SPACING;
} }
@ -141,7 +141,7 @@ int main(void)
// `, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, BACKSPACE, DEL // `, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, BACKSPACE, DEL
for (int i = 0, recOffsetX = 0; i < 15; i++) for (int i = 0, recOffsetX = 0; i < 15; i++)
{ {
GuiKeyboardKey((Rectangle){ keyboardOffset.x + recOffsetX, keyboardOffset.y + 30 + KEY_REC_SPACING, line02KeyWidths[i], 38 }, line02Keys[i]); GuiKeyboardKey((Rectangle){ keyboardOffset.x + recOffsetX, keyboardOffset.y + 30 + KEY_REC_SPACING, (float)line02KeyWidths[i], 38.0f }, line02Keys[i]);
recOffsetX += line02KeyWidths[i] + KEY_REC_SPACING; recOffsetX += line02KeyWidths[i] + KEY_REC_SPACING;
} }
@ -149,7 +149,7 @@ int main(void)
// TAB, Q, W, E, R, T, Y, U, I, O, P, [, ], \, INS // TAB, Q, W, E, R, T, Y, U, I, O, P, [, ], \, INS
for (int i = 0, recOffsetX = 0; i < 15; i++) for (int i = 0, recOffsetX = 0; i < 15; i++)
{ {
GuiKeyboardKey((Rectangle){ keyboardOffset.x + recOffsetX, keyboardOffset.y + 30 + 38 + KEY_REC_SPACING*2, line03KeyWidths[i], 38 }, line03Keys[i]); GuiKeyboardKey((Rectangle){ keyboardOffset.x + recOffsetX, keyboardOffset.y + 30 + 38 + KEY_REC_SPACING*2, (float)line03KeyWidths[i], 38.0f }, line03Keys[i]);
recOffsetX += line03KeyWidths[i] + KEY_REC_SPACING; recOffsetX += line03KeyWidths[i] + KEY_REC_SPACING;
} }
@ -157,7 +157,7 @@ int main(void)
// MAYUS, A, S, D, F, G, H, J, K, L, ;, ', ENTER, REPAG // MAYUS, A, S, D, F, G, H, J, K, L, ;, ', ENTER, REPAG
for (int i = 0, recOffsetX = 0; i < 14; i++) for (int i = 0, recOffsetX = 0; i < 14; i++)
{ {
GuiKeyboardKey((Rectangle){ keyboardOffset.x + recOffsetX, keyboardOffset.y + 30 + 38*2 + KEY_REC_SPACING*3, line04KeyWidths[i], 38 }, line04Keys[i]); GuiKeyboardKey((Rectangle){ keyboardOffset.x + recOffsetX, keyboardOffset.y + 30 + 38*2 + KEY_REC_SPACING*3, (float)line04KeyWidths[i], 38.0f }, line04Keys[i]);
recOffsetX += line04KeyWidths[i] + KEY_REC_SPACING; recOffsetX += line04KeyWidths[i] + KEY_REC_SPACING;
} }
@ -165,7 +165,7 @@ int main(void)
// LSHIFT, Z, X, C, V, B, N, M, ,, ., /, RSHIFT, UP, AVPAG // LSHIFT, Z, X, C, V, B, N, M, ,, ., /, RSHIFT, UP, AVPAG
for (int i = 0, recOffsetX = 0; i < 14; i++) for (int i = 0, recOffsetX = 0; i < 14; i++)
{ {
GuiKeyboardKey((Rectangle){ keyboardOffset.x + recOffsetX, keyboardOffset.y + 30 + 38*3 + KEY_REC_SPACING*4, line05KeyWidths[i], 38 }, line05Keys[i]); GuiKeyboardKey((Rectangle){ keyboardOffset.x + recOffsetX, keyboardOffset.y + 30 + 38*3 + KEY_REC_SPACING*4, (float)line05KeyWidths[i], 38.0f }, line05Keys[i]);
recOffsetX += line05KeyWidths[i] + KEY_REC_SPACING; recOffsetX += line05KeyWidths[i] + KEY_REC_SPACING;
} }
@ -173,7 +173,7 @@ int main(void)
// LCTRL, WIN, LALT, SPACE, ALTGR, \, FN, RCTRL, LEFT, DOWN, RIGHT // LCTRL, WIN, LALT, SPACE, ALTGR, \, FN, RCTRL, LEFT, DOWN, RIGHT
for (int i = 0, recOffsetX = 0; i < 11; i++) for (int i = 0, recOffsetX = 0; i < 11; i++)
{ {
GuiKeyboardKey((Rectangle){ keyboardOffset.x + recOffsetX, keyboardOffset.y + 30 + 38*4 + KEY_REC_SPACING*5, line06KeyWidths[i], 38 }, line06Keys[i]); GuiKeyboardKey((Rectangle){ keyboardOffset.x + recOffsetX, keyboardOffset.y + 30 + 38*4 + KEY_REC_SPACING*5, (float)line06KeyWidths[i], 38.0f }, line06Keys[i]);
recOffsetX += line06KeyWidths[i] + KEY_REC_SPACING; recOffsetX += line06KeyWidths[i] + KEY_REC_SPACING;
} }
@ -316,12 +316,12 @@ static void GuiKeyboardKey(Rectangle bounds, int key)
if (IsKeyDown(key)) if (IsKeyDown(key))
{ {
DrawRectangleLinesEx(bounds, 2.0f, MAROON); DrawRectangleLinesEx(bounds, 2.0f, MAROON);
DrawText(GetKeyText(key), bounds.x + 4, bounds.y + 4, 10, MAROON); DrawText(GetKeyText(key), (int)(bounds.x + 4), (int)(bounds.y + 4), 10, MAROON);
} }
else else
{ {
DrawRectangleLinesEx(bounds, 2.0f, DARKGRAY); DrawRectangleLinesEx(bounds, 2.0f, DARKGRAY);
DrawText(GetKeyText(key), bounds.x + 4, bounds.y + 4, 10, DARKGRAY); DrawText(GetKeyText(key), (int)(bounds.x + 4), (int)(bounds.y + 4), 10, DARKGRAY);
} }
} }

View File

@ -177,10 +177,10 @@ int main(void)
DrawRectangleRec(increaseTypeButton, SKYBLUE); DrawRectangleRec(increaseTypeButton, SKYBLUE);
DrawRectangleRec(decreaseResolutionButton, SKYBLUE); DrawRectangleRec(decreaseResolutionButton, SKYBLUE);
DrawRectangleRec(increaseResolutionButton, SKYBLUE); DrawRectangleRec(increaseResolutionButton, SKYBLUE);
DrawText("<", decreaseTypeButton.x + 3, decreaseTypeButton.y + 1, 10, BLACK); DrawText("<", (int)decreaseTypeButton.x + 3, (int)decreaseTypeButton.y + 1, 10, BLACK);
DrawText(">", increaseTypeButton.x + 3, increaseTypeButton.y + 1, 10, BLACK); DrawText(">", (int)increaseTypeButton.x + 3, (int)increaseTypeButton.y + 1, 10, BLACK);
DrawText("<", decreaseResolutionButton.x + 3, decreaseResolutionButton.y + 1, 10, BLACK); DrawText("<", (int)decreaseResolutionButton.x + 3, (int)decreaseResolutionButton.y + 1, 10, BLACK);
DrawText(">", increaseResolutionButton.x + 3, increaseResolutionButton.y + 1, 10, BLACK); DrawText(">", (int)increaseResolutionButton.x + 3, (int)increaseResolutionButton.y + 1, 10, BLACK);
EndDrawing(); EndDrawing();
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
@ -308,7 +308,7 @@ static void ResizeRenderSize(ViewportType viewportType, int *screenWidth, int *s
} }
UnloadRenderTexture(*target); UnloadRenderTexture(*target);
*target = LoadRenderTexture(sourceRect->width, -sourceRect->height); *target = LoadRenderTexture((int)sourceRect->width, -(int)sourceRect->height);
} }
// Example how to calculate position on RenderTexture // Example how to calculate position on RenderTexture

View File

@ -646,6 +646,7 @@ typedef enum {
// ProgressBar // ProgressBar
typedef enum { typedef enum {
PROGRESS_PADDING = 16, // ProgressBar internal padding PROGRESS_PADDING = 16, // ProgressBar internal padding
PROGRESS_SIDE, // ProgressBar increment side: 0-left->right, 1-right-left
} GuiProgressBarProperty; } GuiProgressBarProperty;
// ScrollBar // ScrollBar
@ -3522,8 +3523,16 @@ int GuiProgressBar(Rectangle bounds, const char *textLeft, const char *textRight
} }
// Draw slider internal progress bar (depends on state) // Draw slider internal progress bar (depends on state)
if (GuiGetStyle(PROGRESSBAR, PROGRESS_SIDE) == 0) // Left-->Right
{
GuiDrawRectangle(progress, 0, BLANK, GetColor(GuiGetStyle(PROGRESSBAR, BASE_COLOR_PRESSED))); GuiDrawRectangle(progress, 0, BLANK, GetColor(GuiGetStyle(PROGRESSBAR, BASE_COLOR_PRESSED)));
} }
else // Right-->Left
{
progress.x = bounds.x + bounds.width - progress.width - GuiGetStyle(PROGRESSBAR, BORDER_WIDTH);
GuiDrawRectangle(progress, 0, BLANK, GetColor(GuiGetStyle(PROGRESSBAR, BASE_COLOR_PRESSED)));
}
}
// Draw left/right text if provided // Draw left/right text if provided
if (textLeft != NULL) if (textLeft != NULL)
@ -5119,11 +5128,11 @@ static const char *GetTextIcon(const char *text, int *iconId)
// Get text divided into lines (by line-breaks '\n') // Get text divided into lines (by line-breaks '\n')
// WARNING: It returns pointers to new lines but it does not add NULL ('\0') terminator! // WARNING: It returns pointers to new lines but it does not add NULL ('\0') terminator!
static char **GetTextLines(const char *text, int *count) static const char **GetTextLines(const char *text, int *count)
{ {
#define RAYGUI_MAX_TEXT_LINES 128 #define RAYGUI_MAX_TEXT_LINES 128
static char *lines[RAYGUI_MAX_TEXT_LINES] = { 0 }; static const char *lines[RAYGUI_MAX_TEXT_LINES] = { 0 };
for (int i = 0; i < RAYGUI_MAX_TEXT_LINES; i++) lines[i] = NULL; // Init NULL pointers to substrings for (int i = 0; i < RAYGUI_MAX_TEXT_LINES; i++) lines[i] = NULL; // Init NULL pointers to substrings
int textLength = (int)strlen(text); int textLength = (int)strlen(text);
@ -5193,7 +5202,7 @@ static void GuiDrawText(const char *text, Rectangle textBounds, int alignment, C
// WARNING: GuiTextSplit() function can't be used now because it can have already been used // WARNING: GuiTextSplit() function can't be used now because it can have already been used
// before the GuiDrawText() call and its buffer is static, it would be overriden :( // before the GuiDrawText() call and its buffer is static, it would be overriden :(
int lineCount = 0; int lineCount = 0;
char **lines = GetTextLines(text, &lineCount); const char **lines = GetTextLines(text, &lineCount);
// Text style variables // Text style variables
//int alignment = GuiGetStyle(DEFAULT, TEXT_ALIGNMENT); //int alignment = GuiGetStyle(DEFAULT, TEXT_ALIGNMENT);

View File

@ -144,7 +144,7 @@ text;text_codepoints_loading;★★★☆;4.2;4.2;2022;2025;"Ramon Santamaria";@
text;text_inline_styling;★★★☆;5.6-dev;5.6-dev;2025;2025;"Wagner Barongello";@SultansOfCode text;text_inline_styling;★★★☆;5.6-dev;5.6-dev;2025;2025;"Wagner Barongello";@SultansOfCode
text;text_words_alignment;★☆☆☆;5.6-dev;5.6-dev;2025;2025;"JP Mortiboys";@themushroompirates text;text_words_alignment;★☆☆☆;5.6-dev;5.6-dev;2025;2025;"JP Mortiboys";@themushroompirates
text;text_strings_management;★★★☆;5.6-dev;5.6-dev;2025;2025;"David Buzatto";@davidbuzatto text;text_strings_management;★★★☆;5.6-dev;5.6-dev;2025;2025;"David Buzatto";@davidbuzatto
models;models_animation_playing;★★☆☆;2.5;3.5;2019;2025;"Culacant";@culacant models;models_loading_iqm;★★☆☆;2.5;3.5;2019;2025;"Culacant";@culacant
models;models_billboard_rendering;★★★☆;1.3;3.5;2015;2025;"Ramon Santamaria";@raysan5 models;models_billboard_rendering;★★★☆;1.3;3.5;2015;2025;"Ramon Santamaria";@raysan5
models;models_box_collisions;★☆☆☆;1.3;3.5;2015;2025;"Ramon Santamaria";@raysan5 models;models_box_collisions;★☆☆☆;1.3;3.5;2015;2025;"Ramon Santamaria";@raysan5
models;models_cubicmap_rendering;★★☆☆;1.8;3.5;2015;2025;"Ramon Santamaria";@raysan5 models;models_cubicmap_rendering;★★☆☆;1.8;3.5;2015;2025;"Ramon Santamaria";@raysan5
@ -171,8 +171,9 @@ models;models_basic_voxel;★★☆☆;5.5;5.5;2025;2025;"Tim Little";@timlittle
models;models_rotating_cube;★☆☆☆;5.6-dev;5.6-dev;2025;2025;"Jopestpe";@jopestpe models;models_rotating_cube;★☆☆☆;5.6-dev;5.6-dev;2025;2025;"Jopestpe";@jopestpe
models;models_decals;★★★★;5.6-dev;5.6-dev;2025;2025;"JP Mortiboys";@themushroompirates models;models_decals;★★★★;5.6-dev;5.6-dev;2025;2025;"JP Mortiboys";@themushroompirates
models;models_directional_billboard;★★☆☆;5.6-dev;5.6;2025;2025;"Robin";@RobinsAviary models;models_directional_billboard;★★☆☆;5.6-dev;5.6;2025;2025;"Robin";@RobinsAviary
models;models_animation_bone_blending;★★★★;5.5;5.5;2026;2026;"dmitrii-brand";@dmitrii-brand models;models_animation_blend_custom;★★★★;5.5;5.5;2026;2026;"dmitrii-brand";@dmitrii-brand
models;models_animation_blending;☆☆☆☆;5.5;5.6-dev;2024;2024;"Kirandeep";@Kirandeep-Singh-Khehra models;models_animation_blending;☆☆☆☆;5.5;5.6-dev;2024;2024;"Kirandeep";@Kirandeep-Singh-Khehra
models;models_animation_timing;★★☆☆;5.6;5.6;2026;2026;"Ramon Santamaria";@raysan5
shaders;shaders_ascii_rendering;★★☆☆;5.5;5.6;2025;2025;"Maicon Santana";@maiconpintoabreu shaders;shaders_ascii_rendering;★★☆☆;5.5;5.6;2025;2025;"Maicon Santana";@maiconpintoabreu
shaders;shaders_basic_lighting;★★★★;3.0;4.2;2019;2025;"Chris Camacho";@chriscamacho shaders;shaders_basic_lighting;★★★★;3.0;4.2;2019;2025;"Chris Camacho";@chriscamacho
shaders;shaders_model_shader;★★☆☆;1.3;3.7;2014;2025;"Ramon Santamaria";@raysan5 shaders;shaders_model_shader;★★☆☆;1.3;3.7;2014;2025;"Ramon Santamaria";@raysan5

View File

@ -0,0 +1,331 @@
/*******************************************************************************************
*
* raylib [models] example - animation blend custom
*
* Example complexity rating: [] 4/4
*
* Example originally created with raylib 5.5, last time updated with raylib 5.5
*
* Example contributed by dmitrii-brand (@dmitrii-brand) and reviewed by Ramon Santamaria (@raysan5)
*
* DETAILS: Example demonstrates per-bone animation blending, allowing smooth transitions
* between two animations by interpolating bone transforms. This is useful for:
* - Blending movement animations (walk/run) with action animations (jump/attack)
* - Creating smooth animation transitions
* - Layering animations (e.g., upper body attack while lower body walks)
*
* WARNING: GPU skinning must be enabled in raylib with a compilation flag,
* if not enabled, CPU skinning will be used instead
*
* 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 dmitrii-brand (@dmitrii-brand)
*
********************************************************************************************/
#include "raylib.h"
#include "raymath.h"
#include "rlgl.h" // Requried for: rlUpdateVertexBuffer() (CPU-skinning)
#include <string.h> // Required for: memcpy()
#include <stdlib.h> // Required for: NULL
#if defined(PLATFORM_DESKTOP)
#define GLSL_VERSION 330
#else // PLATFORM_ANDROID, PLATFORM_WEB
#define GLSL_VERSION 100
#endif
//------------------------------------------------------------------------------------
// Module Functions Declaration
//------------------------------------------------------------------------------------
static bool IsUpperBodyBone(const char *boneName);
static void UpdateModelAnimationBones(Model *model, ModelAnimation *anim1, int frame1,
ModelAnimation *anim2, int frame2, float blend, bool upperBodyBlend);
//------------------------------------------------------------------------------------
// Program main entry point
//------------------------------------------------------------------------------------
int main(void)
{
// Initialization
//--------------------------------------------------------------------------------------
const int screenWidth = 800;
const int screenHeight = 450;
InitWindow(screenWidth, screenHeight, "raylib [models] example - animation blend custom");
// Define the camera to look into our 3d world
Camera camera = { 0 };
camera.position = (Vector3){ 4.0f, 4.0f, 4.0f }; // Camera position
camera.target = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera looking at point
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target)
camera.fovy = 45.0f; // Camera field-of-view Y
camera.projection = CAMERA_PERSPECTIVE; // Camera projection type
// Load gltf model
Model model = LoadModel("resources/models/gltf/greenman.glb");
Vector3 position = { 0.0f, 0.0f, 0.0f }; // Set model position
// Load skinning shader
// WARNING: GPU skinning must be enabled in raylib with a compilation flag,
// if not enabled, CPU skinning will be used instead
Shader skinningShader = LoadShader(TextFormat("resources/shaders/glsl%i/skinning.vs", GLSL_VERSION),
TextFormat("resources/shaders/glsl%i/skinning.fs", GLSL_VERSION));
model.materials[1].shader = skinningShader;
// Load gltf model animations
int animCount = 0;
ModelAnimation *anims = LoadModelAnimations("resources/models/gltf/greenman.glb", &animCount);
// Use specific animation indices: 2-walk/move, 3-attack
int animIndex0 = 2; // Walk/Move animation (index 2)
int animIndex1 = 3; // Attack animation (index 3)
int animCurrentFrame0 = 0;
int animCurrentFrame1 = 0;
// Validate indices
if (animIndex0 >= animCount) animIndex0 = 0;
if (animIndex1 >= animCount) animIndex1 = (animCount > 1) ? 1 : 0;
bool upperBodyBlend = true; // Toggle: true = upper/lower body blending, false = uniform blending (50/50)
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
//--------------------------------------------------------------------------------------
// Main game loop
while (!WindowShouldClose()) // Detect window close button or ESC key
{
// Update
//----------------------------------------------------------------------------------
UpdateCamera(&camera, CAMERA_ORBITAL);
// Toggle upper/lower body blending mode (SPACE key)
if (IsKeyPressed(KEY_SPACE)) upperBodyBlend = !upperBodyBlend;
// Update animation frames
ModelAnimation anim0 = anims[animIndex0];
ModelAnimation anim1 = anims[animIndex1];
animCurrentFrame0 = (animCurrentFrame0 + 1)%anim0.keyframeCount;
animCurrentFrame1 = (animCurrentFrame1 + 1)%anim1.keyframeCount;
// Blend the two animations
// When upperBodyBlend is ON: upper body = attack (1.0), lower body = walk (0.0)
// When upperBodyBlend is OFF: uniform blend at 0.5 (50% walk, 50% attack)
float blendFactor = (upperBodyBlend? 1.0f : 0.5f);
UpdateModelAnimationBones(&model, &anim0, animCurrentFrame0,
&anim1, animCurrentFrame1, blendFactor, upperBodyBlend);
// raylib provided animation blending function
//UpdateModelAnimationEx(model, anim0, (float)animCurrentFrame0,
// anim1, (float)animCurrentFrame1, blendFactor);
//----------------------------------------------------------------------------------
// Draw
//----------------------------------------------------------------------------------
BeginDrawing();
ClearBackground(RAYWHITE);
BeginMode3D(camera);
DrawModel(model, position, 1.0f, WHITE);
DrawGrid(10, 1.0f);
EndMode3D();
// Draw UI
DrawText(TextFormat("ANIM 0: %s", anim0.name), 10, 10, 20, GRAY);
DrawText(TextFormat("ANIM 1: %s", anim1.name), 10, 40, 20, GRAY);
DrawText(TextFormat("[SPACE] Toggle blending mode: %s",
upperBodyBlend? "Upper/Lower Body Blending" : "Uniform Blending"),
10, GetScreenHeight() - 30, 20, DARKGRAY);
EndDrawing();
//----------------------------------------------------------------------------------
}
// De-Initialization
//--------------------------------------------------------------------------------------
UnloadModelAnimations(anims, animCount); // Unload model animation
UnloadModel(model); // Unload model and meshes/material
UnloadShader(skinningShader); // Unload GPU skinning shader
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;
}
//----------------------------------------------------------------------------------
// Module Functions Definition
//----------------------------------------------------------------------------------
// Check if a bone is part of upper body (for selective blending)
static bool IsUpperBodyBone(const char *boneName)
{
// Common upper body bone names (adjust based on your model)
if (TextIsEqual(boneName, "spine") || TextIsEqual(boneName, "spine1") || TextIsEqual(boneName, "spine2") ||
TextIsEqual(boneName, "chest") || TextIsEqual(boneName, "upperChest") ||
TextIsEqual(boneName, "neck") || TextIsEqual(boneName, "head") ||
TextIsEqual(boneName, "shoulder") || TextIsEqual(boneName, "shoulder_L") || TextIsEqual(boneName, "shoulder_R") ||
TextIsEqual(boneName, "upperArm") || TextIsEqual(boneName, "upperArm_L") || TextIsEqual(boneName, "upperArm_R") ||
TextIsEqual(boneName, "lowerArm") || TextIsEqual(boneName, "lowerArm_L") || TextIsEqual(boneName, "lowerArm_R") ||
TextIsEqual(boneName, "hand") || TextIsEqual(boneName, "hand_L") || TextIsEqual(boneName, "hand_R") ||
TextIsEqual(boneName, "clavicle") || TextIsEqual(boneName, "clavicle_L") || TextIsEqual(boneName, "clavicle_R"))
{
return true;
}
// Check if bone name contains upper body keywords
if (strstr(boneName, "spine") != NULL || strstr(boneName, "chest") != NULL ||
strstr(boneName, "neck") != NULL || strstr(boneName, "head") != NULL ||
strstr(boneName, "shoulder") != NULL || strstr(boneName, "arm") != NULL ||
strstr(boneName, "hand") != NULL || strstr(boneName, "clavicle") != NULL)
{
return true;
}
return false;
}
// Blend two animations per-bone with selective upper/lower body blending
static void UpdateModelAnimationBones(Model *model, ModelAnimation *anim0, int frame0,
ModelAnimation *anim1, int frame1, float blend, bool upperBodyBlend)
{
// Validate inputs
if ((anim0->boneCount != 0) && (anim0->keyframePoses != NULL) &&
(anim1->boneCount != 0) && (anim1->keyframePoses != NULL) &&
(model->skeleton.boneCount != 0) && (model->skeleton.bindPose != NULL))
{
// Clamp blend factor to [0, 1]
blend = fminf(1.0f, fmaxf(0.0f, blend));
// Ensure frame indices are valid
if (frame0 >= anim0->keyframeCount) frame0 = anim0->keyframeCount - 1;
if (frame1 >= anim1->keyframeCount) frame1 = anim1->keyframeCount - 1;
if (frame0 < 0) frame0 = 0;
if (frame1 < 0) frame1 = 0;
// Get bone count (use minimum of all to be safe)
int boneCount = model->skeleton.boneCount;
if (anim0->boneCount < boneCount) boneCount = anim0->boneCount;
if (anim1->boneCount < boneCount) boneCount = anim1->boneCount;
// Blend each bone
for (int boneIndex = 0; boneIndex < boneCount; boneIndex++)
{
// Determine blend factor for this bone
float boneBlendFactor = blend;
// If upper body blending is enabled, use different blend factors for upper vs lower body
if (upperBodyBlend)
{
const char *boneName = model->skeleton.bones[boneIndex].name;
bool isUpperBody = IsUpperBodyBone(boneName);
// Upper body: use anim1 (attack), Lower body: use anim0 (walk)
// blend = 0.0 means full anim0 (walk), 1.0 means full anim1 (attack)
if (isUpperBody) boneBlendFactor = blend; // Upper body: blend towards anim1 (attack)
else boneBlendFactor = 1.0f - blend; // Lower body: blend towards anim0 (walk) - invert the blend
}
// Get transforms from both animations
Transform *bindTransform = &model->skeleton.bindPose[boneIndex];
Transform *animTransform0 = &anim0->keyframePoses[frame0][boneIndex];
Transform *animTransform1 = &anim1->keyframePoses[frame1][boneIndex];
// Blend the transforms
Transform blended = { 0 };
blended.translation = Vector3Lerp(animTransform0->translation, animTransform1->translation, boneBlendFactor);
blended.rotation = QuaternionSlerp(animTransform0->rotation, animTransform1->rotation, boneBlendFactor);
blended.scale = Vector3Lerp(animTransform0->scale, animTransform1->scale, boneBlendFactor);
// Convert bind pose to matrix
Matrix bindMatrix = MatrixMultiply(MatrixMultiply(
MatrixScale(bindTransform->scale.x, bindTransform->scale.y, bindTransform->scale.z),
QuaternionToMatrix(bindTransform->rotation)),
MatrixTranslate(bindTransform->translation.x, bindTransform->translation.y, bindTransform->translation.z));
// Convert blended transform to matrix
Matrix blendedMatrix = MatrixMultiply(MatrixMultiply(
MatrixScale(blended.scale.x, blended.scale.y, blended.scale.z),
QuaternionToMatrix(blended.rotation)),
MatrixTranslate(blended.translation.x, blended.translation.y, blended.translation.z));
// Calculate final bone matrix (similar to UpdateModelAnimationBones)
model->boneMatrices[boneIndex] = MatrixMultiply(MatrixInvert(bindMatrix), blendedMatrix);
}
// CPU skinning, updates CPU buffers and uploads them to GPU (if available)
// NOTE: Fallback in case GPU skinning is not supported or enabled
for (int m = 0; m < model->meshCount; m++)
{
Mesh mesh = model->meshes[m];
Vector3 animVertex = { 0 };
Vector3 animNormal = { 0 };
const int vertexValuesCount = mesh.vertexCount*3;
int boneIndex = 0;
int boneCounter = 0;
float boneWeight = 0.0f;
bool bufferUpdateRequired = false; // Flag to check when anim vertex information is updated
// Skip if missing bone data or missing anim buffers initialization
if ((mesh.boneWeights == NULL) || (mesh.boneIndices == NULL) ||
(mesh.animVertices == NULL) || (mesh.animNormals == NULL)) continue;
for (int vCounter = 0; vCounter < vertexValuesCount; vCounter += 3)
{
mesh.animVertices[vCounter] = 0;
mesh.animVertices[vCounter + 1] = 0;
mesh.animVertices[vCounter + 2] = 0;
if (mesh.animNormals != NULL)
{
mesh.animNormals[vCounter] = 0;
mesh.animNormals[vCounter + 1] = 0;
mesh.animNormals[vCounter + 2] = 0;
}
// Iterates over 4 bones per vertex
for (int j = 0; j < 4; j++, boneCounter++)
{
boneWeight = mesh.boneWeights[boneCounter];
boneIndex = mesh.boneIndices[boneCounter];
// Early stop when no transformation will be applied
if (boneWeight == 0.0f) continue;
animVertex = (Vector3){ mesh.vertices[vCounter], mesh.vertices[vCounter + 1], mesh.vertices[vCounter + 2] };
animVertex = Vector3Transform(animVertex, model->boneMatrices[boneIndex]);
mesh.animVertices[vCounter] += animVertex.x*boneWeight;
mesh.animVertices[vCounter + 1] += animVertex.y*boneWeight;
mesh.animVertices[vCounter + 2] += animVertex.z*boneWeight;
bufferUpdateRequired = true;
// Normals processing
// NOTE: We use meshes.baseNormals (default normal) to calculate meshes.normals (animated normals)
if ((mesh.normals != NULL) && (mesh.animNormals != NULL ))
{
animNormal = (Vector3){ mesh.normals[vCounter], mesh.normals[vCounter + 1], mesh.normals[vCounter + 2] };
animNormal = Vector3Transform(animNormal, MatrixTranspose(MatrixInvert(model->boneMatrices[boneIndex])));
mesh.animNormals[vCounter] += animNormal.x*boneWeight;
mesh.animNormals[vCounter + 1] += animNormal.y*boneWeight;
mesh.animNormals[vCounter + 2] += animNormal.z*boneWeight;
}
}
}
if (bufferUpdateRequired)
{
// Update GPU vertex buffers with updated data (position + normals)
rlUpdateVertexBuffer(mesh.vboId[SHADER_LOC_VERTEX_POSITION], mesh.animVertices, mesh.vertexCount*3*sizeof(float), 0);
if (mesh.normals != NULL) rlUpdateVertexBuffer(mesh.vboId[SHADER_LOC_VERTEX_NORMAL], mesh.animNormals, mesh.vertexCount*3*sizeof(float), 0);
}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

View File

@ -2,24 +2,26 @@
* *
* raylib [models] example - animation blending * raylib [models] example - animation blending
* *
* Example complexity rating: [] 4/4
*
* Example originally created with raylib 5.5, last time updated with raylib 5.6-dev * Example originally created with raylib 5.5, last time updated with raylib 5.6-dev
* *
* Example contributed by Kirandeep (@Kirandeep-Singh-Khehra) * Example contributed by Kirandeep (@Kirandeep-Singh-Khehra) and reviewed by Ramon Santamaria (@raysan5)
*
* WARNING: GPU skinning must be enabled in raylib with a compilation flag,
* if not enabled, CPU skinning will be used instead
* *
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified, * Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software * BSD-like license that allows static linking with closed source software
* *
* Copyright (c) 2024 Kirandeep (@Kirandeep-Singh-Khehra) * Copyright (c) 2024-2026 Kirandeep (@Kirandeep-Singh-Khehra) and Ramon Santamaria (@raysan5)
*
* Note: Due to limitations in the Apple OpenGL driver, this feature does not work on MacOS
* Note: This example uses CPU for updating meshes.
* For GPU skinning see comments with 'INFO:'.
* *
********************************************************************************************/ ********************************************************************************************/
#include "raylib.h" #include "raylib.h"
#define clamp(x,a,b) ((x < a)? a : (x > b)? b : x) #define RAYGUI_IMPLEMENTATION
#include "raygui.h" // Required for: UI controls
#if defined(PLATFORM_DESKTOP) #if defined(PLATFORM_DESKTOP)
#define GLSL_VERSION 330 #define GLSL_VERSION 330
@ -41,36 +43,58 @@ int main(void)
// Define the camera to look into our 3d world // Define the camera to look into our 3d world
Camera camera = { 0 }; Camera camera = { 0 };
camera.position = (Vector3){ 8.0f, 8.0f, 8.0f }; // Camera position camera.position = (Vector3){ 6.0f, 6.0f, 6.0f }; // Camera position
camera.target = (Vector3){ 0.0f, 2.0f, 0.0f }; // Camera looking at point camera.target = (Vector3){ 0.0f, 2.0f, 0.0f }; // Camera looking at point
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target) camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target)
camera.fovy = 45.0f; // Camera field-of-view Y camera.fovy = 45.0f; // Camera field-of-view Y
camera.projection = CAMERA_PERSPECTIVE; // Camera projection type camera.projection = CAMERA_PERSPECTIVE; // Camera projection type
// Load gltf model // Load model
Model characterModel = LoadModel("resources/models/gltf/robot.glb"); // Load character model Model model = LoadModel("resources/models/gltf/robot.glb"); // Load character model
Vector3 position = { 0.0f, 0.0f, 0.0f }; // Set model world position
/* INFO: Uncomment this to use GPU skinning
// Load skinning shader // Load skinning shader
// WARNING: It requires SUPPORT_GPU_SKINNING enabled on raylib (disabled by default)
Shader skinningShader = LoadShader(TextFormat("resources/shaders/glsl%i/skinning.vs", GLSL_VERSION), Shader skinningShader = LoadShader(TextFormat("resources/shaders/glsl%i/skinning.vs", GLSL_VERSION),
TextFormat("resources/shaders/glsl%i/skinning.fs", GLSL_VERSION)); TextFormat("resources/shaders/glsl%i/skinning.fs", GLSL_VERSION));
for (int i = 0; i < characterModel.materialCount; i++) // Assign skinning shader to all materials shaders
{ //for (int i = 0; i < model.materialCount; i++) model.materials[i].shader = skinningShader;
characterModel.materials[i].shader = skinningShader;
}
*/
// Load gltf model animations // Load model animations
int animsCount = 0; int animCount = 0;
unsigned int animIndex0 = 0; ModelAnimation *anims = LoadModelAnimations("resources/models/gltf/robot.glb", &animCount);
unsigned int animIndex1 = 0;
unsigned int animCurrentFrame = 0;
ModelAnimation *modelAnimations = LoadModelAnimations("resources/models/gltf/robot.glb", &animsCount);
float blendFactor = 0.5f; // Animation playing variables
// NOTE: Two animations are played with a smooth transition between them
int currentAnimPlaying = 0; // Current animation playing (0 o 1)
int nextAnimToPlay = 1; // Next animation to play (to transition)
bool animTransition = false; // Flag to register anim transition state
DisableCursor(); // Limit cursor to relative movement inside the window int animIndex0 = 10; // Current animation playing (walking)
float animCurrentFrame0 = 0.0f; // Current animation frame (supporting interpolated frames)
float animFrameSpeed0 = 0.5f; // Current animation play speed
int animIndex1 = 6; // Next animation to play (running)
float animCurrentFrame1 = 0.0f; // Next animation frame (supporting interpolated frames)
float animFrameSpeed1 = 0.5f; // Next animation play speed
float animBlendFactor = 0.0f; // Blend factor from anim0[frame0] --> anim1[frame1], [0.0f..1.0f]
// NOTE: 0.0f results in full anim0[] and 1.0f in full anim1[]
float animBlendTime = 2.0f; // Time to blend from one playing animation to another (in seconds)
float animBlendTimeCounter = 0.0f; // Time counter (delta time)
bool animPause = false; // Pause animation
// UI required variables
char *animNames[64] = { 0 }; // Pointers to animation names for dropdown box
for (int i = 0; i < animCount; i++) animNames[i] = anims[i].name;
bool dropdownEditMode0 = false;
bool dropdownEditMode1 = false;
float animFrameProgress0 = 0.0f;
float animFrameProgress1 = 0.0f;
float animBlendProgress = 0.0f;
SetTargetFPS(60); // Set our game to run at 60 frames-per-second SetTargetFPS(60); // Set our game to run at 60 frames-per-second
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
@ -80,27 +104,102 @@ int main(void)
{ {
// Update // Update
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
UpdateCamera(&camera, CAMERA_THIRD_PERSON); UpdateCamera(&camera, CAMERA_ORBITAL);
// Select current animation if (IsKeyPressed(KEY_P)) animPause = !animPause;
if (IsKeyPressed(KEY_T)) animIndex0 = (animIndex0 + 1)%animsCount;
else if (IsKeyPressed(KEY_G)) animIndex0 = (animIndex0 + animsCount - 1)%animsCount;
if (IsKeyPressed(KEY_Y)) animIndex1 = (animIndex1 + 1)%animsCount;
else if (IsKeyPressed(KEY_H)) animIndex1 = (animIndex1 + animsCount - 1)%animsCount;
// Select blend factor if (!animPause)
if (IsKeyPressed(KEY_U)) blendFactor = clamp(blendFactor - 0.1, 0.0f, 1.0f); {
else if (IsKeyPressed(KEY_J)) blendFactor = clamp(blendFactor + 0.1, 0.0f, 1.0f); // Start transition from anim0[] to anim1[]
if (IsKeyPressed(KEY_SPACE) && !animTransition)
{
if (currentAnimPlaying == 0)
{
// Transition anim0 --> anim1
nextAnimToPlay = 1;
animCurrentFrame1 = 0.0f;
}
else
{
// Transition anim1 --> anim0
nextAnimToPlay = 0;
animCurrentFrame0 = 0.0f;
}
// Update animation // Set animation transition
animCurrentFrame++; animTransition = true;
animBlendTimeCounter = 0.0f;
animBlendFactor = 0.0f;
}
// Update bones if (animTransition)
// Note: Same animation frame index is used below. By default it loops both animations {
UpdateModelAnimationBonesLerp(characterModel, modelAnimations[animIndex0], animCurrentFrame, modelAnimations[animIndex1], animCurrentFrame, blendFactor); // Playing anim0 and anim1 at the same time
animCurrentFrame0 += animFrameSpeed0;
if (animCurrentFrame0 >= anims[animIndex0].keyframeCount) animCurrentFrame0 = 0.0f;
animCurrentFrame1 += animFrameSpeed1;
if (animCurrentFrame1 >= anims[animIndex1].keyframeCount) animCurrentFrame1 = 0.0f;
// INFO: Comment the following line to use GPU skinning // Increment blend factor over time to transition from anim0 --> anim1 over time
UpdateModelVertsToCurrentBones(characterModel); // NOTE: Time blending could be other than linear, using some easing
animBlendFactor = animBlendTimeCounter/animBlendTime;
animBlendTimeCounter += GetFrameTime();
animBlendProgress = animBlendFactor;
// Update model with animations blending
if (nextAnimToPlay == 1)
{
// Blend anim0 --> anim1
UpdateModelAnimationEx(model, anims[animIndex0], animCurrentFrame0,
anims[animIndex1], animCurrentFrame1, animBlendFactor);
}
else
{
// Blend anim1 --> anim0
UpdateModelAnimationEx(model, anims[animIndex1], animCurrentFrame1,
anims[animIndex0], animCurrentFrame0, animBlendFactor);
}
// Check if transition completed
if (animBlendFactor > 1.0f)
{
// Reset frame states
if (currentAnimPlaying == 0) animCurrentFrame0 = 0.0f;
else if (currentAnimPlaying == 1) animCurrentFrame1 = 0.0f;
currentAnimPlaying = nextAnimToPlay; // Update current animation playing
animBlendFactor = 0.0f; // Reset blend factor
animTransition = false; // Exit transition mode
animBlendTimeCounter = 0.0f;
}
}
else
{
// Play only one anim, the current one
if (currentAnimPlaying == 0)
{
// Playing anim0 at defined speed
animCurrentFrame0 += animFrameSpeed0;
if (animCurrentFrame0 >= anims[animIndex0].keyframeCount) animCurrentFrame0 = 0.0f;
UpdateModelAnimation(model, anims[animIndex0], animCurrentFrame0);
//UpdateModelAnimationEx(model, anims[animIndex0], animCurrentFrame0,
// anims[animIndex1], animCurrentFrame1, 0.0f); // Same as above, first animation frame blend
}
else if (currentAnimPlaying == 1)
{
// Playing anim1 at defined speed
animCurrentFrame1 += animFrameSpeed1;
if (animCurrentFrame1 >= anims[animIndex1].keyframeCount) animCurrentFrame1 = 0.0f;
UpdateModelAnimation(model, anims[animIndex1], animCurrentFrame1);
//UpdateModelAnimationEx(model, anims[animIndex0], animCurrentFrame0,
// anims[animIndex1], animCurrentFrame1, 1.0f); // Same as above, second animation frame blend
}
}
}
// Update progress bars values with current frame for each animation
animFrameProgress0 = animCurrentFrame0;
animFrameProgress1 = animCurrentFrame1;
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
// Draw // Draw
@ -111,27 +210,56 @@ int main(void)
BeginMode3D(camera); BeginMode3D(camera);
/* INFO: Uncomment this to use GPU skinning DrawModel(model, position, 1.0f, WHITE); // Draw animated model
// Draw character mesh, pose calculation is done in shader (GPU skinning)
for (int i = 0; i < characterModel.meshCount; i++)
{
DrawMesh(characterModel.meshes[i], characterModel.materials[characterModel.meshMaterial[i]], characterModel.transform);
}
*/
// INFO: Comment the following line to use GPU skinning
DrawModel(characterModel, (Vector3){0.0f, 0.0f, 0.0f}, 1.0f, WHITE);
DrawGrid(10, 1.0f); DrawGrid(10, 1.0f);
EndMode3D(); EndMode3D();
DrawText("Use the U/J to adjust blend factor", 10, 10, 20, GRAY); if (animTransition) DrawText("ANIM TRANSITION BLENDING!", 170, 50, 30, BLUE);
DrawText("Use the T/G to switch first animation", 10, 30, 20, GRAY);
DrawText("Use the Y/H to switch second animation", 10, 50, 20, GRAY); // Draw UI elements
DrawText(TextFormat("Animations: %s, %s", modelAnimations[animIndex0].name, modelAnimations[animIndex1].name), 10, 70, 20, BLACK); //---------------------------------------------------------------------------------------------
DrawText(TextFormat("Blend Factor: %f", blendFactor), 10, 86, 20, BLACK); if (dropdownEditMode0) GuiDisable();
GuiSlider((Rectangle){ 10, 38, 160, 12 },
NULL, TextFormat("x%.1f", animFrameSpeed0), &animFrameSpeed0, 0.1f, 2.0f);
GuiEnable();
if (dropdownEditMode1) GuiDisable();
GuiSlider((Rectangle){ GetScreenWidth() - 170.0f, 38, 160, 12 },
TextFormat("%.1fx", animFrameSpeed1), NULL, &animFrameSpeed1, 0.1f, 2.0f);
GuiEnable();
// Draw animation selectors for blending transition
// NOTE: Transition does not start until requested
GuiSetStyle(DROPDOWNBOX, DROPDOWN_ITEMS_SPACING, 1);
if (GuiDropdownBox((Rectangle){ 10, 10, 160, 24 }, TextJoin(animNames, animCount, ";"),
&animIndex0, dropdownEditMode0)) dropdownEditMode0 = !dropdownEditMode0;
// Blending process progress bar
if (nextAnimToPlay == 1) GuiSetStyle(PROGRESSBAR, PROGRESS_SIDE, 0); // Left-->Right
else GuiSetStyle(PROGRESSBAR, PROGRESS_SIDE, 1); // Right-->Left
GuiProgressBar((Rectangle){ 180, 14, 440, 16 }, NULL, NULL, &animBlendProgress, 0.0f, 1.0f);
GuiSetStyle(PROGRESSBAR, PROGRESS_SIDE, 0); // Reset to Left-->Right
if (GuiDropdownBox((Rectangle){ GetScreenWidth() - 170.0f, 10, 160, 24 }, TextJoin(animNames, animCount, ";"),
&animIndex1, dropdownEditMode1)) dropdownEditMode1 = !dropdownEditMode1;
// Draw playing timeline with keyframes for anim0[]
GuiProgressBar((Rectangle){ 60, GetScreenHeight() - 60.0f, GetScreenWidth() - 180.0f, 20 }, "ANIM 0",
TextFormat("FRAME: %.2f / %i", animFrameProgress0, anims[animIndex0].keyframeCount),
&animFrameProgress0, 0.0f, (float)anims[animIndex0].keyframeCount);
for (int i = 0; i < anims[animIndex0].keyframeCount; i++)
DrawRectangle(60 + (int)(((float)(GetScreenWidth() - 180)/(float)anims[animIndex0].keyframeCount)*(float)i),
GetScreenHeight() - 60, 1, 20, BLUE);
// Draw playing timeline with keyframes for anim1[]
GuiProgressBar((Rectangle){ 60, GetScreenHeight() - 30.0f, GetScreenWidth() - 180.0f, 20 }, "ANIM 1",
TextFormat("FRAME: %.2f / %i", animFrameProgress1, anims[animIndex1].keyframeCount),
&animFrameProgress1, 0.0f, (float)anims[animIndex1].keyframeCount);
for (int i = 0; i < anims[animIndex1].keyframeCount; i++)
DrawRectangle(60 + (int)(((float)(GetScreenWidth() - 180)/(float)anims[animIndex1].keyframeCount)*(float)i),
GetScreenHeight() - 30, 1, 20, BLUE);
//---------------------------------------------------------------------------------------------
EndDrawing(); EndDrawing();
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
@ -139,11 +267,9 @@ int main(void)
// De-Initialization // De-Initialization
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
UnloadModelAnimations(modelAnimations, animsCount); // Unload model animation UnloadModelAnimations(anims, animCount); // Unload model animation
UnloadModel(characterModel); // Unload model and meshes/material UnloadModel(model); // Unload model and meshes/material
UnloadShader(skinningShader); // Unload GPU skinning shader
// INFO: Uncomment the following line to use GPU skinning
// UnloadShader(skinningShader); // Unload GPU skinning shader
CloseWindow(); // Close window and OpenGL context CloseWindow(); // Close window and OpenGL context
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View File

@ -1,296 +0,0 @@
/*******************************************************************************************
*
* raylib [models] example - animation bone blending
*
* Example complexity rating: [] 4/4
*
* Example originally created with raylib 5.5, last time updated with raylib 5.5
*
* This example demonstrates per-bone animation blending, allowing smooth transitions
* between two animations by interpolating bone transforms. This is useful for:
* - Blending movement animations (walk/run) with action animations (jump/attack)
* - Creating smooth animation transitions
* - Layering animations (e.g., upper body attack while lower body walks)
*
* Example contributed by dmitrii-brand (@dmitrii-brand) and reviewed by Ramon Santamaria (@raysan5)
*
* NOTE: Due to limitations in the Apple OpenGL driver, this feature does not work on MacOS
*
* 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 dmitrii-brand (@dmitrii-brand)
*
********************************************************************************************/
#include "raylib.h"
#include "raymath.h"
#include <string.h> // Required for: memcpy()
#include <stdlib.h> // Required for: NULL
#if defined(PLATFORM_DESKTOP)
#define GLSL_VERSION 330
#else // PLATFORM_ANDROID, PLATFORM_WEB
#define GLSL_VERSION 100
#endif
//------------------------------------------------------------------------------------
// Module Functions Declaration
//------------------------------------------------------------------------------------
static bool IsUpperBodyBone(const char *boneName);
static void BlendModelAnimationsBones(Model *model, ModelAnimation *anim1, int frame1,
ModelAnimation *anim2, int frame2, float blendFactor, bool upperBodyBlend);
//------------------------------------------------------------------------------------
// Program main entry point
//------------------------------------------------------------------------------------
int main(void)
{
// Initialization
//--------------------------------------------------------------------------------------
const int screenWidth = 800;
const int screenHeight = 450;
InitWindow(screenWidth, screenHeight, "raylib [models] example - animation bone blending");
// Define the camera to look into our 3d world
Camera camera = { 0 };
camera.position = (Vector3){ 5.0f, 5.0f, 5.0f }; // Camera position
camera.target = (Vector3){ 0.0f, 2.0f, 0.0f }; // Camera looking at point
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target)
camera.fovy = 45.0f; // Camera field-of-view Y
camera.projection = CAMERA_PERSPECTIVE; // Camera projection type
// Load gltf model
Model characterModel = LoadModel("resources/models/gltf/greenman.glb");
// Load skinning shader
Shader skinningShader = LoadShader(TextFormat("resources/shaders/glsl%i/skinning.vs", GLSL_VERSION),
TextFormat("resources/shaders/glsl%i/skinning.fs", GLSL_VERSION));
characterModel.materials[1].shader = skinningShader;
// Load gltf model animations
int animsCount = 0;
ModelAnimation *modelAnimations = LoadModelAnimations("resources/models/gltf/greenman.glb", &animsCount);
// Log all available animations for debugging
TraceLog(LOG_INFO, "Found %d animations:", animsCount);
for (int i = 0; i < animsCount; i++)
{
TraceLog(LOG_INFO, " Animation %d: %s (%d frames)", i, modelAnimations[i].name, modelAnimations[i].frameCount);
}
// Use specific indices: walk/move = 2, attack = 3
unsigned int animIndex1 = 2; // Walk/Move animation (index 2)
unsigned int animIndex2 = 3; // Attack animation (index 3)
unsigned int animCurrentFrame1 = 0;
unsigned int animCurrentFrame2 = 0;
// Validate indices
if (animIndex1 >= animsCount) animIndex1 = 0;
if (animIndex2 >= animsCount) animIndex2 = (animsCount > 1) ? 1 : 0;
TraceLog(LOG_INFO, "Using Walk (index %d): %s", animIndex1, modelAnimations[animIndex1].name);
TraceLog(LOG_INFO, "Using Attack (index %d): %s", animIndex2, modelAnimations[animIndex2].name);
Vector3 position = { 0.0f, 0.0f, 0.0f }; // Set model position
bool upperBodyBlend = true; // Toggle: true = upper/lower body blending, false = uniform blending (50/50)
DisableCursor(); // Limit cursor to relative movement inside the window
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
//--------------------------------------------------------------------------------------
// Main game loop
while (!WindowShouldClose()) // Detect window close button or ESC key
{
// Update
//----------------------------------------------------------------------------------
UpdateCamera(&camera, CAMERA_THIRD_PERSON);
// Toggle upper/lower body blending mode (SPACE key)
if (IsKeyPressed(KEY_SPACE)) upperBodyBlend = !upperBodyBlend;
// Update animation frames
ModelAnimation anim1 = modelAnimations[animIndex1];
ModelAnimation anim2 = modelAnimations[animIndex2];
animCurrentFrame1 = (animCurrentFrame1 + 1)%anim1.frameCount;
animCurrentFrame2 = (animCurrentFrame2 + 1)%anim2.frameCount;
// Blend the two animations
characterModel.transform = MatrixTranslate(position.x, position.y, position.z);
// When upperBodyBlend is ON: upper body = attack (1.0), lower body = walk (0.0)
// When upperBodyBlend is OFF: uniform blend at 0.5 (50% walk, 50% attack)
float blendFactor = upperBodyBlend ? 1.0f : 0.5f;
BlendModelAnimationsBones(&characterModel, &anim1, animCurrentFrame1, &anim2, animCurrentFrame2, blendFactor, upperBodyBlend);
//----------------------------------------------------------------------------------
// Draw
//----------------------------------------------------------------------------------
BeginDrawing();
ClearBackground(RAYWHITE);
BeginMode3D(camera);
// Draw character mesh, pose calculation is done in shader (GPU skinning)
DrawMesh(characterModel.meshes[0], characterModel.materials[1], characterModel.transform);
DrawGrid(10, 1.0f);
EndMode3D();
// Draw UI
DrawText("BONE BLENDING EXAMPLE", 10, 10, 20, DARKGRAY);
DrawText(TextFormat("Walk (Animation 2): %s", anim1.name), 10, 35, 10, GRAY);
DrawText(TextFormat("Attack (Animation 3): %s", anim2.name), 10, 50, 10, GRAY);
DrawText(TextFormat("Mode: %s", upperBodyBlend ? "Upper/Lower Body Blending" : "Uniform Blending"), 10, 65, 10, GRAY);
DrawText("SPACE - Toggle blending mode", 10, GetScreenHeight() - 20, 10, DARKGRAY);
EndDrawing();
//----------------------------------------------------------------------------------
}
// De-Initialization
//--------------------------------------------------------------------------------------
UnloadModelAnimations(modelAnimations, animsCount); // Unload model animation
UnloadModel(characterModel); // Unload model and meshes/material
UnloadShader(skinningShader); // Unload GPU skinning shader
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;
}
//----------------------------------------------------------------------------------
// Module Functions Definition
//----------------------------------------------------------------------------------
// Check if a bone is part of upper body (for selective blending)
static bool IsUpperBodyBone(const char *boneName)
{
// Common upper body bone names (adjust based on your model)
if (TextIsEqual(boneName, "spine") || TextIsEqual(boneName, "spine1") || TextIsEqual(boneName, "spine2") ||
TextIsEqual(boneName, "chest") || TextIsEqual(boneName, "upperChest") ||
TextIsEqual(boneName, "neck") || TextIsEqual(boneName, "head") ||
TextIsEqual(boneName, "shoulder") || TextIsEqual(boneName, "shoulder_L") || TextIsEqual(boneName, "shoulder_R") ||
TextIsEqual(boneName, "upperArm") || TextIsEqual(boneName, "upperArm_L") || TextIsEqual(boneName, "upperArm_R") ||
TextIsEqual(boneName, "lowerArm") || TextIsEqual(boneName, "lowerArm_L") || TextIsEqual(boneName, "lowerArm_R") ||
TextIsEqual(boneName, "hand") || TextIsEqual(boneName, "hand_L") || TextIsEqual(boneName, "hand_R") ||
TextIsEqual(boneName, "clavicle") || TextIsEqual(boneName, "clavicle_L") || TextIsEqual(boneName, "clavicle_R"))
{
return true;
}
// Check if bone name contains upper body keywords
if (strstr(boneName, "spine") != NULL || strstr(boneName, "chest") != NULL ||
strstr(boneName, "neck") != NULL || strstr(boneName, "head") != NULL ||
strstr(boneName, "shoulder") != NULL || strstr(boneName, "arm") != NULL ||
strstr(boneName, "hand") != NULL || strstr(boneName, "clavicle") != NULL)
{
return true;
}
return false;
}
// Blend two animations per-bone with selective upper/lower body blending
static void BlendModelAnimationsBones(Model *model, ModelAnimation *anim1, int frame1,
ModelAnimation *anim2, int frame2, float blendFactor, bool upperBodyBlend)
{
// Validate inputs
if (anim1->boneCount == 0 || anim1->framePoses == NULL ||
anim2->boneCount == 0 || anim2->framePoses == NULL ||
model->boneCount == 0 || model->bindPose == NULL)
{
return;
}
// Clamp blend factor to [0, 1]
blendFactor = fminf(1.0f, fmaxf(0.0f, blendFactor));
// Ensure frame indices are valid
if (frame1 >= anim1->frameCount) frame1 = anim1->frameCount - 1;
if (frame2 >= anim2->frameCount) frame2 = anim2->frameCount - 1;
if (frame1 < 0) frame1 = 0;
if (frame2 < 0) frame2 = 0;
// Find first mesh with bones
int firstMeshWithBones = -1;
for (int i = 0; i < model->meshCount; i++)
{
if (model->meshes[i].boneMatrices)
{
firstMeshWithBones = i;
break;
}
}
if (firstMeshWithBones == -1) return;
// Get bone count (use minimum of all to be safe)
int boneCount = model->boneCount;
if (anim1->boneCount < boneCount) boneCount = anim1->boneCount;
if (anim2->boneCount < boneCount) boneCount = anim2->boneCount;
// Blend each bone
for (int boneId = 0; boneId < boneCount; boneId++)
{
// Determine blend factor for this bone
float boneBlendFactor = blendFactor;
// If upper body blending is enabled, use different blend factors for upper vs lower body
if (upperBodyBlend)
{
const char *boneName = model->bones[boneId].name;
bool isUpperBody = IsUpperBodyBone(boneName);
// Upper body: use anim2 (attack), Lower body: use anim1 (walk)
// blendFactor = 0.0 means full anim1 (walk), 1.0 means full anim2 (attack)
if (isUpperBody) boneBlendFactor = blendFactor; // Upper body: blend towards anim2 (attack)
else boneBlendFactor = 1.0f - blendFactor; // Lower body: blend towards anim1 (walk) - invert the blend
}
// Get transforms from both animations
Transform *bindTransform = &model->bindPose[boneId];
Transform *anim1Transform = &anim1->framePoses[frame1][boneId];
Transform *anim2Transform = &anim2->framePoses[frame2][boneId];
// Blend the transforms
Transform blended;
blended.translation = Vector3Lerp(anim1Transform->translation, anim2Transform->translation, boneBlendFactor);
blended.rotation = QuaternionSlerp(anim1Transform->rotation, anim2Transform->rotation, boneBlendFactor);
blended.scale = Vector3Lerp(anim1Transform->scale, anim2Transform->scale, boneBlendFactor);
// Convert bind pose to matrix
Matrix bindMatrix = MatrixMultiply(MatrixMultiply(
MatrixScale(bindTransform->scale.x, bindTransform->scale.y, bindTransform->scale.z),
QuaternionToMatrix(bindTransform->rotation)),
MatrixTranslate(bindTransform->translation.x, bindTransform->translation.y, bindTransform->translation.z));
// Convert blended transform to matrix
Matrix blendedMatrix = MatrixMultiply(MatrixMultiply(
MatrixScale(blended.scale.x, blended.scale.y, blended.scale.z),
QuaternionToMatrix(blended.rotation)),
MatrixTranslate(blended.translation.x, blended.translation.y, blended.translation.z));
// Calculate final bone matrix (similar to UpdateModelAnimationBones)
model->meshes[firstMeshWithBones].boneMatrices[boneId] = MatrixMultiply(MatrixInvert(bindMatrix), blendedMatrix);
}
// Copy bone matrices to remaining meshes
for (int i = firstMeshWithBones + 1; i < model->meshCount; i++)
{
if (model->meshes[i].boneMatrices)
{
memcpy(model->meshes[i].boneMatrices,
model->meshes[firstMeshWithBones].boneMatrices,
model->meshes[i].boneCount*sizeof(model->meshes[i].boneMatrices[0]));
}
}
}

View File

@ -8,13 +8,14 @@
* *
* Example contributed by Daniel Holden (@orangeduck) and reviewed by Ramon Santamaria (@raysan5) * Example contributed by Daniel Holden (@orangeduck) and reviewed by Ramon Santamaria (@raysan5)
* *
* WARNING: GPU skinning must be enabled in raylib with a compilation flag,
* if not enabled, CPU skinning will be used instead
*
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified, * Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software * BSD-like license that allows static linking with closed source software
* *
* Copyright (c) 2024-2025 Daniel Holden (@orangeduck) * Copyright (c) 2024-2025 Daniel Holden (@orangeduck)
* *
* Note: Due to limitations in the Apple OpenGL driver, this feature does not work on MacOS
*
********************************************************************************************/ ********************************************************************************************/
#include "raylib.h" #include "raylib.h"
@ -42,29 +43,29 @@ int main(void)
// Define the camera to look into our 3d world // Define the camera to look into our 3d world
Camera camera = { 0 }; Camera camera = { 0 };
camera.position = (Vector3){ 5.0f, 5.0f, 5.0f }; // Camera position camera.position = (Vector3){ 5.0f, 5.0f, 5.0f }; // Camera position
camera.target = (Vector3){ 0.0f, 2.0f, 0.0f }; // Camera looking at point camera.target = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera looking at point
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target) camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target)
camera.fovy = 45.0f; // Camera field-of-view Y camera.fovy = 45.0f; // Camera field-of-view Y
camera.projection = CAMERA_PERSPECTIVE; // Camera projection type camera.projection = CAMERA_PERSPECTIVE; // Camera projection type
// Load gltf model // Load gltf model
Model characterModel = LoadModel("resources/models/gltf/greenman.glb"); // Load character model Model model = LoadModel("resources/models/gltf/greenman.glb"); // Load character model
// Load skinning shader
Shader skinningShader = LoadShader(TextFormat("resources/shaders/glsl%i/skinning.vs", GLSL_VERSION),
TextFormat("resources/shaders/glsl%i/skinning.fs", GLSL_VERSION));
characterModel.materials[1].shader = skinningShader;
// Load gltf model animations
int animsCount = 0;
unsigned int animIndex = 0;
unsigned int animCurrentFrame = 0;
ModelAnimation *modelAnimations = LoadModelAnimations("resources/models/gltf/greenman.glb", &animsCount);
Vector3 position = { 0.0f, 0.0f, 0.0f }; // Set model position Vector3 position = { 0.0f, 0.0f, 0.0f }; // Set model position
DisableCursor(); // Limit cursor to relative movement inside the window // Load skinning shader
// WARNING: GPU skinning must be enabled in raylib with a compilation flag,
// if not enabled, CPU skinning will be used instead
Shader skinningShader = LoadShader(TextFormat("resources/shaders/glsl%i/skinning.vs", GLSL_VERSION),
TextFormat("resources/shaders/glsl%i/skinning.fs", GLSL_VERSION));
model.materials[1].shader = skinningShader;
// Load gltf model animations
int animCount = 0;
ModelAnimation *anims = LoadModelAnimations("resources/models/gltf/greenman.glb", &animCount);
// Animation playing variables
unsigned int animIndex = 0; // Current animation playing
unsigned int animCurrentFrame = 0; // Current animation frame
SetTargetFPS(60); // Set our game to run at 60 frames-per-second SetTargetFPS(60); // Set our game to run at 60 frames-per-second
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
@ -74,17 +75,15 @@ int main(void)
{ {
// Update // Update
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
UpdateCamera(&camera, CAMERA_THIRD_PERSON); UpdateCamera(&camera, CAMERA_ORBITAL);
// Select current animation // Select current animation
if (IsKeyPressed(KEY_T)) animIndex = (animIndex + 1)%animsCount; if (IsKeyPressed(KEY_RIGHT)) animIndex = (animIndex + 1)%animCount;
else if (IsKeyPressed(KEY_G)) animIndex = (animIndex + animsCount - 1)%animsCount; else if (IsKeyPressed(KEY_LEFT)) animIndex = (animIndex + animCount - 1)%animCount;
// Update model animation // Update model animation
ModelAnimation anim = modelAnimations[animIndex]; animCurrentFrame = (animCurrentFrame + 1)%anims[animIndex].keyframeCount;
animCurrentFrame = (animCurrentFrame + 1)%anim.frameCount; UpdateModelAnimation(model, anims[animIndex], (float)animCurrentFrame);
characterModel.transform = MatrixTranslate(position.x, position.y, position.z);
UpdateModelAnimationBones(characterModel, anim, animCurrentFrame);
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
// Draw // Draw
@ -95,14 +94,14 @@ int main(void)
BeginMode3D(camera); BeginMode3D(camera);
// Draw character mesh, pose calculation is done in shader (GPU skinning) DrawModel(model, position, 1.0f, WHITE);
DrawMesh(characterModel.meshes[0], characterModel.materials[1], characterModel.transform);
DrawGrid(10, 1.0f); DrawGrid(10, 1.0f);
EndMode3D(); EndMode3D();
DrawText("Use the T/G to switch animation", 10, 10, 20, GRAY); DrawText(TextFormat("Current animation: %s", anims[animIndex].name), 10, 40, 20, MAROON);
DrawText("Use the LEFT/RIGHT keys to switch animation", 10, 10, 20, GRAY);
EndDrawing(); EndDrawing();
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
@ -110,8 +109,8 @@ int main(void)
// De-Initialization // De-Initialization
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
UnloadModelAnimations(modelAnimations, animsCount); // Unload model animation UnloadModelAnimations(anims, animCount); // Unload model animation
UnloadModel(characterModel); // Unload model and meshes/material UnloadModel(model); // Unload model and meshes/material
UnloadShader(skinningShader); // Unload GPU skinning shader UnloadShader(skinningShader); // Unload GPU skinning shader
CloseWindow(); // Close window and OpenGL context CloseWindow(); // Close window and OpenGL context

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

View File

@ -0,0 +1,133 @@
/*******************************************************************************************
*
* raylib [models] example - animation timing
*
* Example complexity rating: [] 3/4
*
* Example originally created with raylib 5.6, last time updated with raylib 5.6
*
* 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 Ramon Santamaria (@raysan5)
*
********************************************************************************************/
#include "raylib.h"
#define RAYGUI_IMPLEMENTATION
#include "raygui.h" // Required for: UI controls
//------------------------------------------------------------------------------------
// Program main entry point
//------------------------------------------------------------------------------------
int main(void)
{
// Initialization
//--------------------------------------------------------------------------------------
const int screenWidth = 800;
const int screenHeight = 450;
InitWindow(screenWidth, screenHeight, "raylib [models] example - animation timing");
// Define the camera to look into our 3d world
Camera camera = { 0 };
camera.position = (Vector3){ 6.0f, 6.0f, 6.0f }; // Camera position
camera.target = (Vector3){ 0.0f, 2.0f, 0.0f }; // Camera looking at point
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target)
camera.fovy = 45.0f; // Camera field-of-view Y
camera.projection = CAMERA_PERSPECTIVE; // Camera projection type
// Load model
Model model = LoadModel("resources/models/gltf/robot.glb");
Vector3 position = { 0.0f, 0.0f, 0.0f }; // Set model world position
// Load model animations
int animCount = 0;
ModelAnimation *anims = LoadModelAnimations("resources/models/gltf/robot.glb", &animCount);
// Animation playing variables
int animIndex = 10; // Current animation playing
float animCurrentFrame = 0.0f; // Current animation frame (supporting interpolated frames)
float animFrameSpeed = 0.5f; // Animation play speed
bool animPause = false; // Pause animation
// UI required variables
char *animNames[64] = { 0 };
for (int i = 0; i < animCount; i++) animNames[i] = anims[i].name;
bool dropdownEditMode = false;
float animFrameProgress = 0.0f;
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
//--------------------------------------------------------------------------------------
// Main game loop
while (!WindowShouldClose()) // Detect window close button or ESC key
{
// Update
//----------------------------------------------------------------------------------
UpdateCamera(&camera, CAMERA_ORBITAL);
if (IsKeyPressed(KEY_P)) animPause = !animPause;
if (!animPause && (animIndex < animCount))
{
// Update model animation
animCurrentFrame += animFrameSpeed;
if (animCurrentFrame >= anims[animIndex].keyframeCount) animCurrentFrame = 0.0f;
UpdateModelAnimation(model, anims[animIndex], animCurrentFrame);
}
// NOTE: Animation and playing speed selected through UI
// Update progressbar value with current frame
animFrameProgress = animCurrentFrame;
//----------------------------------------------------------------------------------
// Draw
//----------------------------------------------------------------------------------
BeginDrawing();
ClearBackground(RAYWHITE);
BeginMode3D(camera);
DrawModel(model, position, 1.0f, WHITE);
DrawGrid(10, 1.0f);
EndMode3D();
// Draw UI, select anim and playing speed
GuiSetStyle(DROPDOWNBOX, DROPDOWN_ITEMS_SPACING, 1);
if (GuiDropdownBox((Rectangle){ 10, 10, 140, 24 }, TextJoin(animNames, animCount, ";"),
&animIndex, dropdownEditMode)) dropdownEditMode = !dropdownEditMode;
GuiSlider((Rectangle){ 260, 10, 500, 24 }, "FRAME SPEED: ", TextFormat("x%.1f", animFrameSpeed),
&animFrameSpeed, 0.1f, 2.0f);
// Draw playing timeline with keyframes
GuiLabel((Rectangle){ 10, GetScreenHeight() - 64.0f, GetScreenWidth() - 20.0f, 24 },
TextFormat("CURRENT FRAME: %.2f / %i", animFrameProgress, anims[animIndex].keyframeCount));
GuiProgressBar((Rectangle){ 10, GetScreenHeight() - 40.0f, GetScreenWidth() - 20.0f, 24 }, NULL, NULL,
&animFrameProgress, 0.0f, (float)anims[animIndex].keyframeCount);
for (int i = 0; i < anims[animIndex].keyframeCount; i++)
DrawRectangle(10 + (int)(((float)(GetScreenWidth() - 20)/(float)anims[animIndex].keyframeCount)*(float)i),
GetScreenHeight() - 40, 1, 24, BLUE);
EndDrawing();
//----------------------------------------------------------------------------------
}
// De-Initialization
//--------------------------------------------------------------------------------------
UnloadModelAnimations(anims, animCount); // Unload model animation
UnloadModel(model); // Unload model and meshes/material
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@ -72,6 +72,7 @@ int main(void)
UpdateCamera(&camera, CAMERA_FIRST_PERSON); UpdateCamera(&camera, CAMERA_FIRST_PERSON);
// Handle voxel removal with mouse click // Handle voxel removal with mouse click
// This method is quite inefficient. Ray marching through the voxel grid using DDA would be faster, but more complex.
if (IsMouseButtonPressed(MOUSE_LEFT_BUTTON)) if (IsMouseButtonPressed(MOUSE_LEFT_BUTTON))
{ {
// Cast a ray from the screen center (where crosshair would be) // Cast a ray from the screen center (where crosshair would be)
@ -79,12 +80,14 @@ int main(void)
Ray ray = GetMouseRay(screenCenter, camera); Ray ray = GetMouseRay(screenCenter, camera);
// Check ray collision with all voxels // Check ray collision with all voxels
bool voxelRemoved = false; float closestDistance = 99999.0f;
for (int x = 0; (x < WORLD_SIZE) && !voxelRemoved; x++) Vector3 closestVoxelPosition = { -1, -1, -1 };
bool voxelFound = false;
for (int x = 0; x < WORLD_SIZE; x++)
{ {
for (int y = 0; (y < WORLD_SIZE) && !voxelRemoved; y++) for (int y = 0; y < WORLD_SIZE; y++)
{ {
for (int z = 0; (z < WORLD_SIZE) && !voxelRemoved; z++) for (int z = 0; z < WORLD_SIZE; z++)
{ {
if (!voxels[x][y][z]) continue; // Skip empty voxels if (!voxels[x][y][z]) continue; // Skip empty voxels
@ -97,14 +100,23 @@ int main(void)
// Check ray-box collision // Check ray-box collision
RayCollision collision = GetRayCollisionBox(ray, box); RayCollision collision = GetRayCollisionBox(ray, box);
if (collision.hit) if (collision.hit && (collision.distance < closestDistance))
{ {
voxels[x][y][z] = false; // Remove this voxel closestDistance = collision.distance;
voxelRemoved = true; // Exit all loops closestVoxelPosition = (Vector3){ x, y, z };
voxelFound = true;
} }
} }
} }
} }
// Remove the closest voxel if one was hit
if (voxelFound)
{
voxels[(int)closestVoxelPosition.x]
[(int)closestVoxelPosition.y]
[(int)closestVoxelPosition.z] = false;
}
} }
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
@ -137,7 +149,7 @@ int main(void)
EndMode3D(); EndMode3D();
// Draw reference point for raycasting to delete blocks // Draw reference point for raycasting to delete blocks
DrawCircle(GetRenderWidth()/2, GetScreenHeight()/2, 4, RED); DrawCircle(GetScreenWidth()/2, GetScreenHeight()/2, 4, RED);
DrawText("Left-click a voxel to remove it!", 10, 10, 20, DARKGRAY); DrawText("Left-click a voxel to remove it!", 10, 10, 20, DARKGRAY);
DrawText("WASD to move, mouse to look around", 10, 35, 10, GRAY); DrawText("WASD to move, mouse to look around", 10, 35, 10, GRAY);

View File

@ -60,25 +60,25 @@ int main(void)
unsigned int animCurrentFrame = 0; unsigned int animCurrentFrame = 0;
ModelAnimation *modelAnimations = LoadModelAnimations("resources/models/gltf/greenman.glb", &animsCount); ModelAnimation *modelAnimations = LoadModelAnimations("resources/models/gltf/greenman.glb", &animsCount);
// indices of bones for sockets // Indices of bones for sockets
int boneSocketIndex[BONE_SOCKETS] = { -1, -1, -1 }; int boneSocketIndex[BONE_SOCKETS] = { -1, -1, -1 };
// search bones for sockets // Search bones for sockets
for (int i = 0; i < characterModel.boneCount; i++) for (int i = 0; i < characterModel.skeleton.boneCount; i++)
{ {
if (TextIsEqual(characterModel.bones[i].name, "socket_hat")) if (TextIsEqual(characterModel.skeleton.bones[i].name, "socket_hat"))
{ {
boneSocketIndex[BONE_SOCKET_HAT] = i; boneSocketIndex[BONE_SOCKET_HAT] = i;
continue; continue;
} }
if (TextIsEqual(characterModel.bones[i].name, "socket_hand_R")) if (TextIsEqual(characterModel.skeleton.bones[i].name, "socket_hand_R"))
{ {
boneSocketIndex[BONE_SOCKET_HAND_R] = i; boneSocketIndex[BONE_SOCKET_HAND_R] = i;
continue; continue;
} }
if (TextIsEqual(characterModel.bones[i].name, "socket_hand_L")) if (TextIsEqual(characterModel.skeleton.bones[i].name, "socket_hand_L"))
{ {
boneSocketIndex[BONE_SOCKET_HAND_L] = i; boneSocketIndex[BONE_SOCKET_HAND_L] = i;
continue; continue;
@ -115,8 +115,8 @@ int main(void)
// Update model animation // Update model animation
ModelAnimation anim = modelAnimations[animIndex]; ModelAnimation anim = modelAnimations[animIndex];
animCurrentFrame = (animCurrentFrame + 1)%anim.frameCount; animCurrentFrame = (animCurrentFrame + 1)%anim.keyframeCount;
UpdateModelAnimation(characterModel, anim, animCurrentFrame); UpdateModelAnimation(characterModel, anim, (float)animCurrentFrame);
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
// Draw // Draw
@ -129,7 +129,7 @@ int main(void)
// Draw character // Draw character
Quaternion characterRotate = QuaternionFromAxisAngle((Vector3){ 0.0f, 1.0f, 0.0f }, angle*DEG2RAD); Quaternion characterRotate = QuaternionFromAxisAngle((Vector3){ 0.0f, 1.0f, 0.0f }, angle*DEG2RAD);
characterModel.transform = MatrixMultiply(QuaternionToMatrix(characterRotate), MatrixTranslate(position.x, position.y, position.z)); characterModel.transform = MatrixMultiply(QuaternionToMatrix(characterRotate), MatrixTranslate(position.x, position.y, position.z));
UpdateModelAnimation(characterModel, anim, animCurrentFrame); UpdateModelAnimation(characterModel, anim, (float)animCurrentFrame);
DrawMesh(characterModel.meshes[0], characterModel.materials[1], characterModel.transform); DrawMesh(characterModel.meshes[0], characterModel.materials[1], characterModel.transform);
// Draw equipments (hat, sword, shield) // Draw equipments (hat, sword, shield)
@ -137,8 +137,8 @@ int main(void)
{ {
if (!showEquip[i]) continue; if (!showEquip[i]) continue;
Transform *transform = &anim.framePoses[animCurrentFrame][boneSocketIndex[i]]; Transform *transform = &anim.keyframePoses[animCurrentFrame][boneSocketIndex[i]];
Quaternion inRotation = characterModel.bindPose[boneSocketIndex[i]].rotation; Quaternion inRotation = characterModel.skeleton.bindPose[boneSocketIndex[i]].rotation;
Quaternion outRotation = transform->rotation; Quaternion outRotation = transform->rotation;
// Calculate socket rotation (angle between bone in initial pose and same bone in current animation frame) // Calculate socket rotation (angle between bone in initial pose and same bone in current animation frame)

View File

@ -7,11 +7,11 @@
* NOTE: raylib supports multiple models file formats: * NOTE: raylib supports multiple models file formats:
* *
* - OBJ > Text file format. Must include vertex position-texcoords-normals information, * - OBJ > Text file format. Must include vertex position-texcoords-normals information,
* if files references some .mtl materials file, it will be loaded (or try to) * if .obj references some .mtl materials file, it will be tried to be loaded
* - GLTF > Text/binary file format. Includes lot of information and it could * - GLTF/GLB > Text/binary file formats. Includes lot of information and it could
* also reference external files, raylib will try loading mesh and materials data * also reference external files, mesh and materials data will be tried to be loaded
* - IQM > Binary file format. Includes mesh vertex data but also animation data, * - IQM > Binary file format. Includes mesh vertex data but also animation data,
* raylib can load .iqm animations * meshes and animation data can be loaded
* - VOX > Binary file format. MagikaVoxel mesh format: * - VOX > Binary file format. MagikaVoxel mesh format:
* https://github.com/ephtracy/voxel-model/blob/master/MagicaVoxel-file-format-vox.txt * https://github.com/ephtracy/voxel-model/blob/master/MagicaVoxel-file-format-vox.txt
* - M3D > Binary file format. Model 3D format: * - M3D > Binary file format. Model 3D format:
@ -43,7 +43,7 @@ int main(void)
// Define the camera to look into our 3d world // Define the camera to look into our 3d world
Camera camera = { 0 }; Camera camera = { 0 };
camera.position = (Vector3){ 50.0f, 50.0f, 50.0f }; // Camera position camera.position = (Vector3){ 50.0f, 50.0f, 50.0f }; // Camera position
camera.target = (Vector3){ 0.0f, 10.0f, 0.0f }; // Camera looking at point camera.target = (Vector3){ 0.0f, 12.0f, 0.0f }; // Camera looking at point
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target) camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target)
camera.fovy = 45.0f; // Camera field-of-view Y camera.fovy = 45.0f; // Camera field-of-view Y
camera.projection = CAMERA_PERSPECTIVE; // Camera mode type camera.projection = CAMERA_PERSPECTIVE; // Camera mode type
@ -61,8 +61,6 @@ int main(void)
bool selected = false; // Selected object flag bool selected = false; // Selected object flag
DisableCursor(); // Limit cursor to relative movement inside the window
SetTargetFPS(60); // Set our game to run at 60 frames-per-second SetTargetFPS(60); // Set our game to run at 60 frames-per-second
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
@ -71,7 +69,7 @@ int main(void)
{ {
// Update // Update
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
UpdateCamera(&camera, CAMERA_FIRST_PERSON); UpdateCamera(&camera, CAMERA_ORBITAL);
// Load new models/textures on drag&drop // Load new models/textures on drag&drop
if (IsFileDropped()) if (IsFileDropped())
@ -93,7 +91,10 @@ int main(void)
bounds = GetMeshBoundingBox(model.meshes[0]); bounds = GetMeshBoundingBox(model.meshes[0]);
// TODO: Move camera position from target enough distance to visualize model properly // Move camera position from target enough distance to visualize model properly
camera.position.x = bounds.max.x + 10.0f;
camera.position.y = bounds.max.y + 10.0f;
camera.position.z = bounds.max.z + 10.0f;
} }
else if (IsFileExtension(droppedFiles.paths[0], ".png")) // Texture file formats supported else if (IsFileExtension(droppedFiles.paths[0], ".png")) // Texture file formats supported
{ {

View File

@ -42,15 +42,17 @@ int main(void)
camera.fovy = 45.0f; // Camera field-of-view Y camera.fovy = 45.0f; // Camera field-of-view Y
camera.projection = CAMERA_PERSPECTIVE; // Camera projection type camera.projection = CAMERA_PERSPECTIVE; // Camera projection type
// Load gltf model // Load model
Model model = LoadModel("resources/models/gltf/robot.glb"); Model model = LoadModel("resources/models/gltf/robot.glb");
Vector3 position = { 0.0f, 0.0f, 0.0f }; // Set model position Vector3 position = { 0.0f, 0.0f, 0.0f }; // Set model world position
// Load gltf model animations // Load model animations
int animsCount = 0; int animCount = 0;
unsigned int animIndex = 0; ModelAnimation *anims = LoadModelAnimations("resources/models/gltf/robot.glb", &animCount);
unsigned int animCurrentFrame = 0;
ModelAnimation *modelAnimations = LoadModelAnimations("resources/models/gltf/robot.glb", &animsCount); // Animation playing variables
unsigned int animIndex = 0; // Current animation playing
unsigned int animCurrentFrame = 0; // Current animation frame
SetTargetFPS(60); // Set our game to run at 60 frames-per-second SetTargetFPS(60); // Set our game to run at 60 frames-per-second
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
@ -63,13 +65,12 @@ int main(void)
UpdateCamera(&camera, CAMERA_ORBITAL); UpdateCamera(&camera, CAMERA_ORBITAL);
// Select current animation // Select current animation
if (IsMouseButtonPressed(MOUSE_BUTTON_RIGHT)) animIndex = (animIndex + 1)%animsCount; if (IsKeyPressed(KEY_RIGHT)) animIndex = (animIndex + 1)%animCount;
else if (IsMouseButtonPressed(MOUSE_BUTTON_LEFT)) animIndex = (animIndex + animsCount - 1)%animsCount; else if (IsKeyPressed(KEY_LEFT)) animIndex = (animIndex + animCount - 1)%animCount;
// Update model animation // Update model animation
ModelAnimation anim = modelAnimations[animIndex]; animCurrentFrame = (animCurrentFrame + 1)%anims[animIndex].keyframeCount;
animCurrentFrame = (animCurrentFrame + 1)%anim.frameCount; UpdateModelAnimation(model, anims[animIndex], (float)animCurrentFrame);
UpdateModelAnimation(model, anim, animCurrentFrame);
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
// Draw // Draw
@ -79,12 +80,15 @@ int main(void)
ClearBackground(RAYWHITE); ClearBackground(RAYWHITE);
BeginMode3D(camera); BeginMode3D(camera);
DrawModel(model, position, 1.0f, WHITE); // Draw animated model
DrawModel(model, position, 1.0f, WHITE);
DrawGrid(10, 1.0f); DrawGrid(10, 1.0f);
EndMode3D(); EndMode3D();
DrawText("Use the LEFT/RIGHT mouse buttons to switch animation", 10, 10, 20, GRAY); DrawText(TextFormat("Current animation: %s", anims[animIndex].name), 10, 40, 20, MAROON);
DrawText(TextFormat("Animation: %s", anim.name), 10, GetScreenHeight() - 20, 10, DARKGRAY); DrawText("Use the LEFT/RIGHT keys to switch animation", 10, 10, 20, GRAY);
EndDrawing(); EndDrawing();
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
@ -92,7 +96,8 @@ int main(void)
// De-Initialization // De-Initialization
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
UnloadModel(model); // Unload model and meshes/material UnloadModelAnimations(anims, animCount); // Unload model animations data
UnloadModel(model); // Unload model
CloseWindow(); // Close window and OpenGL context CloseWindow(); // Close window and OpenGL context
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -1,6 +1,6 @@
/******************************************************************************************* /*******************************************************************************************
* *
* raylib [models] example - animation playing * raylib [models] example - loading iqm
* *
* Example complexity rating: [] 2/4 * Example complexity rating: [] 2/4
* *
@ -8,17 +8,15 @@
* *
* Example contributed by Culacant (@culacant) and reviewed by Ramon Santamaria (@raysan5) * Example contributed by Culacant (@culacant) and reviewed by Ramon Santamaria (@raysan5)
* *
* NOTES: To export an IQM model from blender, make sure it is not posed, the vertices need
* to be in the same position as they would be in edit mode and the scale of the models is
* set to 0; scaling can be set from the export menu
*
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified, * Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software * BSD-like license that allows static linking with closed source software
* *
* Copyright (c) 2019-2025 Culacant (@culacant) and Ramon Santamaria (@raysan5) * Copyright (c) 2019-2025 Culacant (@culacant) and Ramon Santamaria (@raysan5)
* *
********************************************************************************************
*
* NOTE: To export a model from blender, make sure it is not posed, the vertices need to be
* in the same position as they would be in edit mode and the scale of your models is
* set to 0. Scaling can be done from the export menu
*
********************************************************************************************/ ********************************************************************************************/
#include "raylib.h" #include "raylib.h"
@ -33,12 +31,12 @@ int main(void)
const int screenWidth = 800; const int screenWidth = 800;
const int screenHeight = 450; const int screenHeight = 450;
InitWindow(screenWidth, screenHeight, "raylib [models] example - animation playing"); InitWindow(screenWidth, screenHeight, "raylib [models] example - loading iqm");
// Define the camera to look into our 3d world // Define the camera to look into our 3d world
Camera camera = { 0 }; Camera camera = { 0 };
camera.position = (Vector3){ 10.0f, 10.0f, 10.0f }; // Camera position camera.position = (Vector3){ 10.0f, 10.0f, 10.0f }; // Camera position
camera.target = (Vector3){ 0.0f, 0.0f, 0.0f }; // Camera looking at point camera.target = (Vector3){ 0.0f, 4.0f, 0.0f }; // Camera looking at point
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target) camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target)
camera.fovy = 45.0f; // Camera field-of-view Y camera.fovy = 45.0f; // Camera field-of-view Y
camera.projection = CAMERA_PERSPECTIVE; // Camera mode type camera.projection = CAMERA_PERSPECTIVE; // Camera mode type
@ -46,15 +44,16 @@ int main(void)
Model model = LoadModel("resources/models/iqm/guy.iqm"); // Load the animated model mesh and basic data Model model = LoadModel("resources/models/iqm/guy.iqm"); // Load the animated model mesh and basic data
Texture2D texture = LoadTexture("resources/models/iqm/guytex.png"); // Load model texture and set material Texture2D texture = LoadTexture("resources/models/iqm/guytex.png"); // Load model texture and set material
SetMaterialTexture(&model.materials[0], MATERIAL_MAP_DIFFUSE, texture); // Set model material map texture SetMaterialTexture(&model.materials[0], MATERIAL_MAP_DIFFUSE, texture); // Set model material map texture
Vector3 position = { 0.0f, 0.0f, 0.0f }; // Set model position Vector3 position = { 0.0f, 0.0f, 0.0f }; // Set model position
// Load animation data // Load animation data
int animsCount = 0; int animCount = 0;
ModelAnimation *anims = LoadModelAnimations("resources/models/iqm/guyanim.iqm", &animsCount); ModelAnimation *anims = LoadModelAnimations("resources/models/iqm/guyanim.iqm", &animCount);
int animFrameCounter = 0;
// Animation playing variables
unsigned int animIndex = 0; // Current animation playing
float animCurrentFrame = 0.0f; // Current animation frame (supporting interpolated frames)
DisableCursor(); // Catch cursor
SetTargetFPS(60); // Set our game to run at 60 frames-per-second SetTargetFPS(60); // Set our game to run at 60 frames-per-second
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
@ -63,15 +62,12 @@ int main(void)
{ {
// Update // Update
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
UpdateCamera(&camera, CAMERA_FIRST_PERSON); UpdateCamera(&camera, CAMERA_ORBITAL);
// Play animation when spacebar is held down // Play animation when spacebar is held down
if (IsKeyDown(KEY_SPACE)) animCurrentFrame += 1.0f;
{ UpdateModelAnimation(model, anims[0], animCurrentFrame);
animFrameCounter++; if (animCurrentFrame >= anims[0].keyframeCount) animCurrentFrame = 0;
UpdateModelAnimation(model, anims[0], animFrameCounter);
if (animFrameCounter >= anims[0].frameCount) animFrameCounter = 0;
}
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
// Draw // Draw
@ -84,16 +80,11 @@ int main(void)
DrawModelEx(model, position, (Vector3){ 1.0f, 0.0f, 0.0f }, -90.0f, (Vector3){ 1.0f, 1.0f, 1.0f }, WHITE); DrawModelEx(model, position, (Vector3){ 1.0f, 0.0f, 0.0f }, -90.0f, (Vector3){ 1.0f, 1.0f, 1.0f }, WHITE);
for (int i = 0; i < model.boneCount; i++) DrawGrid(10, 1.0f);
{
DrawCube(anims[0].framePoses[animFrameCounter][i].translation, 0.2f, 0.2f, 0.2f, RED);
}
DrawGrid(10, 1.0f); // Draw a grid
EndMode3D(); EndMode3D();
DrawText("PRESS SPACE to PLAY MODEL ANIMATION", 10, 10, 20, MAROON); DrawText(TextFormat("Current animation: %s", anims[animIndex].name), 10, 10, 20, MAROON);
DrawText("(c) Guy IQM 3D model by @culacant", screenWidth - 200, screenHeight - 20, 10, GRAY); DrawText("(c) Guy IQM 3D model by @culacant", screenWidth - 200, screenHeight - 20, 10, GRAY);
EndDrawing(); EndDrawing();
@ -103,7 +94,7 @@ int main(void)
// De-Initialization // De-Initialization
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
UnloadTexture(texture); // Unload texture UnloadTexture(texture); // Unload texture
UnloadModelAnimations(anims, animsCount); // Unload model animations data UnloadModelAnimations(anims, animCount); // Unload model animations data
UnloadModel(model); // Unload model UnloadModel(model); // Unload model
CloseWindow(); // Close window and OpenGL context CloseWindow(); // Close window and OpenGL context

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

View File

@ -21,6 +21,8 @@
#include "raylib.h" #include "raylib.h"
static void DrawModelSkeleton(ModelSkeleton skeleton, ModelAnimPose pose, float scale, Color color);
//------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------
// Program main entry point // Program main entry point
//------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------
@ -41,22 +43,17 @@ int main(void)
camera.fovy = 45.0f; // Camera field-of-view Y camera.fovy = 45.0f; // Camera field-of-view Y
camera.projection = CAMERA_PERSPECTIVE; // Camera projection type camera.projection = CAMERA_PERSPECTIVE; // Camera projection type
// Load model
Model model = LoadModel("resources/models/m3d/cesium_man.m3d"); // Load the animated model mesh and basic data
Vector3 position = { 0.0f, 0.0f, 0.0f }; // Set model position Vector3 position = { 0.0f, 0.0f, 0.0f }; // Set model position
char modelFileName[128] = "resources/models/m3d/cesium_man.m3d"; // Load animation data
bool drawMesh = 1; int animCount = 0;
bool drawSkeleton = 1; ModelAnimation *anims = LoadModelAnimations("resources/models/m3d/cesium_man.m3d", &animCount);
bool animPlaying = false; // Store anim state, what to draw
// Load model // Animation playing variables
Model model = LoadModel(modelFileName); // Load the bind-pose model mesh and basic data unsigned int animIndex = 0; // Current animation playing
float animCurrentFrame = 0.0f; // Current animation frame (supporting interpolated frames)
// Load animations
int animsCount = 0;
int animFrameCounter = 0, animId = 0;
ModelAnimation *anims = LoadModelAnimations(modelFileName, &animsCount); // Load skeletal animation data
DisableCursor(); // Limit cursor to relative movement inside the window
SetTargetFPS(60); // Set our game to run at 60 frames-per-second SetTargetFPS(60); // Set our game to run at 60 frames-per-second
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
@ -66,38 +63,16 @@ int main(void)
{ {
// Update // Update
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
UpdateCamera(&camera, CAMERA_FIRST_PERSON); UpdateCamera(&camera, CAMERA_ORBITAL);
if (animsCount) // Select current animation
{ if (IsKeyPressed(KEY_RIGHT)) animIndex = (animIndex + 1)%animCount;
// Play animation when spacebar is held down (or step one frame with N) else if (IsKeyPressed(KEY_LEFT)) animIndex = (animIndex + animCount - 1)%animCount;
if (IsKeyDown(KEY_SPACE) || IsKeyPressed(KEY_N))
{
animFrameCounter++;
if (animFrameCounter >= anims[animId].frameCount) animFrameCounter = 0; // Update model animation
animCurrentFrame += 1.0f;
UpdateModelAnimation(model, anims[animId], animFrameCounter); if (animCurrentFrame >= anims[animIndex].keyframeCount) animCurrentFrame = 0.0f;
animPlaying = true; UpdateModelAnimation(model, anims[animIndex], animCurrentFrame);
}
// Select animation by pressing C
if (IsKeyPressed(KEY_C))
{
animFrameCounter = 0;
animId++;
if (animId >= (int)animsCount) animId = 0;
UpdateModelAnimation(model, anims[animId], 0);
animPlaying = true;
}
}
// Toggle skeleton drawing
if (IsKeyPressed(KEY_B)) drawSkeleton ^= 1;
// Toggle mesh drawing
if (IsKeyPressed(KEY_M)) drawMesh ^= 1;
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
// Draw // Draw
@ -109,52 +84,19 @@ int main(void)
BeginMode3D(camera); BeginMode3D(camera);
// Draw 3d model with texture // Draw 3d model with texture
if (drawMesh) DrawModel(model, position, 1.0f, WHITE); if (!IsKeyDown(KEY_SPACE)) DrawModel(model, position, 1.0f, WHITE);
// Draw the animated skeleton
if (drawSkeleton)
{
// Loop to (boneCount - 1) because the last one is a special "no bone" bone,
// needed to workaround buggy models
// without a -1, we would always draw a cube at the origin
for (int i = 0; i < model.boneCount - 1; i++)
{
// By default the model is loaded in bind-pose by LoadModel()
// But if UpdateModelAnimation() has been called at least once
// then the model is already in animation pose, so we need the animated skeleton
if (!animPlaying || !animsCount)
{
// Display the bind-pose skeleton
DrawCube(model.bindPose[i].translation, 0.04f, 0.04f, 0.04f, RED);
if (model.bones[i].parent >= 0)
{
DrawLine3D(model.bindPose[i].translation,
model.bindPose[model.bones[i].parent].translation, RED);
}
}
else else
{ {
// Display the frame-pose skeleton // Draw the animated skeleton
DrawCube(anims[animId].framePoses[animFrameCounter][i].translation, 0.05f, 0.05f, 0.05f, RED); DrawModelSkeleton(model.skeleton, anims[animIndex].keyframePoses[(int)animCurrentFrame], 1.0f, RED);
if (anims[animId].bones[i].parent >= 0)
{
DrawLine3D(anims[animId].framePoses[animFrameCounter][i].translation,
anims[animId].framePoses[animFrameCounter][anims[animId].bones[i].parent].translation, RED);
}
}
}
} }
DrawGrid(10, 1.0f); // Draw a grid DrawGrid(10, 1.0f);
EndMode3D(); EndMode3D();
DrawText("PRESS SPACE to PLAY MODEL ANIMATION", 10, GetScreenHeight() - 80, 10, MAROON); DrawText(TextFormat("Current animation: %s", anims[animIndex].name), 10, 10, 20, LIGHTGRAY);
DrawText("PRESS N to STEP ONE ANIMATION FRAME", 10, GetScreenHeight() - 60, 10, DARKGRAY); DrawText("Press SPACE to draw skeleton", 10, 40, 20, MAROON);
DrawText("PRESS C to CYCLE THROUGH ANIMATIONS", 10, GetScreenHeight() - 40, 10, DARKGRAY);
DrawText("PRESS M to toggle MESH, B to toggle SKELETON DRAWING", 10, GetScreenHeight() - 20, 10, DARKGRAY);
DrawText("(c) CesiumMan model by KhronosGroup", GetScreenWidth() - 210, GetScreenHeight() - 20, 10, GRAY); DrawText("(c) CesiumMan model by KhronosGroup", GetScreenWidth() - 210, GetScreenHeight() - 20, 10, GRAY);
EndDrawing(); EndDrawing();
@ -163,10 +105,7 @@ int main(void)
// De-Initialization // De-Initialization
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
UnloadModelAnimations(anims, animCount); // Unload model animations data
// Unload model animations data
UnloadModelAnimations(anims, animsCount);
UnloadModel(model); // Unload model UnloadModel(model); // Unload model
CloseWindow(); // Close window and OpenGL context CloseWindow(); // Close window and OpenGL context
@ -174,3 +113,20 @@ int main(void)
return 0; return 0;
} }
// Draw model skeleton
static void DrawModelSkeleton(ModelSkeleton skeleton, ModelAnimPose pose, float scale, Color color)
{
// Loop to (boneCount - 1) because the last one is a special "no bone" bone,
// needed to workaround buggy models without a -1, a cube is always drawn at the origin
for (int i = 0; i < skeleton.boneCount - 1; i++)
{
// Display the frame-pose skeleton
DrawCube(pose[i].translation, scale*0.05f, scale*0.05f, scale*0.05f, color);
if (skeleton.bones[i].parent >= 0)
{
DrawLine3D(pose[i].translation, pose[skeleton.bones[i].parent].translation, color);
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -130,6 +130,7 @@ int main(void)
camerarot.y = 0; camerarot.y = 0;
} }
// Update camere movement, custom controls
UpdateCameraPro(&camera, UpdateCameraPro(&camera,
(Vector3){ (IsKeyDown(KEY_W) || IsKeyDown(KEY_UP))*0.1f - (IsKeyDown(KEY_S) || IsKeyDown(KEY_DOWN))*0.1f, // Move forward-backward (Vector3){ (IsKeyDown(KEY_W) || IsKeyDown(KEY_UP))*0.1f - (IsKeyDown(KEY_S) || IsKeyDown(KEY_DOWN))*0.1f, // Move forward-backward
(IsKeyDown(KEY_D) || IsKeyDown(KEY_RIGHT))*0.1f - (IsKeyDown(KEY_A) || IsKeyDown(KEY_LEFT))*0.1f, // Move right-left (IsKeyDown(KEY_D) || IsKeyDown(KEY_RIGHT))*0.1f - (IsKeyDown(KEY_A) || IsKeyDown(KEY_LEFT))*0.1f, // Move right-left
@ -173,7 +174,7 @@ int main(void)
DrawText("- MOUSE LEFT BUTTON: CYCLE VOX MODELS", 20, 50, 10, BLUE); DrawText("- MOUSE LEFT BUTTON: CYCLE VOX MODELS", 20, 50, 10, BLUE);
DrawText("- MOUSE MIDDLE BUTTON: ZOOM OR ROTATE CAMERA", 20, 70, 10, BLUE); DrawText("- MOUSE MIDDLE BUTTON: ZOOM OR ROTATE CAMERA", 20, 70, 10, BLUE);
DrawText("- UP-DOWN-LEFT-RIGHT KEYS: MOVE CAMERA", 20, 90, 10, BLUE); DrawText("- UP-DOWN-LEFT-RIGHT KEYS: MOVE CAMERA", 20, 90, 10, BLUE);
DrawText(TextFormat("Model file: %s", GetFileName(voxFileNames[currentModel])), 10, 10, 20, GRAY); DrawText(TextFormat("VOX model file: %s", GetFileName(voxFileNames[currentModel])), 10, 10, 20, GRAY);
EndDrawing(); EndDrawing();
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 36 KiB

View File

@ -357,8 +357,10 @@
#elif defined(USE_LIBTYPE_SHARED) #elif defined(USE_LIBTYPE_SHARED)
#define RAYGUIAPI __declspec(dllimport) // Using the library as a Win32 shared library (.dll) #define RAYGUIAPI __declspec(dllimport) // Using the library as a Win32 shared library (.dll)
#endif #endif
#if !defined(_CRT_SECURE_NO_WARNINGS)
#define _CRT_SECURE_NO_WARNINGS // Disable unsafe warnings on scanf() functions in MSVC #define _CRT_SECURE_NO_WARNINGS // Disable unsafe warnings on scanf() functions in MSVC
#endif #endif
#endif
// Function specifiers definition // Function specifiers definition
#ifndef RAYGUIAPI #ifndef RAYGUIAPI
@ -646,6 +648,7 @@ typedef enum {
// ProgressBar // ProgressBar
typedef enum { typedef enum {
PROGRESS_PADDING = 16, // ProgressBar internal padding PROGRESS_PADDING = 16, // ProgressBar internal padding
PROGRESS_SIDE, // ProgressBar increment side: 0-left->right, 1-right-left
} GuiProgressBarProperty; } GuiProgressBarProperty;
// ScrollBar // ScrollBar
@ -3522,8 +3525,16 @@ int GuiProgressBar(Rectangle bounds, const char *textLeft, const char *textRight
} }
// Draw slider internal progress bar (depends on state) // Draw slider internal progress bar (depends on state)
if (GuiGetStyle(PROGRESSBAR, PROGRESS_SIDE) == 0) // Left-->Right
{
GuiDrawRectangle(progress, 0, BLANK, GetColor(GuiGetStyle(PROGRESSBAR, BASE_COLOR_PRESSED))); GuiDrawRectangle(progress, 0, BLANK, GetColor(GuiGetStyle(PROGRESSBAR, BASE_COLOR_PRESSED)));
} }
else // Right-->Left
{
progress.x = bounds.x + bounds.width - progress.width - GuiGetStyle(PROGRESSBAR, BORDER_WIDTH);
GuiDrawRectangle(progress, 0, BLANK, GetColor(GuiGetStyle(PROGRESSBAR, BASE_COLOR_PRESSED)));
}
}
// Draw left/right text if provided // Draw left/right text if provided
if (textLeft != NULL) if (textLeft != NULL)
@ -5119,11 +5130,11 @@ static const char *GetTextIcon(const char *text, int *iconId)
// Get text divided into lines (by line-breaks '\n') // Get text divided into lines (by line-breaks '\n')
// WARNING: It returns pointers to new lines but it does not add NULL ('\0') terminator! // WARNING: It returns pointers to new lines but it does not add NULL ('\0') terminator!
static char **GetTextLines(const char *text, int *count) static const char **GetTextLines(const char *text, int *count)
{ {
#define RAYGUI_MAX_TEXT_LINES 128 #define RAYGUI_MAX_TEXT_LINES 128
static char *lines[RAYGUI_MAX_TEXT_LINES] = { 0 }; static const char *lines[RAYGUI_MAX_TEXT_LINES] = { 0 };
for (int i = 0; i < RAYGUI_MAX_TEXT_LINES; i++) lines[i] = NULL; // Init NULL pointers to substrings for (int i = 0; i < RAYGUI_MAX_TEXT_LINES; i++) lines[i] = NULL; // Init NULL pointers to substrings
int textLength = (int)strlen(text); int textLength = (int)strlen(text);
@ -5193,7 +5204,7 @@ static void GuiDrawText(const char *text, Rectangle textBounds, int alignment, C
// WARNING: GuiTextSplit() function can't be used now because it can have already been used // WARNING: GuiTextSplit() function can't be used now because it can have already been used
// before the GuiDrawText() call and its buffer is static, it would be overriden :( // before the GuiDrawText() call and its buffer is static, it would be overriden :(
int lineCount = 0; int lineCount = 0;
char **lines = GetTextLines(text, &lineCount); const char **lines = GetTextLines(text, &lineCount);
// Text style variables // Text style variables
//int alignment = GuiGetStyle(DEFAULT, TEXT_ALIGNMENT); //int alignment = GuiGetStyle(DEFAULT, TEXT_ALIGNMENT);

View File

@ -6,7 +6,7 @@
attribute vec3 vertexPosition; attribute vec3 vertexPosition;
attribute vec2 vertexTexCoord; attribute vec2 vertexTexCoord;
attribute vec4 vertexColor; attribute vec4 vertexColor;
attribute vec4 vertexBoneIds; attribute vec4 vertexBoneIndices;
attribute vec4 vertexBoneWeights; attribute vec4 vertexBoneWeights;
// Input uniform values // Input uniform values
@ -19,10 +19,10 @@ varying vec4 fragColor;
void main() void main()
{ {
int boneIndex0 = int(vertexBoneIds.x); int boneIndex0 = int(vertexBoneIndices.x);
int boneIndex1 = int(vertexBoneIds.y); int boneIndex1 = int(vertexBoneIndices.y);
int boneIndex2 = int(vertexBoneIds.z); int boneIndex2 = int(vertexBoneIndices.z);
int boneIndex3 = int(vertexBoneIds.w); int boneIndex3 = int(vertexBoneIndices.w);
// WARNING: OpenGL ES 2.0 does not support automatic matrix transposing, neither transpose() function // WARNING: OpenGL ES 2.0 does not support automatic matrix transposing, neither transpose() function
mat4 boneMatrixTransposed0 = mat4( mat4 boneMatrixTransposed0 = mat4(

View File

@ -6,7 +6,7 @@
attribute vec3 vertexPosition; attribute vec3 vertexPosition;
attribute vec2 vertexTexCoord; attribute vec2 vertexTexCoord;
attribute vec4 vertexColor; attribute vec4 vertexColor;
attribute vec4 vertexBoneIds; attribute vec4 vertexBoneIndices;
attribute vec4 vertexBoneWeights; attribute vec4 vertexBoneWeights;
// Input uniform values // Input uniform values
@ -19,10 +19,10 @@ varying vec4 fragColor;
void main() void main()
{ {
int boneIndex0 = int(vertexBoneIds.x); int boneIndex0 = int(vertexBoneIndices.x);
int boneIndex1 = int(vertexBoneIds.y); int boneIndex1 = int(vertexBoneIndices.y);
int boneIndex2 = int(vertexBoneIds.z); int boneIndex2 = int(vertexBoneIndices.z);
int boneIndex3 = int(vertexBoneIds.w); int boneIndex3 = int(vertexBoneIndices.w);
// WARNING: OpenGL ES 2.0 does not support automatic matrix transposing, neither transpose() function // WARNING: OpenGL ES 2.0 does not support automatic matrix transposing, neither transpose() function
mat4 boneMatrixTransposed0 = mat4( mat4 boneMatrixTransposed0 = mat4(

View File

@ -7,7 +7,7 @@ in vec3 vertexPosition;
in vec2 vertexTexCoord; in vec2 vertexTexCoord;
in vec4 vertexColor; in vec4 vertexColor;
in vec3 vertexNormal; in vec3 vertexNormal;
in vec4 vertexBoneIds; in vec4 vertexBoneIndices;
in vec4 vertexBoneWeights; in vec4 vertexBoneWeights;
// Input uniform values // Input uniform values
@ -22,10 +22,10 @@ out vec3 fragNormal;
void main() void main()
{ {
int boneIndex0 = int(vertexBoneIds.x); int boneIndex0 = int(vertexBoneIndices.x);
int boneIndex1 = int(vertexBoneIds.y); int boneIndex1 = int(vertexBoneIndices.y);
int boneIndex2 = int(vertexBoneIds.z); int boneIndex2 = int(vertexBoneIndices.z);
int boneIndex3 = int(vertexBoneIds.w); int boneIndex3 = int(vertexBoneIndices.w);
vec4 skinnedPosition = vec4 skinnedPosition =
vertexBoneWeights.x*(boneMatrices[boneIndex0]*vec4(vertexPosition, 1.0)) + vertexBoneWeights.x*(boneMatrices[boneIndex0]*vec4(vertexPosition, 1.0)) +
@ -42,7 +42,6 @@ void main()
fragTexCoord = vertexTexCoord; fragTexCoord = vertexTexCoord;
fragColor = vertexColor; fragColor = vertexColor;
fragNormal = normalize(vec3(matNormal*skinnedNormal)); fragNormal = normalize(vec3(matNormal*skinnedNormal));
gl_Position = mvp*skinnedPosition; gl_Position = mvp*skinnedPosition;

View File

@ -30,7 +30,6 @@
#if defined(PLATFORM_DESKTOP) || defined(PLATFORM_DESKTOP_SDL) #if defined(PLATFORM_DESKTOP) || defined(PLATFORM_DESKTOP_SDL)
#if defined(GRAPHICS_API_OPENGL_ES2) #if defined(GRAPHICS_API_OPENGL_ES2)
#define GLAD_GLES2_IMPLEMENTATION
#include "glad_gles2.h" // Required for: OpenGL functionality #include "glad_gles2.h" // Required for: OpenGL functionality
#define glGenVertexArrays glGenVertexArraysOES #define glGenVertexArrays glGenVertexArraysOES
#define glBindVertexArray glBindVertexArrayOES #define glBindVertexArray glBindVertexArrayOES

View File

@ -646,6 +646,7 @@ typedef enum {
// ProgressBar // ProgressBar
typedef enum { typedef enum {
PROGRESS_PADDING = 16, // ProgressBar internal padding PROGRESS_PADDING = 16, // ProgressBar internal padding
PROGRESS_SIDE, // ProgressBar increment side: 0-left->right, 1-right-left
} GuiProgressBarProperty; } GuiProgressBarProperty;
// ScrollBar // ScrollBar
@ -3522,8 +3523,16 @@ int GuiProgressBar(Rectangle bounds, const char *textLeft, const char *textRight
} }
// Draw slider internal progress bar (depends on state) // Draw slider internal progress bar (depends on state)
if (GuiGetStyle(PROGRESSBAR, PROGRESS_SIDE) == 0) // Left-->Right
{
GuiDrawRectangle(progress, 0, BLANK, GetColor(GuiGetStyle(PROGRESSBAR, BASE_COLOR_PRESSED))); GuiDrawRectangle(progress, 0, BLANK, GetColor(GuiGetStyle(PROGRESSBAR, BASE_COLOR_PRESSED)));
} }
else // Right-->Left
{
progress.x = bounds.x + bounds.width - progress.width - GuiGetStyle(PROGRESSBAR, BORDER_WIDTH);
GuiDrawRectangle(progress, 0, BLANK, GetColor(GuiGetStyle(PROGRESSBAR, BASE_COLOR_PRESSED)));
}
}
// Draw left/right text if provided // Draw left/right text if provided
if (textLeft != NULL) if (textLeft != NULL)
@ -5119,11 +5128,11 @@ static const char *GetTextIcon(const char *text, int *iconId)
// Get text divided into lines (by line-breaks '\n') // Get text divided into lines (by line-breaks '\n')
// WARNING: It returns pointers to new lines but it does not add NULL ('\0') terminator! // WARNING: It returns pointers to new lines but it does not add NULL ('\0') terminator!
static char **GetTextLines(const char *text, int *count) static const char **GetTextLines(const char *text, int *count)
{ {
#define RAYGUI_MAX_TEXT_LINES 128 #define RAYGUI_MAX_TEXT_LINES 128
static char *lines[RAYGUI_MAX_TEXT_LINES] = { 0 }; static const char *lines[RAYGUI_MAX_TEXT_LINES] = { 0 };
for (int i = 0; i < RAYGUI_MAX_TEXT_LINES; i++) lines[i] = NULL; // Init NULL pointers to substrings for (int i = 0; i < RAYGUI_MAX_TEXT_LINES; i++) lines[i] = NULL; // Init NULL pointers to substrings
int textLength = (int)strlen(text); int textLength = (int)strlen(text);
@ -5193,7 +5202,7 @@ static void GuiDrawText(const char *text, Rectangle textBounds, int alignment, C
// WARNING: GuiTextSplit() function can't be used now because it can have already been used // WARNING: GuiTextSplit() function can't be used now because it can have already been used
// before the GuiDrawText() call and its buffer is static, it would be overriden :( // before the GuiDrawText() call and its buffer is static, it would be overriden :(
int lineCount = 0; int lineCount = 0;
char **lines = GetTextLines(text, &lineCount); const char **lines = GetTextLines(text, &lineCount);
// Text style variables // Text style variables
//int alignment = GuiGetStyle(DEFAULT, TEXT_ALIGNMENT); //int alignment = GuiGetStyle(DEFAULT, TEXT_ALIGNMENT);

View File

@ -0,0 +1,58 @@
#version 100
precision mediump float;
varying vec3 fragPosition;
varying vec2 fragTexCoord;
varying vec4 fragColor;
varying vec3 fragNormal;
uniform sampler2D texture0;
uniform vec4 colDiffuse;
uniform vec3 viewPos;
uniform float numBands;
struct Light {
int enabled;
int type;
vec3 position;
vec3 target;
vec4 color;
};
uniform Light lights[4];
void main()
{
vec4 texColor = texture2D(texture0, fragTexCoord);
vec3 baseColor = texColor.rgb * fragColor.rgb * colDiffuse.rgb;
vec3 norm = normalize(fragNormal);
float lightAccum = 0.08; // ambient floor
for (int i = 0; i < 4; i++)
{
if (lights[i].enabled == 1) // no continue in GLSL ES 1.0
{
vec3 lightDir;
if (lights[i].type == 0)
{
// Directional: direction is from position toward target.
lightDir = normalize(lights[i].position - lights[i].target);
}
else
{
// Point: direction from surface to light.
lightDir = normalize(lights[i].position - fragPosition);
}
float NdotL = max(dot(norm, lightDir), 0.0);
// Quantize NdotL into numBands discrete steps.
float quantized = min(floor(NdotL * numBands), numBands - 1.0) / (numBands - 1.0);
lightAccum += quantized * lights[i].color.r;
}
}
lightAccum = clamp(lightAccum, 0.0, 1.0);
gl_FragColor = vec4(baseColor * lightAccum, texColor.a * colDiffuse.a);
}

View File

@ -0,0 +1,47 @@
#version 100
attribute vec3 vertexPosition;
attribute vec2 vertexTexCoord;
attribute vec3 vertexNormal;
attribute vec4 vertexColor;
uniform mat4 mvp;
uniform mat4 matModel;
varying vec3 fragPosition;
varying vec2 fragTexCoord;
varying vec4 fragColor;
varying vec3 fragNormal;
mat3 inverse(mat3 m)
{
float a00 = m[0][0], a01 = m[0][1], a02 = m[0][2];
float a10 = m[1][0], a11 = m[1][1], a12 = m[1][2];
float a20 = m[2][0], a21 = m[2][1], a22 = m[2][2];
float b01 = a22*a11 - a12*a21;
float b11 = -a22*a10 + a12*a20;
float b21 = a21*a10 - a11*a20;
float det = a00*b01 + a01*b11 + a02*b21;
return mat3(b01, (-a22*a01 + a02*a21), ( a12*a01 - a02*a11),
b11, ( a22*a00 - a02*a20), (-a12*a00 + a02*a10),
b21, (-a21*a00 + a01*a20), ( a11*a00 - a01*a10)) / det;
}
mat3 transpose(mat3 m)
{
return mat3(m[0][0], m[1][0], m[2][0],
m[0][1], m[1][1], m[2][1],
m[0][2], m[1][2], m[2][2]);
}
void main()
{
fragPosition = vec3(matModel * vec4(vertexPosition, 1.0));
fragTexCoord = vertexTexCoord;
fragColor = vertexColor;
mat3 normalMatrix = transpose(inverse(mat3(matModel)));
fragNormal = normalize(normalMatrix * vertexNormal);
gl_Position = mvp * vec4(vertexPosition, 1.0);
}

View File

@ -0,0 +1,8 @@
#version 100
precision mediump float;
void main()
{
gl_FragColor = vec4(0.05, 0.05, 0.05, 1.0);
}

View File

@ -0,0 +1,15 @@
#version 100
attribute vec3 vertexPosition;
attribute vec3 vertexNormal;
attribute vec2 vertexTexCoord;
attribute vec4 vertexColor;
uniform mat4 mvp;
uniform float outlineThickness;
void main()
{
vec3 extruded = vertexPosition + vertexNormal * outlineThickness;
gl_Position = mvp * vec4(extruded, 1.0);
}

View File

@ -0,0 +1,56 @@
#version 120
varying vec3 fragPosition;
varying vec2 fragTexCoord;
varying vec4 fragColor;
varying vec3 fragNormal;
uniform sampler2D texture0;
uniform vec4 colDiffuse;
uniform vec3 viewPos;
uniform float numBands;
struct Light {
int enabled;
int type;
vec3 position;
vec3 target;
vec4 color;
};
uniform Light lights[4];
void main()
{
vec4 texColor = texture2D(texture0, fragTexCoord);
vec3 baseColor = texColor.rgb * fragColor.rgb * colDiffuse.rgb;
vec3 norm = normalize(fragNormal);
float lightAccum = 0.08; // ambient floor
for (int i = 0; i < 4; i++)
{
if (lights[i].enabled == 1)
{
vec3 lightDir;
if (lights[i].type == 0)
{
// Directional: direction is from position toward target.
lightDir = normalize(lights[i].position - lights[i].target);
}
else
{
// Point: direction from surface to light.
lightDir = normalize(lights[i].position - fragPosition);
}
float NdotL = max(dot(norm, lightDir), 0.0);
// Quantize NdotL into numBands discrete steps.
float quantized = min(floor(NdotL * numBands), numBands - 1.0) / (numBands - 1.0);
lightAccum += quantized * lights[i].color.r;
}
}
lightAccum = clamp(lightAccum, 0.0, 1.0);
gl_FragColor = vec4(baseColor * lightAccum, texColor.a * colDiffuse.a);
}

View File

@ -0,0 +1,48 @@
#version 120
attribute vec3 vertexPosition;
attribute vec2 vertexTexCoord;
attribute vec3 vertexNormal;
attribute vec4 vertexColor;
uniform mat4 mvp;
uniform mat4 matModel;
varying vec3 fragPosition;
varying vec2 fragTexCoord;
varying vec4 fragColor;
varying vec3 fragNormal;
// inverse() and transpose() are not built-in until GLSL 1.40
mat3 inverse(mat3 m)
{
float a00 = m[0][0], a01 = m[0][1], a02 = m[0][2];
float a10 = m[1][0], a11 = m[1][1], a12 = m[1][2];
float a20 = m[2][0], a21 = m[2][1], a22 = m[2][2];
float b01 = a22*a11 - a12*a21;
float b11 = -a22*a10 + a12*a20;
float b21 = a21*a10 - a11*a20;
float det = a00*b01 + a01*b11 + a02*b21;
return mat3(b01, (-a22*a01 + a02*a21), ( a12*a01 - a02*a11),
b11, ( a22*a00 - a02*a20), (-a12*a00 + a02*a10),
b21, (-a21*a00 + a01*a20), ( a11*a00 - a01*a10)) / det;
}
mat3 transpose(mat3 m)
{
return mat3(m[0][0], m[1][0], m[2][0],
m[0][1], m[1][1], m[2][1],
m[0][2], m[1][2], m[2][2]);
}
void main()
{
fragPosition = vec3(matModel * vec4(vertexPosition, 1.0));
fragTexCoord = vertexTexCoord;
fragColor = vertexColor;
mat3 normalMatrix = transpose(inverse(mat3(matModel)));
fragNormal = normalize(normalMatrix * vertexNormal);
gl_Position = mvp * vec4(vertexPosition, 1.0);
}

View File

@ -0,0 +1,6 @@
#version 120
void main()
{
gl_FragColor = vec4(0.05, 0.05, 0.05, 1.0);
}

View File

@ -0,0 +1,15 @@
#version 120
attribute vec3 vertexPosition;
attribute vec3 vertexNormal;
attribute vec2 vertexTexCoord;
attribute vec4 vertexColor;
uniform mat4 mvp;
uniform float outlineThickness;
void main()
{
vec3 extruded = vertexPosition + vertexNormal * outlineThickness;
gl_Position = mvp * vec4(extruded, 1.0);
}

View File

@ -0,0 +1,60 @@
#version 330
in vec3 fragPosition;
in vec2 fragTexCoord;
in vec4 fragColor;
in vec3 fragNormal;
// Raylib standard uniforms
uniform sampler2D texture0;
uniform vec4 colDiffuse;
// View position for future specular / fresnel use.
uniform vec3 viewPos;
// Number of discrete toon bands (2 = hard binary, 10 = default, 20 = near-smooth).
uniform float numBands;
// rlights.h compatible light block.
struct Light {
int enabled;
int type; // 0 = directional, 1 = point
vec3 position;
vec3 target;
vec4 color;
float attenuation;
};
uniform Light lights[4];
out vec4 finalColor;
void main() {
vec4 texColor = texture(texture0, fragTexCoord);
vec3 baseColor = texColor.rgb * fragColor.rgb * colDiffuse.rgb;
vec3 norm = normalize(fragNormal);
float lightAccum = 0.08; // ambient floor
for (int i = 0; i < 4; i++) {
if (lights[i].enabled == 0) continue;
vec3 lightDir;
if (lights[i].type == 0) {
// Directional: direction is from position toward target.
lightDir = normalize(lights[i].position - lights[i].target);
} else {
// Point: direction from surface to light.
lightDir = normalize(lights[i].position - fragPosition);
}
float NdotL = max(dot(norm, lightDir), 0.0);
// Quantize NdotL into numBands discrete steps.
// min() guards against NdotL == 1.0 producing an out-of-range index.
float quantized = min(floor(NdotL * numBands), numBands - 1.0) / (numBands - 1.0);
lightAccum += quantized * lights[i].color.r;
}
lightAccum = clamp(lightAccum, 0.0, 1.0);
finalColor = vec4(baseColor * lightAccum, texColor.a * colDiffuse.a);
}

View File

@ -0,0 +1,25 @@
#version 330
// Raylib standard attributes
in vec3 vertexPosition;
in vec2 vertexTexCoord;
in vec3 vertexNormal;
in vec4 vertexColor;
// Raylib standard uniforms
uniform mat4 mvp;
uniform mat4 matModel;
uniform mat4 matNormal;
out vec3 fragPosition;
out vec2 fragTexCoord;
out vec4 fragColor;
out vec3 fragNormal;
void main() {
fragPosition = vec3(matModel * vec4(vertexPosition, 1.0));
fragTexCoord = vertexTexCoord;
fragColor = vertexColor;
fragNormal = normalize(vec3(matNormal * vec4(vertexNormal, 0.0)));
gl_Position = mvp * vec4(vertexPosition, 1.0);
}

View File

@ -0,0 +1,7 @@
#version 330
out vec4 finalColor;
void main() {
finalColor = vec4(0.05, 0.05, 0.05, 1.0);
}

View File

@ -0,0 +1,15 @@
#version 330
in vec3 vertexPosition;
in vec3 vertexNormal;
in vec2 vertexTexCoord;
in vec4 vertexColor;
uniform mat4 mvp;
uniform float outlineThickness;
void main() {
// Extrude vertex along its normal to create the hull.
vec3 extruded = vertexPosition + vertexNormal * outlineThickness;
gl_Position = mvp * vec4(extruded, 1.0);
}

View File

@ -0,0 +1,175 @@
/*******************************************************************************************
*
* raylib [shaders] example - cel shading
*
* Example complexity rating: [] 3/4
*
* NOTE: This example requires raylib OpenGL 3.3 or ES2 versions for shaders support,
* OpenGL 1.1 does not support shaders, recompile raylib to OpenGL 3.3 version
*
* NOTE: Shaders used in this example are #version 330 (OpenGL 3.3)
*
* Example contributed by Gleb A (@ggrizzly) 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 Gleb A (@ggrizzly)
*
********************************************************************************************/
#include "raylib.h"
#include "raymath.h"
#include "rlgl.h"
#include <math.h> // Required for: sinf(), cosf()
#define RLIGHTS_IMPLEMENTATION
#include "rlights.h"
#if defined(PLATFORM_DESKTOP)
#define GLSL_VERSION 330
#else // PLATFORM_ANDROID, PLATFORM_WEB
#define GLSL_VERSION 100
#endif
//------------------------------------------------------------------------------------
// Program main entry point
//------------------------------------------------------------------------------------
int main(void)
{
// Initialization
//--------------------------------------------------------------------------------------
const int screenWidth = 800;
const int screenHeight = 450;
SetConfigFlags(FLAG_MSAA_4X_HINT);
InitWindow(screenWidth, screenHeight, "raylib [shaders] example - cel shading");
Camera camera = { 0 };
camera.position = (Vector3){ 9.0f, 6.0f, 9.0f };
camera.target = (Vector3){ 0.0f, 1.0f, 0.0f };
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f };
camera.fovy = 45.0f;
camera.projection = CAMERA_PERSPECTIVE;
// Load model
Model model = LoadModel("resources/models/old_car_new.glb");
// Load cel shader
Shader celShader = LoadShader(
TextFormat("resources/shaders/glsl%i/cel.vs", GLSL_VERSION),
TextFormat("resources/shaders/glsl%i/cel.fs", GLSL_VERSION));
celShader.locs[SHADER_LOC_VECTOR_VIEW] = GetShaderLocation(celShader, "viewPos");
// Apply cel shader to model, keep copy of default shader
Shader defaultShader = model.materials[0].shader;
model.materials[0].shader = celShader;
// numBands: controls toon quantization steps (2 = hard binary, 20 = near-smooth)
float numBands = 10.0f;
int numBandsLoc = GetShaderLocation(celShader, "numBands");
SetShaderValue(celShader, numBandsLoc, &numBands, SHADER_UNIFORM_FLOAT);
// Inverted-hull outline shader: draws back faces extruded along normals
Shader outlineShader = LoadShader(
TextFormat("resources/shaders/glsl%i/outline_hull.vs", GLSL_VERSION),
TextFormat("resources/shaders/glsl%i/outline_hull.fs", GLSL_VERSION));
int outlineThicknessLoc = GetShaderLocation(outlineShader, "outlineThickness");
// Single directional white light, angled so toon bands are visible on the model sides.
// Spins opposite to CAMERA_ORBITAL (0.5 rad/s) so lighting changes as you watch.
Light lights[MAX_LIGHTS] = { 0 };
lights[0] = CreateLight(LIGHT_DIRECTIONAL, (Vector3){ 50.0f, 50.0f, 50.0f }, Vector3Zero(), WHITE, celShader);
bool celEnabled = true;
bool outlineEnabled = true;
SetTargetFPS(60);
//--------------------------------------------------------------------------------------
// Main game loop
while (!WindowShouldClose())
{
// Update
//----------------------------------------------------------------------------------
UpdateCamera(&camera, CAMERA_ORBITAL);
float cameraPos[3] = { camera.position.x, camera.position.y, camera.position.z };
SetShaderValue(celShader, celShader.locs[SHADER_LOC_VECTOR_VIEW], cameraPos, SHADER_UNIFORM_VEC3);
// [Z] Toggle cel shading on/off
if (IsKeyPressed(KEY_Z))
{
celEnabled = !celEnabled;
if (celEnabled) model.materials[0].shader = celShader; // Apply cel shader to model
else model.materials[0].shader = defaultShader; // Apply default shader to model
}
// [C] Toggle outline on/off
if (IsKeyPressed(KEY_C)) outlineEnabled = !outlineEnabled;
// [Q/E] Decrease/increase toon band count (press or hold to repeat)
if (IsKeyPressed(KEY_E) || IsKeyPressedRepeat(KEY_E)) numBands = Clamp(numBands + 1.0f, 2.0f, 20.0f);
if (IsKeyPressed(KEY_Q) || IsKeyPressedRepeat(KEY_Q)) numBands = Clamp(numBands - 1.0f, 2.0f, 20.0f);
SetShaderValue(celShader, numBandsLoc, &numBands, SHADER_UNIFORM_FLOAT);
// Spin light opposite to CAMERA_ORBITAL (0.5 rad/s), angled 45 degrees off vertical
float t = (float)GetTime();
lights[0].position = (Vector3){ sinf(-t*0.3f)*5.0f, 5.0f, cosf(-t*0.3f)*5.0f };
for (int i = 0; i < MAX_LIGHTS; i++) UpdateLightValues(celShader, lights[i]);
//----------------------------------------------------------------------------------
// Draw
//----------------------------------------------------------------------------------
BeginDrawing();
ClearBackground(RAYWHITE);
BeginMode3D(camera);
if (outlineEnabled)
{
// Outline pass: cull front faces, draw extruded back faces as silhouette
float thickness = 0.005f;
SetShaderValue(outlineShader, outlineThicknessLoc, &thickness, SHADER_UNIFORM_FLOAT);
rlSetCullFace(RL_CULL_FACE_FRONT);
model.materials[0].shader = outlineShader;
DrawModel(model, Vector3Zero(), 0.75f, WHITE);
if (celEnabled) model.materials[0].shader = celShader; // Apply cel shader to model
else model.materials[0].shader = defaultShader; // Apply default shader to model
rlSetCullFace(RL_CULL_FACE_BACK);
}
DrawModel(model, Vector3Zero(), 0.75f, WHITE);
DrawSphereEx(lights[0].position, 0.2f, 50, 50, YELLOW); // Light position indicator
DrawGrid(10, 10.0f);
EndMode3D();
DrawFPS(10, 10);
DrawText(TextFormat("Cel: %s [Z]", celEnabled? "ON" : "OFF"), 10, 65, 20, celEnabled? DARKGREEN : DARKGRAY);
DrawText(TextFormat("Outline: %s [C]", outlineEnabled? "ON" : "OFF"), 10, 90, 20, outlineEnabled? DARKGREEN : DARKGRAY);
DrawText(TextFormat("Bands: %.0f [Q/E]", numBands), 10, 115, 20, DARKGRAY);
EndDrawing();
//----------------------------------------------------------------------------------
}
// De-Initialization
//--------------------------------------------------------------------------------------
UnloadModel(model);
UnloadShader(celShader);
UnloadShader(outlineShader);
CloseWindow();
//--------------------------------------------------------------------------------------
return 0;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

View File

@ -65,8 +65,8 @@ int main(void)
// Game of Life logic compute shader // Game of Life logic compute shader
char *golLogicCode = LoadFileText("resources/shaders/glsl430/gol.glsl"); char *golLogicCode = LoadFileText("resources/shaders/glsl430/gol.glsl");
unsigned int golLogicShader = rlCompileShader(golLogicCode, RL_COMPUTE_SHADER); unsigned int golLogicShader = rlLoadShader(golLogicCode, RL_COMPUTE_SHADER);
unsigned int golLogicProgram = rlLoadComputeShaderProgram(golLogicShader); unsigned int golLogicProgram = rlLoadShaderProgramCompute(golLogicShader);
UnloadFileText(golLogicCode); UnloadFileText(golLogicCode);
// Game of Life logic render shader // Game of Life logic render shader
@ -75,8 +75,8 @@ int main(void)
// Game of Life transfert shader (CPU<->GPU download and upload) // Game of Life transfert shader (CPU<->GPU download and upload)
char *golTransfertCode = LoadFileText("resources/shaders/glsl430/gol_transfert.glsl"); char *golTransfertCode = LoadFileText("resources/shaders/glsl430/gol_transfert.glsl");
unsigned int golTransfertShader = rlCompileShader(golTransfertCode, RL_COMPUTE_SHADER); unsigned int golTransfertShader = rlLoadShader(golTransfertCode, RL_COMPUTE_SHADER);
unsigned int golTransfertProgram = rlLoadComputeShaderProgram(golTransfertShader); unsigned int golTransfertProgram = rlLoadShaderProgramCompute(golTransfertShader);
UnloadFileText(golTransfertCode); UnloadFileText(golTransfertCode);
// Load shader storage buffer object (SSBO), id returned // Load shader storage buffer object (SSBO), id returned
@ -169,7 +169,9 @@ int main(void)
rlUnloadShaderBuffer(ssboB); rlUnloadShaderBuffer(ssboB);
rlUnloadShaderBuffer(ssboTransfert); rlUnloadShaderBuffer(ssboTransfert);
// Unload compute shader programs // Unload compute shader
rlUnloadShader(golLogicShader);
rlUnloadShader(golTransfertShader);
rlUnloadShaderProgram(golTransfertProgram); rlUnloadShaderProgram(golTransfertProgram);
rlUnloadShaderProgram(golLogicProgram); rlUnloadShaderProgram(golLogicProgram);

View File

@ -79,8 +79,9 @@ int main(void)
cube.materials[0].shader = shadowShader; cube.materials[0].shader = shadowShader;
Model robot = LoadModel("resources/models/robot.glb"); Model robot = LoadModel("resources/models/robot.glb");
for (int i = 0; i < robot.materialCount; i++) robot.materials[i].shader = shadowShader; for (int i = 0; i < robot.materialCount; i++) robot.materials[i].shader = shadowShader;
int animCount = 0; int animCount = 0;
ModelAnimation *robotAnimations = LoadModelAnimations("resources/models/robot.glb", &animCount); ModelAnimation *anims = LoadModelAnimations("resources/models/robot.glb", &animCount);
RenderTexture2D shadowMap = LoadShadowmapRenderTexture(SHADOWMAP_RESOLUTION, SHADOWMAP_RESOLUTION); RenderTexture2D shadowMap = LoadShadowmapRenderTexture(SHADOWMAP_RESOLUTION, SHADOWMAP_RESOLUTION);
@ -115,8 +116,8 @@ int main(void)
UpdateCamera(&camera, CAMERA_ORBITAL); UpdateCamera(&camera, CAMERA_ORBITAL);
frameCounter++; frameCounter++;
frameCounter %= (robotAnimations[0].frameCount); frameCounter %= (anims[0].keyframeCount);
UpdateModelAnimation(robot, robotAnimations[0], frameCounter); UpdateModelAnimation(robot, anims[0], (float)frameCounter);
// Move light with arrow keys // Move light with arrow keys
const float cameraSpeed = 0.05f; const float cameraSpeed = 0.05f;
@ -190,7 +191,7 @@ int main(void)
UnloadShader(shadowShader); UnloadShader(shadowShader);
UnloadModel(cube); UnloadModel(cube);
UnloadModel(robot); UnloadModel(robot);
UnloadModelAnimations(robotAnimations, animCount); UnloadModelAnimations(anims, animCount);
UnloadShadowmapRenderTexture(shadowMap); UnloadShadowmapRenderTexture(shadowMap);
CloseWindow(); // Close window and OpenGL context CloseWindow(); // Close window and OpenGL context

View File

@ -357,8 +357,10 @@
#elif defined(USE_LIBTYPE_SHARED) #elif defined(USE_LIBTYPE_SHARED)
#define RAYGUIAPI __declspec(dllimport) // Using the library as a Win32 shared library (.dll) #define RAYGUIAPI __declspec(dllimport) // Using the library as a Win32 shared library (.dll)
#endif #endif
#if !defined(_CRT_SECURE_NO_WARNINGS)
#define _CRT_SECURE_NO_WARNINGS // Disable unsafe warnings on scanf() functions in MSVC #define _CRT_SECURE_NO_WARNINGS // Disable unsafe warnings on scanf() functions in MSVC
#endif #endif
#endif
// Function specifiers definition // Function specifiers definition
#ifndef RAYGUIAPI #ifndef RAYGUIAPI
@ -646,6 +648,7 @@ typedef enum {
// ProgressBar // ProgressBar
typedef enum { typedef enum {
PROGRESS_PADDING = 16, // ProgressBar internal padding PROGRESS_PADDING = 16, // ProgressBar internal padding
PROGRESS_SIDE, // ProgressBar increment side: 0-left->right, 1-right-left
} GuiProgressBarProperty; } GuiProgressBarProperty;
// ScrollBar // ScrollBar
@ -3522,8 +3525,16 @@ int GuiProgressBar(Rectangle bounds, const char *textLeft, const char *textRight
} }
// Draw slider internal progress bar (depends on state) // Draw slider internal progress bar (depends on state)
if (GuiGetStyle(PROGRESSBAR, PROGRESS_SIDE) == 0) // Left-->Right
{
GuiDrawRectangle(progress, 0, BLANK, GetColor(GuiGetStyle(PROGRESSBAR, BASE_COLOR_PRESSED))); GuiDrawRectangle(progress, 0, BLANK, GetColor(GuiGetStyle(PROGRESSBAR, BASE_COLOR_PRESSED)));
} }
else // Right-->Left
{
progress.x = bounds.x + bounds.width - progress.width - GuiGetStyle(PROGRESSBAR, BORDER_WIDTH);
GuiDrawRectangle(progress, 0, BLANK, GetColor(GuiGetStyle(PROGRESSBAR, BASE_COLOR_PRESSED)));
}
}
// Draw left/right text if provided // Draw left/right text if provided
if (textLeft != NULL) if (textLeft != NULL)
@ -5119,11 +5130,11 @@ static const char *GetTextIcon(const char *text, int *iconId)
// Get text divided into lines (by line-breaks '\n') // Get text divided into lines (by line-breaks '\n')
// WARNING: It returns pointers to new lines but it does not add NULL ('\0') terminator! // WARNING: It returns pointers to new lines but it does not add NULL ('\0') terminator!
static char **GetTextLines(const char *text, int *count) static const char **GetTextLines(const char *text, int *count)
{ {
#define RAYGUI_MAX_TEXT_LINES 128 #define RAYGUI_MAX_TEXT_LINES 128
static char *lines[RAYGUI_MAX_TEXT_LINES] = { 0 }; static const char *lines[RAYGUI_MAX_TEXT_LINES] = { 0 };
for (int i = 0; i < RAYGUI_MAX_TEXT_LINES; i++) lines[i] = NULL; // Init NULL pointers to substrings for (int i = 0; i < RAYGUI_MAX_TEXT_LINES; i++) lines[i] = NULL; // Init NULL pointers to substrings
int textLength = (int)strlen(text); int textLength = (int)strlen(text);
@ -5193,7 +5204,7 @@ static void GuiDrawText(const char *text, Rectangle textBounds, int alignment, C
// WARNING: GuiTextSplit() function can't be used now because it can have already been used // WARNING: GuiTextSplit() function can't be used now because it can have already been used
// before the GuiDrawText() call and its buffer is static, it would be overriden :( // before the GuiDrawText() call and its buffer is static, it would be overriden :(
int lineCount = 0; int lineCount = 0;
char **lines = GetTextLines(text, &lineCount); const char **lines = GetTextLines(text, &lineCount);
// Text style variables // Text style variables
//int alignment = GuiGetStyle(DEFAULT, TEXT_ALIGNMENT); //int alignment = GuiGetStyle(DEFAULT, TEXT_ALIGNMENT);

View File

@ -43,7 +43,7 @@ int main(void)
InitWindow(screenWidth, screenHeight, "raylib [shapes] example - hilbert curve"); InitWindow(screenWidth, screenHeight, "raylib [shapes] example - hilbert curve");
int order = 2; int order = 2;
float size = GetScreenHeight(); float size = (float)GetScreenHeight();
int strokeCount = 0; int strokeCount = 0;
Vector2 *hilbertPath = LoadHilbertPath(order, size, &strokeCount); Vector2 *hilbertPath = LoadHilbertPath(order, size, &strokeCount);
@ -73,7 +73,7 @@ int main(void)
else counter = strokeCount; else counter = strokeCount;
prevOrder = order; prevOrder = order;
prevSize = size; prevSize = (int)size;
} }
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------

View File

@ -89,7 +89,7 @@ int main(void)
// Cotangent (orange) // Cotangent (orange)
DrawLineEx((Vector2){ center.x , limitMin.y }, (Vector2){ cotangentPoint.x, limitMin.y }, 2.0f, ORANGE); DrawLineEx((Vector2){ center.x , limitMin.y }, (Vector2){ cotangentPoint.x, limitMin.y }, 2.0f, ORANGE);
DrawLineDashed(center, cotangentPoint, 10.0f, 4.0f, ORANGE); DrawLineDashed(center, cotangentPoint, 10, 4, ORANGE);
// Side background // Side background
DrawLine(580, 0, 580, GetScreenHeight(), (Color){ 218, 218, 218, 255 }); DrawLine(580, 0, 580, GetScreenHeight(), (Color){ 218, 218, 218, 255 });
@ -106,48 +106,48 @@ int main(void)
DrawLineEx((Vector2){ start.x, start.y + start.height/2 }, (Vector2){ start.x + start.width, start.y + start.height/2 }, 2.0f, GRAY); DrawLineEx((Vector2){ start.x, start.y + start.height/2 }, (Vector2){ start.x + start.width, start.y + start.height/2 }, 2.0f, GRAY);
// Wave graph axis labels // Wave graph axis labels
DrawText("1", start.x - 8, start.y, 6, GRAY); DrawText("1", (int)start.x - 8, (int)start.y, 6, GRAY);
DrawText("0", start.x - 8, start.y + start.height/2 - 6, 6, GRAY); DrawText("0", (int)start.x - 8, (int)start.y + (int)start.height/2 - 6, 6, GRAY);
DrawText("-1", start.x - 12, start.y + start.height - 8, 6, GRAY); DrawText("-1", (int)start.x - 12, (int)start.y + (int)start.height - 8, 6, GRAY);
DrawText("0", start.x - 2, start.y + start.height + 4, 6, GRAY); DrawText("0", (int)start.x - 2, (int)start.y + (int)start.height + 4, 6, GRAY);
DrawText("360", start.x + start.width - 8, start.y + start.height + 4, 6, GRAY); DrawText("360", (int)start.x + (int)start.width - 8, (int)start.y + (int)start.height + 4, 6, GRAY);
// Sine (red - vertical) // Sine (red - vertical)
DrawLineEx((Vector2){ center.x, center.y }, (Vector2){ center.x, point.y }, 2.0f, RED); DrawLineEx((Vector2){ center.x, center.y }, (Vector2){ center.x, point.y }, 2.0f, RED);
DrawLineDashed((Vector2){ point.x, center.y }, (Vector2){ point.x, point.y }, 10.0f, 4.0f, RED); DrawLineDashed((Vector2){ point.x, center.y }, (Vector2){ point.x, point.y }, 10, 4, RED);
DrawText(TextFormat("Sine %.2f", sinRad), 640, 190, 6, RED); DrawText(TextFormat("Sine %.2f", sinRad), 640, 190, 6, RED);
DrawCircleV((Vector2){ start.x + (angle/360.0f)*start.width, start.y + ((-sinRad + 1)*start.height/2.0f) }, 4.0f, RED); DrawCircleV((Vector2){ start.x + (angle/360.0f)*start.width, start.y + ((-sinRad + 1)*start.height/2.0f) }, 4.0f, RED);
DrawSplineLinear(sinePoints, WAVE_POINTS, 1.0f, RED); DrawSplineLinear(sinePoints, WAVE_POINTS, 1.0f, RED);
// Cosine (blue - horizontal) // Cosine (blue - horizontal)
DrawLineEx((Vector2){ center.x, center.y }, (Vector2){ point.x, center.y }, 2.0f, BLUE); DrawLineEx((Vector2){ center.x, center.y }, (Vector2){ point.x, center.y }, 2.0f, BLUE);
DrawLineDashed((Vector2){ center.x , point.y }, (Vector2){ point.x, point.y }, 10.0f, 4.0f, BLUE); DrawLineDashed((Vector2){ center.x , point.y }, (Vector2){ point.x, point.y }, 10, 4, BLUE);
DrawText(TextFormat("Cosine %.2f", cosRad), 640, 210, 6, BLUE); DrawText(TextFormat("Cosine %.2f", cosRad), 640, 210, 6, BLUE);
DrawCircleV((Vector2){ start.x + (angle/360.0f)*start.width, start.y + ((-cosRad + 1)*start.height/2.0f) }, 4.0f, BLUE); DrawCircleV((Vector2){ start.x + (angle/360.0f)*start.width, start.y + ((-cosRad + 1)*start.height/2.0f) }, 4.0f, BLUE);
DrawSplineLinear(cosPoints, WAVE_POINTS, 1.0f, BLUE); DrawSplineLinear(cosPoints, WAVE_POINTS, 1.0f, BLUE);
// Tangent (purple) // Tangent (purple)
DrawLineEx((Vector2){ limitMax.x , center.y }, (Vector2){ limitMax.x, tangentPoint.y }, 2.0f, PURPLE); DrawLineEx((Vector2){ limitMax.x , center.y }, (Vector2){ limitMax.x, tangentPoint.y }, 2.0f, PURPLE);
DrawLineDashed(center, tangentPoint, 10.0f, 4.0f, PURPLE); DrawLineDashed(center, tangentPoint, 10, 4, PURPLE);
DrawText(TextFormat("Tangent %.2f", tangent), 640, 230, 6, PURPLE); DrawText(TextFormat("Tangent %.2f", tangent), 640, 230, 6, PURPLE);
// Cotangent (orange) // Cotangent (orange)
DrawText(TextFormat("Cotangent %.2f", cotangent), 640, 250, 6, ORANGE); DrawText(TextFormat("Cotangent %.2f", cotangent), 640, 250, 6, ORANGE);
// Complementary angle (beige) // Complementary angle (beige)
DrawCircleSectorLines(center, radius*0.6f , -angle, -90.0f , 36.0f, BEIGE); DrawCircleSectorLines(center, radius*0.6f , -angle, -90.0f , 36, BEIGE);
DrawText(TextFormat("Complementary %0.f°",complementary), 640, 150, 6, BEIGE); DrawText(TextFormat("Complementary %0.f°",complementary), 640, 150, 6, BEIGE);
// Supplementary angle (darkblue) // Supplementary angle (darkblue)
DrawCircleSectorLines(center, radius*0.5f , -angle, -180.0f , 36.0f, DARKBLUE); DrawCircleSectorLines(center, radius*0.5f , -angle, -180.0f , 36, DARKBLUE);
DrawText(TextFormat("Supplementary %0.f°",supplementary), 640, 130, 6, DARKBLUE); DrawText(TextFormat("Supplementary %0.f°",supplementary), 640, 130, 6, DARKBLUE);
// Explementary angle (pink) // Explementary angle (pink)
DrawCircleSectorLines(center, radius*0.4f , -angle, -360.0f , 36.0f, PINK); DrawCircleSectorLines(center, radius*0.4f , -angle, -360.0f , 36, PINK);
DrawText(TextFormat("Explementary %0.f°",explementary), 640, 170, 6, PINK); DrawText(TextFormat("Explementary %0.f°",explementary), 640, 170, 6, PINK);
// Current angle - arc (lime), radius (black), endpoint (black) // Current angle - arc (lime), radius (black), endpoint (black)
DrawCircleSectorLines(center, radius*0.7f , -angle, 0.0f, 36.0f, LIME); DrawCircleSectorLines(center, radius*0.7f , -angle, 0.0f, 36, LIME);
DrawLineEx((Vector2){ center.x , center.y }, point, 2.0f, BLACK); DrawLineEx((Vector2){ center.x , center.y }, point, 2.0f, BLACK);
DrawCircleV(point, 4.0f, BLACK); DrawCircleV(point, 4.0f, BLACK);

View File

@ -30,7 +30,7 @@
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
typedef struct TurtleState { typedef struct TurtleState {
Vector2 origin; Vector2 origin;
double angle; float angle;
} TurtleState; } TurtleState;
typedef struct PenroseLSystem { typedef struct PenroseLSystem {

View File

@ -160,7 +160,7 @@ int main(void)
// Draw inner circle to create donut effect // Draw inner circle to create donut effect
// TODO: This is a hacky solution, better use DrawRing() // TODO: This is a hacky solution, better use DrawRing()
if (showDonut) DrawCircle(center.x, center.y, donutInnerRadius, RAYWHITE); if (showDonut) DrawCircleV(center, donutInnerRadius, RAYWHITE);
startAngle += sweepAngle; startAngle += sweepAngle;
} }

View File

@ -47,8 +47,8 @@ int main(void)
// Setup the stars with a random position // Setup the stars with a random position
for (int i = 0; i < STAR_COUNT; i++) for (int i = 0; i < STAR_COUNT; i++)
{ {
stars[i].x = GetRandomValue(-screenWidth*0.5f, screenWidth*0.5f); stars[i].x = (float)GetRandomValue(-screenWidth / 2, (int)screenWidth / 2);
stars[i].y = GetRandomValue(-screenHeight*0.5f, screenHeight*0.5f); stars[i].y = (float)GetRandomValue(-screenHeight / 2, (int)screenHeight / 2);
stars[i].z = 1.0f; stars[i].z = 1.0f;
} }
@ -85,8 +85,8 @@ int main(void)
if ((stars[i].z < 0.0f) || (starsScreenPos[i].x < 0) || (starsScreenPos[i].y < 0.0f) || if ((stars[i].z < 0.0f) || (starsScreenPos[i].x < 0) || (starsScreenPos[i].y < 0.0f) ||
(starsScreenPos[i].x > screenWidth) || (starsScreenPos[i].y > screenHeight)) (starsScreenPos[i].x > screenWidth) || (starsScreenPos[i].y > screenHeight))
{ {
stars[i].x = GetRandomValue(-screenWidth*0.5f, screenWidth*0.5f); stars[i].x = (float)GetRandomValue(-screenWidth / 2, screenWidth / 2);
stars[i].y = GetRandomValue(-screenHeight*0.5f, screenHeight*0.5f); stars[i].y = (float)GetRandomValue(-screenHeight / 2, screenHeight / 2);
stars[i].z = 1.0f; stars[i].z = 1.0f;
} }
} }

View File

@ -109,7 +109,7 @@ int main(void)
DrawRectangleRec(textContainerRect, BLUE); DrawRectangleRec(textContainerRect, BLUE);
// Get the size of the text to draw // Get the size of the text to draw
Vector2 textSize = MeasureTextEx(font, words[wordIndex], fontSize, fontSize*.1f); Vector2 textSize = MeasureTextEx(font, words[wordIndex], (float)fontSize, fontSize*.1f);
// Calculate the top-left text position based on the rectangle and alignment // Calculate the top-left text position based on the rectangle and alignment
Vector2 textPos = (Vector2){ Vector2 textPos = (Vector2){
@ -118,7 +118,7 @@ int main(void)
}; };
// Draw the text // Draw the text
DrawTextEx(font, words[wordIndex], textPos, fontSize, fontSize*.1f, RAYWHITE); DrawTextEx(font, words[wordIndex], textPos, (float)fontSize, fontSize*.1f, RAYWHITE);
EndDrawing(); EndDrawing();
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------

View File

@ -17,7 +17,7 @@
#include <stdlib.h> // Required for: malloc(), free() #include <stdlib.h> // Required for: malloc(), free()
#define MAX_BUNNIES 50000 // 50K bunnies limit #define MAX_BUNNIES 80000 // 80K bunnies limit
// This is the maximum amount of elements (quads) per batch // This is the maximum amount of elements (quads) per batch
// NOTE: This value is defined in [rlgl] module and can be changed there // NOTE: This value is defined in [rlgl] module and can be changed there
@ -51,7 +51,9 @@ int main(void)
int bunniesCount = 0; // Bunnies counter int bunniesCount = 0; // Bunnies counter
SetTargetFPS(60); // Set our game to run at 60 frames-per-second bool paused = false;
//SetTargetFPS(60); // Set our game to run at 60 frames-per-second
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
// Main game loop // Main game loop
@ -67,8 +69,8 @@ int main(void)
if (bunniesCount < MAX_BUNNIES) if (bunniesCount < MAX_BUNNIES)
{ {
bunnies[bunniesCount].position = GetMousePosition(); bunnies[bunniesCount].position = GetMousePosition();
bunnies[bunniesCount].speed.x = (float)GetRandomValue(-250, 250)/60.0f; bunnies[bunniesCount].speed.x = (float)GetRandomValue(-250, 250);
bunnies[bunniesCount].speed.y = (float)GetRandomValue(-250, 250)/60.0f; bunnies[bunniesCount].speed.y = (float)GetRandomValue(-250, 250);
bunnies[bunniesCount].color = (Color){ GetRandomValue(50, 240), bunnies[bunniesCount].color = (Color){ GetRandomValue(50, 240),
GetRandomValue(80, 240), GetRandomValue(80, 240),
GetRandomValue(100, 240), 255 }; GetRandomValue(100, 240), 255 };
@ -77,17 +79,22 @@ int main(void)
} }
} }
if (IsKeyPressed(KEY_P)) paused = !paused;
if (!paused)
{
// Update bunnies // Update bunnies
for (int i = 0; i < bunniesCount; i++) for (int i = 0; i < bunniesCount; i++)
{ {
bunnies[i].position.x += bunnies[i].speed.x; bunnies[i].position.x += bunnies[i].speed.x*GetFrameTime();
bunnies[i].position.y += bunnies[i].speed.y; bunnies[i].position.y += bunnies[i].speed.y*GetFrameTime();
if (((bunnies[i].position.x + (float)texBunny.width/2) > GetScreenWidth()) || if (((bunnies[i].position.x + (float)texBunny.width/2) > GetScreenWidth()) ||
((bunnies[i].position.x + (float)texBunny.width/2) < 0)) bunnies[i].speed.x *= -1; ((bunnies[i].position.x + (float)texBunny.width/2) < 0)) bunnies[i].speed.x *= -1;
if (((bunnies[i].position.y + (float)texBunny.height/2) > GetScreenHeight()) || if (((bunnies[i].position.y + (float)texBunny.height/2) > GetScreenHeight()) ||
((bunnies[i].position.y + (float)texBunny.height/2 - 40) < 0)) bunnies[i].speed.y *= -1; ((bunnies[i].position.y + (float)texBunny.height/2 - 40) < 0)) bunnies[i].speed.y *= -1;
} }
}
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
// Draw // Draw

View File

@ -0,0 +1,110 @@
/*******************************************************************************************
*
* raylib [textures] example - clipboard image
*
* Example complexity rating: [] 1/4
*
* Example originally created with raylib 6.0, last time updated with raylib 6.0
*
* Example contributed by Maicon Santana (@maiconpintoabreu) 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 Maicon Santana (@maiconpintoabreu)
*
********************************************************************************************/
#include "raylib.h"
#define MAX_TEXTURE_COLLECTION 20
typedef struct TextureCollection {
Texture2D texture;
Vector2 position;
} TextureCollection;
//------------------------------------------------------------------------------------
// Program main entry point
//------------------------------------------------------------------------------------
int main(void)
{
// Initialization
//--------------------------------------------------------------------------------------
const int screenWidth = 800;
const int screenHeight = 450;
InitWindow(screenWidth, screenHeight, "raylib [textures] example - clipboard_image");
TextureCollection collection[MAX_TEXTURE_COLLECTION] = { 0 };
int currentCollectionIndex = 0;
SetTargetFPS(60);
//--------------------------------------------------------------------------------------
// Main game loop
while (!WindowShouldClose()) // Detect window close button or ESC key
{
// Update
//----------------------------------------------------------------------------------
if (IsKeyPressed(KEY_R)) // Reset image collection
{
// Unload textures to avoid memory leaks
for (int i = 0; i < MAX_TEXTURE_COLLECTION; i++) UnloadTexture(collection[i].texture);
currentCollectionIndex = 0;
}
if (IsKeyDown(KEY_LEFT_CONTROL) && IsKeyPressed(KEY_V) &&
(currentCollectionIndex < MAX_TEXTURE_COLLECTION))
{
Image image = GetClipboardImage();
if (IsImageValid(image))
{
collection[currentCollectionIndex].texture = LoadTextureFromImage(image);
collection[currentCollectionIndex].position = GetMousePosition();
currentCollectionIndex++;
UnloadImage(image);
}
else TraceLog(LOG_INFO, "IMAGE: Could not retrieve image from clipboard");
}
//----------------------------------------------------------------------------------
// Draw
//----------------------------------------------------------------------------------
BeginDrawing();
ClearBackground(RAYWHITE);
for (int i = 0; i < currentCollectionIndex; i++)
{
if (IsTextureValid(collection[i].texture))
{
DrawTexturePro(collection[i].texture,
(Rectangle){0,0,collection[i].texture.width, collection[i].texture.height},
(Rectangle){collection[i].position.x,collection[i].position.y,collection[i].texture.width, collection[i].texture.height},
(Vector2){collection[i].texture.width*0.5f, collection[i].texture.height*0.5f},
0.0f, WHITE);
}
}
DrawRectangle(0, 0, screenWidth, 40, BLACK);
DrawText("Clipboard Image - Ctrl+V to Paste and R to Reset ", 120, 10, 20, LIGHTGRAY);
EndDrawing();
//----------------------------------------------------------------------------------
}
// De-Initialization
//--------------------------------------------------------------------------------------
for (int i = 0; i < MAX_TEXTURE_COLLECTION;i ++)
{
UnloadTexture(collection[i].texture);
}
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 KiB

View File

@ -65,7 +65,7 @@ int main(void)
// Rectangles for cropping render texture // Rectangles for cropping render texture
const float captureSize = 128.0f; const float captureSize = 128.0f;
Rectangle cropSource = { (subjectTarget.texture.width - captureSize)/2.0f, (subjectTarget.texture.height - captureSize)/2.0f, captureSize, -captureSize }; Rectangle cropSource = { (subjectTarget.texture.width - captureSize)/2.0f, (subjectTarget.texture.height - captureSize)/2.0f, captureSize, -captureSize };
Rectangle cropDest = { splitWidth + 20, 20, captureSize, captureSize}; Rectangle cropDest = { splitWidth + 20.0f, 20.0f, captureSize, captureSize};
SetTargetFPS(60); SetTargetFPS(60);
DisableCursor(); DisableCursor();
@ -115,7 +115,7 @@ int main(void)
EndMode3D(); EndMode3D();
DrawRectangleLines((subjectTarget.texture.width - captureSize)/2, (subjectTarget.texture.height - captureSize)/2, captureSize, captureSize, GREEN); DrawRectangleLines((int)((subjectTarget.texture.width - captureSize)/2.0f), (int)((subjectTarget.texture.height - captureSize)/2.0f), captureSize, captureSize, GREEN);
DrawText("Subject View", 10, subjectTarget.texture.height - 30, 20, BLACK); DrawText("Subject View", 10, subjectTarget.texture.height - 30, 20, BLACK);
EndTextureMode(); EndTextureMode();

View File

@ -0,0 +1,134 @@
/*******************************************************************************************
*
* raylib textures example - magnifying glass
*
* Example complexity rating: [] 3/4
*
* Example originally created with raylib 5.6, last time updated with raylib 5.6
*
* Example contributed by Luke Vaughan (@badram) 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 Luke Vaughan (@badram)
*
********************************************************************************************/
#include "raylib.h"
#include "rlgl.h" // for rlSetBlendFactorsSeparate()
//------------------------------------------------------------------------------------
// Program main entry point
//------------------------------------------------------------------------------------
int main(void)
{
// Initialization
//--------------------------------------------------------------------------------------
const int screenWidth = 800;
const int screenHeight = 450;
InitWindow(screenWidth, screenHeight, "raylib [textures] example - magnifying glass");
Texture2D bunny = LoadTexture("resources/raybunny.png");
Texture2D parrots = LoadTexture("resources/parrots.png");
// Use image draw to generate a mask texture instead of loading it from a file.
Image circle = GenImageColor(256, 256, BLANK);
ImageDrawCircle(&circle, 128, 128, 128, WHITE);
Texture2D mask = LoadTextureFromImage(circle); // Copy the mask image from RAM to VRAM
UnloadImage(circle); // Unload the image from RAM
RenderTexture2D magnifiedWorld = LoadRenderTexture(256, 256);
Camera2D camera = { 0 };
// Set magnifying glass zoom
camera.zoom = 2;
// Offset by half the size of the magnifying glass to counteract drawing the texture centered on the mouse position
camera.offset = (Vector2){128, 128};
SetTargetFPS(60);
//--------------------------------------------------------------------------------------
// Main game loop
while (!WindowShouldClose()) // Detect window close button or ESC key
{
// Update
//----------------------------------------------------------------------------------
Vector2 mPos = GetMousePosition();
camera.target = mPos;
//----------------------------------------------------------------------------------
// Draw
//----------------------------------------------------------------------------------
BeginDrawing();
ClearBackground(RAYWHITE);
// Draw the normal version of the world
DrawTexture(parrots, 144, 33, WHITE);
DrawText("Use the magnifying glass to find hidden bunnies!", 154, 6, 20, BLACK);
// Render to a the magnifying glass
BeginTextureMode(magnifiedWorld);
ClearBackground(RAYWHITE);
BeginMode2D(camera);
// Draw the same things in the magnified world as were in the normal version
DrawTexture(parrots, 144, 33, WHITE);
DrawText("Use the magnifying glass to find hidden bunnies!", 154, 6, 20, BLACK);
// Draw bunnies only in the magnified world.
// BLEND_MULTIPLIED lets them take on the color of the image below them.
BeginBlendMode(BLEND_MULTIPLIED);
DrawTexture(bunny, 250, 350, WHITE);
DrawTexture(bunny, 500, 100, WHITE);
DrawTexture(bunny, 420, 300, WHITE);
DrawTexture(bunny, 650, 10, WHITE);
EndBlendMode();
EndMode2D();
// Mask the magnifying glass view texture to a circle
// To make the mask affect only alpha, a CUSTOM blend mode is used with SEPARATE color/alpha functions
BeginBlendMode(BLEND_CUSTOM_SEPARATE);
// C: Color, A: Alpha, s: source (texture to draw), d: destination (texture drawn to)
// glSrcRGB: RL_ZERO - Cs * 0 = 0 - discard source rgb because we don't want to draw our texture's colors at all
// glDstRGB: RL_ONE - Cd * 1 = Cd - use destination colors unmodified
// glSrcAlpha: RL_ONE - As * 1 = As - use source alpha unmodified
// glDstAlpha: RL_ZERO - Ad * 0 = 0 - discard destination alpha
// glEqRGB: RL_FUNC_ADD - Cs(0) + Cd = Cd - destination color is unmodified
// glEqAlpha: RL_FUNC_ADD - As + Ad(0) = As - destination alpha is set to source alpha
rlSetBlendFactorsSeparate(RL_ZERO, RL_ONE, RL_ONE, RL_ZERO, RL_FUNC_ADD, RL_FUNC_ADD);
DrawTexture(mask, 0, 0, WHITE);
EndBlendMode();
EndTextureMode();
// Draw magnifiedWorld to screen, centered on cursor
DrawTextureRec(magnifiedWorld.texture, (Rectangle){0, 0, 256, -256}, (Vector2){mPos.x - 128, mPos.y - 128}, WHITE);
// Draw the outer ring of the magnifying glass
DrawRing(mPos, 126, 130, 0, 360, 64, BLACK);
// Draw floating specular highlight on the glass
float rx = mPos.x/800;
float ry = mPos.y/800;
DrawCircle((int)(mPos.x - 64*rx) - 32, (int)(mPos.y - 64*ry) - 32, 4, ColorAlpha(WHITE, 0.5));
EndDrawing();
//----------------------------------------------------------------------------------
}
// De-Initialization
//--------------------------------------------------------------------------------------
UnloadTexture(parrots);
UnloadTexture(bunny);
UnloadTexture(mask);
UnloadRenderTexture(magnifiedWorld);
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 KiB

View File

@ -292,7 +292,7 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
@ -309,7 +309,7 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>/FS %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>/FS %(AdditionalOptions)</AdditionalOptions>
@ -345,7 +345,7 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
@ -366,7 +366,7 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
@ -410,7 +410,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions> <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData> <RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData>
@ -432,7 +432,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions> <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData> <RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData>
@ -476,7 +476,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions> <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData> <RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData>
@ -504,7 +504,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions> <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData> <RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData>

View File

@ -292,7 +292,7 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
@ -309,7 +309,7 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>/FS %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>/FS %(AdditionalOptions)</AdditionalOptions>
@ -345,7 +345,7 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
@ -366,7 +366,7 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
@ -410,7 +410,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions> <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData> <RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData>
@ -432,7 +432,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions> <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData> <RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData>
@ -476,7 +476,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions> <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData> <RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData>
@ -504,7 +504,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions> <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData> <RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData>

View File

@ -53,9 +53,9 @@
<PropertyGroup Label="Globals"> <PropertyGroup Label="Globals">
<ProjectGuid>{AC751FE1-C986-4B6A-92A8-28ED89DEE671}</ProjectGuid> <ProjectGuid>{AC751FE1-C986-4B6A-92A8-28ED89DEE671}</ProjectGuid>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
<RootNamespace>models_animation_bone_blending</RootNamespace> <RootNamespace>models_animation_blend_custom</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion> <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
<ProjectName>models_animation_bone_blending</ProjectName> <ProjectName>models_animation_blend_custom</ProjectName>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
@ -553,7 +553,7 @@
</PostBuildEvent> </PostBuildEvent>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="..\..\..\examples\models\models_animation_bone_blending.c" /> <ClCompile Include="..\..\..\examples\models\models_animation_blend_custom.c" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ResourceCompile Include="..\..\..\examples\examples.rc" /> <ResourceCompile Include="..\..\..\examples\examples.rc" />

View File

@ -202,7 +202,7 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
@ -219,7 +219,7 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>/FS %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>/FS %(AdditionalOptions)</AdditionalOptions>
@ -237,7 +237,7 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
@ -258,7 +258,7 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
@ -281,7 +281,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions> <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData> <RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData>
@ -303,7 +303,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions> <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData> <RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData>
@ -325,7 +325,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions> <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData> <RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData>
@ -353,7 +353,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions> <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData> <RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData>
@ -381,6 +381,9 @@
<Project>{e89d61ac-55de-4482-afd4-df7242ebc859}</Project> <Project>{e89d61ac-55de-4482-afd4-df7242ebc859}</Project>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\..\examples\examples.rc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets"> <ImportGroup Label="ExtensionTargets">
</ImportGroup> </ImportGroup>

View File

@ -0,0 +1,569 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug.DLL|ARM64">
<Configuration>Debug.DLL</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug.DLL|Win32">
<Configuration>Debug.DLL</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug.DLL|x64">
<Configuration>Debug.DLL</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|ARM64">
<Configuration>Debug</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release.DLL|ARM64">
<Configuration>Release.DLL</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release.DLL|Win32">
<Configuration>Release.DLL</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release.DLL|x64">
<Configuration>Release.DLL</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM64">
<Configuration>Release</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{89D5A0E9-683C-465C-BF85-A880865175C8}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>models_animation_timming</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
<ProjectName>models_animation_timing</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug.DLL|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug.DLL|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug.DLL|ARM64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release.DLL|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release.DLL|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release.DLL|ARM64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug.DLL|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug.DLL|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug.DLL|ARM64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release.DLL|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release.DLL|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release.DLL|ARM64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)\build\$(ProjectName)\bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)\build\$(ProjectName)\obj\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)\build\$(ProjectName)\bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)\build\$(ProjectName)\obj\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)\build\$(ProjectName)\bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)\build\$(ProjectName)\obj\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug.DLL|Win32'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)\build\$(ProjectName)\bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)\build\$(ProjectName)\obj\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug.DLL|x64'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)\build\$(ProjectName)\bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)\build\$(ProjectName)\obj\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug.DLL|ARM64'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)\build\$(ProjectName)\bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)\build\$(ProjectName)\obj\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)\build\$(ProjectName)\bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)\build\$(ProjectName)\obj\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)\build\$(ProjectName)\bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)\build\$(ProjectName)\obj\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)\build\$(ProjectName)\bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)\build\$(ProjectName)\obj\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release.DLL|Win32'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)\build\$(ProjectName)\bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)\build\$(ProjectName)\obj\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release.DLL|x64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)\build\$(ProjectName)\bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)\build\$(ProjectName)\obj\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release.DLL|ARM64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)\build\$(ProjectName)\bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)\build\$(ProjectName)\obj\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug.DLL|Win32'">
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\models</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug.DLL|x64'">
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\models</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug.DLL|ARM64'">
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\models</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\models</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\models</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release.DLL|Win32'">
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\models</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\models</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\models</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\models</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\models</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release.DLL|x64'">
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\models</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release.DLL|ARM64'">
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\models</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAs>CompileAsC</CompileAs>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>$(SolutionDir)\build\raylib\bin\$(Platform)\$(Configuration)\</AdditionalLibraryDirectories>
<AdditionalDependencies>raylib.lib;opengl32.lib;kernel32.lib;user32.lib;gdi32.lib;winmm.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAs>CompileAsC</CompileAs>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>/FS %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>$(SolutionDir)\build\raylib\bin\$(Platform)\$(Configuration)\</AdditionalLibraryDirectories>
<AdditionalDependencies>raylib.lib;opengl32.lib;kernel32.lib;user32.lib;gdi32.lib;winmm.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAs>CompileAsC</CompileAs>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>/FS %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>$(SolutionDir)\build\raylib\bin\$(Platform)\$(Configuration)\</AdditionalLibraryDirectories>
<AdditionalDependencies>raylib.lib;opengl32.lib;kernel32.lib;user32.lib;gdi32.lib;winmm.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug.DLL|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAs>CompileAsC</CompileAs>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>$(SolutionDir)\build\raylib\bin\$(Platform)\$(Configuration)\</AdditionalLibraryDirectories>
<AdditionalDependencies>raylib.lib;opengl32.lib;kernel32.lib;user32.lib;gdi32.lib;winmm.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>xcopy /y /d "$(SolutionDir)\build\raylib\bin\$(Platform)\$(Configuration)\raylib.dll" "$(SolutionDir)\build\$(ProjectName)\bin\$(Platform)\$(Configuration)"</Command>
<Message>Copy Debug DLL to output directory</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug.DLL|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAs>CompileAsC</CompileAs>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>$(SolutionDir)\build\raylib\bin\$(Platform)\$(Configuration)\</AdditionalLibraryDirectories>
<AdditionalDependencies>raylib.lib;opengl32.lib;kernel32.lib;user32.lib;gdi32.lib;winmm.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>xcopy /y /d "$(SolutionDir)\build\raylib\bin\$(Platform)\$(Configuration)\raylib.dll" "$(SolutionDir)\build\$(ProjectName)\bin\$(Platform)\$(Configuration)"</Command>
<Message>Copy Debug DLL to output directory</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug.DLL|ARM64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAs>CompileAsC</CompileAs>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>$(SolutionDir)\build\raylib\bin\$(Platform)\$(Configuration)\</AdditionalLibraryDirectories>
<AdditionalDependencies>raylib.lib;opengl32.lib;kernel32.lib;user32.lib;gdi32.lib;winmm.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>xcopy /y /d "$(SolutionDir)\build\raylib\bin\$(Platform)\$(Configuration)\raylib.dll" "$(SolutionDir)\build\$(ProjectName)\bin\$(Platform)\$(Configuration)"</Command>
<Message>Copy Debug DLL to output directory</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
<RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>raylib.lib;opengl32.lib;kernel32.lib;user32.lib;gdi32.lib;winmm.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(SolutionDir)\build\raylib\bin\$(Platform)\$(Configuration)\</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
<RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>raylib.lib;opengl32.lib;kernel32.lib;user32.lib;gdi32.lib;winmm.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(SolutionDir)\build\raylib\bin\$(Platform)\$(Configuration)\</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
<RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>raylib.lib;opengl32.lib;kernel32.lib;user32.lib;gdi32.lib;winmm.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(SolutionDir)\build\raylib\bin\$(Platform)\$(Configuration)\</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release.DLL|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
<RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>raylib.lib;opengl32.lib;kernel32.lib;user32.lib;gdi32.lib;winmm.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(SolutionDir)\build\raylib\bin\$(Platform)\$(Configuration)\</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
<Command>xcopy /y /d "$(SolutionDir)\build\raylib\bin\$(Platform)\$(Configuration)\raylib.dll" "$(SolutionDir)\build\$(ProjectName)\bin\$(Platform)\$(Configuration)"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy Release DLL to output directory</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release.DLL|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
<RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>raylib.lib;opengl32.lib;kernel32.lib;user32.lib;gdi32.lib;winmm.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(SolutionDir)\build\raylib\bin\$(Platform)\$(Configuration)\</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
<Command>xcopy /y /d "$(SolutionDir)\build\raylib\bin\$(Platform)\$(Configuration)\raylib.dll" "$(SolutionDir)\build\$(ProjectName)\bin\$(Platform)\$(Configuration)"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy Release DLL to output directory</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release.DLL|ARM64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
<RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>raylib.lib;opengl32.lib;kernel32.lib;user32.lib;gdi32.lib;winmm.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(SolutionDir)\build\raylib\bin\$(Platform)\$(Configuration)\</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
<Command>xcopy /y /d "$(SolutionDir)\build\raylib\bin\$(Platform)\$(Configuration)\raylib.dll" "$(SolutionDir)\build\$(ProjectName)\bin\$(Platform)\$(Configuration)"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy Release DLL to output directory</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\examples\models\models_animation_timing.c" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\..\examples\examples.rc" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\raylib\raylib.vcxproj">
<Project>{e89d61ac-55de-4482-afd4-df7242ebc859}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -53,9 +53,9 @@
<PropertyGroup Label="Globals"> <PropertyGroup Label="Globals">
<ProjectGuid>{AFDDE100-2D36-4749-817D-12E54C56312F}</ProjectGuid> <ProjectGuid>{AFDDE100-2D36-4749-817D-12E54C56312F}</ProjectGuid>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
<RootNamespace>models_animation_playing</RootNamespace> <RootNamespace>models_loading_iqm</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion> <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
<ProjectName>models_animation_playing</ProjectName> <ProjectName>models_loading_iqm</ProjectName>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
@ -553,7 +553,7 @@
</PostBuildEvent> </PostBuildEvent>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="..\..\..\examples\models\models_animation_playing.c" /> <ClCompile Include="..\..\..\examples\models\models_loading_iqm.c" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ResourceCompile Include="..\..\..\examples\examples.rc" /> <ResourceCompile Include="..\..\..\examples\examples.rc" />

View File

@ -292,7 +292,7 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
@ -309,7 +309,7 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>/FS %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>/FS %(AdditionalOptions)</AdditionalOptions>
@ -345,7 +345,7 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
@ -366,7 +366,7 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
@ -410,7 +410,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions> <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData> <RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData>
@ -432,7 +432,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions> <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData> <RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData>
@ -476,7 +476,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions> <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData> <RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData>
@ -504,7 +504,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions> <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData> <RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData>

View File

@ -292,7 +292,7 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
@ -309,7 +309,7 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>/FS %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>/FS %(AdditionalOptions)</AdditionalOptions>
@ -345,7 +345,7 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
@ -366,7 +366,7 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
@ -410,7 +410,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions> <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData> <RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData>
@ -432,7 +432,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions> <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData> <RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData>
@ -476,7 +476,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions> <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData> <RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData>
@ -504,7 +504,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions> <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs> <CompileAs>CompileAsC</CompileAs>
<RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData> <RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData>

View File

@ -83,7 +83,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core_window_letterbox", "ex
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core_world_screen", "examples\core_world_screen.vcxproj", "{79417CE2-FEEB-42F0-BC53-62D5267B19B1}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core_world_screen", "examples\core_world_screen.vcxproj", "{79417CE2-FEEB-42F0-BC53-62D5267B19B1}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "models_animation_playing", "examples\models_animation_playing.vcxproj", "{AFDDE100-2D36-4749-817D-12E54C56312F}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "models_loading_iqm", "examples\models_loading_iqm.vcxproj", "{AFDDE100-2D36-4749-817D-12E54C56312F}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "models_billboard_rendering", "examples\models_billboard_rendering.vcxproj", "{B7812167-50FB-4934-996F-DF6FE4CBBFDF}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "models_billboard_rendering", "examples\models_billboard_rendering.vcxproj", "{B7812167-50FB-4934-996F-DF6FE4CBBFDF}"
EndProject EndProject
@ -429,12 +429,14 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shapes_easings_testbed", "e
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shaders_rlgl_compute", "examples\shaders_rlgl_compute.vcxproj", "{AEA9D0D4-B810-4624-BC75-10A291584ED6}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shaders_rlgl_compute", "examples\shaders_rlgl_compute.vcxproj", "{AEA9D0D4-B810-4624-BC75-10A291584ED6}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "models_animation_bone_blending", "examples\models_animation_bone_blending.vcxproj", "{AC751FE1-C986-4B6A-92A8-28ED89DEE671}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "models_animation_blend_custom", "examples\models_animation_blend_custom.vcxproj", "{AC751FE1-C986-4B6A-92A8-28ED89DEE671}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "models_animation_blending", "examples\models_animation_blending.vcxproj", "{BB9C957D-34F1-46AE-B64A-9E0499C1746D}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "models_animation_blending", "examples\models_animation_blending.vcxproj", "{BB9C957D-34F1-46AE-B64A-9E0499C1746D}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core_window_web", "examples\core_window_web.vcxproj", "{4E7157E0-6CDB-47AE-A19A-FEC3876FA8A3}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core_window_web", "examples\core_window_web.vcxproj", "{4E7157E0-6CDB-47AE-A19A-FEC3876FA8A3}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "models_animation_timing", "examples\models_animation_timing.vcxproj", "{89D5A0E9-683C-465C-BF85-A880865175C8}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug.DLL|ARM64 = Debug.DLL|ARM64 Debug.DLL|ARM64 = Debug.DLL|ARM64
@ -5443,6 +5445,30 @@ Global
{4E7157E0-6CDB-47AE-A19A-FEC3876FA8A3}.Release|x64.Build.0 = Release|x64 {4E7157E0-6CDB-47AE-A19A-FEC3876FA8A3}.Release|x64.Build.0 = Release|x64
{4E7157E0-6CDB-47AE-A19A-FEC3876FA8A3}.Release|x86.ActiveCfg = Release|Win32 {4E7157E0-6CDB-47AE-A19A-FEC3876FA8A3}.Release|x86.ActiveCfg = Release|Win32
{4E7157E0-6CDB-47AE-A19A-FEC3876FA8A3}.Release|x86.Build.0 = Release|Win32 {4E7157E0-6CDB-47AE-A19A-FEC3876FA8A3}.Release|x86.Build.0 = Release|Win32
{89D5A0E9-683C-465C-BF85-A880865175C8}.Debug.DLL|ARM64.ActiveCfg = Debug.DLL|ARM64
{89D5A0E9-683C-465C-BF85-A880865175C8}.Debug.DLL|ARM64.Build.0 = Debug.DLL|ARM64
{89D5A0E9-683C-465C-BF85-A880865175C8}.Debug.DLL|x64.ActiveCfg = Debug.DLL|x64
{89D5A0E9-683C-465C-BF85-A880865175C8}.Debug.DLL|x64.Build.0 = Debug.DLL|x64
{89D5A0E9-683C-465C-BF85-A880865175C8}.Debug.DLL|x86.ActiveCfg = Debug.DLL|Win32
{89D5A0E9-683C-465C-BF85-A880865175C8}.Debug.DLL|x86.Build.0 = Debug.DLL|Win32
{89D5A0E9-683C-465C-BF85-A880865175C8}.Debug|ARM64.ActiveCfg = Debug|ARM64
{89D5A0E9-683C-465C-BF85-A880865175C8}.Debug|ARM64.Build.0 = Debug|ARM64
{89D5A0E9-683C-465C-BF85-A880865175C8}.Debug|x64.ActiveCfg = Debug|x64
{89D5A0E9-683C-465C-BF85-A880865175C8}.Debug|x64.Build.0 = Debug|x64
{89D5A0E9-683C-465C-BF85-A880865175C8}.Debug|x86.ActiveCfg = Debug|Win32
{89D5A0E9-683C-465C-BF85-A880865175C8}.Debug|x86.Build.0 = Debug|Win32
{89D5A0E9-683C-465C-BF85-A880865175C8}.Release.DLL|ARM64.ActiveCfg = Release.DLL|ARM64
{89D5A0E9-683C-465C-BF85-A880865175C8}.Release.DLL|ARM64.Build.0 = Release.DLL|ARM64
{89D5A0E9-683C-465C-BF85-A880865175C8}.Release.DLL|x64.ActiveCfg = Release.DLL|x64
{89D5A0E9-683C-465C-BF85-A880865175C8}.Release.DLL|x64.Build.0 = Release.DLL|x64
{89D5A0E9-683C-465C-BF85-A880865175C8}.Release.DLL|x86.ActiveCfg = Release.DLL|Win32
{89D5A0E9-683C-465C-BF85-A880865175C8}.Release.DLL|x86.Build.0 = Release.DLL|Win32
{89D5A0E9-683C-465C-BF85-A880865175C8}.Release|ARM64.ActiveCfg = Release|ARM64
{89D5A0E9-683C-465C-BF85-A880865175C8}.Release|ARM64.Build.0 = Release|ARM64
{89D5A0E9-683C-465C-BF85-A880865175C8}.Release|x64.ActiveCfg = Release|x64
{89D5A0E9-683C-465C-BF85-A880865175C8}.Release|x64.Build.0 = Release|x64
{89D5A0E9-683C-465C-BF85-A880865175C8}.Release|x86.ActiveCfg = Release|Win32
{89D5A0E9-683C-465C-BF85-A880865175C8}.Release|x86.Build.0 = Release|Win32
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
@ -5619,7 +5645,7 @@ Global
{52BA9067-A5FC-4CE8-82AD-7204ECFDEF9F} = {AF5BEC5C-1F2B-4DA8-B12D-D09FE569237C} {52BA9067-A5FC-4CE8-82AD-7204ECFDEF9F} = {AF5BEC5C-1F2B-4DA8-B12D-D09FE569237C}
{8E132D5A-2C00-48D0-8747-97E41356F26F} = {278D8859-20B1-428F-8448-064F46E1F021} {8E132D5A-2C00-48D0-8747-97E41356F26F} = {278D8859-20B1-428F-8448-064F46E1F021}
{A4662163-83E7-4309-8CAA-B0BF13655FE6} = {AF5BEC5C-1F2B-4DA8-B12D-D09FE569237C} {A4662163-83E7-4309-8CAA-B0BF13655FE6} = {AF5BEC5C-1F2B-4DA8-B12D-D09FE569237C}
{5F4B766F-DD52-4B53-B6C3-BC7611E17F20} = {278D8859-20B1-428F-8448-064F46E1F021} {5F4B766F-DD52-4B53-B6C3-BC7611E17F20} = {5317807F-61D4-4E0F-B6DC-2D9F12621ED9}
{FF5F9EE9-29C5-40EE-BBCF-AE51B001FEC3} = {6C82BAAE-BDDF-457D-8FA8-7E2490B07035} {FF5F9EE9-29C5-40EE-BBCF-AE51B001FEC3} = {6C82BAAE-BDDF-457D-8FA8-7E2490B07035}
{0C442799-B09C-4CD1-9538-711B6E85E9BF} = {278D8859-20B1-428F-8448-064F46E1F021} {0C442799-B09C-4CD1-9538-711B6E85E9BF} = {278D8859-20B1-428F-8448-064F46E1F021}
{DFB40A10-F8B7-412A-BCC3-5EE49294D816} = {278D8859-20B1-428F-8448-064F46E1F021} {DFB40A10-F8B7-412A-BCC3-5EE49294D816} = {278D8859-20B1-428F-8448-064F46E1F021}
@ -5662,6 +5688,7 @@ Global
{AC751FE1-C986-4B6A-92A8-28ED89DEE671} = {AF5BEC5C-1F2B-4DA8-B12D-D09FE569237C} {AC751FE1-C986-4B6A-92A8-28ED89DEE671} = {AF5BEC5C-1F2B-4DA8-B12D-D09FE569237C}
{BB9C957D-34F1-46AE-B64A-9E0499C1746D} = {AF5BEC5C-1F2B-4DA8-B12D-D09FE569237C} {BB9C957D-34F1-46AE-B64A-9E0499C1746D} = {AF5BEC5C-1F2B-4DA8-B12D-D09FE569237C}
{4E7157E0-6CDB-47AE-A19A-FEC3876FA8A3} = {6C82BAAE-BDDF-457D-8FA8-7E2490B07035} {4E7157E0-6CDB-47AE-A19A-FEC3876FA8A3} = {6C82BAAE-BDDF-457D-8FA8-7E2490B07035}
{89D5A0E9-683C-465C-BF85-A880865175C8} = {AF5BEC5C-1F2B-4DA8-B12D-D09FE569237C}
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {E926C768-6307-4423-A1EC-57E95B1FAB29} SolutionGuid = {E926C768-6307-4423-A1EC-57E95B1FAB29}

View File

@ -343,7 +343,7 @@ ifeq ($(PLATFORM),PLATFORM_RPI)
endif endif
ifeq ($(PLATFORM),PLATFORM_WEB) ifeq ($(PLATFORM),PLATFORM_WEB)
# Libraries for web (HTML5) compiling # Libraries for web (HTML5) compiling
LDLIBS = $(RAYLIB_RELEASE_PATH)/libraylib.a LDLIBS = $(RAYLIB_RELEASE_PATH)/libraylib.web.a
endif endif
# Define a recursive wildcard function # Define a recursive wildcard function

View File

@ -1,7 +1,7 @@
# Setup the project and settings # Setup the project and settings
project(raylib C) project(raylib C)
set(PROJECT_VERSION 5.5.0) set(PROJECT_VERSION 6.0.0)
set(API_VERSION 550) set(API_VERSION 600)
include(GNUInstallDirs) include(GNUInstallDirs)
include(JoinPaths) include(JoinPaths)
@ -75,6 +75,12 @@ if (${PLATFORM} MATCHES "Web")
endif() endif()
endif() endif()
if (${PLATFORM} MATCHES "Android")
# Wrap fopen at link time so all code (including third-party libs) goes
# through __wrap_fopen, which handles Android APK asset loading
target_link_options(raylib PUBLIC -Wl,--wrap=fopen)
endif()
set_target_properties(raylib PROPERTIES set_target_properties(raylib PROPERTIES
PUBLIC_HEADER "${raylib_public_headers}" PUBLIC_HEADER "${raylib_public_headers}"
VERSION ${PROJECT_VERSION} VERSION ${PROJECT_VERSION}
@ -111,6 +117,21 @@ target_include_directories(raylib
# Copy the header files to the build directory for convenience # Copy the header files to the build directory for convenience
file(COPY ${raylib_public_headers} DESTINATION "include") file(COPY ${raylib_public_headers} DESTINATION "include")
if (PLATFORM STREQUAL "Desktop")
if (UNIX AND NOT APPLE)
if (GLFW_BUILD_X11)
find_package(X11 REQUIRED)
target_compile_definitions(raylib PRIVATE _GLFW_X11)
target_link_libraries(raylib PRIVATE
${X11_LIBRARIES}
)
message(STATUS "X11 support enabled for raylib")
endif()
endif()
endif()
# Includes information on how the library will be installed on the system # Includes information on how the library will be installed on the system
# when cmake --install is run # when cmake --install is run

View File

@ -20,15 +20,22 @@
# - Linux (X11 desktop mode) # - Linux (X11 desktop mode)
# - macOS/OSX (x64, arm64 (not tested)) # - macOS/OSX (x64, arm64 (not tested))
# - Others (not tested) # - Others (not tested)
# > PLATFORM_WEB_RGFW: # > PLATFORM_DESKTOP_WIN32 (native Win32):
# - Windows (Win32, Win64)
# > PLATFORM_WEB (GLFW + Emscripten):
# - HTML5 (WebAssembly) # - HTML5 (WebAssembly)
# > PLATFORM_WEB: # > PLATFORM_WEB_EMSCRIPTEN (Emscripten):
# - HTML5 (WebAssembly) # - HTML5 (WebAssembly)
# > PLATFORM_DRM: # > PLATFORM_WEB_RGFW (Emscripten):
# - HTML5 (WebAssembly)
# > PLATFORM_DRM (native DRM):
# - Raspberry Pi 0-5 (DRM/KMS) # - Raspberry Pi 0-5 (DRM/KMS)
# - Linux DRM subsystem (KMS mode) # - Linux DRM subsystem (KMS mode)
# > PLATFORM_ANDROID: # - Embedded devices (with GPU)
# > PLATFORM_ANDROID (native NDK):
# - Android (ARM, ARM64) # - Android (ARM, ARM64)
# > PLATFORM_MEMORY
# - Memory framebuffer output, using software renderer, no OS required
# #
# Many thanks to Milan Nikolic (@gen2brain) for implementing Android platform pipeline. # Many thanks to Milan Nikolic (@gen2brain) for implementing Android platform pipeline.
# Many thanks to Emanuele Petriglia for his contribution on GNU/Linux pipeline. # Many thanks to Emanuele Petriglia for his contribution on GNU/Linux pipeline.
@ -68,8 +75,8 @@ else
endif endif
# Define required raylib variables # Define required raylib variables
RAYLIB_VERSION = 5.5.0 RAYLIB_VERSION = 6.0.0
RAYLIB_API_VERSION = 550 RAYLIB_API_VERSION = 600
# Define raylib source code path # Define raylib source code path
RAYLIB_SRC_PATH ?= ../src RAYLIB_SRC_PATH ?= ../src
@ -115,6 +122,11 @@ USE_EXTERNAL_GLFW ?= FALSE
GLFW_LINUX_ENABLE_WAYLAND ?= FALSE GLFW_LINUX_ENABLE_WAYLAND ?= FALSE
GLFW_LINUX_ENABLE_X11 ?= TRUE GLFW_LINUX_ENABLE_X11 ?= TRUE
# Enable support for X11 by default on Linux when using GLFW
# NOTE: Wayland is disabled by default, only enable if you are sure
RGFW_LINUX_ENABLE_WAYLAND ?= FALSE
RGFW_LINUX_ENABLE_X11 ?= TRUE
# PLATFORM_DESKTOP_SDL: It requires SDL library to be provided externally # PLATFORM_DESKTOP_SDL: It requires SDL library to be provided externally
# WARNING: Library is not included in raylib, it MUST be configured by users # WARNING: Library is not included in raylib, it MUST be configured by users
SDL_INCLUDE_PATH ?= $(RAYLIB_SRC_PATH)/external/SDL2/include SDL_INCLUDE_PATH ?= $(RAYLIB_SRC_PATH)/external/SDL2/include
@ -289,6 +301,17 @@ ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW)
CC = clang CC = clang
endif endif
endif endif
ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_RGFW)
ifeq ($(PLATFORM_OS),OSX)
# OSX default compiler
CC = clang
GLFW_OSX = -x objective-c
endif
ifeq ($(PLATFORM_OS),BSD)
# FreeBSD, OpenBSD, NetBSD, DragonFly default compiler
CC = clang
endif
endif
ifeq ($(TARGET_PLATFORM),PLATFORM_DRM) ifeq ($(TARGET_PLATFORM),PLATFORM_DRM)
ifeq ($(USE_RPI_CROSSCOMPILER),TRUE) ifeq ($(USE_RPI_CROSSCOMPILER),TRUE)
# Define RPI cross-compiler # Define RPI cross-compiler
@ -450,7 +473,6 @@ ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW)
endif endif
ifeq ($(GLFW_LINUX_ENABLE_WAYLAND),TRUE) ifeq ($(GLFW_LINUX_ENABLE_WAYLAND),TRUE)
CFLAGS += -D_GLFW_WAYLAND CFLAGS += -D_GLFW_WAYLAND
LDFLAGS += $(shell pkg-config wayland-client wayland-cursor wayland-egl xkbcommon --libs)
WL_PROTOCOLS_DIR := external/glfw/deps/wayland WL_PROTOCOLS_DIR := external/glfw/deps/wayland
@ -472,6 +494,33 @@ ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW)
endif endif
endif endif
endif endif
# Use Wayland display on Linux desktop
ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_RGFW)
ifeq ($(PLATFORM_OS), LINUX)
ifeq ($(RGFW_LINUX_ENABLE_X11),TRUE)
CFLAGS += -DRGFW_X11 -DRGFW_UNIX
endif
ifeq ($(RGFW_LINUX_ENABLE_WAYLAND),TRUE)
CFLAGS += -DRGFW_WAYLAND -DEGLAPIENTRY=
WL_PROTOCOLS_DIR := external/RGFW/deps/wayland
wl_generate = \
$(eval protocol=$(1)) \
$(eval basename=$(2)) \
$(shell wayland-scanner client-header $(protocol) $(RAYLIB_SRC_PATH)/$(basename).h) \
$(shell wayland-scanner private-code $(protocol) $(RAYLIB_SRC_PATH)/$(basename)-code.c)
$(call wl_generate, $(WL_PROTOCOLS_DIR)/pointer-constraints-unstable-v1.xml, pointer-constraints-unstable-v1-client-protocol)
$(call wl_generate, $(WL_PROTOCOLS_DIR)/pointer-warp-v1.xml, pointer-warp-v1-client-protocol)
$(call wl_generate, $(WL_PROTOCOLS_DIR)/relative-pointer-unstable-v1.xml, relative-pointer-unstable-v1-client-protocol)
$(call wl_generate, $(WL_PROTOCOLS_DIR)/xdg-decoration-unstable-v1.xml, xdg-decoration-unstable-v1-client-protocol)
$(call wl_generate, $(WL_PROTOCOLS_DIR)/xdg-output-unstable-v1.xml, xdg-output-unstable-v1-client-protocol)
$(call wl_generate, $(WL_PROTOCOLS_DIR)/xdg-shell.xml, xdg-shell-client-protocol)
$(call wl_generate, $(WL_PROTOCOLS_DIR)/xdg-toplevel-icon-v1.xml, xdg-toplevel-icon-v1-client-protocol)
endif
endif
endif
CFLAGS += $(CUSTOM_CFLAGS) CFLAGS += $(CUSTOM_CFLAGS)
@ -565,6 +614,9 @@ ifeq ($(TARGET_PLATFORM),PLATFORM_ANDROID)
LDFLAGS += -Lsrc LDFLAGS += -Lsrc
# Avoid unresolved symbol pointing to external main() # Avoid unresolved symbol pointing to external main()
LDFLAGS += -Wl,-undefined,dynamic_lookup LDFLAGS += -Wl,-undefined,dynamic_lookup
# Wrap fopen at link time so all code (including third-party libs) goes
# through __wrap_fopen, which handles Android APK asset loading
LDFLAGS += -Wl,--wrap=fopen
endif endif
# Define libraries required on linking: LDLIBS # Define libraries required on linking: LDLIBS
@ -583,6 +635,10 @@ ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW)
ifeq ($(GLFW_LINUX_ENABLE_X11),TRUE) ifeq ($(GLFW_LINUX_ENABLE_X11),TRUE)
LDLIBS += -lX11 LDLIBS += -lX11
endif endif
ifeq ($(GLFW_LINUX_ENABLE_WAYLAND),TRUE)
LDFLAGS += $(shell pkg-config wayland-client wayland-cursor wayland-egl xkbcommon --libs)
endif
# TODO: On ARM 32bit arch, miniaudio requires atomics library # TODO: On ARM 32bit arch, miniaudio requires atomics library
#LDLIBS += -latomic #LDLIBS += -latomic
endif endif
@ -618,7 +674,15 @@ ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_RGFW)
ifeq ($(PLATFORM_OS),LINUX) ifeq ($(PLATFORM_OS),LINUX)
# Libraries for Debian GNU/Linux desktop compipling # Libraries for Debian GNU/Linux desktop compipling
# NOTE: Required packages: libegl1-mesa-dev # NOTE: Required packages: libegl1-mesa-dev
LDLIBS = -lGL -lX11 -lXrandr -lXinerama -lXi -lXcursor -lm -lpthread -ldl -lrt LDLIBS = -lm
ifeq ($(RGFW_LINUX_ENABLE_X11),TRUE)
LDLIBS += -lGL -lX11 -lXrandr -lXinerama -lXi -lXcursor -lpthread -ldl -lrt
endif
ifeq ($(RGFW_LINUX_ENABLE_WAYLAND),TRUE)
LDFLAGS += $(shell pkg-config wayland-client wayland-cursor wayland-egl xkbcommon --libs)
endif
# Explicit link to libc # Explicit link to libc
ifeq ($(RAYLIB_LIBTYPE),SHARED) ifeq ($(RAYLIB_LIBTYPE),SHARED)
@ -665,6 +729,21 @@ ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW)
OBJS += rglfw.o OBJS += rglfw.o
endif endif
endif endif
ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_RGFW)
ifeq ($(RGFW_LINUX_ENABLE_WAYLAND),TRUE)
PROTOCOL_CODE_FILES = \
pointer-constraints-unstable-v1-client-protocol-code \
pointer-warp-v1-client-protocol-code \
relative-pointer-unstable-v1-client-protocol-code \
xdg-decoration-unstable-v1-client-protocol-code \
xdg-output-unstable-v1-client-protocol-code \
xdg-shell-client-protocol-code \
xdg-toplevel-icon-v1-client-protocol-code
PROTO_OBJS = $(addsuffix .o, $(PROTOCOL_CODE_FILES))
OBJS += $(PROTO_OBJS)
endif
endif
ifeq ($(RAYLIB_MODULE_MODELS),TRUE) ifeq ($(RAYLIB_MODULE_MODELS),TRUE)
OBJS += rmodels.o OBJS += rmodels.o
endif endif
@ -801,6 +880,17 @@ endif
android_native_app_glue.o : $(NATIVE_APP_GLUE)/android_native_app_glue.c android_native_app_glue.o : $(NATIVE_APP_GLUE)/android_native_app_glue.c
$(CC) -c $< $(CFLAGS) $(INCLUDE_PATHS) $(CC) -c $< $(CFLAGS) $(INCLUDE_PATHS)
# Compile Wayland files
ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_RGFW)
ifeq ($(RGFW_LINUX_ENABLE_WAYLAND),TRUE)
%-client-protocol-code.o: %-client-protocol-code.c
$(CC) -c $< $(CFLAGS) $(INCLUDE_PATHS)
%-client-protocol-code.h: external/RGFW/deps/wayland/%.xml
wayland-scanner private-code $< $@
endif
endif
# Install generated and needed files to desired directories. # Install generated and needed files to desired directories.
# On GNU/Linux and BSDs, there are some standard directories that contain extra # On GNU/Linux and BSDs, there are some standard directories that contain extra
# libraries and header files. These directories (often /usr/local/lib and # libraries and header files. These directories (often /usr/local/lib and
@ -885,7 +975,7 @@ clean: clean_shell_$(PLATFORM_SHELL)
@echo "removed all generated files!" @echo "removed all generated files!"
clean_shell_sh: clean_shell_sh:
rm -fv *.o $(RAYLIB_RELEASE_PATH)/lib$(RAYLIB_LIB_NAME).a $(RAYLIB_RELEASE_PATH)/lib$(RAYLIB_LIB_NAME).web.a $(RAYLIB_RELEASE_PATH)/lib$(RAYLIB_LIB_NAME).so* raygui.c $(RAYLIB_RELEASE_PATH)/*-protocol.h $(RAYLIB_RELEASE_PATH)/*-protocol-code.h rm -fv *.o $(RAYLIB_RELEASE_PATH)/lib$(RAYLIB_LIB_NAME).a $(RAYLIB_RELEASE_PATH)/lib$(RAYLIB_LIB_NAME).web.a $(RAYLIB_RELEASE_PATH)/lib$(RAYLIB_LIB_NAME).so* raygui.c $(RAYLIB_RELEASE_PATH)/*-protocol.h $(RAYLIB_RELEASE_PATH)/*-protocol-code.h $(RAYLIB_RELEASE_PATH)/*-protocol-code.c
ifeq ($(TARGET_PLATFORM),PLATFORM_ANDROID) ifeq ($(TARGET_PLATFORM),PLATFORM_ANDROID)
rm -fv $(NATIVE_APP_GLUE)/android_native_app_glue.o rm -fv $(NATIVE_APP_GLUE)/android_native_app_glue.o
endif endif

View File

@ -2,7 +2,9 @@
* *
* raylib configuration flags * raylib configuration flags
* *
* This file defines all the configuration flags for the different raylib modules * This file defines the configuration flags for different raylib features per-module
*
* NOTE: Additional values are configured per-module and can be set on compile time
* *
* LICENSE: zlib/libpng * LICENSE: zlib/libpng
* *
@ -28,283 +30,343 @@
#ifndef CONFIG_H #ifndef CONFIG_H
#define CONFIG_H #define CONFIG_H
#if !defined(EXTERNAL_CONFIG_FLAGS)
//------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------
// Module selection - Some modules could be avoided // Module selection - Some modules could be avoided
// Mandatory modules: rcore, rlgl // Mandatory modules: rcore, rlgl
//------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------
#if !defined(EXTERNAL_CONFIG_FLAGS) #ifndef SUPPORT_MODULE_RSHAPES
#define SUPPORT_MODULE_RSHAPES 1 #define SUPPORT_MODULE_RSHAPES 1
#endif
#ifndef SUPPORT_MODULE_RTEXTURES
#define SUPPORT_MODULE_RTEXTURES 1 #define SUPPORT_MODULE_RTEXTURES 1
#endif
#ifndef SUPPORT_MODULE_RTEXT
#define SUPPORT_MODULE_RTEXT 1 // WARNING: It requires SUPPORT_MODULE_RTEXTURES to load sprite font textures #define SUPPORT_MODULE_RTEXT 1 // WARNING: It requires SUPPORT_MODULE_RTEXTURES to load sprite font textures
#endif
#ifndef SUPPORT_MODULE_RMODELS
#define SUPPORT_MODULE_RMODELS 1 #define SUPPORT_MODULE_RMODELS 1
#endif
#ifndef SUPPORT_MODULE_RAUDIO
#define SUPPORT_MODULE_RAUDIO 1 #define SUPPORT_MODULE_RAUDIO 1
#endif #endif
//------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------
// Module: rcore - Configuration Flags // Module: rcore - Configuration Flags
//------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------
#if !defined(EXTERNAL_CONFIG_FLAGS) #ifndef SUPPORT_TRACELOG
// Standard file io library (stdio.h) included
#define SUPPORT_STANDARD_FILEIO 1
// Show TRACELOG() output messages // Show TRACELOG() output messages
#define SUPPORT_TRACELOG 1 #define SUPPORT_TRACELOG 1
// Camera module is included (rcamera.h) and multiple predefined cameras are available: free, 1st/3rd person, orbital #endif
#ifndef SUPPORT_CAMERA_SYSTEM
// Camera module is included (rcamera.h) and multiple predefined
// cameras are available: free, 1st/3rd person, orbital
#define SUPPORT_CAMERA_SYSTEM 1 #define SUPPORT_CAMERA_SYSTEM 1
#endif
#ifndef SUPPORT_GESTURES_SYSTEM
// Gestures module is included (rgestures.h) to support gestures detection: tap, hold, swipe, drag // Gestures module is included (rgestures.h) to support gestures detection: tap, hold, swipe, drag
#define SUPPORT_GESTURES_SYSTEM 1 #define SUPPORT_GESTURES_SYSTEM 1
#endif
#ifndef SUPPORT_RPRAND_GENERATOR
// Include pseudo-random numbers generator (rprand.h), based on Xoshiro128** and SplitMix64 // Include pseudo-random numbers generator (rprand.h), based on Xoshiro128** and SplitMix64
#define SUPPORT_RPRAND_GENERATOR 1 #define SUPPORT_RPRAND_GENERATOR 1
#endif
#ifndef SUPPORT_MOUSE_GESTURES
// Mouse gestures are directly mapped like touches and processed by gestures system // Mouse gestures are directly mapped like touches and processed by gestures system
#define SUPPORT_MOUSE_GESTURES 1 #define SUPPORT_MOUSE_GESTURES 1
#endif
#ifndef SUPPORT_SSH_KEYBOARD_RPI
// Reconfigure standard input to receive key inputs, works with SSH connection // Reconfigure standard input to receive key inputs, works with SSH connection
#define SUPPORT_SSH_KEYBOARD_RPI 1 #define SUPPORT_SSH_KEYBOARD_RPI 1
#endif
#ifndef SUPPORT_WINMM_HIGHRES_TIMER
// Setting a higher resolution can improve the accuracy of time-out intervals in wait functions // Setting a higher resolution can improve the accuracy of time-out intervals in wait functions
// However, it can also reduce overall system performance, because the thread scheduler switches tasks more often // However, it can also reduce overall system performance, because the thread scheduler switches tasks more often
#define SUPPORT_WINMM_HIGHRES_TIMER 1 #define SUPPORT_WINMM_HIGHRES_TIMER 1
#endif
#if !SUPPORT_BUSY_WAIT_LOOP && !SUPPORT_PARTIALBUSY_WAIT_LOOP
// Use busy wait loop for timing sync, if not defined, a high-resolution timer is set up and used // Use busy wait loop for timing sync, if not defined, a high-resolution timer is set up and used
//#define SUPPORT_BUSY_WAIT_LOOP 1 #define SUPPORT_BUSY_WAIT_LOOP 0 // Disabled by default
// Use a partial-busy wait loop, in this case frame sleeps for most of the time, but then runs a busy loop at the end for accuracy #endif
#if !SUPPORT_PARTIALBUSY_WAIT_LOOP && !SUPPORT_BUSY_WAIT_LOOP
// Use a partial-busy wait loop, in this case frame sleeps for most of the time,
// but then runs a busy loop at the end for accuracy
#define SUPPORT_PARTIALBUSY_WAIT_LOOP 1 #define SUPPORT_PARTIALBUSY_WAIT_LOOP 1
#endif
#ifndef SUPPORT_SCREEN_CAPTURE
// Allow automatic screen capture of current screen pressing F12, defined in KeyCallback() // Allow automatic screen capture of current screen pressing F12, defined in KeyCallback()
// WARNING: It also requires SUPPORT_IMAGE_EXPORT and SUPPORT_FILEFORMAT_PNG flags // WARNING: It requires SUPPORT_FILEFORMAT_PNG flag
#define SUPPORT_SCREEN_CAPTURE 1 #define SUPPORT_SCREEN_CAPTURE 1
#endif
#ifndef SUPPORT_COMPRESSION_API
// Support CompressData() and DecompressData() functions // Support CompressData() and DecompressData() functions
#define SUPPORT_COMPRESSION_API 1 #define SUPPORT_COMPRESSION_API 1
#endif
#ifndef SUPPORT_AUTOMATION_EVENTS
// Support automatic generated events, loading and recording of those events when required // Support automatic generated events, loading and recording of those events when required
#define SUPPORT_AUTOMATION_EVENTS 1 #define SUPPORT_AUTOMATION_EVENTS 1
#endif
#ifndef SUPPORT_CUSTOM_FRAME_CONTROL
// Support custom frame control, only for advanced users // Support custom frame control, only for advanced users
// 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()
// Enabling this flag allows manual control of the frame processes, use at your own risk // Enabling this flag allows manual control of the frame processes, use at your own risk
//#define SUPPORT_CUSTOM_FRAME_CONTROL 1 #define SUPPORT_CUSTOM_FRAME_CONTROL 0 // Disabled by default
#endif
#ifndef SUPPORT_CLIPBOARD_IMAGE
// Support for clipboard image loading // Support for clipboard image loading
// NOTE: Only working on SDL3, GLFW (Windows) and RGFW (Windows) // NOTE: Only working on SDL3, GLFW (Windows) and RGFW (Windows)
// WARNING: It requires support for some additional flags:
// - SUPPORT_MODULE_RTEXTURES
// - SUPPORT_FILEFORMAT_BMP (Windows clipboard)
// - SUPPORT_FILEFORMAT_PNG (Wayland clipboard)
// - SUPPORT_FILEFORMAT_JPG
#define SUPPORT_CLIPBOARD_IMAGE 1 #define SUPPORT_CLIPBOARD_IMAGE 1
#endif #endif
// NOTE: Clipboard image loading requires support for some image file formats
// TODO: Those defines should probably be removed from here, letting the user manage them
#if defined(SUPPORT_CLIPBOARD_IMAGE)
#ifndef SUPPORT_MODULE_RTEXTURES
#define SUPPORT_MODULE_RTEXTURES 1
#endif
#ifndef STBI_REQUIRED
#define STBI_REQUIRED
#endif
#ifndef SUPPORT_FILEFORMAT_BMP // For clipboard image on Windows
#define SUPPORT_FILEFORMAT_BMP 1
#endif
#ifndef SUPPORT_FILEFORMAT_PNG // Wayland uses png for prints, at least it was on 22 LTS ubuntu
#define SUPPORT_FILEFORMAT_PNG 1
#endif
#ifndef SUPPORT_FILEFORMAT_JPG
#define SUPPORT_FILEFORMAT_JPG 1
#endif
#endif
#if defined(SUPPORT_TRACELOG)
#define TRACELOG(level, ...) TraceLog(level, __VA_ARGS__)
#else
#define TRACELOG(level, ...) (void)0
#endif
// rcore: Configuration values // rcore: Configuration values
// NOTE: Below values are alread defined inside [rcore.c] so there is no need to be
// redefined here, in case it must be done, uncomment the required line and update
// the value; it can also be done on compilation with -DVALUE_TO_REDEFINE=128
//------------------------------------------------------------------------------------
//#define MAX_TRACELOG_MSG_LENGTH 256 // Max length of one trace-log message
//#define MAX_FILEPATH_CAPACITY 8192 // Maximum file paths capacity
//#define MAX_FILEPATH_LENGTH 4096 // Maximum length for filepaths (Linux PATH_MAX default value)
//#define MAX_KEYBOARD_KEYS 512 // Maximum number of keyboard keys supported
//#define MAX_MOUSE_BUTTONS 8 // Maximum number of mouse buttons supported
//#define MAX_GAMEPADS 4 // Maximum number of gamepads supported
//#define MAX_GAMEPAD_AXES 8 // Maximum number of axes supported (per gamepad)
//#define MAX_GAMEPAD_BUTTONS 32 // Maximum number of buttons supported (per gamepad)
//#define MAX_GAMEPAD_VIBRATION_TIME 2.0f // Maximum vibration time in seconds
//#define MAX_TOUCH_POINTS 10 // Maximum number of touch points supported
//#define MAX_KEY_PRESSED_QUEUE 16 // Maximum number of keys in the key input queue
//#define MAX_CHAR_PRESSED_QUEUE 16 // Maximum number of characters in the char input queue
//#define MAX_DECOMPRESSION_SIZE 64 // Max size allocated for decompression in MB
//#define MAX_AUTOMATION_EVENTS 16384 // Maximum number of automation events to record
//------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------
#define MAX_TRACELOG_MSG_LENGTH 256 // Max length of one trace-log message
#define MAX_FILEPATH_CAPACITY 8192 // Maximum file paths capacity
#define MAX_FILEPATH_LENGTH 4096 // Maximum length for filepaths (Linux PATH_MAX default value)
#define MAX_KEYBOARD_KEYS 512 // Maximum number of keyboard keys supported
#define MAX_MOUSE_BUTTONS 8 // Maximum number of mouse buttons supported
#define MAX_GAMEPADS 4 // Maximum number of gamepads supported
#define MAX_GAMEPAD_AXES 8 // Maximum number of axes supported (per gamepad)
#define MAX_GAMEPAD_BUTTONS 32 // Maximum number of buttons supported (per gamepad)
#define MAX_GAMEPAD_VIBRATION_TIME 2.0f // Maximum vibration time in seconds
#define MAX_TOUCH_POINTS 10 // Maximum number of touch points supported
#define MAX_KEY_PRESSED_QUEUE 16 // Maximum number of keys in the key input queue
#define MAX_CHAR_PRESSED_QUEUE 16 // Maximum number of characters in the char input queue
#define MAX_DECOMPRESSION_SIZE 64 // Max size allocated for decompression in MB
#define MAX_AUTOMATION_EVENTS 16384 // Maximum number of automation events to record
//------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------
// Module: rlgl - Configuration values // Module: rlgl - Configuration values
//------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------
#if !defined(EXTERNAL_CONFIG_FLAGS) #ifndef RLGL_ENABLE_OPENGL_DEBUG_CONTEXT
// Enable OpenGL Debug Context (only available on OpenGL 4.3) // Request OpenGL debug context (only available on OpenGL 4.3)
//#define RLGL_ENABLE_OPENGL_DEBUG_CONTEXT 1 #define RLGL_ENABLE_OPENGL_DEBUG_CONTEXT 0
#endif
// Show OpenGL extensions and capabilities detailed logs on init #ifndef RLGL_SHOW_GL_DETAILS_INFO
//#define RLGL_SHOW_GL_DETAILS_INFO 1 // Show OpenGL detailed info on initialization,
// supported GL extensions and GL capabilities
#define RL_SUPPORT_MESH_GPU_SKINNING 1 // GPU skinning, comment if your GPU does not support more than 8 VBOs #define RLGL_SHOW_GL_DETAILS_INFO 0
#endif #endif
// rlgl: Configuration values
// NOTE: Below values are alread defined inside [rlgl.h] so there is no need to be
// redefined here, in case it must be done, uncomment the required line and update
// the value; it can also be done on compilation with -DVALUE_TO_REDEFINE=128
//------------------------------------------------------------------------------------
//#define RL_DEFAULT_BATCH_BUFFER_ELEMENTS 4096 // Default internal render batch elements limits //#define RL_DEFAULT_BATCH_BUFFER_ELEMENTS 4096 // Default internal render batch elements limits
#define RL_DEFAULT_BATCH_BUFFERS 1 // Default number of batch buffers (multi-buffering) //#define RL_DEFAULT_BATCH_BUFFERS 1 // Default number of batch buffers (multi-buffering)
#define RL_DEFAULT_BATCH_DRAWCALLS 256 // Default number of batch draw calls (by state changes: mode, texture) //#define RL_DEFAULT_BATCH_DRAWCALLS 256 // Default number of batch draw calls (by state changes: mode, texture)
#define RL_DEFAULT_BATCH_MAX_TEXTURE_UNITS 4 // Maximum number of textures units that can be activated on batch drawing (SetShaderValueTexture()) //#define RL_DEFAULT_BATCH_MAX_TEXTURE_UNITS 4 // Maximum number of textures units that can be activated on batch drawing (SetShaderValueTexture())
//#define RL_MAX_MATRIX_STACK_SIZE 32 // Maximum size of internal Matrix stack
#define RL_MAX_MATRIX_STACK_SIZE 32 // Maximum size of internal Matrix stack //#define RL_MAX_SHADER_LOCATIONS 32 // Maximum number of shader locations supported
//#define RL_CULL_DISTANCE_NEAR 0.05 // Default projection matrix near cull distance
#define RL_MAX_SHADER_LOCATIONS 32 // Maximum number of shader locations supported //#define RL_CULL_DISTANCE_FAR 4000.0 // Default projection matrix far cull distance
#define RL_CULL_DISTANCE_NEAR 0.05 // Default projection matrix near cull distance
#define RL_CULL_DISTANCE_FAR 4000.0 // Default projection matrix far cull distance
// Default shader vertex attribute locations // Default shader vertex attribute locations
#define RL_DEFAULT_SHADER_ATTRIB_LOCATION_POSITION 0 //#define RL_DEFAULT_SHADER_ATTRIB_LOCATION_POSITION 0
#define RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD 1 //#define RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD 1
#define RL_DEFAULT_SHADER_ATTRIB_LOCATION_NORMAL 2 //#define RL_DEFAULT_SHADER_ATTRIB_LOCATION_NORMAL 2
#define RL_DEFAULT_SHADER_ATTRIB_LOCATION_COLOR 3 //#define RL_DEFAULT_SHADER_ATTRIB_LOCATION_COLOR 3
#define RL_DEFAULT_SHADER_ATTRIB_LOCATION_TANGENT 4 //#define RL_DEFAULT_SHADER_ATTRIB_LOCATION_TANGENT 4
#define RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD2 5 //#define RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD2 5
#define RL_DEFAULT_SHADER_ATTRIB_LOCATION_INDICES 6 //#define RL_DEFAULT_SHADER_ATTRIB_LOCATION_INDICES 6
#if defined(RL_SUPPORT_MESH_GPU_SKINNING) //#define RL_DEFAULT_SHADER_ATTRIB_LOCATION_BONEINDICES 7
#define RL_DEFAULT_SHADER_ATTRIB_LOCATION_BONEIDS 7 //#define RL_DEFAULT_SHADER_ATTRIB_LOCATION_BONEWEIGHTS 8
#define RL_DEFAULT_SHADER_ATTRIB_LOCATION_BONEWEIGHTS 8 //#define RL_DEFAULT_SHADER_ATTRIB_LOCATION_INSTANCETRANSFORM 9
#endif
#define RL_DEFAULT_SHADER_ATTRIB_LOCATION_INSTANCE_TX 9
// Default shader vertex attribute names to set location points // Default shader vertex attribute/uniform names to set location points
// NOTE: When a new shader is loaded, the following locations are tried to be set for convenience // NOTE: When a new shader is loaded, locations are tried to be set for convenience, looking for the names defined here
#define RL_DEFAULT_SHADER_ATTRIB_NAME_POSITION "vertexPosition" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_POSITION // In case custom shader names are used, it's up to the user to set locations with GetShaderLocation*() functions
#define RL_DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD "vertexTexCoord" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD //#define RL_DEFAULT_SHADER_ATTRIB_NAME_POSITION "vertexPosition" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_POSITION
#define RL_DEFAULT_SHADER_ATTRIB_NAME_NORMAL "vertexNormal" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_NORMAL //#define RL_DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD "vertexTexCoord" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD
#define RL_DEFAULT_SHADER_ATTRIB_NAME_COLOR "vertexColor" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_COLOR //#define RL_DEFAULT_SHADER_ATTRIB_NAME_NORMAL "vertexNormal" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_NORMAL
#define RL_DEFAULT_SHADER_ATTRIB_NAME_TANGENT "vertexTangent" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_TANGENT //#define RL_DEFAULT_SHADER_ATTRIB_NAME_COLOR "vertexColor" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_COLOR
#define RL_DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD2 "vertexTexCoord2" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD2 //#define RL_DEFAULT_SHADER_ATTRIB_NAME_TANGENT "vertexTangent" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_TANGENT
//#define RL_DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD2 "vertexTexCoord2" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD2
#define RL_DEFAULT_SHADER_UNIFORM_NAME_MVP "mvp" // model-view-projection matrix //#define RL_DEFAULT_SHADER_ATTRIB_NAME_BONEINDICES "vertexBoneIndices" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_BONEINDICES
#define RL_DEFAULT_SHADER_UNIFORM_NAME_VIEW "matView" // view matrix //#define RL_DEFAULT_SHADER_ATTRIB_NAME_BONEWEIGHTS "vertexBoneWeights" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_BONEWEIGHTS
#define RL_DEFAULT_SHADER_UNIFORM_NAME_PROJECTION "matProjection" // projection matrix //#define RL_DEFAULT_SHADER_ATTRIB_NAME_INSTANCETRANSFORM "instanceTransform" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_INSTANCETRANSFORM
#define RL_DEFAULT_SHADER_UNIFORM_NAME_MODEL "matModel" // model matrix //#define RL_DEFAULT_SHADER_UNIFORM_NAME_MVP "mvp" // model-view-projection matrix
#define RL_DEFAULT_SHADER_UNIFORM_NAME_NORMAL "matNormal" // normal matrix (transpose(inverse(matModelView)) //#define RL_DEFAULT_SHADER_UNIFORM_NAME_VIEW "matView" // view matrix
#define RL_DEFAULT_SHADER_UNIFORM_NAME_COLOR "colDiffuse" // color diffuse (base tint color, multiplied by texture color) //#define RL_DEFAULT_SHADER_UNIFORM_NAME_PROJECTION "matProjection" // projection matrix
#define RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE0 "texture0" // texture0 (texture slot active 0) //#define RL_DEFAULT_SHADER_UNIFORM_NAME_MODEL "matModel" // model matrix
#define RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE1 "texture1" // texture1 (texture slot active 1) //#define RL_DEFAULT_SHADER_UNIFORM_NAME_NORMAL "matNormal" // normal matrix (transpose(inverse(matModelView))
#define RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE2 "texture2" // texture2 (texture slot active 2) //#define RL_DEFAULT_SHADER_UNIFORM_NAME_COLOR "colDiffuse" // color diffuse (tint color, multiplied by texture color)
//#define RL_DEFAULT_SHADER_UNIFORM_NAME_BONEMATRICES "boneMatrices" // bone matrices
//#define RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE0 "texture0" // texture0 (texture slot active 0)
//#define RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE1 "texture1" // texture1 (texture slot active 1)
//#define RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE2 "texture2" // texture2 (texture slot active 2)
//------------------------------------------------------------------------------------
//------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------
// Module: rshapes - Configuration Flags // Module: rshapes - Configuration Flags
//------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------
#if !defined(EXTERNAL_CONFIG_FLAGS) #ifndef SUPPORT_QUADS_DRAW_MODE
// Use QUADS instead of TRIANGLES for drawing when possible // Use QUADS instead of TRIANGLES for drawing when possible
// Some lines-based shapes could still use lines // Some lines-based shapes could still use lines
#define SUPPORT_QUADS_DRAW_MODE 1 #define SUPPORT_QUADS_DRAW_MODE 1
#endif #endif
// rshapes: Configuration values
//------------------------------------------------------------------------------------
#define SPLINE_SEGMENT_DIVISIONS 24 // Spline segments subdivisions
//------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------
// Module: rtextures - Configuration Flags // Module: rtextures - Configuration Flags
//------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------
#if !defined(EXTERNAL_CONFIG_FLAGS)
// Selected desired fileformats to be supported for image data loading // Selected desired fileformats to be supported for image data loading
#ifndef SUPPORT_FILEFORMAT_PNG
#define SUPPORT_FILEFORMAT_PNG 1 #define SUPPORT_FILEFORMAT_PNG 1
//#define SUPPORT_FILEFORMAT_BMP 1 #endif
//#define SUPPORT_FILEFORMAT_TGA 1 #ifndef SUPPORT_FILEFORMAT_BMP
//#define SUPPORT_FILEFORMAT_JPG 1 // NOTE: BMP support required for clipboard images on Windows
#define SUPPORT_FILEFORMAT_BMP 1
#endif
#ifndef SUPPORT_FILEFORMAT_TGA
#define SUPPORT_FILEFORMAT_TGA 0 // Disabled by default
#endif
#ifndef SUPPORT_FILEFORMAT_JPG
#define SUPPORT_FILEFORMAT_JPG 0 // Disabled by default
#endif
#ifndef SUPPORT_FILEFORMAT_GIF
#define SUPPORT_FILEFORMAT_GIF 1 #define SUPPORT_FILEFORMAT_GIF 1
#endif
#ifndef SUPPORT_FILEFORMAT_QOI
#define SUPPORT_FILEFORMAT_QOI 1 #define SUPPORT_FILEFORMAT_QOI 1
//#define SUPPORT_FILEFORMAT_PSD 1 #endif
#ifndef SUPPORT_FILEFORMAT_PSD
#define SUPPORT_FILEFORMAT_PSD 0 // Disabled by default
#endif
#ifndef SUPPORT_FILEFORMAT_DDS
#define SUPPORT_FILEFORMAT_DDS 1 #define SUPPORT_FILEFORMAT_DDS 1
//#define SUPPORT_FILEFORMAT_HDR 1 #endif
//#define SUPPORT_FILEFORMAT_PIC 1 #ifndef SUPPORT_FILEFORMAT_HDR
//#define SUPPORT_FILEFORMAT_KTX 1 #define SUPPORT_FILEFORMAT_HDR 0 // Disabled by default
//#define SUPPORT_FILEFORMAT_ASTC 1 #endif
//#define SUPPORT_FILEFORMAT_PKM 1 #ifndef SUPPORT_FILEFORMAT_PIC
//#define SUPPORT_FILEFORMAT_PVR 1 #define SUPPORT_FILEFORMAT_PIC 0 // Disabled by default
#endif
#ifndef SUPPORT_FILEFORMAT_KTX
#define SUPPORT_FILEFORMAT_KTX 0 // Disabled by default
#endif
#ifndef SUPPORT_FILEFORMAT_ASTC
#define SUPPORT_FILEFORMAT_ASTC 0 // Disabled by default
#endif
#ifndef SUPPORT_FILEFORMAT_PKM
#define SUPPORT_FILEFORMAT_PKM 0 // Disabled by default
#endif
#ifndef SUPPORT_FILEFORMAT_PVR
#define SUPPORT_FILEFORMAT_PVR 0 // Disabled by default
#endif
#ifndef SUPPORT_IMAGE_EXPORT
// Support image export functionality (.png, .bmp, .tga, .jpg, .qoi) // Support image export functionality (.png, .bmp, .tga, .jpg, .qoi)
// NOTE: Image export requires stb_image_write.h library
#define SUPPORT_IMAGE_EXPORT 1 #define SUPPORT_IMAGE_EXPORT 1
// Support procedural image generation functionality (gradient, spot, perlin-noise, cellular) #endif
#ifndef SUPPORT_IMAGE_GENERATION
// Support procedural image generation functionality: gradient, spot, perlin-noise, cellular...
// NOTE: Perlin noise requires stb_perlin.h library
#define SUPPORT_IMAGE_GENERATION 1 #define SUPPORT_IMAGE_GENERATION 1
// Support multiple image editing functions to scale, adjust colors, flip, draw on images, crop...
// If not defined, still some functions are supported: ImageFormat(), ImageCrop(), ImageToPOT()
#define SUPPORT_IMAGE_MANIPULATION 1
#endif #endif
//------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------
// Module: rtext - Configuration Flags // Module: rtext - Configuration Flags
//------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------
#if !defined(EXTERNAL_CONFIG_FLAGS)
// Default font is loaded on window initialization to be available for the user to render simple text
// NOTE: If enabled, uses external module functions to load default raylib font
#define SUPPORT_DEFAULT_FONT 1
// Selected desired font fileformats to be supported for loading // Selected desired font fileformats to be supported for loading
#ifndef SUPPORT_FILEFORMAT_TTF
#define SUPPORT_FILEFORMAT_TTF 1 #define SUPPORT_FILEFORMAT_TTF 1
#define SUPPORT_FILEFORMAT_FNT 1
//#define SUPPORT_FILEFORMAT_BDF 1
// Support text management functions
// If not defined, still some functions are supported: TextLength(), TextFormat()
#define SUPPORT_TEXT_MANIPULATION 1
// On font atlas image generation [GenImageFontAtlas()], add a 3x3 pixels white rectangle
// at the bottom-right corner of the atlas. It can be useful to for shapes drawing, to allow
// drawing text and shapes with a single draw call [SetShapesTexture()]
#define SUPPORT_FONT_ATLAS_WHITE_REC 1
// Support conservative font atlas size estimation
//#define SUPPORT_FONT_ATLAS_SIZE_CONSERVATIVE 1
#endif #endif
#ifndef SUPPORT_FILEFORMAT_FNT
// rtext: Configuration values #define SUPPORT_FILEFORMAT_FNT 1
//------------------------------------------------------------------------------------ #endif
#define MAX_TEXT_BUFFER_LENGTH 1024 // Size of internal static buffers used on some functions: #ifndef SUPPORT_FILEFORMAT_BDF
// TextFormat(), TextSubtext(), TextToUpper(), TextToLower(), TextToPascal(), TextSplit() #define SUPPORT_FILEFORMAT_BDF 0 // Disabled by default
#define MAX_TEXTSPLIT_COUNT 128 // Maximum number of substrings to split: TextSplit() #endif
//------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------
// Module: rmodels - Configuration Flags // Module: rmodels - Configuration Flags
//------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------
#if !defined(EXTERNAL_CONFIG_FLAGS)
// Selected desired model fileformats to be supported for loading // Selected desired model fileformats to be supported for loading
#ifndef SUPPORT_FILEFORMAT_OBJ
#define SUPPORT_FILEFORMAT_OBJ 1 #define SUPPORT_FILEFORMAT_OBJ 1
#endif
#ifndef SUPPORT_FILEFORMAT_MTL
#define SUPPORT_FILEFORMAT_MTL 1 #define SUPPORT_FILEFORMAT_MTL 1
#endif
#ifndef SUPPORT_FILEFORMAT_IQM
#define SUPPORT_FILEFORMAT_IQM 1 #define SUPPORT_FILEFORMAT_IQM 1
#endif
#ifndef SUPPORT_FILEFORMAT_GLTF
#define SUPPORT_FILEFORMAT_GLTF 1 #define SUPPORT_FILEFORMAT_GLTF 1
#endif
#ifndef SUPPORT_FILEFORMAT_VOX
#define SUPPORT_FILEFORMAT_VOX 1 #define SUPPORT_FILEFORMAT_VOX 1
#endif
#ifndef SUPPORT_FILEFORMAT_M3D
#define SUPPORT_FILEFORMAT_M3D 1 #define SUPPORT_FILEFORMAT_M3D 1
#endif
#ifndef SUPPORT_MESH_GENERATION
// Support procedural mesh generation functions, uses external par_shapes.h library // Support procedural mesh generation functions, uses external par_shapes.h library
// NOTE: Some generated meshes DO NOT include generated texture coordinates // NOTE: Some generated meshes DO NOT include generated texture coordinates
#define SUPPORT_MESH_GENERATION 1 #define SUPPORT_MESH_GENERATION 1
#endif #endif
#ifndef SUPPORT_GPU_SKINNING
// rmodels: Configuration values // GPU skinning disabled by default, some GPUs do not support more than 8 VBOs
//------------------------------------------------------------------------------------ #define SUPPORT_GPU_SKINNING 0
#define MAX_MATERIAL_MAPS 12 // Maximum number of shader maps supported
#ifdef RL_SUPPORT_MESH_GPU_SKINNING
#define MAX_MESH_VERTEX_BUFFERS 9 // Maximum vertex buffers (VBO) per mesh
#else
#define MAX_MESH_VERTEX_BUFFERS 7 // Maximum vertex buffers (VBO) per mesh
#endif #endif
//------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------
// Module: raudio - Configuration Flags // Module: raudio - Configuration Flags
//------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------
#if !defined(EXTERNAL_CONFIG_FLAGS)
// Desired audio fileformats to be supported for loading // Desired audio fileformats to be supported for loading
#ifndef SUPPORT_FILEFORMAT_WAV
#define SUPPORT_FILEFORMAT_WAV 1 #define SUPPORT_FILEFORMAT_WAV 1
#endif
#ifndef SUPPORT_FILEFORMAT_OGG
#define SUPPORT_FILEFORMAT_OGG 1 #define SUPPORT_FILEFORMAT_OGG 1
#endif
#ifndef SUPPORT_FILEFORMAT_MP3
#define SUPPORT_FILEFORMAT_MP3 1 #define SUPPORT_FILEFORMAT_MP3 1
#endif
#ifndef SUPPORT_FILEFORMAT_QOA
#define SUPPORT_FILEFORMAT_QOA 1 #define SUPPORT_FILEFORMAT_QOA 1
//#define SUPPORT_FILEFORMAT_FLAC 1 #endif
#ifndef SUPPORT_FILEFORMAT_FLAC
#define SUPPORT_FILEFORMAT_FLAC 0 // Disabled by default
#endif
#ifndef SUPPORT_FILEFORMAT_XM
#define SUPPORT_FILEFORMAT_XM 1 #define SUPPORT_FILEFORMAT_XM 1
#endif
#ifndef SUPPORT_FILEFORMAT_MOD
#define SUPPORT_FILEFORMAT_MOD 1 #define SUPPORT_FILEFORMAT_MOD 1
#endif #endif
// raudio: Configuration values // raudio: Configuration values
// NOTE: Below values are alread defined inside [rlgl.h] so there is no need to be
// redefined here, in case it must be done, uncomment the required line and update
// the value; it can also be done on compilation with -DVALUE_TO_REDEFINE=128
//------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------
#define AUDIO_DEVICE_FORMAT ma_format_f32 // Device output format (miniaudio: float-32bit) //#define AUDIO_DEVICE_FORMAT ma_format_f32 // Device output format (miniaudio: float-32bit)
#define AUDIO_DEVICE_CHANNELS 2 // Device output channels: stereo //#define AUDIO_DEVICE_CHANNELS 2 // Device output channels: stereo
#define AUDIO_DEVICE_SAMPLE_RATE 0 // Device sample rate (device default) //#define AUDIO_DEVICE_SAMPLE_RATE 0 // Device sample rate (device default)
#define AUDIO_DEVICE_PERIOD_SIZE_IN_FRAMES 0 // Device period size (controls latency, 0 defaults to 10ms) //#define AUDIO_DEVICE_PERIOD_SIZE_IN_FRAMES 0 // Device period size (controls latency, 0 defaults to 10ms)
//#define MAX_AUDIO_BUFFER_POOL_CHANNELS 16 // Maximum number of audio pool channels
//------------------------------------------------------------------------------------
#endif // !EXTERNAL_CONFIG_FLAGS
#define MAX_AUDIO_BUFFER_POOL_CHANNELS 16 // Maximum number of audio pool channels // NOTE: Following macro depends on config flag that can
// be externally defined, so, it needs to be outside EXTERNAL_CONFIG_FLAGS
#if SUPPORT_TRACELOG
#define TRACELOG(level, ...) TraceLog(level, __VA_ARGS__)
#else
#define TRACELOG(level, ...) (void)0
#endif
#endif // CONFIG_H #endif // CONFIG_H

11074
src/external/RGFW.h vendored

File diff suppressed because it is too large Load Diff

15891
src/external/RGFW/RGFW.h vendored Normal file

File diff suppressed because it is too large Load Diff

5242
src/external/RGFW/deps/minigamepad.h vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,334 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="pointer_constraints_unstable_v1">
<copyright>
Copyright © 2014 Jonas Ådahl
Copyright © 2015 Red Hat Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
</copyright>
<description summary="protocol for constraining pointer motions">
This protocol specifies a set of interfaces used for adding constraints to
the motion of a pointer. Possible constraints include confining pointer
motions to a given region, or locking it to its current position.
In order to constrain the pointer, a client must first bind the global
interface "wp_pointer_constraints" which, if a compositor supports pointer
constraints, is exposed by the registry. Using the bound global object, the
client uses the request that corresponds to the type of constraint it wants
to make. See wp_pointer_constraints for more details.
Warning! The protocol described in this file is experimental and backward
incompatible changes may be made. Backward compatible changes may be added
together with the corresponding interface version bump. Backward
incompatible changes are done by bumping the version number in the protocol
and interface names and resetting the interface version. Once the protocol
is to be declared stable, the 'z' prefix and the version number in the
protocol and interface names are removed and the interface version number is
reset.
</description>
<interface name="zwp_pointer_constraints_v1" version="1">
<description summary="constrain the movement of a pointer">
The global interface exposing pointer constraining functionality. It
exposes two requests: lock_pointer for locking the pointer to its
position, and confine_pointer for locking the pointer to a region.
The lock_pointer and confine_pointer requests create the objects
wp_locked_pointer and wp_confined_pointer respectively, and the client can
use these objects to interact with the lock.
For any surface, only one lock or confinement may be active across all
wl_pointer objects of the same seat. If a lock or confinement is requested
when another lock or confinement is active or requested on the same surface
and with any of the wl_pointer objects of the same seat, an
'already_constrained' error will be raised.
</description>
<enum name="error">
<description summary="wp_pointer_constraints error values">
These errors can be emitted in response to wp_pointer_constraints
requests.
</description>
<entry name="already_constrained" value="1"
summary="pointer constraint already requested on that surface"/>
</enum>
<enum name="lifetime">
<description summary="constraint lifetime">
These values represent different lifetime semantics. They are passed
as arguments to the factory requests to specify how the constraint
lifetimes should be managed.
</description>
<entry name="oneshot" value="1">
<description summary="the pointer constraint is defunct once deactivated">
A oneshot pointer constraint will never reactivate once it has been
deactivated. See the corresponding deactivation event
(wp_locked_pointer.unlocked and wp_confined_pointer.unconfined) for
details.
</description>
</entry>
<entry name="persistent" value="2">
<description summary="the pointer constraint may reactivate">
A persistent pointer constraint may again reactivate once it has
been deactivated. See the corresponding deactivation event
(wp_locked_pointer.unlocked and wp_confined_pointer.unconfined) for
details.
</description>
</entry>
</enum>
<request name="destroy" type="destructor">
<description summary="destroy the pointer constraints manager object">
Used by the client to notify the server that it will no longer use this
pointer constraints object.
</description>
</request>
<request name="lock_pointer">
<description summary="lock pointer to a position">
The lock_pointer request lets the client request to disable movements of
the virtual pointer (i.e. the cursor), effectively locking the pointer
to a position. This request may not take effect immediately; in the
future, when the compositor deems implementation-specific constraints
are satisfied, the pointer lock will be activated and the compositor
sends a locked event.
The protocol provides no guarantee that the constraints are ever
satisfied, and does not require the compositor to send an error if the
constraints cannot ever be satisfied. It is thus possible to request a
lock that will never activate.
There may not be another pointer constraint of any kind requested or
active on the surface for any of the wl_pointer objects of the seat of
the passed pointer when requesting a lock. If there is, an error will be
raised. See general pointer lock documentation for more details.
The intersection of the region passed with this request and the input
region of the surface is used to determine where the pointer must be
in order for the lock to activate. It is up to the compositor whether to
warp the pointer or require some kind of user interaction for the lock
to activate. If the region is null the surface input region is used.
A surface may receive pointer focus without the lock being activated.
The request creates a new object wp_locked_pointer which is used to
interact with the lock as well as receive updates about its state. See
the the description of wp_locked_pointer for further information.
Note that while a pointer is locked, the wl_pointer objects of the
corresponding seat will not emit any wl_pointer.motion events, but
relative motion events will still be emitted via wp_relative_pointer
objects of the same seat. wl_pointer.axis and wl_pointer.button events
are unaffected.
</description>
<arg name="id" type="new_id" interface="zwp_locked_pointer_v1"/>
<arg name="surface" type="object" interface="wl_surface"
summary="surface to lock pointer to"/>
<arg name="pointer" type="object" interface="wl_pointer"
summary="the pointer that should be locked"/>
<arg name="region" type="object" interface="wl_region" allow-null="true"
summary="region of surface"/>
<arg name="lifetime" type="uint" enum="lifetime" summary="lock lifetime"/>
</request>
<request name="confine_pointer">
<description summary="confine pointer to a region">
The confine_pointer request lets the client request to confine the
pointer cursor to a given region. This request may not take effect
immediately; in the future, when the compositor deems implementation-
specific constraints are satisfied, the pointer confinement will be
activated and the compositor sends a confined event.
The intersection of the region passed with this request and the input
region of the surface is used to determine where the pointer must be
in order for the confinement to activate. It is up to the compositor
whether to warp the pointer or require some kind of user interaction for
the confinement to activate. If the region is null the surface input
region is used.
The request will create a new object wp_confined_pointer which is used
to interact with the confinement as well as receive updates about its
state. See the the description of wp_confined_pointer for further
information.
</description>
<arg name="id" type="new_id" interface="zwp_confined_pointer_v1"/>
<arg name="surface" type="object" interface="wl_surface"
summary="surface to lock pointer to"/>
<arg name="pointer" type="object" interface="wl_pointer"
summary="the pointer that should be confined"/>
<arg name="region" type="object" interface="wl_region" allow-null="true"
summary="region of surface"/>
<arg name="lifetime" type="uint" enum="lifetime" summary="confinement lifetime"/>
</request>
</interface>
<interface name="zwp_locked_pointer_v1" version="1">
<description summary="receive relative pointer motion events">
The wp_locked_pointer interface represents a locked pointer state.
While the lock of this object is active, the wl_pointer objects of the
associated seat will not emit any wl_pointer.motion events.
This object will send the event 'locked' when the lock is activated.
Whenever the lock is activated, it is guaranteed that the locked surface
will already have received pointer focus and that the pointer will be
within the region passed to the request creating this object.
To unlock the pointer, send the destroy request. This will also destroy
the wp_locked_pointer object.
If the compositor decides to unlock the pointer the unlocked event is
sent. See wp_locked_pointer.unlock for details.
When unlocking, the compositor may warp the cursor position to the set
cursor position hint. If it does, it will not result in any relative
motion events emitted via wp_relative_pointer.
If the surface the lock was requested on is destroyed and the lock is not
yet activated, the wp_locked_pointer object is now defunct and must be
destroyed.
</description>
<request name="destroy" type="destructor">
<description summary="destroy the locked pointer object">
Destroy the locked pointer object. If applicable, the compositor will
unlock the pointer.
</description>
</request>
<request name="set_cursor_position_hint">
<description summary="set the pointer cursor position hint">
Set the cursor position hint relative to the top left corner of the
surface.
If the client is drawing its own cursor, it should update the position
hint to the position of its own cursor. A compositor may use this
information to warp the pointer upon unlock in order to avoid pointer
jumps.
The cursor position hint is double-buffered state, see
wl_surface.commit.
</description>
<arg name="surface_x" type="fixed"
summary="surface-local x coordinate"/>
<arg name="surface_y" type="fixed"
summary="surface-local y coordinate"/>
</request>
<request name="set_region">
<description summary="set a new lock region">
Set a new region used to lock the pointer.
The new lock region is double-buffered, see wl_surface.commit.
For details about the lock region, see wp_locked_pointer.
</description>
<arg name="region" type="object" interface="wl_region" allow-null="true"
summary="region of surface"/>
</request>
<event name="locked">
<description summary="lock activation event">
Notification that the pointer lock of the seat's pointer is activated.
</description>
</event>
<event name="unlocked">
<description summary="lock deactivation event">
Notification that the pointer lock of the seat's pointer is no longer
active. If this is a oneshot pointer lock (see
wp_pointer_constraints.lifetime) this object is now defunct and should
be destroyed. If this is a persistent pointer lock (see
wp_pointer_constraints.lifetime) this pointer lock may again
reactivate in the future.
</description>
</event>
</interface>
<interface name="zwp_confined_pointer_v1" version="1">
<description summary="confined pointer object">
The wp_confined_pointer interface represents a confined pointer state.
This object will send the event 'confined' when the confinement is
activated. Whenever the confinement is activated, it is guaranteed that
the surface the pointer is confined to will already have received pointer
focus and that the pointer will be within the region passed to the request
creating this object. It is up to the compositor to decide whether this
requires some user interaction and if the pointer will warp to within the
passed region if outside.
To unconfine the pointer, send the destroy request. This will also destroy
the wp_confined_pointer object.
If the compositor decides to unconfine the pointer the unconfined event is
sent. The wp_confined_pointer object is at this point defunct and should
be destroyed.
</description>
<request name="destroy" type="destructor">
<description summary="destroy the confined pointer object">
Destroy the confined pointer object. If applicable, the compositor will
unconfine the pointer.
</description>
</request>
<request name="set_region">
<description summary="set a new confine region">
Set a new region used to confine the pointer.
The new confine region is double-buffered, see wl_surface.commit.
If the confinement is active when the new confinement region is applied
and the pointer ends up outside of newly applied region, the pointer may
warped to a position within the new confinement region. If warped, a
wl_pointer.motion event will be emitted, but no
wp_relative_pointer.relative_motion event.
The compositor may also, instead of using the new region, unconfine the
pointer.
For details about the confine region, see wp_confined_pointer.
</description>
<arg name="region" type="object" interface="wl_region" allow-null="true"
summary="region of surface"/>
</request>
<event name="confined">
<description summary="pointer confined">
Notification that the pointer confinement of the seat's pointer is
activated.
</description>
</event>
<event name="unconfined">
<description summary="pointer unconfined">
Notification that the pointer confinement of the seat's pointer is no
longer active. If this is a oneshot pointer confinement (see
wp_pointer_constraints.lifetime) this object is now defunct and should
be destroyed. If this is a persistent pointer confinement (see
wp_pointer_constraints.lifetime) this pointer confinement may again
reactivate in the future.
</description>
</event>
</interface>
</protocol>

View File

@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="pointer_warp_v1">
<copyright>
Copyright © 2024 Neal Gompa
Copyright © 2024 Xaver Hugl
Copyright © 2024 Matthias Klumpp
Copyright © 2024 Vlad Zahorodnii
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
</copyright>
<interface name="wp_pointer_warp_v1" version="1">
<description summary="reposition the pointer to a location on a surface">
This global interface allows applications to request the pointer to be
moved to a position relative to a wl_surface.
Note that if the desired behavior is to constrain the pointer to an area
or lock it to a position, this protocol does not provide a reliable way
to do that. The pointer constraint and pointer lock protocols should be
used for those use cases instead.
Warning! The protocol described in this file is currently in the testing
phase. Backward compatible changes may be added together with the
corresponding interface version bump. Backward incompatible changes can
only be done by creating a new major version of the extension.
</description>
<request name="destroy" type="destructor">
<description summary="destroy the warp manager">
Destroy the pointer warp manager.
</description>
</request>
<request name="warp_pointer">
<description summary="reposition the pointer">
Request the compositor to move the pointer to a surface-local position.
Whether or not the compositor honors the request is implementation defined,
but it should
- honor it if the surface has pointer focus, including
when it has an implicit pointer grab
- reject it if the enter serial is incorrect
- reject it if the requested position is outside of the surface
Note that the enter serial is valid for any surface of the client,
and does not have to be from the surface the pointer is warped to.
</description>
<arg name="surface" type="object" interface="wl_surface"
summary="surface to position the pointer on"/>
<arg name="pointer" type="object" interface="wl_pointer"
summary="the pointer that should be repositioned"/>
<arg name="x" type="fixed"/>
<arg name="y" type="fixed"/>
<arg name="serial" type="uint" summary="serial number of the enter event"/>
</request>
</interface>
</protocol>

View File

@ -0,0 +1,136 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="relative_pointer_unstable_v1">
<copyright>
Copyright © 2014 Jonas Ådahl
Copyright © 2015 Red Hat Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
</copyright>
<description summary="protocol for relative pointer motion events">
This protocol specifies a set of interfaces used for making clients able to
receive relative pointer events not obstructed by barriers (such as the
monitor edge or other pointer barriers).
To start receiving relative pointer events, a client must first bind the
global interface "wp_relative_pointer_manager" which, if a compositor
supports relative pointer motion events, is exposed by the registry. After
having created the relative pointer manager proxy object, the client uses
it to create the actual relative pointer object using the
"get_relative_pointer" request given a wl_pointer. The relative pointer
motion events will then, when applicable, be transmitted via the proxy of
the newly created relative pointer object. See the documentation of the
relative pointer interface for more details.
Warning! The protocol described in this file is experimental and backward
incompatible changes may be made. Backward compatible changes may be added
together with the corresponding interface version bump. Backward
incompatible changes are done by bumping the version number in the protocol
and interface names and resetting the interface version. Once the protocol
is to be declared stable, the 'z' prefix and the version number in the
protocol and interface names are removed and the interface version number is
reset.
</description>
<interface name="zwp_relative_pointer_manager_v1" version="1">
<description summary="get relative pointer objects">
A global interface used for getting the relative pointer object for a
given pointer.
</description>
<request name="destroy" type="destructor">
<description summary="destroy the relative pointer manager object">
Used by the client to notify the server that it will no longer use this
relative pointer manager object.
</description>
</request>
<request name="get_relative_pointer">
<description summary="get a relative pointer object">
Create a relative pointer interface given a wl_pointer object. See the
wp_relative_pointer interface for more details.
</description>
<arg name="id" type="new_id" interface="zwp_relative_pointer_v1"/>
<arg name="pointer" type="object" interface="wl_pointer"/>
</request>
</interface>
<interface name="zwp_relative_pointer_v1" version="1">
<description summary="relative pointer object">
A wp_relative_pointer object is an extension to the wl_pointer interface
used for emitting relative pointer events. It shares the same focus as
wl_pointer objects of the same seat and will only emit events when it has
focus.
</description>
<request name="destroy" type="destructor">
<description summary="release the relative pointer object"/>
</request>
<event name="relative_motion">
<description summary="relative pointer motion">
Relative x/y pointer motion from the pointer of the seat associated with
this object.
A relative motion is in the same dimension as regular wl_pointer motion
events, except they do not represent an absolute position. For example,
moving a pointer from (x, y) to (x', y') would have the equivalent
relative motion (x' - x, y' - y). If a pointer motion caused the
absolute pointer position to be clipped by for example the edge of the
monitor, the relative motion is unaffected by the clipping and will
represent the unclipped motion.
This event also contains non-accelerated motion deltas. The
non-accelerated delta is, when applicable, the regular pointer motion
delta as it was before having applied motion acceleration and other
transformations such as normalization.
Note that the non-accelerated delta does not represent 'raw' events as
they were read from some device. Pointer motion acceleration is device-
and configuration-specific and non-accelerated deltas and accelerated
deltas may have the same value on some devices.
Relative motions are not coupled to wl_pointer.motion events, and can be
sent in combination with such events, but also independently. There may
also be scenarios where wl_pointer.motion is sent, but there is no
relative motion. The order of an absolute and relative motion event
originating from the same physical motion is not guaranteed.
If the client needs button events or focus state, it can receive them
from a wl_pointer object of the same seat that the wp_relative_pointer
object is associated with.
</description>
<arg name="utime_hi" type="uint"
summary="high 32 bits of a 64 bit timestamp with microsecond granularity"/>
<arg name="utime_lo" type="uint"
summary="low 32 bits of a 64 bit timestamp with microsecond granularity"/>
<arg name="dx" type="fixed"
summary="the x component of the motion vector"/>
<arg name="dy" type="fixed"
summary="the y component of the motion vector"/>
<arg name="dx_unaccel" type="fixed"
summary="the x component of the unaccelerated motion vector"/>
<arg name="dy_unaccel" type="fixed"
summary="the y component of the unaccelerated motion vector"/>
</event>
</interface>
</protocol>

View File

@ -0,0 +1,160 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="xdg_decoration_unstable_v1">
<copyright>
Copyright © 2018 Simon Ser
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
</copyright>
<interface name="zxdg_decoration_manager_v1" version="1">
<description summary="window decoration manager">
This interface allows a compositor to announce support for server-side
decorations.
A window decoration is a set of window controls as deemed appropriate by
the party managing them, such as user interface components used to move,
resize and change a window's state.
A client can use this protocol to request being decorated by a supporting
compositor.
If compositor and client do not negotiate the use of a server-side
decoration using this protocol, clients continue to self-decorate as they
see fit.
Warning! The protocol described in this file is experimental and
backward incompatible changes may be made. Backward compatible changes
may be added together with the corresponding interface version bump.
Backward incompatible changes are done by bumping the version number in
the protocol and interface names and resetting the interface version.
Once the protocol is to be declared stable, the 'z' prefix and the
version number in the protocol and interface names are removed and the
interface version number is reset.
</description>
<request name="destroy" type="destructor">
<description summary="destroy the decoration manager object">
Destroy the decoration manager. This doesn't destroy objects created
with the manager.
</description>
</request>
<request name="get_toplevel_decoration">
<description summary="create a new toplevel decoration object">
Create a new decoration object associated with the given toplevel.
Creating an xdg_toplevel_decoration from an xdg_toplevel which has a
buffer attached or committed is a client error, and any attempts by a
client to attach or manipulate a buffer prior to the first
xdg_toplevel_decoration.configure event must also be treated as
errors.
</description>
<arg name="id" type="new_id" interface="zxdg_toplevel_decoration_v1"/>
<arg name="toplevel" type="object" interface="xdg_toplevel"/>
</request>
</interface>
<interface name="zxdg_toplevel_decoration_v1" version="1">
<description summary="decoration object for a toplevel surface">
The decoration object allows the compositor to toggle server-side window
decorations for a toplevel surface. The client can request to switch to
another mode.
The xdg_toplevel_decoration object must be destroyed before its
xdg_toplevel.
</description>
<enum name="error">
<entry name="unconfigured_buffer" value="0"
summary="xdg_toplevel has a buffer attached before configure"/>
<entry name="already_constructed" value="1"
summary="xdg_toplevel already has a decoration object"/>
<entry name="orphaned" value="2"
summary="xdg_toplevel destroyed before the decoration object"/>
<entry name="invalid_mode" value="3" summary="invalid mode"/>
</enum>
<request name="destroy" type="destructor">
<description summary="destroy the decoration object">
Switch back to a mode without any server-side decorations at the next
commit.
</description>
</request>
<enum name="mode">
<description summary="window decoration modes">
These values describe window decoration modes.
</description>
<entry name="client_side" value="1"
summary="no server-side window decoration"/>
<entry name="server_side" value="2"
summary="server-side window decoration"/>
</enum>
<request name="set_mode">
<description summary="set the decoration mode">
Set the toplevel surface decoration mode. This informs the compositor
that the client prefers the provided decoration mode.
After requesting a decoration mode, the compositor will respond by
emitting an xdg_surface.configure event. The client should then update
its content, drawing it without decorations if the received mode is
server-side decorations. The client must also acknowledge the configure
when committing the new content (see xdg_surface.ack_configure).
The compositor can decide not to use the client's mode and enforce a
different mode instead.
Clients whose decoration mode depend on the xdg_toplevel state may send
a set_mode request in response to an xdg_surface.configure event and wait
for the next xdg_surface.configure event to prevent unwanted state.
Such clients are responsible for preventing configure loops and must
make sure not to send multiple successive set_mode requests with the
same decoration mode.
If an invalid mode is supplied by the client, the invalid_mode protocol
error is raised by the compositor.
</description>
<arg name="mode" type="uint" enum="mode" summary="the decoration mode"/>
</request>
<request name="unset_mode">
<description summary="unset the decoration mode">
Unset the toplevel surface decoration mode. This informs the compositor
that the client doesn't prefer a particular decoration mode.
This request has the same semantics as set_mode.
</description>
</request>
<event name="configure">
<description summary="notify a decoration mode change">
The configure event configures the effective decoration mode. The
configured state should not be applied immediately. Clients must send an
ack_configure in response to this event. See xdg_surface.configure and
xdg_surface.ack_configure for details.
A configure event can be sent at any time. The specified mode must be
obeyed by the client.
</description>
<arg name="mode" type="uint" enum="mode" summary="the decoration mode"/>
</event>
</interface>
</protocol>

Some files were not shown because too many files have changed in this diff Show More