Merge branch 'master' into scancodes
This commit is contained in:
commit
a4e17ba171
67 changed files with 2603 additions and 787 deletions
2
.github/workflows/webassembly.yml
vendored
2
.github/workflows/webassembly.yml
vendored
|
|
@ -29,7 +29,7 @@ jobs:
|
||||||
- name: Setup emsdk
|
- name: Setup emsdk
|
||||||
uses: mymindstorm/setup-emsdk@v14
|
uses: mymindstorm/setup-emsdk@v14
|
||||||
with:
|
with:
|
||||||
version: 3.1.64
|
version: 3.1.71
|
||||||
actions-cache-folder: 'emsdk-cache'
|
actions-cache-folder: 'emsdk-cache'
|
||||||
|
|
||||||
- name: Setup Release Version
|
- name: Setup Release Version
|
||||||
|
|
|
||||||
61
BINDINGS.md
61
BINDINGS.md
|
|
@ -6,10 +6,10 @@ Some people ported raylib to other languages in the form of bindings or wrappers
|
||||||
|
|
||||||
| Name | raylib Version | Language | License |
|
| Name | raylib Version | Language | License |
|
||||||
| :--------------------------------------------------------------------------------------- | :--------------: | :------------------------------------------------------------------: | :------------------: |
|
| :--------------------------------------------------------------------------------------- | :--------------: | :------------------------------------------------------------------: | :------------------: |
|
||||||
| [raylib](https://github.com/raysan5/raylib) | **5.0** | [C/C++](https://en.wikipedia.org/wiki/C_(programming_language)) | Zlib |
|
| [raylib](https://github.com/raysan5/raylib) | **5.5** | [C/C++](https://en.wikipedia.org/wiki/C_(programming_language)) | Zlib |
|
||||||
| [raylib-beef](https://github.com/Starpelly/raylib-beef) | **5.0** | [Beef](https://www.beeflang.org) | MIT |
|
| [raylib-beef](https://github.com/Starpelly/raylib-beef) | **5.5** | [Beef](https://www.beeflang.org) | MIT |
|
||||||
| [raylib-boo](https://github.com/Rabios/raylib-boo) | 3.7 | [Boo](http://boo-language.github.io) | MIT |
|
| [raybit](https://github.com/Alex-Velez/raybit) | **5.0** | [Brainfuck](https://en.wikipedia.org/wiki/Brainfuck) | MIT |
|
||||||
| [raybit](https://github.com/Alex-Velez/raybit) | **5.0** | [Brainfuck](https://en.wikipedia.org/wiki/Brainfuck) | MIT |
|
| [raylib-c3](https://github.com/c3lang/vendor/tree/main/libraries/raylib55.c3l) | **5.5** | [C3](https://c3-lang.org) | MIT |
|
||||||
| [Raylib-cs](https://github.com/ChrisDill/Raylib-cs) | **5.0** | [C#](https://en.wikipedia.org/wiki/C_Sharp_(programming_language)) | Zlib |
|
| [Raylib-cs](https://github.com/ChrisDill/Raylib-cs) | **5.0** | [C#](https://en.wikipedia.org/wiki/C_Sharp_(programming_language)) | Zlib |
|
||||||
| [Raylib-CsLo](https://github.com/NotNotTech/Raylib-CsLo) | 4.2 | [C#](https://en.wikipedia.org/wiki/C_Sharp_(programming_language)) | MPL-2.0 |
|
| [Raylib-CsLo](https://github.com/NotNotTech/Raylib-CsLo) | 4.2 | [C#](https://en.wikipedia.org/wiki/C_Sharp_(programming_language)) | MPL-2.0 |
|
||||||
| [Raylib-CSharp-Vinculum](https://github.com/ZeroElectric/Raylib-CSharp-Vinculum) | **5.0** | [C#](https://en.wikipedia.org/wiki/C_Sharp_(programming_language)) | MPL-2.0 |
|
| [Raylib-CSharp-Vinculum](https://github.com/ZeroElectric/Raylib-CSharp-Vinculum) | **5.0** | [C#](https://en.wikipedia.org/wiki/C_Sharp_(programming_language)) | MPL-2.0 |
|
||||||
|
|
@ -18,62 +18,64 @@ Some people ported raylib to other languages in the form of bindings or wrappers
|
||||||
| [claylib/wrap](https://github.com/defun-games/claylib) | 4.5 | [Common Lisp](https://common-lisp.net) | Zlib |
|
| [claylib/wrap](https://github.com/defun-games/claylib) | 4.5 | [Common Lisp](https://common-lisp.net) | Zlib |
|
||||||
| [claw-raylib](https://github.com/bohonghuang/claw-raylib) | **auto** | [Common Lisp](https://common-lisp.net) | Apache-2.0 |
|
| [claw-raylib](https://github.com/bohonghuang/claw-raylib) | **auto** | [Common Lisp](https://common-lisp.net) | Apache-2.0 |
|
||||||
| [chez-raylib](https://github.com/Yunoinsky/chez-raylib) | **auto** | [Chez Scheme](https://cisco.github.io/ChezScheme) | GPLv3 |
|
| [chez-raylib](https://github.com/Yunoinsky/chez-raylib) | **auto** | [Chez Scheme](https://cisco.github.io/ChezScheme) | GPLv3 |
|
||||||
|
| [CLIPSraylib](https://github.com/mrryanjohnston/CLIPSraylib) | **auto** | [CLIPS](https://www.clipsrules.net/) | MIT |
|
||||||
| [raylib-cr](https://github.com/sol-vin/raylib-cr) | 4.6-dev (5e1a81) | [Crystal](https://crystal-lang.org) | Apache-2.0 |
|
| [raylib-cr](https://github.com/sol-vin/raylib-cr) | 4.6-dev (5e1a81) | [Crystal](https://crystal-lang.org) | Apache-2.0 |
|
||||||
| [ray-cyber](https://github.com/fubark/ray-cyber) | **5.0** | [Cyber](https://cyberscript.dev) | MIT |
|
| [ray-cyber](https://github.com/fubark/ray-cyber) | **5.0** | [Cyber](https://cyberscript.dev) | MIT |
|
||||||
| [dart-raylib](https://gitlab.com/wolfenrain/dart-raylib) | 4.0 | [Dart](https://dart.dev) | MIT |
|
| [dart-raylib](https://gitlab.com/wolfenrain/dart-raylib) | 4.0 | [Dart](https://dart.dev) | MIT |
|
||||||
| [bindbc-raylib3](https://github.com/o3o/bindbc-raylib3) | **5.0** | [D](https://dlang.org) | BSL-1.0 |
|
| [bindbc-raylib3](https://github.com/o3o/bindbc-raylib3) | **5.0** | [D](https://dlang.org) | BSL-1.0 |
|
||||||
| [dray](https://github.com/redthing1/dray) | **5.0** | [D](https://dlang.org) | Apache-2.0 |
|
| [dray](https://github.com/redthing1/dray) | **5.0** | [D](https://dlang.org) | Apache-2.0 |
|
||||||
| [raylib-d](https://github.com/schveiguy/raylib-d) | **5.0** | [D](https://dlang.org) | Zlib |
|
| [raylib-d](https://github.com/schveiguy/raylib-d) | **5.5** | [D](https://dlang.org) | Zlib |
|
||||||
| [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-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) | 4.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 |
|
||||||
| [fortran-raylib](https://github.com/interkosmos/fortran-raylib) | 4.5 | [Fortran](https://fortran-lang.org) | ISC |
|
| [fortran-raylib](https://github.com/interkosmos/fortran-raylib) | **5.5** | [Fortran](https://fortran-lang.org) | ISC |
|
||||||
| [raylib-go](https://github.com/gen2brain/raylib-go) | **5.0** | [Go](https://golang.org) | Zlib |
|
| [raylib-go](https://github.com/gen2brain/raylib-go) | **5.5** | [Go](https://golang.org) | Zlib |
|
||||||
| [raylib-guile](https://github.com/petelliott/raylib-guile) | **auto** | [Guile](https://www.gnu.org/software/guile) | Zlib |
|
| [raylib-guile](https://github.com/petelliott/raylib-guile) | **auto** | [Guile](https://www.gnu.org/software/guile) | Zlib |
|
||||||
| [gforth-raylib](https://github.com/ArnautDaniel/gforth-raylib) | 3.5 | [Gforth](https://gforth.org) | **???** |
|
| [gforth-raylib](https://github.com/ArnautDaniel/gforth-raylib) | 3.5 | [Gforth](https://gforth.org) | **???** |
|
||||||
| [h-raylib](https://github.com/Anut-py/h-raylib) | **5.5-dev** | [Haskell](https://haskell.org) | Apache-2.0 |
|
| [h-raylib](https://github.com/Anut-py/h-raylib) | **5.5-dev** | [Haskell](https://haskell.org) | Apache-2.0 |
|
||||||
| [raylib-hx](https://github.com/foreignsasquatch/raylib-hx) | 4.2 | [Haxe](https://haxe.org) | Zlib |
|
| [raylib-hx](https://github.com/foreignsasquatch/raylib-hx) | 4.2 | [Haxe](https://haxe.org) | Zlib |
|
||||||
| [hb-raylib](https://github.com/MarcosLeonardoMendezGerencir/hb-raylib) | 3.5 | [Harbour](https://harbour.github.io) | MIT |
|
| [hb-raylib](https://github.com/MarcosLeonardoMendezGerencir/hb-raylib) | 3.5 | [Harbour](https://harbour.github.io) | MIT |
|
||||||
| [jaylib](https://github.com/janet-lang/jaylib) | **5.0** | [Janet](https://janet-lang.org) | MIT |
|
| [jaylib](https://github.com/janet-lang/jaylib) | **5.0** | [Janet](https://janet-lang.org) | MIT |
|
||||||
| [jaylib](https://github.com/electronstudio/jaylib/) | 4.5 | [Java](https://en.wikipedia.org/wiki/Java_(programming_language)) | GPLv3+CE |
|
| [jaylib](https://github.com/electronstudio/jaylib/) | **5.5** | [Java](https://en.wikipedia.org/wiki/Java_(programming_language)) | GPLv3+CE |
|
||||||
| [raylib-j](https://github.com/CreedVI/Raylib-J) | 4.0 | [Java](https://en.wikipedia.org/wiki/Java_(programming_language)) | Zlib |
|
| [raylib-j](https://github.com/CreedVI/Raylib-J) | 4.0 | [Java](https://en.wikipedia.org/wiki/Java_(programming_language)) | Zlib |
|
||||||
| [Raylib.jl](https://github.com/chengchingwen/Raylib.jl) | 4.2 | [Julia](https://julialang.org) | Zlib |
|
| [Raylib.jl](https://github.com/chengchingwen/Raylib.jl) | 4.2 | [Julia](https://julialang.org) | Zlib |
|
||||||
| [kaylib](https://github.com/electronstudio/kaylib) | 3.7 | [Kotlin/native](https://kotlinlang.org) | **???** |
|
| [kaylib](https://github.com/electronstudio/kaylib) | 3.7 | [Kotlin/native](https://kotlinlang.org) | **???** |
|
||||||
| [KaylibKit](https://codeberg.org/Kenta/KaylibKit) | 4.5 | [Kotlin/native](https://kotlinlang.org) | Zlib |
|
| [KaylibKit](https://codeberg.org/Kenta/KaylibKit) | 4.5 | [Kotlin/native](https://kotlinlang.org) | Zlib |
|
||||||
| [raylib-lua](https://github.com/TSnake41/raylib-lua) | 4.5 | [Lua](http://www.lua.org) | ISC |
|
| [raylib-lua](https://github.com/TSnake41/raylib-lua) | 5.0 | [Lua](http://www.lua.org) | ISC |
|
||||||
| [raylua](https://github.com/Rabios/raylua) | 4.0 | [Lua](http://www.lua.org) | MIT |
|
| [raylib-lua-bindings (WIP)](https://github.com/legendaryredfox/raylib-lua-bindings) | 5.5 | [Lua](http://www.lua.org) | ISC |
|
||||||
| [raylib-matte](https://github.com/jcorks/raylib-matte) | 4.6-dev | [Matte](https://github.com/jcorks/matte) | MIT |
|
| [ReiLua](https://github.com/nullstare/ReiLua) | 5.5 | [Lua](http://www.lua.org) | MIT |
|
||||||
|
| [raylib-matte](https://github.com/jcorks/raylib-matte) | 4.6-dev | [Matte](https://github.com/jcorks/matte) | **???** |
|
||||||
| [Raylib.nelua](https://github.com/AuzFox/Raylib.nelua) | **5.0** | [nelua](https://nelua.io) | Zlib |
|
| [Raylib.nelua](https://github.com/AuzFox/Raylib.nelua) | **5.0** | [nelua](https://nelua.io) | Zlib |
|
||||||
| [raylib-bindings](https://github.com/vaiorabbit/raylib-bindings) | 4.5 | [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.1-dev** | [Nim](https://nim-lang.org) | MIT |
|
| [naylib](https://github.com/planetis-m/naylib) | **5.1-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.0** | [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) | BSD-3Clause |
|
||||||
| [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 |
|
||||||
| [Ray4Laz](https://github.com/GuvaCode/Ray4Laz) | **5.0** | [Free Pascal](https://en.wikipedia.org/wiki/Free_Pascal) | Zlib |
|
| [Ray4Laz](https://github.com/GuvaCode/Ray4Laz) | **5.5** | [Free Pascal](https://en.wikipedia.org/wiki/Free_Pascal) | Zlib |
|
||||||
| [Raylib.4.0.Pascal](https://github.com/sysrpl/Raylib.4.0.Pascal) | 4.0 | [Free Pascal](https://en.wikipedia.org/wiki/Free_Pascal) | Zlib |
|
| [Raylib.4.0.Pascal](https://github.com/sysrpl/Raylib.4.0.Pascal) | 4.0 | [Free Pascal](https://en.wikipedia.org/wiki/Free_Pascal) | Zlib |
|
||||||
| [pyraylib](https://github.com/Ho011/pyraylib) | 3.7 | [Python](https://www.python.org) | Zlib |
|
| [pyraylib](https://github.com/Ho011/pyraylib) | 3.7 | [Python](https://www.python.org) | Zlib |
|
||||||
| [raylib-python-cffi](https://github.com/electronstudio/raylib-python-cffi) | 4.2 | [Python](https://www.python.org) | EPL-2.0 |
|
| [raylib-python-cffi](https://github.com/electronstudio/raylib-python-cffi) | **5.5** | [Python](https://www.python.org) | EPL-2.0 |
|
||||||
| [raylibpyctbg](https://github.com/overdev/raylibpyctbg) | 4.5 | [Python](https://www.python.org) | MIT |
|
| [raylibpyctbg](https://github.com/overdev/raylibpyctbg) | 5.5 | [Python](https://www.python.org) | MIT |
|
||||||
| [raylib-py](https://github.com/overdev/raylib-py) | **5.0b1** | [Python](https://www.python.org) | MIT |
|
| [raylib-py](https://github.com/overdev/raylib-py) | 5.5 | [Python](https://www.python.org) | MIT |
|
||||||
| [raylib-python-ctypes](https://github.com/sDos280/raylib-python-ctypes) | 4.6-dev | [Python](https://www.python.org) | MIT |
|
| [raylib-python-ctypes](https://github.com/sDos280/raylib-python-ctypes) | 4.6-dev | [Python](https://www.python.org) | MIT |
|
||||||
| [raylib-pkpy-bindings](https://github.com/blueloveTH/pkpy-bindings) | 4.6-dev | [pocketpy](https://pocketpy.dev) | MIT |
|
| [raylib-pkpy-bindings](https://github.com/blueloveTH/pkpy-bindings) | 5.1-dev | [pocketpy](https://pocketpy.dev) | MIT |
|
||||||
| [raylib-php](https://github.com/joseph-montanez/raylib-php) | 4.5 | [PHP](https://en.wikipedia.org/wiki/PHP) | Zlib |
|
| [raylib-php](https://github.com/joseph-montanez/raylib-php) | 4.5 | [PHP](https://en.wikipedia.org/wiki/PHP) | Zlib |
|
||||||
| [raylib-phpcpp](https://github.com/oraoto/raylib-phpcpp) | 3.5 | [PHP](https://en.wikipedia.org/wiki/PHP) | Zlib |
|
| [raylib-phpcpp](https://github.com/oraoto/raylib-phpcpp) | 3.5 | [PHP](https://en.wikipedia.org/wiki/PHP) | Zlib |
|
||||||
| [raylibr](https://github.com/jeroenjanssens/raylibr) | 4.0 | [R](https://www.r-project.org) | MIT |
|
| [raylibr](https://github.com/jeroenjanssens/raylibr) | 4.0 | [R](https://www.r-project.org) | MIT |
|
||||||
| [raylib-ffi](https://github.com/ewpratten/raylib-ffi) | 4.5 | [Rust](https://www.rust-lang.org) | GPLv3 |
|
| [raylib-ffi](https://github.com/ewpratten/raylib-ffi) | 5.5 | [Rust](https://www.rust-lang.org) | GPLv3 |
|
||||||
| [raylib-rs](https://github.com/raylib-rs/raylib-rs) | **5.0** | [Rust](https://www.rust-lang.org) | Zlib |
|
| [raylib-rs](https://github.com/raylib-rs/raylib-rs) | **5.5** | [Rust](https://www.rust-lang.org) | Zlib |
|
||||||
| [Relib](https://github.com/RedCubeDev-ByteSpace/Relib) | 3.5 | [ReCT](https://github.com/RedCubeDev-ByteSpace/ReCT) | **???** |
|
| [Relib](https://github.com/RedCubeDev-ByteSpace/Relib) | 3.5 | [ReCT](https://github.com/RedCubeDev-ByteSpace/ReCT) | **???** |
|
||||||
| [racket-raylib](https://github.com/eutro/racket-raylib) | 4.0 | [Racket](https://racket-lang.org) | MIT/Apache-2.0 |
|
| [racket-raylib](https://github.com/eutro/racket-raylib) | 4.0 | [Racket](https://racket-lang.org) | MIT/Apache-2.0 |
|
||||||
| [raylib-swift](https://github.com/STREGAsGate/Raylib) | 4.0 | [Swift](https://swift.org) | MIT |
|
| [raylib-swift](https://github.com/STREGAsGate/Raylib) | 4.0 | [Swift](https://swift.org) | MIT |
|
||||||
| [raylib-scopes](https://github.com/salotz/raylib-scopes) | auto | [Scopes](http://scopes.rocks) | MIT |
|
| [raylib-scopes](https://github.com/salotz/raylib-scopes) | auto | [Scopes](http://scopes.rocks) | MIT |
|
||||||
| [raylib-SmallBASIC](https://github.com/smallbasic/smallbasic.plugins/tree/master/raylib) | **5.0** | [SmallBASIC](https://github.com/smallbasic/SmallBASIC) | GPLv3 |
|
| [raylib-SmallBASIC](https://github.com/smallbasic/smallbasic.plugins/tree/master/raylib) | **5.5** | [SmallBASIC](https://github.com/smallbasic/SmallBASIC) | GPLv3 |
|
||||||
| [raylib-umka](https://github.com/robloach/raylib-umka) | 4.5 | [Umka](https://github.com/vtereshkov/umka-lang) | Zlib |
|
| [raylib-umka](https://github.com/robloach/raylib-umka) | 4.5 | [Umka](https://github.com/vtereshkov/umka-lang) | Zlib |
|
||||||
| [raylib.v](https://github.com/irishgreencitrus/raylib.v) | 4.2 | [V](https://vlang.io) | Zlib |
|
| [raylib.v](https://github.com/irishgreencitrus/raylib.v) | 4.2 | [V](https://vlang.io) | Zlib |
|
||||||
| [raylib-vapi](https://github.com/lxmcf/raylib-vapi) | **5.0** | [Vala](https://vala.dev) | Zlib |
|
| [raylib-vapi](https://github.com/lxmcf/raylib-vapi) | **5.0** | [Vala](https://vala.dev) | Zlib |
|
||||||
| [raylib-wren](https://github.com/TSnake41/raylib-wren) | 4.0 | [Wren](http://wren.io) | ISC |
|
| [raylib-wren](https://github.com/TSnake41/raylib-wren) | 4.5 | [Wren](http://wren.io) | ISC |
|
||||||
| [raylib-zig](https://github.com/Not-Nik/raylib-zig) | **5.0** | [Zig](https://ziglang.org) | MIT |
|
| [raylib-zig](https://github.com/Not-Nik/raylib-zig) | **5.5** | [Zig](https://ziglang.org) | MIT |
|
||||||
| [raylib.zig](https://github.com/ryupold/raylib.zig) | **5.1-dev** | [Zig](https://ziglang.org) | MIT |
|
| [raylib.zig](https://github.com/ryupold/raylib.zig) | **5.1-dev** | [Zig](https://ziglang.org) | MIT |
|
||||||
| [raylib-zig-bindings](https://github.com/L-Briand/raylib-zig-bindings) | **5.0** | [Zig](https://ziglang.org) | Zlib |
|
| [raylib-zig-bindings](https://github.com/L-Briand/raylib-zig-bindings) | **5.0** | [Zig](https://ziglang.org) | Zlib |
|
||||||
| [hare-raylib](https://git.sr.ht/~evantj/hare-raylib) | **auto** | [Hare](https://harelang.org) | Zlib |
|
| [hare-raylib](https://git.sr.ht/~evantj/hare-raylib) | **auto** | [Hare](https://harelang.org) | Zlib |
|
||||||
|
|
@ -84,15 +86,18 @@ Some people ported raylib to other languages in the form of bindings or wrappers
|
||||||
| [Raylib.lean](https://github.com/KislyjKisel/Raylib.lean) | **5.5-dev** | [Lean4](https://lean-lang.org) | BSD-3-Clause |
|
| [Raylib.lean](https://github.com/KislyjKisel/Raylib.lean) | **5.5-dev** | [Lean4](https://lean-lang.org) | BSD-3-Clause |
|
||||||
| [raylib-cobol](https://codeberg.org/glowiak/raylib-cobol) | **auto** | [COBOL](https://gnucobol.sourceforge.io) | Public domain |
|
| [raylib-cobol](https://codeberg.org/glowiak/raylib-cobol) | **auto** | [COBOL](https://gnucobol.sourceforge.io) | Public domain |
|
||||||
| [raylib-apl](https://github.com/Brian-ED/raylib-apl) | **5.0** | [Dyalog APL](https://www.dyalog.com/) | MIT |
|
| [raylib-apl](https://github.com/Brian-ED/raylib-apl) | **5.0** | [Dyalog APL](https://www.dyalog.com/) | 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 |
|
||||||
|
|
||||||
### Utility Wrapers
|
### Utility Wrapers
|
||||||
|
|
||||||
These are utility wrappers for specific languages, they are not required to use raylib in the language but may adapt the raylib API to be more inline with the language's pardigm.
|
These are utility wrappers for specific languages, they are not required to use raylib in the language but may adapt the raylib API to be more inline with the language's paradigm.
|
||||||
| Name | raylib Version | Language | License |
|
| Name | raylib Version | Language | License |
|
||||||
| ---------------------------------------------------- | :------------: | :------------------------------------------: | :-----: |
|
| ---------------------------------------------------- | :------------: | :------------------------------------------: | :-----: |
|
||||||
| [raylib-cpp](https://github.com/robloach/raylib-cpp) | **5.0** | [C++](https://en.wikipedia.org/wiki/C%2B%2B) | Zlib |
|
| [raylib-cpp](https://github.com/robloach/raylib-cpp) | **5.5** | [C++](https://en.wikipedia.org/wiki/C%2B%2B) | Zlib |
|
||||||
| [claylib](https://github.com/defun-games/claylib) | 4.5 | [Common Lisp](https://common-lisp.net) | Zlib |
|
| [claylib](https://github.com/defun-games/claylib) | 4.5 | [Common Lisp](https://common-lisp.net) | Zlib |
|
||||||
| [rayed-bqn](https://github.com/Brian-ED/rayed-bqn) | **5.0** | [BQN](https://mlochbaum.github.io/BQN) | MIT |
|
| [rayed-bqn](https://github.com/Brian-ED/rayed-bqn) | **5.0** | [BQN](https://mlochbaum.github.io/BQN) | MIT |
|
||||||
|
| [DOOR](https://github.com/RealDoigt/DOOR) | 4.0 | [D](https://dlang.org) | MIT |
|
||||||
|
|
||||||
### Older or Unmaintained Language Bindings
|
### Older or Unmaintained Language Bindings
|
||||||
|
|
||||||
|
|
@ -152,7 +157,7 @@ These are older raylib bindings that are more than 2 versions old or have not be
|
||||||
| [ray.mod](https://github.com/bmx-ng/ray.mod) | 3.0 | [BlitzMax](https://blitzmax.org) |
|
| [ray.mod](https://github.com/bmx-ng/ray.mod) | 3.0 | [BlitzMax](https://blitzmax.org) |
|
||||||
| [raylib-mosaic](https://github.com/pluckyporcupine/raylib-mosaic) | 3.0 | [Mosaic](https://github.com/sal55/langs/tree/master/Mosaic) |
|
| [raylib-mosaic](https://github.com/pluckyporcupine/raylib-mosaic) | 3.0 | [Mosaic](https://github.com/sal55/langs/tree/master/Mosaic) |
|
||||||
| [raylib-xdpw](https://github.com/vtereshkov/raylib-xdpw) | 2.6 | [XD Pascal](https://github.com/vtereshkov/xdpw) |
|
| [raylib-xdpw](https://github.com/vtereshkov/raylib-xdpw) | 2.6 | [XD Pascal](https://github.com/vtereshkov/xdpw) |
|
||||||
| [raylib-carp](https://github.com/sacredbirdman/raylib-carp) | 3.0 | [Carp](https://github.com/carp-lang/Carp) |
|
| [raylib-carp](https://github.com/sacredbirdman/raylib-carp) | 3.0 | [Carp](https://github.com/carp-lang/Carp) |
|
||||||
| [raylib-fb](https://github.com/IchMagBier/raylib-fb) | 3.0 | [FreeBasic](https://www.freebasic.net) |
|
| [raylib-fb](https://github.com/IchMagBier/raylib-fb) | 3.0 | [FreeBasic](https://www.freebasic.net) |
|
||||||
| [raylib-purebasic](https://github.com/D-a-n-i-l-o/raylib-purebasic) | 3.0 | [PureBasic](https://www.purebasic.com) |
|
| [raylib-purebasic](https://github.com/D-a-n-i-l-o/raylib-purebasic) | 3.0 | [PureBasic](https://www.purebasic.com) |
|
||||||
| [raylib-ats2](https://github.com/mephistopheles-8/raylib-ats2) | 3.0 | [ATS2](http://www.ats-lang.org) |
|
| [raylib-ats2](https://github.com/mephistopheles-8/raylib-ats2) | 3.0 | [ATS2](http://www.ats-lang.org) |
|
||||||
|
|
|
||||||
25
CHANGELOG
25
CHANGELOG
|
|
@ -1,23 +1,24 @@
|
||||||
changelog
|
changelog
|
||||||
---------
|
---------
|
||||||
|
|
||||||
Current Release: raylib 5.0 (18 November 2023)
|
Current Release: raylib 5.5 (18 November 2024)
|
||||||
|
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
Release: raylib 5.5 (November 2024?)
|
Release: raylib 5.5 (18 November 2024)
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
KEY CHANGES:
|
KEY CHANGES:
|
||||||
- New rcore backend: RGFW
|
- New tool: raylib project creator
|
||||||
- New raylib project creator tool
|
- New rcore backends: RGFW and SDL3
|
||||||
- New platforms supported: Dreamcast, N64, PSP, PSVita, PS4
|
- New platforms supported: Dreamcast, N64, PSP, PSVita, PS4
|
||||||
- GPU Skinning (all platforms and GL versions)
|
- Added GPU Skinning support (all platforms and GL versions)
|
||||||
- raymath C++ operators
|
- Added raymath C++ operators
|
||||||
|
|
||||||
Detailed changes:
|
Detailed changes:
|
||||||
|
|
||||||
WIP: Last update with commit from 02-Nov-2024
|
WIP: Last update with commit from 02-Nov-2024
|
||||||
|
|
||||||
[rcore] ADDED: Working directory info at initialization by @Ray
|
[rcore] ADDED: Working directory info at initialization by @Ray
|
||||||
|
[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 @Ray
|
||||||
[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 @Ray
|
||||||
|
|
@ -116,7 +117,7 @@ WIP: Last update with commit from 02-Nov-2024
|
||||||
[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 @Colleague Riley
|
||||||
[rcore][RGFW] REVIEWED: Fix MSVC build errors (#4441) by @Colleague Riley
|
[rcore][RGFW] REVIEWED: Fix MSVC build errors (#4441) by @Colleague Riley
|
||||||
[rlgl] ADDED: More uniform data type options #4137 by @Ray
|
[rlgl] ADDED: More uniform data type options #4137 by @Ray
|
||||||
[rlgl] ADDED: Vertex normals for RLGL immediate drawing mode (#3866) by @bohonghuang
|
[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-
|
||||||
|
|
@ -149,7 +150,7 @@ WIP: Last update with commit from 02-Nov-2024
|
||||||
[rcamera] REVIEWED: Cleaned away unused macros(#3762) by @Brian E
|
[rcamera] REVIEWED: Cleaned away unused macros(#3762) by @Brian E
|
||||||
[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
|
[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 @Jeffery Myers
|
||||||
[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 @Jeffery Myers
|
||||||
|
|
@ -203,6 +204,7 @@ WIP: Last update with commit from 02-Nov-2024
|
||||||
[rtextures] REVIEWED: `ImageDrawRectangleRec()` (#3721) by @Le Juez Victor
|
[rtextures] REVIEWED: `ImageDrawRectangleRec()` (#3721) by @Le Juez Victor
|
||||||
[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 @Nikolas
|
||||||
[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: `DrawTexturePro()` to avoid negative dest rec #4316 by @Ray
|
[rtextures] REVIEWED: `DrawTexturePro()` to avoid negative dest rec #4316 by @Ray
|
||||||
[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 @Jeffery Myers
|
||||||
|
|
@ -239,6 +241,7 @@ WIP: Last update with commit from 02-Nov-2024
|
||||||
[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 @Jeffery Myers
|
||||||
[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 @Jeffery Myers
|
||||||
|
[rmodels] REVIEWED: `LoadOBJ()`, fix bug that fragmented the loaded meshes (#4494) by @Eike Decker
|
||||||
[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 @Jett
|
||||||
[rmodels] REVIEWED: `LoadM3D(), fix vertex colors for m3d files (#3859) by @Jeffery Myers
|
[rmodels] REVIEWED: `LoadM3D(), fix vertex colors for m3d files (#3859) by @Jeffery Myers
|
||||||
|
|
@ -258,7 +261,9 @@ WIP: Last update with commit from 02-Nov-2024
|
||||||
[rmodels] REVIEWED: `GenMeshSphere()`, fix artifacts (#4460) by @MikiZX1
|
[rmodels] REVIEWED: `GenMeshSphere()`, fix artifacts (#4460) by @MikiZX1
|
||||||
[rmodels] REVIEWED: `GenMeshTangents()`, read uninitialized values, fix bounding case (#4066) by @kai-z99
|
[rmodels] REVIEWED: `GenMeshTangents()`, read uninitialized values, fix bounding case (#4066) by @kai-z99
|
||||||
[rmodels] REVIEWED: `GenMeshTangents()`, fixed out of bounds error (#3990) by @Salvador Galindo
|
[rmodels] REVIEWED: `GenMeshTangents()`, fixed out of bounds error (#3990) by @Salvador Galindo
|
||||||
|
[rmodels] REVIEWED: `UpdateModelAnimation()`, performance speedup (#4470) by @JettMonstersGoBoom
|
||||||
[rmodels] REVIEWED: `DrawCylinder()`, fix drawing due to imprecise angle (#4034) by @Paul Melis
|
[rmodels] REVIEWED: `DrawCylinder()`, fix drawing due to imprecise angle (#4034) by @Paul Melis
|
||||||
|
[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 @Le Juez Victor
|
||||||
|
|
@ -364,6 +369,7 @@ WIP: Last update with commit from 02-Nov-2024
|
||||||
[build] REVIEWED: build.zig, remove all uses of deps/mingw (#3805) by @Peter0x44
|
[build] REVIEWED: build.zig, remove all uses of deps/mingw (#3805) by @Peter0x44
|
||||||
[build] REVIEWED: build.zig, fixed illegal instruction crash (#3682) by @WisonYe
|
[build] REVIEWED: build.zig, fixed illegal instruction crash (#3682) by @WisonYe
|
||||||
[build] REVIEWED: build.zig, fix broken build on #3863 (#3891) by @Nikolas Mauropoulos
|
[build] REVIEWED: build.zig, fix broken build on #3863 (#3891) by @Nikolas Mauropoulos
|
||||||
|
[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 @Kacper Zybała
|
||||||
|
|
@ -382,8 +388,9 @@ WIP: Last update with commit from 02-Nov-2024
|
||||||
[build] REVIEWED: CMake, bump version required to avoid deprecated #3639 by @Ray
|
[build] REVIEWED: CMake, bump version required to avoid deprecated #3639 by @Ray
|
||||||
[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 project by @Ray
|
[build] REVIEWED: VS2022, misc improvements by @Ray
|
||||||
[build] REVIEWED: VS2022, fix build warnings (#4095) by @Jeffery Myers
|
[build] REVIEWED: VS2022, fix build warnings (#4095) by @Jeffery Myers
|
||||||
|
[build] REVIEWED: VS2022, added new examples (#4492) by @Jeffery Myers
|
||||||
[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
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
cmake_minimum_required(VERSION 3.5)
|
cmake_minimum_required(VERSION 3.12)
|
||||||
project(raylib)
|
project(raylib)
|
||||||
|
|
||||||
# Avoid excessive expansion of variables in conditionals. In particular, if
|
# Avoid excessive expansion of variables in conditionals. In particular, if
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ enum_option(USE_EXTERNAL_GLFW "OFF;IF_POSSIBLE;ON" "Link raylib against system G
|
||||||
option(GLFW_BUILD_WAYLAND "Build the bundled GLFW with Wayland support" OFF)
|
option(GLFW_BUILD_WAYLAND "Build the bundled GLFW with Wayland support" OFF)
|
||||||
option(GLFW_BUILD_X11 "Build the bundled GLFW with X11 support" ON)
|
option(GLFW_BUILD_X11 "Build the bundled GLFW with X11 support" ON)
|
||||||
|
|
||||||
option(INCLUDE_EVERYTHING "Include everything disabled by default (for CI usage" OFF)
|
option(INCLUDE_EVERYTHING "Include everything disabled by default (for CI usage)" OFF)
|
||||||
set(OFF ${INCLUDE_EVERYTHING} CACHE INTERNAL "Replace any OFF by default with \${OFF} to have it covered by this option")
|
set(OFF ${INCLUDE_EVERYTHING} CACHE INTERNAL "Replace any OFF by default with \${OFF} to have it covered by this option")
|
||||||
|
|
||||||
include(ParseConfigHeader)
|
include(ParseConfigHeader)
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ To open new issues for raylib (bug, enhancement, discussion...), just try to fol
|
||||||
- If applicable, attach some screenshot of the issue and a .zip file with the code sample and required resources.
|
- If applicable, attach some screenshot of the issue and a .zip file with the code sample and required resources.
|
||||||
- On issue description, add a brackets tag about the raylib module that relates to this issue.
|
- On issue description, add a brackets tag about the raylib module that relates to this issue.
|
||||||
If don't know which module, just report the issue, I will review it.
|
If don't know which module, just report the issue, I will review it.
|
||||||
- You can check other issues to see how is being done!
|
- You can check other issues to see how it's being done!
|
||||||
|
|
||||||
### Sending a Pull-Request
|
### Sending a Pull-Request
|
||||||
|
|
||||||
|
|
|
||||||
2
FAQ.md
2
FAQ.md
|
|
@ -90,7 +90,7 @@ I personally consider raylib a graphics library with some high-level features ra
|
||||||
|
|
||||||
### What does raylib provide that other engines or libraries don't?
|
### What does raylib provide that other engines or libraries don't?
|
||||||
|
|
||||||
I would say "simplicity" and "enjoyment" at a really low level of coding but actually is up to the user to discover it, to try it and to see if it fits their needs. raylib is not good for everyone but it's worth a try.
|
I would say "simplicity" and "enjoyment" at a really low level of coding but actually it is up to the user to discover it, to try it and to see if it fits their needs. raylib is not good for everyone but it's worth a try.
|
||||||
|
|
||||||
### How does raylib compare to Unity/Unreal/Godot?
|
### How does raylib compare to Unity/Unreal/Godot?
|
||||||
|
|
||||||
|
|
|
||||||
40
HISTORY.md
40
HISTORY.md
|
|
@ -475,16 +475,50 @@ Undoubtedly, this is the **biggest raylib update in 10 years**. Many new feature
|
||||||
notes on raylib 5.5
|
notes on raylib 5.5
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
It's been **1 year** since latest raylib release and **11 years** since raylib 1.0 was officially released...
|
One year after raylib 5.0 release, arrives `raylib 5.5`, the next big revision of the library. It's been **11 years** since raylib 1.0 release and in all this time it has never stopped growing and improving. With an outstanding number of new contributors and improvements, it's, again, the biggest raylib release to date.
|
||||||
|
|
||||||
Some numbers for this release:
|
Some numbers for this release:
|
||||||
|
|
||||||
- **+270** closed issues (for a TOTAL of **+1810**!)
|
- **+270** closed issues (for a TOTAL of **+1810**!)
|
||||||
- **+760** commits since previous RELEASE (for a TOTAL of **+7730**!)
|
- **+800** commits since previous RELEASE (for a TOTAL of **+7770**!)
|
||||||
- **+30** functions ADDED to raylib API (for a TOTAL of **580**!)
|
- **+30** functions ADDED to raylib API (for a TOTAL of **580**!)
|
||||||
- **+110** functions REVIEWED with fixes and improvements
|
- **+110** functions REVIEWED with fixes and improvements
|
||||||
- **+140** new contributors (for a TOTAL of **+640**!)
|
- **+140** new contributors (for a TOTAL of **+640**!)
|
||||||
|
|
||||||
Highlights for `raylib 5.5`:
|
Highlights for `raylib 5.5`:
|
||||||
|
|
||||||
TODO.
|
- **`NEW` raylib pre-configured Windows package**: The new raylib **portable and self-contained Windows package** for `raylib 5.5`, intended for nobel devs that start in programming world, comes with one big addition: support for **C code building for Web platform with one-single-mouse-click!** For the last 10 years, the pre-configured raylib Windows package allowed to edit simple C projects on Notepad++ and easely compile Windows executables with an automatic script; this new release adds the possibility to compile the same C projects for Web platform with a simple mouse click. This new addition **greatly simplifies C to WebAssembly project building for new users**. The `raylib Windows Installer` package can be downloaded for free from [raylib on itch.io](https://raysan5.itch.io/raylib).
|
||||||
|
|
||||||
|
- **`NEW` raylib project creator tool**: A brand new tool developed to help raylib users to **setup new projects in a professional way**. `raylib project creator` generates a complete project structure with **multiple build systems ready-to-use** and **GitHub CI/CD actions pre-configured**. It only requires providing some C files and basic project parameters! The tools is [free and open-source](https://raysan5.itch.io/raylib-project-creator), and [it can be used online](https://raysan5.itch.io/raylib-project-creator)!.
|
||||||
|
|
||||||
|
- **`NEW` Platform backend supported: RGFW**: Thanks to the `rcore` platform-split implemented in `raylib 5.0`, **adding new platforms backends has been greatly simplified**, new backends can be added using provided template, self-contained in a single C module, completely portable. A new platform backend has been added: [`RGFW`](https://github.com/raysan5/raylib/blob/master/src/platforms/rcore_desktop_rgfw.c). `RGFW` is a **new single-file header-only portable library** ([`RGFW.h`](https://github.com/ColleagueRiley/RGFW)) intended for platform-functionality management (windowing and inputs); in this case for **desktop platforms** (Windows, Linux, macOS) but also for **Web platform**. It adds a new alternative to the already existing `GLFW` and `SDL` platform backends.
|
||||||
|
|
||||||
|
- **`NEW` Platform backend version supported: SDL3**: Previous `raylib 5.0` added support for `SDL2` library, and `raylib 5.5` not only improves SDL2 functionality, with several issues reviewed, but also adds support for the recently released big SDL update in years: [`SDL3`](https://wiki.libsdl.org/SDL3/FrontPage). Now users can **select at compile time the desired SDL version to use**, increasing the number of potential platforms supported in the future!
|
||||||
|
|
||||||
|
- **`NEW` Retro-console platforms supported: Dreamcast, N64, PSP, PSVita, PS4**: Thanks to the platform-split on `raylib 5.0`, **supporting new platform backends is easier than ever!** Along the raylib `rlgl` module support for the `OpenGL 1.1` graphics API, it opened the door to [**multiple homebrew retro-consoles backend implementations!**](https://github.com/raylib4Consoles) It's amazing to see raylib running on +20 year old consoles like [Dreamcast](https://github.com/raylib4Consoles/raylib4Dreamcast), [PSP](https://github.com/raylib4Consoles/raylib4Psp) or [PSVita](https://github.com/psp2dev/raylib4Vita), considering the hardware constraints of those platforms and proves **raylib outstanding versability!** Those additional platforms can be found in separate repositories and have been created by the amazing programmer Antonio Jose Ramos Marquez (@psxdev).
|
||||||
|
|
||||||
|
- **`NEW` GPU Skinning support**: After lots of requests for this feature, it has been finally added to raylib thanks to the contributor Daniel Holden (@orangeduck), probably the developer that has further pushed models animations with raylib, developing two amazing tools to visualize and test animations: [GenoView](https://github.com/orangeduck/GenoView) and [BVHView](https://github.com/orangeduck/BVHView). Adding GPU skinning was a tricky feature, considering it had to be **available for all raylib supported platforms**, including limited ones like Raspberry Pi with OpenGL ES 2.0, where some advance OpenGL features are not available (UBO, SSBO, Transform Feedback) but a multi-platform solution was found to make it possible. A new example, [`models_gpu_skinning`](https://github.com/raysan5/raylib/blob/master/examples/models/models_gpu_skinning.c) has been added to illustrate this new functionality. As an extra, previous existing CPU animation system has been greatly improved, multiplying performance by a factor (simplifiying required maths).
|
||||||
|
|
||||||
|
- **`NEW` [`raymath`](https://github.com/raysan5/raylib/blob/master/src/raymath.h) C++ operators**: After several requested for this feature, C++ math operators for `Vector2`, `Vector3`, `Vector4`, `Quaternion` and `Matrix` has been added to `raymath` as an extension to current implementation. Despite being only available for C++ because C does not support it, these operators **simplify C++ code when doing math operations**.
|
||||||
|
|
||||||
|
Beside those new big features, `raylib 5.5` comes with MANY other improvements:
|
||||||
|
|
||||||
|
- Normals support on batching system
|
||||||
|
- Clipboard images reading support
|
||||||
|
- CRC32/MD5/SHA1 hash computation
|
||||||
|
- Gamepad vibration support
|
||||||
|
- Improved font loading (no GPU required) with BDF fonts support
|
||||||
|
- Time-based camera movement
|
||||||
|
- Improved GLTF animations loading
|
||||||
|
|
||||||
|
...and [much much more](https://github.com/raysan5/raylib/blob/master/CHANGELOG), including **many functions reviews and new functions added!**
|
||||||
|
|
||||||
|
Make sure to check raylib [CHANGELOG](https://github.com/raysan5/raylib/blob/master/CHANGELOG) for a detailed list of changes!
|
||||||
|
|
||||||
|
To end with, I want to **thank all the contributors (+640!**) that along the years have **greatly improved raylib** and pushed it further and better day after day. Thanks to all of them, raylib is the amazing library it is today.
|
||||||
|
|
||||||
|
Last but not least, I want to thank **raylib sponsors and all the raylib community** for their support and continuous engagement with the library, creating and sharing amazing raylib projects on a daily basis. **Thanks for making raylib a great platform to enjoy games/tools/graphic programming!**
|
||||||
|
|
||||||
|
**After 11 years of development, `raylib 5.5` is the best raylib ever.**
|
||||||
|
|
||||||
|
**Enjoy programming with raylib!** :)
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ Ready to learn? Jump to [code examples!](https://www.raylib.com/examples.html)
|
||||||
|
|
||||||
[](https://github.com/raysan5/raylib/releases)
|
[](https://github.com/raysan5/raylib/releases)
|
||||||
[](https://github.com/raysan5/raylib/stargazers)
|
[](https://github.com/raysan5/raylib/stargazers)
|
||||||
[](https://github.com/raysan5/raylib/commits/master)
|
[](https://github.com/raysan5/raylib/commits/master)
|
||||||
[](https://github.com/sponsors/raysan5)
|
[](https://github.com/sponsors/raysan5)
|
||||||
[](https://repology.org/project/raylib/versions)
|
[](https://repology.org/project/raylib/versions)
|
||||||
[](LICENSE)
|
[](LICENSE)
|
||||||
|
|
|
||||||
66
build.zig
66
build.zig
|
|
@ -12,8 +12,6 @@ comptime {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn setDesktopPlatform(raylib: *std.Build.Step.Compile, platform: PlatformBackend) void {
|
fn setDesktopPlatform(raylib: *std.Build.Step.Compile, platform: PlatformBackend) void {
|
||||||
raylib.defineCMacro("PLATFORM_DESKTOP", null);
|
|
||||||
|
|
||||||
switch (platform) {
|
switch (platform) {
|
||||||
.glfw => raylib.defineCMacro("PLATFORM_DESKTOP_GLFW", null),
|
.glfw => raylib.defineCMacro("PLATFORM_DESKTOP_GLFW", null),
|
||||||
.rgfw => raylib.defineCMacro("PLATFORM_DESKTOP_RGFW", null),
|
.rgfw => raylib.defineCMacro("PLATFORM_DESKTOP_RGFW", null),
|
||||||
|
|
@ -58,6 +56,7 @@ const config_h_flags = outer: {
|
||||||
var lines = std.mem.tokenizeScalar(u8, config_h, '\n');
|
var lines = std.mem.tokenizeScalar(u8, config_h, '\n');
|
||||||
while (lines.next()) |line| {
|
while (lines.next()) |line| {
|
||||||
if (!std.mem.containsAtLeast(u8, line, 1, "SUPPORT")) continue;
|
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, "//")) continue;
|
||||||
if (std.mem.startsWith(u8, line, "#if")) continue;
|
if (std.mem.startsWith(u8, line, "#if")) continue;
|
||||||
|
|
||||||
|
|
@ -94,10 +93,9 @@ fn compileRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Sets a flag indiciating the use of a custom `config.h`
|
||||||
|
try raylib_flags_arr.append("-DEXTERNAL_CONFIG_FLAGS");
|
||||||
if (options.config.len > 0) {
|
if (options.config.len > 0) {
|
||||||
// Sets a flag indiciating the use of a custom `config.h`
|
|
||||||
try raylib_flags_arr.append("-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.
|
||||||
|
|
@ -126,6 +124,9 @@ fn compileRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.
|
||||||
// Otherwise, append default value from config.h to compile flags
|
// Otherwise, append default value from config.h to compile flags
|
||||||
try raylib_flags_arr.append(flag);
|
try raylib_flags_arr.append(flag);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// Set default config if no custome config got set
|
||||||
|
try raylib_flags_arr.appendSlice(&config_h_flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
const raylib = if (options.shared)
|
const raylib = if (options.shared)
|
||||||
|
|
@ -150,26 +151,32 @@ fn compileRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.
|
||||||
var c_source_files = try std.ArrayList([]const u8).initCapacity(b.allocator, 2);
|
var c_source_files = try std.ArrayList([]const u8).initCapacity(b.allocator, 2);
|
||||||
c_source_files.appendSliceAssumeCapacity(&.{ "src/rcore.c", "src/utils.c" });
|
c_source_files.appendSliceAssumeCapacity(&.{ "src/rcore.c", "src/utils.c" });
|
||||||
|
|
||||||
if (options.raudio) {
|
|
||||||
try c_source_files.append("src/raudio.c");
|
|
||||||
}
|
|
||||||
if (options.rmodels) {
|
|
||||||
try c_source_files.append("src/rmodels.c");
|
|
||||||
}
|
|
||||||
if (options.rshapes) {
|
if (options.rshapes) {
|
||||||
try c_source_files.append("src/rshapes.c");
|
try c_source_files.append("src/rshapes.c");
|
||||||
}
|
try raylib_flags_arr.append("-DSUPPORT_MODULE_RSHAPES");
|
||||||
if (options.rtext) {
|
|
||||||
try c_source_files.append("src/rtext.c");
|
|
||||||
}
|
}
|
||||||
if (options.rtextures) {
|
if (options.rtextures) {
|
||||||
try c_source_files.append("src/rtextures.c");
|
try c_source_files.append("src/rtextures.c");
|
||||||
|
try raylib_flags_arr.append("-DSUPPORT_MODULE_RTEXTURES");
|
||||||
|
}
|
||||||
|
if (options.rtext) {
|
||||||
|
try c_source_files.append("src/rtext.c");
|
||||||
|
try raylib_flags_arr.append("-DSUPPORT_MODULE_RTEXT");
|
||||||
|
}
|
||||||
|
if (options.rmodels) {
|
||||||
|
try c_source_files.append("src/rmodels.c");
|
||||||
|
try raylib_flags_arr.append("-DSUPPORT_MODULE_RMODELS");
|
||||||
|
}
|
||||||
|
if (options.raudio) {
|
||||||
|
try c_source_files.append("src/raudio.c");
|
||||||
|
try raylib_flags_arr.append("-DSUPPORT_MODULE_RAUDIO");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options.opengl_version != .auto) {
|
if (options.opengl_version != .auto) {
|
||||||
raylib.defineCMacro(options.opengl_version.toCMacroStr(), null);
|
raylib.defineCMacro(options.opengl_version.toCMacroStr(), null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
raylib.addIncludePath(b.path("src/platforms"));
|
||||||
switch (target.result.os.tag) {
|
switch (target.result.os.tag) {
|
||||||
.windows => {
|
.windows => {
|
||||||
try c_source_files.append("src/rglfw.c");
|
try c_source_files.append("src/rglfw.c");
|
||||||
|
|
@ -298,28 +305,28 @@ fn compileRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.
|
||||||
.flags = raylib_flags_arr.items,
|
.flags = raylib_flags_arr.items,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (options.raygui) {
|
|
||||||
const raygui_dep = b.dependency(options.raygui_dependency_name, .{});
|
|
||||||
|
|
||||||
var gen_step = b.addWriteFiles();
|
|
||||||
raylib.step.dependOn(&gen_step.step);
|
|
||||||
|
|
||||||
const raygui_c_path = gen_step.add("raygui.c", "#define RAYGUI_IMPLEMENTATION\n#include \"raygui.h\"\n");
|
|
||||||
raylib.addCSourceFile(.{ .file = raygui_c_path, .flags = raylib_flags_arr.items });
|
|
||||||
raylib.addIncludePath(raygui_dep.path("src"));
|
|
||||||
raylib.installHeader(raygui_dep.path("src/raygui.h"), "raygui.h");
|
|
||||||
}
|
|
||||||
|
|
||||||
return raylib;
|
return raylib;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn addRaygui(b: *std.Build, raylib: *std.Build.Step.Compile, raygui_dep: *std.Build.Dependency) void {
|
||||||
|
const raylib_dep = b.dependencyFromBuildZig(@This(), .{});
|
||||||
|
var gen_step = b.addWriteFiles();
|
||||||
|
raylib.step.dependOn(&gen_step.step);
|
||||||
|
|
||||||
|
const raygui_c_path = gen_step.add("raygui.c", "#define RAYGUI_IMPLEMENTATION\n#include \"raygui.h\"\n");
|
||||||
|
raylib.addCSourceFile(.{ .file = raygui_c_path });
|
||||||
|
raylib.addIncludePath(raygui_dep.path("src"));
|
||||||
|
raylib.addIncludePath(raylib_dep.path("src"));
|
||||||
|
|
||||||
|
raylib.installHeader(raygui_dep.path("src/raygui.h"), "raygui.h");
|
||||||
|
}
|
||||||
|
|
||||||
pub const Options = struct {
|
pub const Options = struct {
|
||||||
raudio: bool = true,
|
raudio: bool = true,
|
||||||
rmodels: bool = true,
|
rmodels: bool = true,
|
||||||
rshapes: bool = true,
|
rshapes: bool = true,
|
||||||
rtext: bool = true,
|
rtext: bool = true,
|
||||||
rtextures: bool = true,
|
rtextures: bool = true,
|
||||||
raygui: bool = false,
|
|
||||||
platform: PlatformBackend = .glfw,
|
platform: PlatformBackend = .glfw,
|
||||||
shared: bool = false,
|
shared: bool = false,
|
||||||
linux_display_backend: LinuxDisplayBackend = .Both,
|
linux_display_backend: LinuxDisplayBackend = .Both,
|
||||||
|
|
@ -327,15 +334,12 @@ pub const Options = struct {
|
||||||
/// config should be a list of space-separated cflags, eg, "-DSUPPORT_CUSTOM_FRAME_CONTROL"
|
/// config should be a list of space-separated cflags, eg, "-DSUPPORT_CUSTOM_FRAME_CONTROL"
|
||||||
config: []const u8 = &.{},
|
config: []const u8 = &.{},
|
||||||
|
|
||||||
raygui_dependency_name: []const u8 = "raygui",
|
|
||||||
|
|
||||||
const defaults = Options{};
|
const defaults = Options{};
|
||||||
|
|
||||||
fn getOptions(b: *std.Build) Options {
|
pub fn getOptions(b: *std.Build) Options {
|
||||||
return .{
|
return .{
|
||||||
.platform = b.option(PlatformBackend, "platform", "Choose the platform backedn for desktop target") orelse defaults.platform,
|
.platform = b.option(PlatformBackend, "platform", "Choose the platform backedn for desktop target") orelse defaults.platform,
|
||||||
.raudio = b.option(bool, "raudio", "Compile with audio support") orelse defaults.raudio,
|
.raudio = b.option(bool, "raudio", "Compile with audio support") orelse defaults.raudio,
|
||||||
.raygui = b.option(bool, "raygui", "Compile with raygui support") orelse defaults.raygui,
|
|
||||||
.rmodels = b.option(bool, "rmodels", "Compile with models support") orelse defaults.rmodels,
|
.rmodels = b.option(bool, "rmodels", "Compile with models support") orelse defaults.rmodels,
|
||||||
.rtext = b.option(bool, "rtext", "Compile with text support") orelse defaults.rtext,
|
.rtext = b.option(bool, "rtext", "Compile with text support") orelse defaults.rtext,
|
||||||
.rtextures = b.option(bool, "rtextures", "Compile with textures support") orelse defaults.rtextures,
|
.rtextures = b.option(bool, "rtextures", "Compile with textures support") orelse defaults.rtextures,
|
||||||
|
|
|
||||||
|
|
@ -54,10 +54,15 @@
|
||||||
# Define target platform: PLATFORM_DESKTOP, PLATFORM_DESKTOP_SDL, PLATFORM_DRM, PLATFORM_ANDROID, PLATFORM_WEB
|
# Define target platform: PLATFORM_DESKTOP, PLATFORM_DESKTOP_SDL, PLATFORM_DRM, PLATFORM_ANDROID, PLATFORM_WEB
|
||||||
PLATFORM ?= PLATFORM_DESKTOP
|
PLATFORM ?= PLATFORM_DESKTOP
|
||||||
|
|
||||||
ifeq ($(PLATFORM), PLATFORM_DESKTOP)
|
ifeq ($(PLATFORM),$(filter $(PLATFORM),PLATFORM_DESKTOP_GLFW PLATFORM_DESKTOP_SDL PLATFORM_DESKTOP_RGFW))
|
||||||
TARGET_PLATFORM = PLATFORM_DESKTOP_GLFW
|
TARGET_PLATFORM := $(PLATFORM)
|
||||||
|
override PLATFORM = PLATFORM_DESKTOP
|
||||||
else
|
else
|
||||||
TARGET_PLATFORM = $(PLATFORM)
|
ifeq ($(PLATFORM), PLATFORM_DESKTOP)
|
||||||
|
TARGET_PLATFORM = PLATFORM_DESKTOP_GLFW
|
||||||
|
else
|
||||||
|
TARGET_PLATFORM = $(PLATFORM)
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Define required raylib variables
|
# Define required raylib variables
|
||||||
|
|
@ -156,7 +161,7 @@ RAYLIB_RELEASE_PATH ?= $(RAYLIB_PATH)/src
|
||||||
ifeq ($(TARGET_PLATFORM),PLATFORM_WEB)
|
ifeq ($(TARGET_PLATFORM),PLATFORM_WEB)
|
||||||
ifeq ($(PLATFORM_OS),WINDOWS)
|
ifeq ($(PLATFORM_OS),WINDOWS)
|
||||||
# Emscripten required variables
|
# Emscripten required variables
|
||||||
EMSDK_PATH ?= C:/emsdk
|
EMSDK_PATH ?= C:/raylib/emsdk
|
||||||
EMSCRIPTEN_PATH ?= $(EMSDK_PATH)/upstream/emscripten
|
EMSCRIPTEN_PATH ?= $(EMSDK_PATH)/upstream/emscripten
|
||||||
CLANG_PATH = $(EMSDK_PATH)/upstream/bin
|
CLANG_PATH = $(EMSDK_PATH)/upstream/bin
|
||||||
PYTHON_PATH = $(EMSDK_PATH)/python/3.9.2-nuget_64bit
|
PYTHON_PATH = $(EMSDK_PATH)/python/3.9.2-nuget_64bit
|
||||||
|
|
@ -653,7 +658,7 @@ OTHERS = \
|
||||||
ifeq ($(TARGET_PLATFORM), PLATFORM_DESKTOP_GFLW)
|
ifeq ($(TARGET_PLATFORM), PLATFORM_DESKTOP_GFLW)
|
||||||
OTHERS += others/rlgl_standalone
|
OTHERS += others/rlgl_standalone
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
CURRENT_MAKEFILE = $(lastword $(MAKEFILE_LIST))
|
CURRENT_MAKEFILE = $(lastword $(MAKEFILE_LIST))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -119,7 +119,7 @@ RAYLIB_RELEASE_PATH ?= $(RAYLIB_PATH)/src
|
||||||
ifeq ($(PLATFORM),PLATFORM_WEB)
|
ifeq ($(PLATFORM),PLATFORM_WEB)
|
||||||
ifeq ($(PLATFORM_OS),WINDOWS)
|
ifeq ($(PLATFORM_OS),WINDOWS)
|
||||||
# Emscripten required variables
|
# Emscripten required variables
|
||||||
EMSDK_PATH ?= C:/emsdk
|
EMSDK_PATH ?= C:/raylib/emsdk
|
||||||
EMSCRIPTEN_PATH ?= $(EMSDK_PATH)/upstream/emscripten
|
EMSCRIPTEN_PATH ?= $(EMSDK_PATH)/upstream/emscripten
|
||||||
CLANG_PATH = $(EMSDK_PATH)/upstream/bin
|
CLANG_PATH = $(EMSDK_PATH)/upstream/bin
|
||||||
PYTHON_PATH = $(EMSDK_PATH)/python/3.9.2-nuget_64bit
|
PYTHON_PATH = $(EMSDK_PATH)/python/3.9.2-nuget_64bit
|
||||||
|
|
@ -280,7 +280,7 @@ ifeq ($(PLATFORM),PLATFORM_WEB)
|
||||||
# --preload-file resources # specify a resources folder for data compilation
|
# --preload-file resources # specify a resources folder for data compilation
|
||||||
# --source-map-base # allow debugging in browser with source map
|
# --source-map-base # allow debugging in browser with source map
|
||||||
LDFLAGS += -sUSE_GLFW=3 -sEXPORTED_RUNTIME_METHODS=ccall
|
LDFLAGS += -sUSE_GLFW=3 -sEXPORTED_RUNTIME_METHODS=ccall
|
||||||
|
|
||||||
# Build using asyncify
|
# Build using asyncify
|
||||||
ifeq ($(BUILD_WEB_ASYNCIFY),TRUE)
|
ifeq ($(BUILD_WEB_ASYNCIFY),TRUE)
|
||||||
LDFLAGS += -sASYNCIFY
|
LDFLAGS += -sASYNCIFY
|
||||||
|
|
@ -383,6 +383,7 @@ CORE = \
|
||||||
core/core_automation_events \
|
core/core_automation_events \
|
||||||
core/core_basic_screen_manager \
|
core/core_basic_screen_manager \
|
||||||
core/core_basic_window \
|
core/core_basic_window \
|
||||||
|
core/core_basic_window_web \
|
||||||
core/core_custom_frame_control \
|
core/core_custom_frame_control \
|
||||||
core/core_custom_logging \
|
core/core_custom_logging \
|
||||||
core/core_drop_files \
|
core/core_drop_files \
|
||||||
|
|
@ -587,6 +588,9 @@ core/core_automation_events : core/core_automation_events.c
|
||||||
core/core_basic_window: core/core_basic_window.c
|
core/core_basic_window: core/core_basic_window.c
|
||||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
|
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
|
||||||
|
|
||||||
|
core/core_basic_window_web: core/core_basic_window_web.c
|
||||||
|
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
|
||||||
|
|
||||||
core/core_basic_screen_manager: core/core_basic_screen_manager.c
|
core/core_basic_screen_manager: core/core_basic_screen_manager.c
|
||||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
|
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
|
||||||
|
|
||||||
|
|
@ -625,6 +629,9 @@ core/core_input_mouse_wheel: core/core_input_mouse_wheel.c
|
||||||
core/core_input_multitouch: core/core_input_multitouch.c
|
core/core_input_multitouch: core/core_input_multitouch.c
|
||||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
|
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
|
||||||
|
|
||||||
|
core/core_input_virtual_controls: core/core_input_virtual_controls.c
|
||||||
|
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
|
||||||
|
|
||||||
# NOTE: To use multi-threading raylib must be compiled with multi-theading support (-s USE_PTHREADS=1)
|
# NOTE: To use multi-threading raylib must be compiled with multi-theading support (-s USE_PTHREADS=1)
|
||||||
# WARNING: For security reasons multi-threading is not supported on browsers, it requires cross-origin isolation (Oct.2021)
|
# WARNING: For security reasons multi-threading is not supported on browsers, it requires cross-origin isolation (Oct.2021)
|
||||||
# WARNING: It requires raylib to be compiled using -pthread, so atomic operations and thread-local data (if any)
|
# WARNING: It requires raylib to be compiled using -pthread, so atomic operations and thread-local data (if any)
|
||||||
|
|
@ -747,6 +754,10 @@ textures/textures_gif_player: textures/textures_gif_player.c
|
||||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
|
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
|
||||||
--preload-file textures/resources/scarfy_run.gif@resources/scarfy_run.gif
|
--preload-file textures/resources/scarfy_run.gif@resources/scarfy_run.gif
|
||||||
|
|
||||||
|
textures/textures_image_channel: textures/textures_image_channel.c
|
||||||
|
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
|
||||||
|
--preload-file textures/resources/fudesumi.png@resources/fudesumi.png
|
||||||
|
|
||||||
textures/textures_image_drawing: textures/textures_image_drawing.c
|
textures/textures_image_drawing: textures/textures_image_drawing.c
|
||||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
|
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
|
||||||
--preload-file textures/resources/custom_jupiter_crash.png@resources/custom_jupiter_crash.png \
|
--preload-file textures/resources/custom_jupiter_crash.png@resources/custom_jupiter_crash.png \
|
||||||
|
|
@ -907,6 +918,13 @@ models/models_billboard: models/models_billboard.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/billboard.png@resources/billboard.png
|
--preload-file models/resources/billboard.png@resources/billboard.png
|
||||||
|
|
||||||
|
models/models_bone_socket: models/models_bone_socket.c
|
||||||
|
$(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/greenman_hat.glb@resources/models/gltf/greenman_hat.glb \
|
||||||
|
--preload-file models/resources/models/gltf/greenman_sword.glb@resources/models/gltf/greenman_sword.glb \
|
||||||
|
--preload-file models/resources/models/gltf/greenman_shield.glb@resources/models/gltf/greenman_shield.glb
|
||||||
|
|
||||||
models/models_box_collisions: models/models_box_collisions.c
|
models/models_box_collisions: models/models_box_collisions.c
|
||||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
|
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
|
||||||
|
|
||||||
|
|
@ -961,6 +979,9 @@ models/models_mesh_picking: models/models_mesh_picking.c
|
||||||
models/models_orthographic_projection: models/models_orthographic_projection.c
|
models/models_orthographic_projection: models/models_orthographic_projection.c
|
||||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
|
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
|
||||||
|
|
||||||
|
models/models_point_rendering: models/models_point_rendering.c
|
||||||
|
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
|
||||||
|
|
||||||
models/models_rlgl_solar_system: models/models_rlgl_solar_system.c
|
models/models_rlgl_solar_system: models/models_rlgl_solar_system.c
|
||||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
|
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
|
||||||
|
|
||||||
|
|
@ -988,6 +1009,24 @@ shaders/shaders_basic_lighting: shaders/shaders_basic_lighting.c
|
||||||
--preload-file shaders/resources/shaders/glsl100/lighting.fs@resources/shaders/glsl100/lighting.fs \
|
--preload-file shaders/resources/shaders/glsl100/lighting.fs@resources/shaders/glsl100/lighting.fs \
|
||||||
--preload-file shaders/resources/shaders/glsl100/lighting.vs@resources/shaders/glsl100/lighting.vs
|
--preload-file shaders/resources/shaders/glsl100/lighting.vs@resources/shaders/glsl100/lighting.vs
|
||||||
|
|
||||||
|
shaders/shaders_basic_pbr: shaders/shaders_basic_pbr.c
|
||||||
|
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
|
||||||
|
--preload-file shaders/resources/shaders/glsl100/pbr.vs@resources/shaders/glsl100/pbr.vs \
|
||||||
|
--preload-file shaders/resources/shaders/glsl120/pbr.vs@resources/shaders/glsl120/pbr.vs \
|
||||||
|
--preload-file shaders/resources/shaders/glsl330/pbr.vs@resources/shaders/glsl330/pbr.vs \
|
||||||
|
--preload-file shaders/resources/shaders/glsl100/pbr.fs@resources/shaders/glsl100/pbr.fs \
|
||||||
|
--preload-file shaders/resources/shaders/glsl120/pbr.fs@resources/shaders/glsl120/pbr.fs \
|
||||||
|
--preload-file shaders/resources/shaders/glsl330/pbr.fs@resources/shaders/glsl330/pbr.fs \
|
||||||
|
--preload-file shaders/resources/models/old_car_new.glb@resources/models/old_car_new.glb \
|
||||||
|
--preload-file shaders/resources/old_car_d.png@resources/old_car_d.png \
|
||||||
|
--preload-file shaders/resources/old_car_mra.png@resources/old_car_mra.png \
|
||||||
|
--preload-file shaders/resources/old_car_n.png@resources/old_car_n.png \
|
||||||
|
--preload-file shaders/resources/old_car_e.png@resources/old_car_e.png \
|
||||||
|
--preload-file shaders/resources/models/plane.glb@resources/models/plane.glb \
|
||||||
|
--preload-file shaders/resources/road_a.png@resources/road_a.png \
|
||||||
|
--preload-file shaders/resources/road_mra.png@resources/road_mra.png \
|
||||||
|
--preload-file shaders/resources/road_n.png@resources/road_n.png
|
||||||
|
|
||||||
shaders/shaders_custom_uniform: shaders/shaders_custom_uniform.c
|
shaders/shaders_custom_uniform: shaders/shaders_custom_uniform.c
|
||||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) -sTOTAL_MEMORY=67108864 \
|
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) -sTOTAL_MEMORY=67108864 \
|
||||||
--preload-file shaders/resources/models/barracks.obj@resources/models/barracks.obj \
|
--preload-file shaders/resources/models/barracks.obj@resources/models/barracks.obj \
|
||||||
|
|
@ -1061,6 +1100,14 @@ shaders/shaders_raymarching: shaders/shaders_raymarching.c
|
||||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
|
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
|
||||||
--preload-file shaders/resources/shaders/glsl100/raymarching.fs@resources/shaders/glsl100/raymarching.fs
|
--preload-file shaders/resources/shaders/glsl100/raymarching.fs@resources/shaders/glsl100/raymarching.fs
|
||||||
|
|
||||||
|
shaders/shaders_shadowmap: shaders/shaders_shadowmap.c
|
||||||
|
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
|
||||||
|
--preload-file shaders/resources/shaders/glsl120/shadowmap.vs@resources/shaders/glsl120/shadowmap.vs \
|
||||||
|
--preload-file shaders/resources/shaders/glsl330/shadowmap.vs@resources/shaders/glsl330/shadowmap.vs \
|
||||||
|
--preload-file shaders/resources/shaders/glsl120/shadowmap.fs@resources/shaders/glsl120/shadowmap.fs \
|
||||||
|
--preload-file shaders/resources/shaders/glsl330/shadowmap.fs@resources/shaders/glsl330/shadowmap.fs \
|
||||||
|
--preload-file shaders/resources/models/robot.glb@resources/models/robot.glb
|
||||||
|
|
||||||
shaders/shaders_shapes_textures: shaders/shaders_shapes_textures.c
|
shaders/shaders_shapes_textures: shaders/shaders_shapes_textures.c
|
||||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
|
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
|
||||||
--preload-file shaders/resources/fudesumi.png@resources/fudesumi.png \
|
--preload-file shaders/resources/fudesumi.png@resources/fudesumi.png \
|
||||||
|
|
@ -1101,6 +1148,13 @@ shaders/shaders_write_depth: shaders/shaders_write_depth.c
|
||||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
|
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
|
||||||
--preload-file shaders/resources/shaders/glsl100/write_depth.fs@resources/shaders/glsl100/write_depth.fs
|
--preload-file shaders/resources/shaders/glsl100/write_depth.fs@resources/shaders/glsl100/write_depth.fs
|
||||||
|
|
||||||
|
shaders/shaders_vertex_displacement: shaders/shaders_vertex_displacement.c
|
||||||
|
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
|
||||||
|
--preload-file shaders/resources/shaders/glsl100/vertex_displacement.vs@resources/shaders/glsl100/vertex_displacement.vs \
|
||||||
|
--preload-file shaders/resources/shaders/glsl330/vertex_displacement.vs@resources/shaders/glsl330/vertex_displacement.vs \
|
||||||
|
--preload-file shaders/resources/shaders/glsl100/vertex_displacement.fs@resources/shaders/glsl100/vertex_displacement.fs \
|
||||||
|
--preload-file shaders/resources/shaders/glsl330/vertex_displacement.fs@resources/shaders/glsl330/vertex_displacement.fs
|
||||||
|
|
||||||
|
|
||||||
# Compile AUDIO examples
|
# Compile AUDIO examples
|
||||||
audio/audio_mixed_processor: audio/audio_mixed_processor.c
|
audio/audio_mixed_processor: audio/audio_mixed_processor.c
|
||||||
|
|
|
||||||
|
|
@ -115,7 +115,7 @@ int main(void)
|
||||||
|
|
||||||
// Update camera computes movement internally depending on the camera mode
|
// Update camera computes movement internally depending on the camera mode
|
||||||
// Some default standard keyboard/mouse inputs are hardcoded to simplify use
|
// Some default standard keyboard/mouse inputs are hardcoded to simplify use
|
||||||
// For advance camera controls, it's reecommended to compute camera movement manually
|
// For advanced camera controls, it's recommended to compute camera movement manually
|
||||||
UpdateCamera(&camera, cameraMode); // Update camera
|
UpdateCamera(&camera, cameraMode); // Update camera
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -203,4 +203,4 @@ int main(void)
|
||||||
//--------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,12 @@
|
||||||
*
|
*
|
||||||
* Welcome to raylib!
|
* Welcome to raylib!
|
||||||
*
|
*
|
||||||
* To test examples, just press F6 and execute raylib_compile_execute script
|
* To test examples, just press F6 and execute 'raylib_compile_execute' script
|
||||||
* Note that compiled executable is placed in the same folder as .c file
|
* Note that compiled executable is placed in the same folder as .c file
|
||||||
*
|
*
|
||||||
|
* To test the examples on Web, press F6 and execute 'raylib_compile_execute_web' script
|
||||||
|
* Web version of the program is generated in the same folder as .c file
|
||||||
|
*
|
||||||
* You can find all basic examples on C:\raylib\raylib\examples folder or
|
* You can find all basic examples on C:\raylib\raylib\examples folder or
|
||||||
* raylib official webpage: www.raylib.com
|
* raylib official webpage: www.raylib.com
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -196,7 +196,7 @@ int main(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
// Draw background: generic
|
// Draw background: generic
|
||||||
DrawRectangleRounded((Rectangle){ 175, 110, 460, 220}, 0.3f, 0.0f, DARKGRAY);
|
DrawRectangleRounded((Rectangle){ 175, 110, 460, 220}, 0.3f, 16, DARKGRAY);
|
||||||
|
|
||||||
// Draw buttons: basic
|
// Draw buttons: basic
|
||||||
DrawCircle(365, 170, 12, RAYWHITE);
|
DrawCircle(365, 170, 12, RAYWHITE);
|
||||||
|
|
@ -225,10 +225,10 @@ int main(void)
|
||||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_RIGHT)) DrawRectangle(217 + 54, 176, 30, 25, RED);
|
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_RIGHT)) DrawRectangle(217 + 54, 176, 30, 25, RED);
|
||||||
|
|
||||||
// Draw buttons: left-right back
|
// Draw buttons: left-right back
|
||||||
DrawRectangleRounded((Rectangle){ 215, 98, 100, 10}, 0.5f, 0.0f, DARKGRAY);
|
DrawRectangleRounded((Rectangle){ 215, 98, 100, 10}, 0.5f, 16, DARKGRAY);
|
||||||
DrawRectangleRounded((Rectangle){ 495, 98, 100, 10}, 0.5f, 0.0f, DARKGRAY);
|
DrawRectangleRounded((Rectangle){ 495, 98, 100, 10}, 0.5f, 16, DARKGRAY);
|
||||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_TRIGGER_1)) DrawRectangleRounded((Rectangle){ 215, 98, 100, 10}, 0.5f, 0.0f, RED);
|
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_TRIGGER_1)) DrawRectangleRounded((Rectangle){ 215, 98, 100, 10}, 0.5f, 16, RED);
|
||||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_RIGHT_TRIGGER_1)) DrawRectangleRounded((Rectangle){ 495, 98, 100, 10}, 0.5f, 0.0f, RED);
|
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_RIGHT_TRIGGER_1)) DrawRectangleRounded((Rectangle){ 495, 98, 100, 10}, 0.5f, 16, RED);
|
||||||
|
|
||||||
// Draw axis: left joystick
|
// Draw axis: left joystick
|
||||||
Color leftGamepadColor = BLACK;
|
Color leftGamepadColor = BLACK;
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,8 @@
|
||||||
*
|
*
|
||||||
* Example create by GreenSnakeLinux (@GreenSnakeLinux),
|
* Example create by GreenSnakeLinux (@GreenSnakeLinux),
|
||||||
* lighter by oblerion (@oblerion) and
|
* lighter by oblerion (@oblerion) and
|
||||||
* reviewed by Ramon Santamaria (@raysan5)
|
* reviewed by Ramon Santamaria (@raysan5) and
|
||||||
|
* improved by danilwhale (@danilwhale)
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
|
@ -17,6 +18,16 @@
|
||||||
|
|
||||||
#include "raylib.h"
|
#include "raylib.h"
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
BUTTON_NONE = -1,
|
||||||
|
BUTTON_UP,
|
||||||
|
BUTTON_LEFT,
|
||||||
|
BUTTON_RIGHT,
|
||||||
|
BUTTON_DOWN,
|
||||||
|
BUTTON_MAX
|
||||||
|
} PadButton;
|
||||||
|
|
||||||
//------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
// Program main entry point
|
// Program main entry point
|
||||||
//------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
|
|
@ -29,24 +40,38 @@ int main(void)
|
||||||
|
|
||||||
InitWindow(screenWidth, screenHeight, "raylib [core] example - input virtual controls");
|
InitWindow(screenWidth, screenHeight, "raylib [core] example - input virtual controls");
|
||||||
|
|
||||||
const int dpadX = 90;
|
Vector2 padPosition = { 100, 350 };
|
||||||
const int dpadY = 300;
|
float buttonRadius = 30;
|
||||||
const int dpadRad = 25;//radius of each pad
|
|
||||||
Color dpadColor = BLUE;
|
|
||||||
int dpadKeydown = -1;//-1 if not down, else 0,1,2,3
|
|
||||||
|
|
||||||
|
Vector2 buttonPositions[BUTTON_MAX] =
|
||||||
const float dpadCollider[4][2]= // collider array with x,y position
|
|
||||||
{
|
{
|
||||||
{dpadX,dpadY-dpadRad*1.5},//up
|
{ padPosition.x,padPosition.y - buttonRadius*1.5f }, // Up
|
||||||
{dpadX-dpadRad*1.5,dpadY},//left
|
{ padPosition.x - buttonRadius*1.5f, padPosition.y }, // Left
|
||||||
{dpadX+dpadRad*1.5,dpadY},//right
|
{ padPosition.x + buttonRadius*1.5f, padPosition.y }, // Right
|
||||||
{dpadX,dpadY+dpadRad*1.5}//down
|
{ padPosition.x, padPosition.y + buttonRadius*1.5f } // Down
|
||||||
};
|
};
|
||||||
const char dpadLabel[4]="XYBA";//label of Dpad
|
|
||||||
|
|
||||||
float playerX=100;
|
const char *buttonLabels[BUTTON_MAX] =
|
||||||
float playerY=100;
|
{
|
||||||
|
"Y", // Up
|
||||||
|
"X", // Left
|
||||||
|
"B", // Right
|
||||||
|
"A" // Down
|
||||||
|
};
|
||||||
|
|
||||||
|
Color buttonLabelColors[BUTTON_MAX] =
|
||||||
|
{
|
||||||
|
YELLOW, // Up
|
||||||
|
BLUE, // Left
|
||||||
|
RED, // Right
|
||||||
|
GREEN // Down
|
||||||
|
};
|
||||||
|
|
||||||
|
int pressedButton = BUTTON_NONE;
|
||||||
|
Vector2 inputPosition = { 0, 0 };
|
||||||
|
|
||||||
|
Vector2 playerPosition = { (float)screenWidth/2, (float)screenHeight/2 };
|
||||||
|
float playerSpeed = 75;
|
||||||
|
|
||||||
SetTargetFPS(60);
|
SetTargetFPS(60);
|
||||||
//--------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------
|
||||||
|
|
@ -54,63 +79,89 @@ int main(void)
|
||||||
// Main game loop
|
// Main game loop
|
||||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||||
{
|
{
|
||||||
// Update
|
// Update
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
dpadKeydown = -1; //reset
|
if ((GetTouchPointCount() > 0))
|
||||||
float inputX=0;
|
{
|
||||||
float inputY=0;
|
// Use touch position
|
||||||
if(GetTouchPointCount()>0)
|
inputPosition = GetTouchPosition(0);
|
||||||
{//use touch pos
|
|
||||||
inputX = GetTouchX();
|
|
||||||
inputY = GetTouchY();
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{//use mouse pos
|
|
||||||
inputX = GetMouseX();
|
|
||||||
inputY = GetMouseY();
|
|
||||||
}
|
|
||||||
for(int i=0;i<4;i++)
|
|
||||||
{
|
{
|
||||||
//test distance each collider and input < radius
|
// Use mouse position
|
||||||
if( fabsf(dpadCollider[i][1]-inputY) + fabsf(dpadCollider[i][0]-inputX) < dpadRad)
|
inputPosition = GetMousePosition();
|
||||||
{
|
|
||||||
dpadKeydown = i;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// move player
|
|
||||||
switch(dpadKeydown){
|
// Reset pressed button to none
|
||||||
case 0: playerY -= 50*GetFrameTime();
|
pressedButton = BUTTON_NONE;
|
||||||
break;
|
|
||||||
case 1: playerX -= 50*GetFrameTime();
|
// Make sure user is pressing left mouse button if they're from desktop
|
||||||
break;
|
if ((GetTouchPointCount() > 0) || ((GetTouchPointCount() == 0) && IsMouseButtonDown(MOUSE_BUTTON_LEFT)))
|
||||||
case 2: playerX += 50*GetFrameTime();
|
{
|
||||||
break;
|
// Find nearest D-Pad button to the input position
|
||||||
case 3: playerY += 50*GetFrameTime();
|
for (int i = 0; i < BUTTON_MAX; i++)
|
||||||
default:;
|
|
||||||
};
|
|
||||||
//--------------------------------------------------------------------------
|
|
||||||
// Draw
|
|
||||||
//--------------------------------------------------------------------------
|
|
||||||
BeginDrawing();
|
|
||||||
ClearBackground(RAYWHITE);
|
|
||||||
for(int i=0;i<4;i++)
|
|
||||||
{
|
{
|
||||||
//draw all pad
|
float distX = fabsf(buttonPositions[i].x - inputPosition.x);
|
||||||
DrawCircle(dpadCollider[i][0],dpadCollider[i][1],dpadRad,dpadColor);
|
float distY = fabsf(buttonPositions[i].y - inputPosition.y);
|
||||||
if(i!=dpadKeydown)
|
|
||||||
|
if ((distX + distY < buttonRadius))
|
||||||
{
|
{
|
||||||
//draw label
|
pressedButton = i;
|
||||||
DrawText(TextSubtext(dpadLabel,i,1),
|
break;
|
||||||
dpadCollider[i][0]-7,
|
|
||||||
dpadCollider[i][1]-8,20,BLACK);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Move player according to pressed button
|
||||||
|
switch (pressedButton)
|
||||||
|
{
|
||||||
|
case BUTTON_UP:
|
||||||
|
{
|
||||||
|
playerPosition.y -= playerSpeed*GetFrameTime();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case BUTTON_LEFT:
|
||||||
|
{
|
||||||
|
playerPosition.x -= playerSpeed*GetFrameTime();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case BUTTON_RIGHT:
|
||||||
|
{
|
||||||
|
playerPosition.x += playerSpeed*GetFrameTime();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case BUTTON_DOWN:
|
||||||
|
{
|
||||||
|
playerPosition.y += playerSpeed*GetFrameTime();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: break;
|
||||||
|
};
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------
|
||||||
|
// Draw
|
||||||
|
//--------------------------------------------------------------------------
|
||||||
|
BeginDrawing();
|
||||||
|
|
||||||
|
ClearBackground(RAYWHITE);
|
||||||
|
|
||||||
|
// Draw world
|
||||||
|
DrawCircleV(playerPosition, 50, MAROON);
|
||||||
|
|
||||||
|
// Draw GUI
|
||||||
|
for (int i = 0; i < BUTTON_MAX; i++)
|
||||||
|
{
|
||||||
|
DrawCircleV(buttonPositions[i], buttonRadius, (i == pressedButton)? DARKGRAY : BLACK);
|
||||||
|
|
||||||
|
DrawText(buttonLabels[i],
|
||||||
|
(int)buttonPositions[i].x - 7, (int)buttonPositions[i].y - 8,
|
||||||
|
20, buttonLabelColors[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
DrawText("move the player with D-Pad buttons", 10, 10, 20, DARKGRAY);
|
||||||
|
|
||||||
DrawRectangle(playerX-4,playerY-4,75,28,RED);
|
|
||||||
DrawText("Player",playerX,playerY,20,WHITE);
|
|
||||||
EndDrawing();
|
EndDrawing();
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
}
|
}
|
||||||
|
|
||||||
// De-Initialization
|
// De-Initialization
|
||||||
|
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 1.8 KiB |
|
|
@ -40,6 +40,8 @@ void main()
|
||||||
vec3 viewD = normalize(viewPos - fragPosition);
|
vec3 viewD = normalize(viewPos - fragPosition);
|
||||||
vec3 specular = vec3(0.0);
|
vec3 specular = vec3(0.0);
|
||||||
|
|
||||||
|
vec4 tint = colDiffuse * fragColor;
|
||||||
|
|
||||||
// NOTE: Implement here your fragment shader code
|
// NOTE: Implement here your fragment shader code
|
||||||
|
|
||||||
for (int i = 0; i < MAX_LIGHTS; i++)
|
for (int i = 0; i < MAX_LIGHTS; i++)
|
||||||
|
|
@ -67,7 +69,7 @@ void main()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
vec4 finalColor = (texelColor*((colDiffuse + vec4(specular, 1.0))*vec4(lightDot, 1.0)));
|
vec4 finalColor = (texelColor*((tint + vec4(specular, 1.0))*vec4(lightDot, 1.0)));
|
||||||
finalColor += texelColor*(ambient/10.0);
|
finalColor += texelColor*(ambient/10.0);
|
||||||
|
|
||||||
// Gamma correction
|
// Gamma correction
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#version 100
|
#version 100
|
||||||
|
|
||||||
precision mediump float;
|
precision highp float;
|
||||||
|
|
||||||
#define MAX_LIGHTS 4
|
#define MAX_LIGHTS 4
|
||||||
#define LIGHT_DIRECTIONAL 0
|
#define LIGHT_DIRECTIONAL 0
|
||||||
|
|
@ -17,13 +17,12 @@ struct Light {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Input vertex attributes (from vertex shader)
|
// Input vertex attributes (from vertex shader)
|
||||||
varying in vec3 fragPosition;
|
varying vec3 fragPosition;
|
||||||
varying in vec2 fragTexCoord;
|
varying vec2 fragTexCoord;
|
||||||
varying in vec4 fragColor;
|
varying vec4 fragColor;
|
||||||
varying in vec3 fragNormal;
|
varying vec3 fragNormal;
|
||||||
varying in vec4 shadowPos;
|
varying vec4 shadowPos;
|
||||||
varying in mat3 TBN;
|
varying mat3 TBN;
|
||||||
|
|
||||||
|
|
||||||
// Input uniform values
|
// Input uniform values
|
||||||
uniform int numOfLights;
|
uniform int numOfLights;
|
||||||
|
|
@ -113,7 +112,7 @@ vec3 pbr(){
|
||||||
vec3 baseRefl = mix(vec3(0.04),albedo.rgb,metallic);
|
vec3 baseRefl = mix(vec3(0.04),albedo.rgb,metallic);
|
||||||
vec3 Lo = vec3(0.0); // acumulate lighting lum
|
vec3 Lo = vec3(0.0); // acumulate lighting lum
|
||||||
|
|
||||||
for(int i=0;i<numOfLights;++i){
|
for(int i=0;i<4;++i){
|
||||||
|
|
||||||
vec3 L = normalize(lights[i].position - fragPosition); // calc light vector
|
vec3 L = normalize(lights[i].position - fragPosition); // calc light vector
|
||||||
vec3 H = normalize(V + L); // calc halfway bisecting vector
|
vec3 H = normalize(V + L); // calc halfway bisecting vector
|
||||||
|
|
@ -153,4 +152,4 @@ void main()
|
||||||
|
|
||||||
gl_FragColor = vec4(color,1.0);
|
gl_FragColor = vec4(color,1.0);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
#version 100
|
#version 100
|
||||||
|
|
||||||
// Input vertex attributes
|
// Input vertex attributes
|
||||||
attribute vec3 vertexPosition;
|
attribute vec3 vertexPosition;
|
||||||
attribute vec2 vertexTexCoord;
|
attribute vec2 vertexTexCoord;
|
||||||
attribute vec3 vertexNormal;
|
attribute vec3 vertexNormal;
|
||||||
attribute vec3 vertexTangent;
|
attribute vec3 vertexTangent;
|
||||||
attribute vec4 vertexColor;
|
attribute vec4 vertexColor;
|
||||||
|
|
||||||
// Input uniform values
|
// Input uniform values
|
||||||
uniform mat4 mvp;
|
uniform mat4 mvp;
|
||||||
|
|
@ -72,4 +72,4 @@ void main()
|
||||||
|
|
||||||
// Calculate final vertex position
|
// Calculate final vertex position
|
||||||
gl_Position = mvp * vec4(vertexPosition, 1.0);
|
gl_Position = mvp * vec4(vertexPosition, 1.0);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue