Merge branch 'master' of github.com:JeffM2501/raylib
This commit is contained in:
commit
8c45d899ac
40 changed files with 3349 additions and 1468 deletions
|
|
@ -9,7 +9,7 @@ Some people ported raylib to other languages in the form of bindings or wrappers
|
||||||
| [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.0** | [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.0** | [Beef](https://www.beeflang.org) | MIT |
|
||||||
| [raylib-boo](https://github.com/Rabios/raylib-boo) | 3.7 | [Boo](http://boo-language.github.io) | 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) | 3.7 | [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-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 |
|
||||||
|
|
@ -78,10 +78,10 @@ Some people ported raylib to other languages in the form of bindings or wrappers
|
||||||
| [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 |
|
||||||
| [raylib-sunder](https://github.com/ashn-dot-dev/raylib-sunder) | **auto** | [Sunder](https://github.com/ashn-dot-dev/sunder) | 0BSD |
|
| [raylib-sunder](https://github.com/ashn-dot-dev/raylib-sunder) | **auto** | [Sunder](https://github.com/ashn-dot-dev/sunder) | 0BSD |
|
||||||
| [rayed-bqn](https://github.com/Brian-ED/rayed-bqn) | **auto** | [BQN](https://mlochbaum.github.io/BQN) | MIT |
|
| [raylib-bqn](https://github.com/Brian-ED/raylib-bqn) | **5.0** | [BQN](https://mlochbaum.github.io/BQN) | MIT |
|
||||||
| [rayjs](https://github.com/mode777/rayjs) | 4.6-dev | [QuickJS](https://bellard.org/quickjs) | MIT |
|
| [rayjs](https://github.com/mode777/rayjs) | 4.6-dev | [QuickJS](https://bellard.org/quickjs) | MIT |
|
||||||
| [raylib-raku](https://github.com/vushu/raylib-raku) | **auto** | [Raku](https://www.raku.org) | Artistic License 2.0 |
|
| [raylib-raku](https://github.com/vushu/raylib-raku) | **auto** | [Raku](https://www.raku.org) | Artistic License 2.0 |
|
||||||
| [Raylib.lean](https://github.com/KislyjKisel/Raylib.lean) | 4.5 | [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 |
|
||||||
|
|
||||||
|
|
@ -92,6 +92,7 @@ These are utility wrappers for specific languages, they are not required to use
|
||||||
| ---------------------------------------------------- | :------------: | :------------------------------------------: | :-----: |
|
| ---------------------------------------------------- | :------------: | :------------------------------------------: | :-----: |
|
||||||
| [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.0** | [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 |
|
||||||
|
|
||||||
### Older or Unmaintained Language Bindings
|
### Older or Unmaintained Language Bindings
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,9 +36,6 @@ include(CompilerFlags)
|
||||||
# Registers build options that are exposed to cmake
|
# Registers build options that are exposed to cmake
|
||||||
include(CMakeOptions.txt)
|
include(CMakeOptions.txt)
|
||||||
|
|
||||||
# Enforces a few environment and compiler configurations
|
|
||||||
include(BuildOptions)
|
|
||||||
|
|
||||||
if (UNIX AND NOT APPLE)
|
if (UNIX AND NOT APPLE)
|
||||||
if (NOT GLFW_BUILD_WAYLAND AND NOT GLFW_BUILD_X11)
|
if (NOT GLFW_BUILD_WAYLAND AND NOT GLFW_BUILD_X11)
|
||||||
MESSAGE(FATAL_ERROR "Cannot disable both Wayland and X11")
|
MESSAGE(FATAL_ERROR "Cannot disable both Wayland and X11")
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@ option(ENABLE_MSAN "Enable MemorySanitizer (MSan) for debugging (not recommended
|
||||||
# Shared library is always PIC. Static library should be PIC too if linked into a shared library
|
# Shared library is always PIC. Static library should be PIC too if linked into a shared library
|
||||||
option(WITH_PIC "Compile static library as position-independent code" OFF)
|
option(WITH_PIC "Compile static library as position-independent code" OFF)
|
||||||
option(BUILD_SHARED_LIBS "Build raylib as a shared library" OFF)
|
option(BUILD_SHARED_LIBS "Build raylib as a shared library" OFF)
|
||||||
option(MACOS_FATLIB "Build fat library for both i386 and x86_64 on macOS" OFF)
|
|
||||||
cmake_dependent_option(USE_AUDIO "Build raylib with audio module" ON CUSTOMIZE_BUILD ON)
|
cmake_dependent_option(USE_AUDIO "Build raylib with audio module" ON CUSTOMIZE_BUILD ON)
|
||||||
|
|
||||||
enum_option(USE_EXTERNAL_GLFW "OFF;IF_POSSIBLE;ON" "Link raylib against system GLFW instead of embedded one")
|
enum_option(USE_EXTERNAL_GLFW "OFF;IF_POSSIBLE;ON" "Link raylib against system GLFW instead of embedded one")
|
||||||
|
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
if(${PLATFORM} MATCHES "Desktop" AND APPLE)
|
|
||||||
if(MACOS_FATLIB)
|
|
||||||
if (CMAKE_OSX_ARCHITECTURES)
|
|
||||||
message(FATAL_ERROR "User supplied -DCMAKE_OSX_ARCHITECTURES overrides -DMACOS_FATLIB=ON")
|
|
||||||
else()
|
|
||||||
set(CMAKE_OSX_ARCHITECTURES "x86_64;i386")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# This helps support the case where emsdk toolchain file is used
|
|
||||||
# either by setting it with -DCMAKE_TOOLCHAIN_FILE=<path_to_emsdk>/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake
|
|
||||||
# or by using "emcmake cmake -B build -S ." as described in https://emscripten.org/docs/compiling/Building-Projects.html
|
|
||||||
if(EMSCRIPTEN)
|
|
||||||
SET(PLATFORM Web CACHE STRING "Forcing PLATFORM_WEB because EMSCRIPTEN was detected")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# vim: ft=cmake
|
|
||||||
|
|
@ -70,8 +70,9 @@ RAYLIB_SRC_PATH ?= ../src
|
||||||
|
|
||||||
# Locations of raylib.h and libraylib.a/libraylib.so
|
# Locations of raylib.h and libraylib.a/libraylib.so
|
||||||
# NOTE: Those variables are only used for PLATFORM_OS: LINUX, BSD
|
# NOTE: Those variables are only used for PLATFORM_OS: LINUX, BSD
|
||||||
RAYLIB_INCLUDE_PATH ?= /usr/local/include
|
DESTDIR ?= /usr/local
|
||||||
RAYLIB_LIB_PATH ?= /usr/local/lib
|
RAYLIB_INCLUDE_PATH ?= $(DESTDIR)/include
|
||||||
|
RAYLIB_LIB_PATH ?= $(DESTDIR)/lib
|
||||||
|
|
||||||
# Library type compilation: STATIC (.a) or SHARED (.so/.dll)
|
# Library type compilation: STATIC (.a) or SHARED (.so/.dll)
|
||||||
RAYLIB_LIBTYPE ?= STATIC
|
RAYLIB_LIBTYPE ?= STATIC
|
||||||
|
|
@ -582,10 +583,12 @@ MODELS = \
|
||||||
models/models_mesh_generation \
|
models/models_mesh_generation \
|
||||||
models/models_mesh_picking \
|
models/models_mesh_picking \
|
||||||
models/models_orthographic_projection \
|
models/models_orthographic_projection \
|
||||||
|
models/models_point_rendering \
|
||||||
models/models_rlgl_solar_system \
|
models/models_rlgl_solar_system \
|
||||||
models/models_skybox \
|
models/models_skybox \
|
||||||
models/models_waving_cubes \
|
models/models_waving_cubes \
|
||||||
models/models_yaw_pitch_roll
|
models/models_yaw_pitch_roll \
|
||||||
|
models/models_gpu_skinning
|
||||||
|
|
||||||
SHADERS = \
|
SHADERS = \
|
||||||
shaders/shaders_basic_lighting \
|
shaders/shaders_basic_lighting \
|
||||||
|
|
|
||||||
|
|
@ -35,8 +35,9 @@ RAYLIB_PATH ?= ..
|
||||||
|
|
||||||
# Locations of raylib.h and libraylib.a/libraylib.so
|
# Locations of raylib.h and libraylib.a/libraylib.so
|
||||||
# NOTE: Those variables are only used for PLATFORM_OS: LINUX, BSD
|
# NOTE: Those variables are only used for PLATFORM_OS: LINUX, BSD
|
||||||
RAYLIB_INCLUDE_PATH ?= /usr/local/include
|
DESTDIR ?= /usr/local
|
||||||
RAYLIB_LIB_PATH ?= /usr/local/lib
|
RAYLIB_INCLUDE_PATH ?= $(DESTDIR)/include
|
||||||
|
RAYLIB_LIB_PATH ?= $(DESTDIR)/lib
|
||||||
|
|
||||||
# Library type compilation: STATIC (.a) or SHARED (.so/.dll)
|
# Library type compilation: STATIC (.a) or SHARED (.so/.dll)
|
||||||
RAYLIB_LIBTYPE ?= STATIC
|
RAYLIB_LIBTYPE ?= STATIC
|
||||||
|
|
@ -447,6 +448,7 @@ MODELS = \
|
||||||
models/models_mesh_generation \
|
models/models_mesh_generation \
|
||||||
models/models_mesh_picking \
|
models/models_mesh_picking \
|
||||||
models/models_orthographic_projection \
|
models/models_orthographic_projection \
|
||||||
|
models/models_point_rendering \
|
||||||
models/models_rlgl_solar_system \
|
models/models_rlgl_solar_system \
|
||||||
models/models_skybox \
|
models/models_skybox \
|
||||||
models/models_waving_cubes \
|
models/models_waving_cubes \
|
||||||
|
|
|
||||||
|
|
@ -147,11 +147,12 @@ Examples using raylib models functionality, including models loading/generation
|
||||||
| 91 | [models_loading_vox](models/models_loading_vox.c) | <img src="models/models_loading_vox.png" alt="models_loading_vox" width="80"> | ⭐️☆☆☆ | **4.0** | **4.0** | [Johann Nadalutti](https://github.com/procfxgen) |
|
| 91 | [models_loading_vox](models/models_loading_vox.c) | <img src="models/models_loading_vox.png" alt="models_loading_vox" width="80"> | ⭐️☆☆☆ | **4.0** | **4.0** | [Johann Nadalutti](https://github.com/procfxgen) |
|
||||||
| 92 | [models_loading_m3d](models/models_loading_m3d.c) | <img src="models/models_loading_m3d.png" alt="models_loading_m3d" width="80"> | ⭐️☆☆☆ | **4.2** | **4.2** | [bzt](https://bztsrc.gitlab.io/model3d) |
|
| 92 | [models_loading_m3d](models/models_loading_m3d.c) | <img src="models/models_loading_m3d.png" alt="models_loading_m3d" width="80"> | ⭐️☆☆☆ | **4.2** | **4.2** | [bzt](https://bztsrc.gitlab.io/model3d) |
|
||||||
| 93 | [models_orthographic_projection](models/models_orthographic_projection.c) | <img src="models/models_orthographic_projection.png" alt="models_orthographic_projection" width="80"> | ⭐️☆☆☆ | 2.0 | 3.7 | [Max Danielsson](https://github.com/autious) |
|
| 93 | [models_orthographic_projection](models/models_orthographic_projection.c) | <img src="models/models_orthographic_projection.png" alt="models_orthographic_projection" width="80"> | ⭐️☆☆☆ | 2.0 | 3.7 | [Max Danielsson](https://github.com/autious) |
|
||||||
| 94 | [models_rlgl_solar_system](models/models_rlgl_solar_system.c) | <img src="models/models_rlgl_solar_system.png" alt="models_rlgl_solar_system" width="80"> | ⭐️⭐️⭐️⭐️ | 2.5 | **4.0** | [Ray](https://github.com/raysan5) |
|
| 94 | [models_point_rendering](models/models_point_rendering.c) | <img src="models/models_point_rendering.png" alt="models_point_rendering" width="80"> | ⭐️⭐️☆☆ | 5.0 | 5.0 | [Reese Gallagher](https://github.com/satchelfrost) |
|
||||||
| 95 | [models_yaw_pitch_roll](models/models_yaw_pitch_roll.c) | <img src="models/models_yaw_pitch_roll.png" alt="models_yaw_pitch_roll" width="80"> | ⭐️⭐️☆☆ | 1.8 | **4.0** | [Berni](https://github.com/Berni8k) |
|
| 95 | [models_rlgl_solar_system](models/models_rlgl_solar_system.c) | <img src="models/models_rlgl_solar_system.png" alt="models_rlgl_solar_system" width="80"> | ⭐️⭐️⭐️⭐️ | 2.5 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||||
| 96 | [models_waving_cubes](models/models_waving_cubes.c) | <img src="models/models_waving_cubes.png" alt="models_waving_cubes" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 3.7 | [codecat](https://github.com/codecat) |
|
| 96 | [models_yaw_pitch_roll](models/models_yaw_pitch_roll.c) | <img src="models/models_yaw_pitch_roll.png" alt="models_yaw_pitch_roll" width="80"> | ⭐️⭐️☆☆ | 1.8 | **4.0** | [Berni](https://github.com/Berni8k) |
|
||||||
| 97 | [models_heightmap](models/models_heightmap.c) | <img src="models/models_heightmap.png" alt="models_heightmap" width="80"> | ⭐️☆☆☆ | 1.8 | 3.5 | [Ray](https://github.com/raysan5) |
|
| 97 | [models_waving_cubes](models/models_waving_cubes.c) | <img src="models/models_waving_cubes.png" alt="models_waving_cubes" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 3.7 | [codecat](https://github.com/codecat) |
|
||||||
| 98 | [models_skybox](models/models_skybox.c) | <img src="models/models_skybox.png" alt="models_skybox" width="80"> | ⭐️⭐️☆☆ | 1.8 | **4.0** | [Ray](https://github.com/raysan5) |
|
| 98 | [models_heightmap](models/models_heightmap.c) | <img src="models/models_heightmap.png" alt="models_heightmap" width="80"> | ⭐️☆☆☆ | 1.8 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||||
|
| 99 | [models_skybox](models/models_skybox.c) | <img src="models/models_skybox.png" alt="models_skybox" width="80"> | ⭐️⭐️☆☆ | 1.8 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||||
|
|
||||||
### category: shaders
|
### category: shaders
|
||||||
|
|
||||||
|
|
@ -159,26 +160,25 @@ Examples using raylib shaders functionality, including shaders loading, paramete
|
||||||
|
|
||||||
| ## | 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 |
|
||||||
|----|----------|--------|:-------------------:|:------------------:|:------------------:|:----------|
|
|----|----------|--------|:-------------------:|:------------------:|:------------------:|:----------|
|
||||||
| 99 | [shaders_basic_lighting](shaders/shaders_basic_lighting.c) | <img src="shaders/shaders_basic_lighting.png" alt="shaders_basic_lighting" width="80"> | ⭐️⭐️⭐️⭐️ | 3.0 | **4.2** | [Chris Camacho](https://github.com/codifies) |
|
| 100 | [shaders_basic_lighting](shaders/shaders_basic_lighting.c) | <img src="shaders/shaders_basic_lighting.png" alt="shaders_basic_lighting" width="80"> | ⭐️⭐️⭐️⭐️ | 3.0 | **4.2** | [Chris Camacho](https://github.com/codifies) |
|
||||||
| 100 | [shaders_model_shader](shaders/shaders_model_shader.c) | <img src="shaders/shaders_model_shader.png" alt="shaders_model_shader" width="80"> | ⭐️⭐️☆☆ | 1.3 | 3.7 | [Ray](https://github.com/raysan5) |
|
| 101 | [shaders_model_shader](shaders/shaders_model_shader.c) | <img src="shaders/shaders_model_shader.png" alt="shaders_model_shader" width="80"> | ⭐️⭐️☆☆ | 1.3 | 3.7 | [Ray](https://github.com/raysan5) |
|
||||||
| 101 | [shaders_shapes_textures](shaders/shaders_shapes_textures.c) | <img src="shaders/shaders_shapes_textures.png" alt="shaders_shapes_textures" width="80"> | ⭐️⭐️☆☆ | 1.7 | 3.7 | [Ray](https://github.com/raysan5) |
|
| 102 | [shaders_shapes_textures](shaders/shaders_shapes_textures.c) | <img src="shaders/shaders_shapes_textures.png" alt="shaders_shapes_textures" width="80"> | ⭐️⭐️☆☆ | 1.7 | 3.7 | [Ray](https://github.com/raysan5) |
|
||||||
| 102 | [shaders_custom_uniform](shaders/shaders_custom_uniform.c) | <img src="shaders/shaders_custom_uniform.png" alt="shaders_custom_uniform" width="80"> | ⭐️⭐️☆☆ | 1.3 | **4.0** | [Ray](https://github.com/raysan5) |
|
| 103 | [shaders_custom_uniform](shaders/shaders_custom_uniform.c) | <img src="shaders/shaders_custom_uniform.png" alt="shaders_custom_uniform" width="80"> | ⭐️⭐️☆☆ | 1.3 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||||
| 103 | [shaders_postprocessing](shaders/shaders_postprocessing.c) | <img src="shaders/shaders_postprocessing.png" alt="shaders_postprocessing" width="80"> | ⭐️⭐️⭐️☆ | 1.3 | **4.0** | [Ray](https://github.com/raysan5) |
|
| 104 | [shaders_postprocessing](shaders/shaders_postprocessing.c) | <img src="shaders/shaders_postprocessing.png" alt="shaders_postprocessing" width="80"> | ⭐️⭐️⭐️☆ | 1.3 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||||
| 104 | [shaders_palette_switch](shaders/shaders_palette_switch.c) | <img src="shaders/shaders_palette_switch.png" alt="shaders_palette_switch" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 3.7 | [Marco Lizza](https://github.com/MarcoLizza) |
|
| 105 | [shaders_palette_switch](shaders/shaders_palette_switch.c) | <img src="shaders/shaders_palette_switch.png" alt="shaders_palette_switch" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 3.7 | [Marco Lizza](https://github.com/MarcoLizza) |
|
||||||
| 105 | [shaders_raymarching](shaders/shaders_raymarching.c) | <img src="shaders/shaders_raymarching.png" alt="shaders_raymarching" width="80"> | ⭐️⭐️⭐️⭐️ | 2.0 | **4.2** | [Ray](https://github.com/raysan5) |
|
| 106 | [shaders_raymarching](shaders/shaders_raymarching.c) | <img src="shaders/shaders_raymarching.png" alt="shaders_raymarching" width="80"> | ⭐️⭐️⭐️⭐️ | 2.0 | **4.2** | [Ray](https://github.com/raysan5) |
|
||||||
| 106 | [shaders_texture_drawing](shaders/shaders_texture_drawing.c) | <img src="shaders/shaders_texture_drawing.png" alt="shaders_texture_drawing" width="80"> | ⭐️⭐️☆☆ | 2.0 | 3.7 | [Michał Ciesielski](https://github.com/) |
|
| 107 | [shaders_texture_drawing](shaders/shaders_texture_drawing.c) | <img src="shaders/shaders_texture_drawing.png" alt="shaders_texture_drawing" width="80"> | ⭐️⭐️☆☆ | 2.0 | 3.7 | [Michał Ciesielski](https://github.com/) |
|
||||||
| 107 | [shaders_texture_outline](shaders/shaders_texture_outline.c) | <img src="shaders/shaders_texture_outline.png" alt="shaders_texture_outline" width="80"> | ⭐️⭐️⭐️☆ | **4.0** | **4.0** | [Samuel Skiff](https://github.com/GoldenThumbs) |
|
| 108 | [shaders_texture_outline](shaders/shaders_texture_outline.c) | <img src="shaders/shaders_texture_outline.png" alt="shaders_texture_outline" width="80"> | ⭐️⭐️⭐️☆ | **4.0** | **4.0** | [Samuel Skiff](https://github.com/GoldenThumbs) |
|
||||||
| 108 | [shaders_texture_waves](shaders/shaders_texture_waves.c) | <img src="shaders/shaders_texture_waves.png" alt="shaders_texture_waves" width="80"> | ⭐️⭐️☆☆ | 2.5 | 3.7 | [Anata](https://github.com/anatagawa) |
|
| 109 | [shaders_texture_waves](shaders/shaders_texture_waves.c) | <img src="shaders/shaders_texture_waves.png" alt="shaders_texture_waves" width="80"> | ⭐️⭐️☆☆ | 2.5 | 3.7 | [Anata](https://github.com/anatagawa) |
|
||||||
| 109 | [shaders_julia_set](shaders/shaders_julia_set.c) | <img src="shaders/shaders_julia_set.png" alt="shaders_julia_set" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | **4.0** | [eggmund](https://github.com/eggmund) |
|
| 110 | [shaders_julia_set](shaders/shaders_julia_set.c) | <img src="shaders/shaders_julia_set.png" alt="shaders_julia_set" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | **4.0** | [eggmund](https://github.com/eggmund) |
|
||||||
| 110 | [shaders_eratosthenes](shaders/shaders_eratosthenes.c) | <img src="shaders/shaders_eratosthenes.png" alt="shaders_eratosthenes" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | **4.0** | [ProfJski](https://github.com/ProfJski) |
|
| 111 | [shaders_eratosthenes](shaders/shaders_eratosthenes.c) | <img src="shaders/shaders_eratosthenes.png" alt="shaders_eratosthenes" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | **4.0** | [ProfJski](https://github.com/ProfJski) |
|
||||||
| 111 | [shaders_fog](shaders/shaders_fog.c) | <img src="shaders/shaders_fog.png" alt="shaders_fog" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 3.7 | [Chris Camacho](https://github.com/codifies) |
|
| 112 | [shaders_fog](shaders/shaders_fog.c) | <img src="shaders/shaders_fog.png" alt="shaders_fog" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 3.7 | [Chris Camacho](https://github.com/codifies) |
|
||||||
| 112 | [shaders_simple_mask](shaders/shaders_simple_mask.c) | <img src="shaders/shaders_simple_mask.png" alt="shaders_simple_mask" width="80"> | ⭐️⭐️☆☆ | 2.5 | 3.7 | [Chris Camacho](https://github.com/codifies) |
|
| 113 | [shaders_simple_mask](shaders/shaders_simple_mask.c) | <img src="shaders/shaders_simple_mask.png" alt="shaders_simple_mask" width="80"> | ⭐️⭐️☆☆ | 2.5 | 3.7 | [Chris Camacho](https://github.com/codifies) |
|
||||||
| 113 | [shaders_hot_reloading](shaders/shaders_hot_reloading.c) | <img src="shaders/shaders_hot_reloading.png" alt="shaders_hot_reloading" width="80"> | ⭐️⭐️⭐️☆ | 3.0 | 3.5 | [Ray](https://github.com/raysan5) |
|
| 114 | [shaders_hot_reloading](shaders/shaders_hot_reloading.c) | <img src="shaders/shaders_hot_reloading.png" alt="shaders_hot_reloading" width="80"> | ⭐️⭐️⭐️☆ | 3.0 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||||
| 114 | [shaders_mesh_instancing](shaders/shaders_mesh_instancing.c) | <img src="shaders/shaders_mesh_instancing.png" alt="shaders_mesh_instancing" width="80"> | ⭐️⭐️⭐️⭐️ | 3.7 | **4.2** | [seanpringle](https://github.com/seanpringle) |
|
| 115 | [shaders_mesh_instancing](shaders/shaders_mesh_instancing.c) | <img src="shaders/shaders_mesh_instancing.png" alt="shaders_mesh_instancing" width="80"> | ⭐️⭐️⭐️⭐️ | 3.7 | **4.2** | [seanpringle](https://github.com/seanpringle) |
|
||||||
| 115 | [shaders_multi_sample2d](shaders/shaders_multi_sample2d.c) | <img src="shaders/shaders_multi_sample2d.png" alt="shaders_multi_sample2d" width="80"> | ⭐️⭐️☆☆ | 3.5 | 3.5 | [Ray](https://github.com/raysan5) |
|
| 116 | [shaders_multi_sample2d](shaders/shaders_multi_sample2d.c) | <img src="shaders/shaders_multi_sample2d.png" alt="shaders_multi_sample2d" width="80"> | ⭐️⭐️☆☆ | 3.5 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||||
| 116 | [shaders_spotlight](shaders/shaders_spotlight.c) | <img src="shaders/shaders_spotlight.png" alt="shaders_spotlight" width="80"> | ⭐️⭐️☆☆ | 2.5 | 3.7 | [Chris Camacho](https://github.com/codifies) |
|
| 117 | [shaders_spotlight](shaders/shaders_spotlight.c) | <img src="shaders/shaders_spotlight.png" alt="shaders_spotlight" width="80"> | ⭐️⭐️☆☆ | 2.5 | 3.7 | [Chris Camacho](https://github.com/codifies) |
|
||||||
| 117 | [shaders_deferred_render](shaders/shaders_deferred_render.c) | <img src="shaders/shaders_deferred_render.png" alt="shaders_deferred_render" width="80"> | ⭐️⭐️⭐️⭐️ | 4.5 | 4.5 | [Justin Andreas Lacoste](https://github.com/27justin) |
|
| 118 | [shaders_deferred_render](shaders/shaders_deferred_render.c) | <img src="shaders/shaders_deferred_render.png" alt="shaders_deferred_render" width="80"> | ⭐️⭐️⭐️⭐️ | 4.5 | 4.5 | [Justin Andreas Lacoste](https://github.com/27justin) |
|
||||||
| 118 | [shaders_vertex_displacement](shaders/shaders_vertex_displacement.c) | <img src="shaders/shaders_vertex_displacement.png" alt="shaders_deferred_render" width="80"> | ⭐️☆☆☆ | 1.5 | 1.5 | [Alex ZH](https://github.com/ZzzhHe) |
|
|
||||||
|
|
||||||
### category: audio
|
### category: audio
|
||||||
|
|
||||||
|
|
|
||||||
119
examples/models/models_gpu_skinning.c
Normal file
119
examples/models/models_gpu_skinning.c
Normal file
|
|
@ -0,0 +1,119 @@
|
||||||
|
/*******************************************************************************************
|
||||||
|
*
|
||||||
|
* raylib [core] example - Doing skinning on the gpu using a vertex shader
|
||||||
|
*
|
||||||
|
* Example originally created with raylib 4.5, last time updated with raylib 4.5
|
||||||
|
*
|
||||||
|
* Example contributed by Daniel Holden (@orangeduck) 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) 2024 Daniel Holden (@orangeduck)
|
||||||
|
*
|
||||||
|
* Note: Due to limitations in the Apple OpenGL driver, this feature does not work on MacOS
|
||||||
|
*
|
||||||
|
********************************************************************************************/
|
||||||
|
|
||||||
|
#include "raylib.h"
|
||||||
|
|
||||||
|
#include "raymath.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;
|
||||||
|
|
||||||
|
InitWindow(screenWidth, screenHeight, "raylib [models] example - GPU skinning");
|
||||||
|
|
||||||
|
// 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 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
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
|
// Select current animation
|
||||||
|
if (IsKeyPressed(KEY_T)) animIndex = (animIndex + 1)%animsCount;
|
||||||
|
else if (IsKeyPressed(KEY_G)) animIndex = (animIndex + animsCount - 1)%animsCount;
|
||||||
|
|
||||||
|
// Update model animation
|
||||||
|
ModelAnimation anim = modelAnimations[animIndex];
|
||||||
|
animCurrentFrame = (animCurrentFrame + 1)%anim.frameCount;
|
||||||
|
UpdateModelAnimationBoneMatrices(characterModel, anim, animCurrentFrame);
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// Draw
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
BeginDrawing();
|
||||||
|
|
||||||
|
ClearBackground(RAYWHITE);
|
||||||
|
|
||||||
|
BeginMode3D(camera);
|
||||||
|
|
||||||
|
// Draw character
|
||||||
|
characterModel.transform = MatrixTranslate(position.x, position.y, position.z);
|
||||||
|
UpdateModelAnimationBoneMatrices(characterModel, anim, animCurrentFrame);
|
||||||
|
DrawMesh(characterModel.meshes[0], characterModel.materials[1], characterModel.transform);
|
||||||
|
|
||||||
|
DrawGrid(10, 1.0f);
|
||||||
|
EndMode3D();
|
||||||
|
|
||||||
|
DrawText("Use the T/G to switch animation", 10, 10, 20, GRAY);
|
||||||
|
|
||||||
|
EndDrawing();
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
}
|
||||||
|
|
||||||
|
// De-Initialization
|
||||||
|
//--------------------------------------------------------------------------------------
|
||||||
|
UnloadModelAnimations(modelAnimations, animsCount);
|
||||||
|
UnloadModel(characterModel); // Unload character model and meshes/material
|
||||||
|
UnloadShader(skinningShader);
|
||||||
|
|
||||||
|
CloseWindow(); // Close window and OpenGL context
|
||||||
|
//--------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
182
examples/models/models_point_rendering.c
Normal file
182
examples/models/models_point_rendering.c
Normal file
|
|
@ -0,0 +1,182 @@
|
||||||
|
/*******************************************************************************************
|
||||||
|
*
|
||||||
|
* raylib example - point rendering
|
||||||
|
*
|
||||||
|
* Example originally created with raylib 5.0, last time updated with raylib 5.0
|
||||||
|
*
|
||||||
|
* Example contributed by Reese Gallagher (@satchelfrost) 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) 2024 Reese Gallagher (@satchelfrost)
|
||||||
|
*
|
||||||
|
********************************************************************************************/
|
||||||
|
|
||||||
|
#include "raylib.h"
|
||||||
|
|
||||||
|
#include <stdlib.h> // Required for: rand()
|
||||||
|
#include <math.h> // Required for: cos(), sin()
|
||||||
|
|
||||||
|
#define MAX_POINTS 10000000 // 10 million
|
||||||
|
#define MIN_POINTS 1000 // 1 thousand
|
||||||
|
|
||||||
|
// Generate mesh using points
|
||||||
|
Mesh GenMeshPoints(int numPoints);
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
|
// Program main entry point
|
||||||
|
//------------------------------------------------------------------------------------
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
// Initialization
|
||||||
|
//--------------------------------------------------------------------------------------
|
||||||
|
const int screenWidth = 800;
|
||||||
|
const int screenHeight = 450;
|
||||||
|
|
||||||
|
InitWindow(screenWidth, screenHeight, "raylib [models] example - point rendering");
|
||||||
|
|
||||||
|
Camera camera = {
|
||||||
|
.position = { 3.0f, 3.0f, 3.0f },
|
||||||
|
.target = { 0.0f, 0.0f, 0.0f },
|
||||||
|
.up = { 0.0f, 1.0f, 0.0f },
|
||||||
|
.fovy = 45.0f,
|
||||||
|
.projection = CAMERA_PERSPECTIVE
|
||||||
|
};
|
||||||
|
|
||||||
|
Vector3 position = { 0.0f, 0.0f, 0.0f };
|
||||||
|
bool useDrawModelPoints = true;
|
||||||
|
bool numPointsChanged = false;
|
||||||
|
int numPoints = 1000;
|
||||||
|
|
||||||
|
Mesh mesh = GenMeshPoints(numPoints);
|
||||||
|
Model model = LoadModelFromMesh(mesh);
|
||||||
|
|
||||||
|
//SetTargetFPS(60);
|
||||||
|
//--------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// Main game loop
|
||||||
|
while(!WindowShouldClose())
|
||||||
|
{
|
||||||
|
// Update
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
UpdateCamera(&camera, CAMERA_ORBITAL);
|
||||||
|
|
||||||
|
if (IsKeyPressed(KEY_SPACE)) useDrawModelPoints = !useDrawModelPoints;
|
||||||
|
if (IsKeyPressed(KEY_UP))
|
||||||
|
{
|
||||||
|
numPoints = (numPoints*10 > MAX_POINTS)? MAX_POINTS : numPoints*10;
|
||||||
|
numPointsChanged = true;
|
||||||
|
}
|
||||||
|
if (IsKeyPressed(KEY_DOWN))
|
||||||
|
{
|
||||||
|
numPoints = (numPoints/10 < MIN_POINTS)? MIN_POINTS : numPoints/10;
|
||||||
|
numPointsChanged = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Upload a different point cloud size
|
||||||
|
if (numPointsChanged)
|
||||||
|
{
|
||||||
|
UnloadModel(model);
|
||||||
|
mesh = GenMeshPoints(numPoints);
|
||||||
|
model = LoadModelFromMesh(mesh);
|
||||||
|
numPointsChanged = false;
|
||||||
|
}
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// Draw
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
BeginDrawing();
|
||||||
|
ClearBackground(BLACK);
|
||||||
|
|
||||||
|
BeginMode3D(camera);
|
||||||
|
|
||||||
|
// The new method only uploads the points once to the GPU
|
||||||
|
if (useDrawModelPoints)
|
||||||
|
{
|
||||||
|
DrawModelPoints(model, position, 1.0f, WHITE);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// The old method must continually draw the "points" (lines)
|
||||||
|
for (int i = 0; i < numPoints; i++)
|
||||||
|
{
|
||||||
|
Vector3 pos = {
|
||||||
|
.x = mesh.vertices[i*3 + 0],
|
||||||
|
.y = mesh.vertices[i*3 + 1],
|
||||||
|
.z = mesh.vertices[i*3 + 2],
|
||||||
|
};
|
||||||
|
Color color = {
|
||||||
|
.r = mesh.colors[i*4 + 0],
|
||||||
|
.g = mesh.colors[i*4 + 1],
|
||||||
|
.b = mesh.colors[i*4 + 2],
|
||||||
|
.a = mesh.colors[i*4 + 3],
|
||||||
|
};
|
||||||
|
|
||||||
|
DrawPoint3D(pos, color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Draw a unit sphere for reference
|
||||||
|
DrawSphereWires(position, 1.0f, 10, 10, YELLOW);
|
||||||
|
|
||||||
|
EndMode3D();
|
||||||
|
|
||||||
|
// Draw UI text
|
||||||
|
DrawText(TextFormat("Point Count: %d", numPoints), 20, screenHeight - 50, 40, WHITE);
|
||||||
|
DrawText("Up - increase points", 20, 70, 20, WHITE);
|
||||||
|
DrawText("Down - decrease points", 20, 100, 20, WHITE);
|
||||||
|
DrawText("Space - drawing function", 20, 130, 20, WHITE);
|
||||||
|
|
||||||
|
if (useDrawModelPoints) DrawText("Using: DrawModelPoints()", 20, 160, 20, GREEN);
|
||||||
|
else DrawText("Using: DrawPoint3D()", 20, 160, 20, RED);
|
||||||
|
|
||||||
|
DrawFPS(10, 10);
|
||||||
|
|
||||||
|
EndDrawing();
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
}
|
||||||
|
|
||||||
|
// De-Initialization
|
||||||
|
//--------------------------------------------------------------------------------------
|
||||||
|
UnloadModel(model);
|
||||||
|
|
||||||
|
CloseWindow();
|
||||||
|
//--------------------------------------------------------------------------------------
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Generate a spherical point cloud
|
||||||
|
Mesh GenMeshPoints(int numPoints)
|
||||||
|
{
|
||||||
|
Mesh mesh = {
|
||||||
|
.triangleCount = 1,
|
||||||
|
.vertexCount = numPoints,
|
||||||
|
.vertices = (float *)MemAlloc(numPoints*3*sizeof(float)),
|
||||||
|
.colors = (unsigned char*)MemAlloc(numPoints*4*sizeof(unsigned char)),
|
||||||
|
};
|
||||||
|
|
||||||
|
// https://en.wikipedia.org/wiki/Spherical_coordinate_system
|
||||||
|
for (int i = 0; i < numPoints; i++)
|
||||||
|
{
|
||||||
|
float theta = PI*rand()/RAND_MAX;
|
||||||
|
float phi = 2.0f*PI*rand()/RAND_MAX;
|
||||||
|
float r = 10.0f*rand()/RAND_MAX;
|
||||||
|
|
||||||
|
mesh.vertices[i*3 + 0] = r*sin(theta)*cos(phi);
|
||||||
|
mesh.vertices[i*3 + 1] = r*sin(theta)*sin(phi);
|
||||||
|
mesh.vertices[i*3 + 2] = r*cos(theta);
|
||||||
|
|
||||||
|
Color color = ColorFromHSV(r*360.0f, 1.0f, 1.0f);
|
||||||
|
|
||||||
|
mesh.colors[i*4 + 0] = color.r;
|
||||||
|
mesh.colors[i*4 + 1] = color.g;
|
||||||
|
mesh.colors[i*4 + 2] = color.b;
|
||||||
|
mesh.colors[i*4 + 3] = color.a;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Upload mesh data from CPU (RAM) to GPU (VRAM) memory
|
||||||
|
UploadMesh(&mesh, false);
|
||||||
|
|
||||||
|
return mesh;
|
||||||
|
}
|
||||||
BIN
examples/models/models_point_rendering.png
Normal file
BIN
examples/models/models_point_rendering.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 127 KiB |
17
examples/models/resources/shaders/glsl100/skinning.fs
Normal file
17
examples/models/resources/shaders/glsl100/skinning.fs
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
#version 100
|
||||||
|
|
||||||
|
// Input vertex attributes (from vertex shader)
|
||||||
|
in vec2 fragTexCoord;
|
||||||
|
in vec4 fragColor;
|
||||||
|
|
||||||
|
// Output fragment color
|
||||||
|
out vec4 finalColor;
|
||||||
|
|
||||||
|
uniform sampler2D texture0;
|
||||||
|
uniform vec4 colDiffuse;
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
vec4 texelColor = texture(texture0, fragTexCoord);
|
||||||
|
finalColor = texelColor*colDiffuse*fragColor;
|
||||||
|
}
|
||||||
34
examples/models/resources/shaders/glsl100/skinning.vs
Normal file
34
examples/models/resources/shaders/glsl100/skinning.vs
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
#version 100
|
||||||
|
|
||||||
|
in vec3 vertexPosition;
|
||||||
|
in vec2 vertexTexCoord;
|
||||||
|
in vec4 vertexColor;
|
||||||
|
in vec4 vertexBoneIds;
|
||||||
|
in vec4 vertexBoneWeights;
|
||||||
|
|
||||||
|
#define MAX_BONE_NUM 128
|
||||||
|
uniform mat4 boneMatrices[MAX_BONE_NUM];
|
||||||
|
|
||||||
|
uniform mat4 mvp;
|
||||||
|
|
||||||
|
out vec2 fragTexCoord;
|
||||||
|
out vec4 fragColor;
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
int boneIndex0 = int(vertexBoneIds.x);
|
||||||
|
int boneIndex1 = int(vertexBoneIds.y);
|
||||||
|
int boneIndex2 = int(vertexBoneIds.z);
|
||||||
|
int boneIndex3 = int(vertexBoneIds.w);
|
||||||
|
|
||||||
|
vec4 skinnedPosition =
|
||||||
|
vertexBoneWeights.x * (boneMatrices[boneIndex0] * vec4(vertexPosition, 1.0f)) +
|
||||||
|
vertexBoneWeights.y * (boneMatrices[boneIndex1] * vec4(vertexPosition, 1.0f)) +
|
||||||
|
vertexBoneWeights.z * (boneMatrices[boneIndex2] * vec4(vertexPosition, 1.0f)) +
|
||||||
|
vertexBoneWeights.w * (boneMatrices[boneIndex3] * vec4(vertexPosition, 1.0f));
|
||||||
|
|
||||||
|
fragTexCoord = vertexTexCoord;
|
||||||
|
fragColor = vertexColor;
|
||||||
|
|
||||||
|
gl_Position = mvp * skinnedPosition;
|
||||||
|
}
|
||||||
17
examples/models/resources/shaders/glsl330/skinning.fs
Normal file
17
examples/models/resources/shaders/glsl330/skinning.fs
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
#version 330
|
||||||
|
|
||||||
|
// Input vertex attributes (from vertex shader)
|
||||||
|
in vec2 fragTexCoord;
|
||||||
|
in vec4 fragColor;
|
||||||
|
|
||||||
|
// Output fragment color
|
||||||
|
out vec4 finalColor;
|
||||||
|
|
||||||
|
uniform sampler2D texture0;
|
||||||
|
uniform vec4 colDiffuse;
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
vec4 texelColor = texture(texture0, fragTexCoord);
|
||||||
|
finalColor = texelColor*colDiffuse*fragColor;
|
||||||
|
}
|
||||||
34
examples/models/resources/shaders/glsl330/skinning.vs
Normal file
34
examples/models/resources/shaders/glsl330/skinning.vs
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
#version 330
|
||||||
|
|
||||||
|
in vec3 vertexPosition;
|
||||||
|
in vec2 vertexTexCoord;
|
||||||
|
in vec4 vertexColor;
|
||||||
|
in vec4 vertexBoneIds;
|
||||||
|
in vec4 vertexBoneWeights;
|
||||||
|
|
||||||
|
#define MAX_BONE_NUM 128
|
||||||
|
uniform mat4 boneMatrices[MAX_BONE_NUM];
|
||||||
|
|
||||||
|
uniform mat4 mvp;
|
||||||
|
|
||||||
|
out vec2 fragTexCoord;
|
||||||
|
out vec4 fragColor;
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
int boneIndex0 = int(vertexBoneIds.x);
|
||||||
|
int boneIndex1 = int(vertexBoneIds.y);
|
||||||
|
int boneIndex2 = int(vertexBoneIds.z);
|
||||||
|
int boneIndex3 = int(vertexBoneIds.w);
|
||||||
|
|
||||||
|
vec4 skinnedPosition =
|
||||||
|
vertexBoneWeights.x * (boneMatrices[boneIndex0] * vec4(vertexPosition, 1.0f)) +
|
||||||
|
vertexBoneWeights.y * (boneMatrices[boneIndex1] * vec4(vertexPosition, 1.0f)) +
|
||||||
|
vertexBoneWeights.z * (boneMatrices[boneIndex2] * vec4(vertexPosition, 1.0f)) +
|
||||||
|
vertexBoneWeights.w * (boneMatrices[boneIndex3] * vec4(vertexPosition, 1.0f));
|
||||||
|
|
||||||
|
fragTexCoord = vertexTexCoord;
|
||||||
|
fragColor = vertexColor;
|
||||||
|
|
||||||
|
gl_Position = mvp * skinnedPosition;
|
||||||
|
}
|
||||||
|
|
@ -41,7 +41,7 @@ OPTIONS:
|
||||||
-f, --format <type> : Define output format for parser data.
|
-f, --format <type> : Define output format for parser data.
|
||||||
Supported types: DEFAULT, JSON, XML, LUA
|
Supported types: DEFAULT, JSON, XML, LUA
|
||||||
|
|
||||||
-d, --define <DEF> : Define functions specifiers (i.e. RLAPI for raylib.h, RMDEF for raymath.h, etc.)
|
-d, --define <DEF> : Define functions specifiers (i.e. RLAPI for raylib.h, RMAPI for raymath.h, etc.)
|
||||||
NOTE: If no specifier defined, defaults to: RLAPI
|
NOTE: If no specifier defined, defaults to: RLAPI
|
||||||
|
|
||||||
-t, --truncate <after> : Define string to truncate input after (i.e. "RLGL IMPLEMENTATION" for rlgl.h)
|
-t, --truncate <after> : Define string to truncate input after (i.e. "RLGL IMPLEMENTATION" for rlgl.h)
|
||||||
|
|
@ -56,7 +56,7 @@ EXAMPLES:
|
||||||
> raylib_parser --output raylib_data.info --format XML
|
> raylib_parser --output raylib_data.info --format XML
|
||||||
Process <raylib.h> to generate <raylib_data.info> as XML text data
|
Process <raylib.h> to generate <raylib_data.info> as XML text data
|
||||||
|
|
||||||
> raylib_parser --input raymath.h --output raymath_data.info --format XML
|
> raylib_parser --input raymath.h --output raymath_data.info --format XML --define RMAPI
|
||||||
Process <raymath.h> to generate <raymath_data.info> as XML text data
|
Process <raymath.h> to generate <raymath_data.info> as XML text data
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -850,12 +850,22 @@
|
||||||
{
|
{
|
||||||
"type": "unsigned char *",
|
"type": "unsigned char *",
|
||||||
"name": "boneIds",
|
"name": "boneIds",
|
||||||
"description": "Vertex bone ids, max 255 bone ids, up to 4 bones influence by vertex (skinning)"
|
"description": "Vertex bone ids, max 255 bone ids, up to 4 bones influence by vertex (skinning) (shader-location = 6)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "float *",
|
"type": "float *",
|
||||||
"name": "boneWeights",
|
"name": "boneWeights",
|
||||||
"description": "Vertex bone weight, up to 4 bones influence by vertex (skinning)"
|
"description": "Vertex bone weight, up to 4 bones influence by vertex (skinning) (shader-location = 7)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Matrix *",
|
||||||
|
"name": "boneMatrices",
|
||||||
|
"description": "Bones animated transformation matrices"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "int",
|
||||||
|
"name": "boneCount",
|
||||||
|
"description": "Number of bones"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "unsigned int",
|
"type": "unsigned int",
|
||||||
|
|
@ -2518,6 +2528,21 @@
|
||||||
"name": "SHADER_LOC_MAP_BRDF",
|
"name": "SHADER_LOC_MAP_BRDF",
|
||||||
"value": 25,
|
"value": 25,
|
||||||
"description": "Shader location: sampler2d texture: brdf"
|
"description": "Shader location: sampler2d texture: brdf"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "SHADER_LOC_VERTEX_BONEIDS",
|
||||||
|
"value": 26,
|
||||||
|
"description": "Shader location: vertex attribute: boneIds"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "SHADER_LOC_VERTEX_BONEWEIGHTS",
|
||||||
|
"value": 27,
|
||||||
|
"description": "Shader location: vertex attribute: boneWeights"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "SHADER_LOC_BONE_MATRICES",
|
||||||
|
"value": 28,
|
||||||
|
"description": "Shader location: array of matrices uniform: boneMatrices"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
@ -3215,12 +3240,12 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ToggleFullscreen",
|
"name": "ToggleFullscreen",
|
||||||
"description": "Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP)",
|
"description": "Toggle window state: fullscreen/windowed [resizes monitor to match window resolution] (only PLATFORM_DESKTOP)",
|
||||||
"returnType": "void"
|
"returnType": "void"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ToggleBorderlessWindowed",
|
"name": "ToggleBorderlessWindowed",
|
||||||
"description": "Toggle window state: borderless windowed (only PLATFORM_DESKTOP)",
|
"description": "Toggle window state: borderless windowed [resizes window to match monitor resolution] (only PLATFORM_DESKTOP)",
|
||||||
"returnType": "void"
|
"returnType": "void"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -4477,6 +4502,17 @@
|
||||||
"description": "Get the directory of the running application (uses static string)",
|
"description": "Get the directory of the running application (uses static string)",
|
||||||
"returnType": "const char *"
|
"returnType": "const char *"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "MakeDirectory",
|
||||||
|
"description": "Create directories (including full path requested), returns 0 on success",
|
||||||
|
"returnType": "int",
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"type": "const char *",
|
||||||
|
"name": "dirPath"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "ChangeDirectory",
|
"name": "ChangeDirectory",
|
||||||
"description": "Change working directory, return true on success",
|
"description": "Change working directory, return true on success",
|
||||||
|
|
@ -4523,7 +4559,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "LoadDirectoryFilesEx",
|
"name": "LoadDirectoryFilesEx",
|
||||||
"description": "Load directory filepaths with extension filtering and recursive directory scan",
|
"description": "Load directory filepaths with extension filtering and recursive directory scan. Use 'DIR' in the filter string to include directories in the result",
|
||||||
"returnType": "FilePathList",
|
"returnType": "FilePathList",
|
||||||
"params": [
|
"params": [
|
||||||
{
|
{
|
||||||
|
|
@ -5238,7 +5274,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "DrawPixel",
|
"name": "DrawPixel",
|
||||||
"description": "Draw a pixel",
|
"description": "Draw a pixel using geometry [Can be slow, use with care]",
|
||||||
"returnType": "void",
|
"returnType": "void",
|
||||||
"params": [
|
"params": [
|
||||||
{
|
{
|
||||||
|
|
@ -5257,7 +5293,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "DrawPixelV",
|
"name": "DrawPixelV",
|
||||||
"description": "Draw a pixel (Vector version)",
|
"description": "Draw a pixel using geometry (Vector version) [Can be slow, use with care]",
|
||||||
"returnType": "void",
|
"returnType": "void",
|
||||||
"params": [
|
"params": [
|
||||||
{
|
{
|
||||||
|
|
@ -8780,6 +8816,25 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "ColorLerp",
|
||||||
|
"description": "Get color lerp interpolation between two colors, factor [0.0f..1.0f]",
|
||||||
|
"returnType": "Color",
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"type": "Color",
|
||||||
|
"name": "color1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Color",
|
||||||
|
"name": "color2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "float",
|
||||||
|
"name": "factor"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "GetColor",
|
"name": "GetColor",
|
||||||
"description": "Get Color structure from hexadecimal value",
|
"description": "Get Color structure from hexadecimal value",
|
||||||
|
|
@ -8862,7 +8917,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "LoadFontEx",
|
"name": "LoadFontEx",
|
||||||
"description": "Load font from file with extended parameters, use NULL for codepoints and 0 for codepointCount to load the default character setFont",
|
"description": "Load font from file with extended parameters, use NULL for codepoints and 0 for codepointCount to load the default character set, font size is provided in pixels height",
|
||||||
"returnType": "Font",
|
"returnType": "Font",
|
||||||
"params": [
|
"params": [
|
||||||
{
|
{
|
||||||
|
|
@ -10366,6 +10421,60 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "DrawModelPoints",
|
||||||
|
"description": "Draw a model as points",
|
||||||
|
"returnType": "void",
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"type": "Model",
|
||||||
|
"name": "model"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Vector3",
|
||||||
|
"name": "position"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "float",
|
||||||
|
"name": "scale"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Color",
|
||||||
|
"name": "tint"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "DrawModelPointsEx",
|
||||||
|
"description": "Draw a model as points with extended parameters",
|
||||||
|
"returnType": "void",
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"type": "Model",
|
||||||
|
"name": "model"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Vector3",
|
||||||
|
"name": "position"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Vector3",
|
||||||
|
"name": "rotationAxis"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "float",
|
||||||
|
"name": "rotationAngle"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Vector3",
|
||||||
|
"name": "scale"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Color",
|
||||||
|
"name": "tint"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "DrawBoundingBox",
|
"name": "DrawBoundingBox",
|
||||||
"description": "Draw bounding box (wires)",
|
"description": "Draw bounding box (wires)",
|
||||||
|
|
@ -10993,6 +11102,25 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "UpdateModelAnimationBoneMatrices",
|
||||||
|
"description": "Update model animation mesh bone matrices (Note GPU skinning does not work on Mac)",
|
||||||
|
"returnType": "void",
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"type": "Model",
|
||||||
|
"name": "model"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "ModelAnimation",
|
||||||
|
"name": "anim"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "int",
|
||||||
|
"name": "frame"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "CheckCollisionSpheres",
|
"name": "CheckCollisionSpheres",
|
||||||
"description": "Check collision between two spheres",
|
"description": "Check collision between two spheres",
|
||||||
|
|
|
||||||
|
|
@ -850,12 +850,22 @@ return {
|
||||||
{
|
{
|
||||||
type = "unsigned char *",
|
type = "unsigned char *",
|
||||||
name = "boneIds",
|
name = "boneIds",
|
||||||
description = "Vertex bone ids, max 255 bone ids, up to 4 bones influence by vertex (skinning)"
|
description = "Vertex bone ids, max 255 bone ids, up to 4 bones influence by vertex (skinning) (shader-location = 6)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type = "float *",
|
type = "float *",
|
||||||
name = "boneWeights",
|
name = "boneWeights",
|
||||||
description = "Vertex bone weight, up to 4 bones influence by vertex (skinning)"
|
description = "Vertex bone weight, up to 4 bones influence by vertex (skinning) (shader-location = 7)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "Matrix *",
|
||||||
|
name = "boneMatrices",
|
||||||
|
description = "Bones animated transformation matrices"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "int",
|
||||||
|
name = "boneCount",
|
||||||
|
description = "Number of bones"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type = "unsigned int",
|
type = "unsigned int",
|
||||||
|
|
@ -2518,6 +2528,21 @@ return {
|
||||||
name = "SHADER_LOC_MAP_BRDF",
|
name = "SHADER_LOC_MAP_BRDF",
|
||||||
value = 25,
|
value = 25,
|
||||||
description = "Shader location: sampler2d texture: brdf"
|
description = "Shader location: sampler2d texture: brdf"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name = "SHADER_LOC_VERTEX_BONEIDS",
|
||||||
|
value = 26,
|
||||||
|
description = "Shader location: vertex attribute: boneIds"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name = "SHADER_LOC_VERTEX_BONEWEIGHTS",
|
||||||
|
value = 27,
|
||||||
|
description = "Shader location: vertex attribute: boneWeights"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name = "SHADER_LOC_BONE_MATRICES",
|
||||||
|
value = 28,
|
||||||
|
description = "Shader location: array of matrices uniform: boneMatrices"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -3158,12 +3183,12 @@ return {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name = "ToggleFullscreen",
|
name = "ToggleFullscreen",
|
||||||
description = "Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP)",
|
description = "Toggle window state: fullscreen/windowed [resizes monitor to match window resolution] (only PLATFORM_DESKTOP)",
|
||||||
returnType = "void"
|
returnType = "void"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name = "ToggleBorderlessWindowed",
|
name = "ToggleBorderlessWindowed",
|
||||||
description = "Toggle window state: borderless windowed (only PLATFORM_DESKTOP)",
|
description = "Toggle window state: borderless windowed [resizes window to match monitor resolution] (only PLATFORM_DESKTOP)",
|
||||||
returnType = "void"
|
returnType = "void"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -4042,6 +4067,14 @@ return {
|
||||||
description = "Get the directory of the running application (uses static string)",
|
description = "Get the directory of the running application (uses static string)",
|
||||||
returnType = "const char *"
|
returnType = "const char *"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name = "MakeDirectory",
|
||||||
|
description = "Create directories (including full path requested), returns 0 on success",
|
||||||
|
returnType = "int",
|
||||||
|
params = {
|
||||||
|
{type = "const char *", name = "dirPath"}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name = "ChangeDirectory",
|
name = "ChangeDirectory",
|
||||||
description = "Change working directory, return true on success",
|
description = "Change working directory, return true on success",
|
||||||
|
|
@ -4076,7 +4109,7 @@ return {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name = "LoadDirectoryFilesEx",
|
name = "LoadDirectoryFilesEx",
|
||||||
description = "Load directory filepaths with extension filtering and recursive directory scan",
|
description = "Load directory filepaths with extension filtering and recursive directory scan. Use 'DIR' in the filter string to include directories in the result",
|
||||||
returnType = "FilePathList",
|
returnType = "FilePathList",
|
||||||
params = {
|
params = {
|
||||||
{type = "const char *", name = "basePath"},
|
{type = "const char *", name = "basePath"},
|
||||||
|
|
@ -4581,7 +4614,7 @@ return {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name = "DrawPixel",
|
name = "DrawPixel",
|
||||||
description = "Draw a pixel",
|
description = "Draw a pixel using geometry [Can be slow, use with care]",
|
||||||
returnType = "void",
|
returnType = "void",
|
||||||
params = {
|
params = {
|
||||||
{type = "int", name = "posX"},
|
{type = "int", name = "posX"},
|
||||||
|
|
@ -4591,7 +4624,7 @@ return {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name = "DrawPixelV",
|
name = "DrawPixelV",
|
||||||
description = "Draw a pixel (Vector version)",
|
description = "Draw a pixel using geometry (Vector version) [Can be slow, use with care]",
|
||||||
returnType = "void",
|
returnType = "void",
|
||||||
params = {
|
params = {
|
||||||
{type = "Vector2", name = "position"},
|
{type = "Vector2", name = "position"},
|
||||||
|
|
@ -6377,6 +6410,16 @@ return {
|
||||||
{type = "Color", name = "tint"}
|
{type = "Color", name = "tint"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name = "ColorLerp",
|
||||||
|
description = "Get color lerp interpolation between two colors, factor [0.0f..1.0f]",
|
||||||
|
returnType = "Color",
|
||||||
|
params = {
|
||||||
|
{type = "Color", name = "color1"},
|
||||||
|
{type = "Color", name = "color2"},
|
||||||
|
{type = "float", name = "factor"}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name = "GetColor",
|
name = "GetColor",
|
||||||
description = "Get Color structure from hexadecimal value",
|
description = "Get Color structure from hexadecimal value",
|
||||||
|
|
@ -6429,7 +6472,7 @@ return {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name = "LoadFontEx",
|
name = "LoadFontEx",
|
||||||
description = "Load font from file with extended parameters, use NULL for codepoints and 0 for codepointCount to load the default character setFont",
|
description = "Load font from file with extended parameters, use NULL for codepoints and 0 for codepointCount to load the default character set, font size is provided in pixels height",
|
||||||
returnType = "Font",
|
returnType = "Font",
|
||||||
params = {
|
params = {
|
||||||
{type = "const char *", name = "fileName"},
|
{type = "const char *", name = "fileName"},
|
||||||
|
|
@ -7213,6 +7256,30 @@ return {
|
||||||
{type = "Color", name = "tint"}
|
{type = "Color", name = "tint"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name = "DrawModelPoints",
|
||||||
|
description = "Draw a model as points",
|
||||||
|
returnType = "void",
|
||||||
|
params = {
|
||||||
|
{type = "Model", name = "model"},
|
||||||
|
{type = "Vector3", name = "position"},
|
||||||
|
{type = "float", name = "scale"},
|
||||||
|
{type = "Color", name = "tint"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name = "DrawModelPointsEx",
|
||||||
|
description = "Draw a model as points with extended parameters",
|
||||||
|
returnType = "void",
|
||||||
|
params = {
|
||||||
|
{type = "Model", name = "model"},
|
||||||
|
{type = "Vector3", name = "position"},
|
||||||
|
{type = "Vector3", name = "rotationAxis"},
|
||||||
|
{type = "float", name = "rotationAngle"},
|
||||||
|
{type = "Vector3", name = "scale"},
|
||||||
|
{type = "Color", name = "tint"}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name = "DrawBoundingBox",
|
name = "DrawBoundingBox",
|
||||||
description = "Draw bounding box (wires)",
|
description = "Draw bounding box (wires)",
|
||||||
|
|
@ -7552,6 +7619,16 @@ return {
|
||||||
{type = "ModelAnimation", name = "anim"}
|
{type = "ModelAnimation", name = "anim"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name = "UpdateModelAnimationBoneMatrices",
|
||||||
|
description = "Update model animation mesh bone matrices (Note GPU skinning does not work on Mac)",
|
||||||
|
returnType = "void",
|
||||||
|
params = {
|
||||||
|
{type = "Model", name = "model"},
|
||||||
|
{type = "ModelAnimation", name = "anim"},
|
||||||
|
{type = "int", name = "frame"}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name = "CheckCollisionSpheres",
|
name = "CheckCollisionSpheres",
|
||||||
description = "Check collision between two spheres",
|
description = "Check collision between two spheres",
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -160,7 +160,7 @@
|
||||||
<Field type="float" name="rotation" desc="Camera rotation in degrees" />
|
<Field type="float" name="rotation" desc="Camera rotation in degrees" />
|
||||||
<Field type="float" name="zoom" desc="Camera zoom (scaling), should be 1.0f by default" />
|
<Field type="float" name="zoom" desc="Camera zoom (scaling), should be 1.0f by default" />
|
||||||
</Struct>
|
</Struct>
|
||||||
<Struct name="Mesh" fieldCount="15" desc="Mesh, vertex data and vao/vbo">
|
<Struct name="Mesh" fieldCount="17" desc="Mesh, vertex data and vao/vbo">
|
||||||
<Field type="int" name="vertexCount" desc="Number of vertices stored in arrays" />
|
<Field type="int" name="vertexCount" desc="Number of vertices stored in arrays" />
|
||||||
<Field type="int" name="triangleCount" desc="Number of triangles stored (indexed or not)" />
|
<Field type="int" name="triangleCount" desc="Number of triangles stored (indexed or not)" />
|
||||||
<Field type="float *" name="vertices" desc="Vertex position (XYZ - 3 components per vertex) (shader-location = 0)" />
|
<Field type="float *" name="vertices" desc="Vertex position (XYZ - 3 components per vertex) (shader-location = 0)" />
|
||||||
|
|
@ -172,8 +172,10 @@
|
||||||
<Field type="unsigned short *" name="indices" desc="Vertex indices (in case vertex data comes indexed)" />
|
<Field type="unsigned short *" name="indices" desc="Vertex indices (in case vertex data comes indexed)" />
|
||||||
<Field type="float *" name="animVertices" desc="Animated vertex positions (after bones transformations)" />
|
<Field type="float *" name="animVertices" desc="Animated vertex positions (after bones transformations)" />
|
||||||
<Field type="float *" name="animNormals" desc="Animated normals (after bones transformations)" />
|
<Field type="float *" name="animNormals" desc="Animated normals (after bones transformations)" />
|
||||||
<Field type="unsigned char *" name="boneIds" desc="Vertex bone ids, max 255 bone ids, up to 4 bones influence by vertex (skinning)" />
|
<Field type="unsigned char *" name="boneIds" desc="Vertex bone ids, max 255 bone ids, up to 4 bones influence by vertex (skinning) (shader-location = 6)" />
|
||||||
<Field type="float *" name="boneWeights" desc="Vertex bone weight, up to 4 bones influence by vertex (skinning)" />
|
<Field type="float *" name="boneWeights" desc="Vertex bone weight, up to 4 bones influence by vertex (skinning) (shader-location = 7)" />
|
||||||
|
<Field type="Matrix *" name="boneMatrices" desc="Bones animated transformation matrices" />
|
||||||
|
<Field type="int" name="boneCount" desc="Number of bones" />
|
||||||
<Field type="unsigned int" name="vaoId" desc="OpenGL Vertex Array Object id" />
|
<Field type="unsigned int" name="vaoId" desc="OpenGL Vertex Array Object id" />
|
||||||
<Field type="unsigned int *" name="vboId" desc="OpenGL Vertex Buffer Objects id (default vertex data)" />
|
<Field type="unsigned int *" name="vboId" desc="OpenGL Vertex Buffer Objects id (default vertex data)" />
|
||||||
</Struct>
|
</Struct>
|
||||||
|
|
@ -505,7 +507,7 @@
|
||||||
<Value name="MATERIAL_MAP_PREFILTER" integer="9" desc="Prefilter material (NOTE: Uses GL_TEXTURE_CUBE_MAP)" />
|
<Value name="MATERIAL_MAP_PREFILTER" integer="9" desc="Prefilter material (NOTE: Uses GL_TEXTURE_CUBE_MAP)" />
|
||||||
<Value name="MATERIAL_MAP_BRDF" integer="10" desc="Brdf material" />
|
<Value name="MATERIAL_MAP_BRDF" integer="10" desc="Brdf material" />
|
||||||
</Enum>
|
</Enum>
|
||||||
<Enum name="ShaderLocationIndex" valueCount="26" desc="Shader location index">
|
<Enum name="ShaderLocationIndex" valueCount="29" desc="Shader location index">
|
||||||
<Value name="SHADER_LOC_VERTEX_POSITION" integer="0" desc="Shader location: vertex attribute: position" />
|
<Value name="SHADER_LOC_VERTEX_POSITION" integer="0" desc="Shader location: vertex attribute: position" />
|
||||||
<Value name="SHADER_LOC_VERTEX_TEXCOORD01" integer="1" desc="Shader location: vertex attribute: texcoord01" />
|
<Value name="SHADER_LOC_VERTEX_TEXCOORD01" integer="1" desc="Shader location: vertex attribute: texcoord01" />
|
||||||
<Value name="SHADER_LOC_VERTEX_TEXCOORD02" integer="2" desc="Shader location: vertex attribute: texcoord02" />
|
<Value name="SHADER_LOC_VERTEX_TEXCOORD02" integer="2" desc="Shader location: vertex attribute: texcoord02" />
|
||||||
|
|
@ -532,6 +534,9 @@
|
||||||
<Value name="SHADER_LOC_MAP_IRRADIANCE" integer="23" desc="Shader location: samplerCube texture: irradiance" />
|
<Value name="SHADER_LOC_MAP_IRRADIANCE" integer="23" desc="Shader location: samplerCube texture: irradiance" />
|
||||||
<Value name="SHADER_LOC_MAP_PREFILTER" integer="24" desc="Shader location: samplerCube texture: prefilter" />
|
<Value name="SHADER_LOC_MAP_PREFILTER" integer="24" desc="Shader location: samplerCube texture: prefilter" />
|
||||||
<Value name="SHADER_LOC_MAP_BRDF" integer="25" desc="Shader location: sampler2d texture: brdf" />
|
<Value name="SHADER_LOC_MAP_BRDF" integer="25" desc="Shader location: sampler2d texture: brdf" />
|
||||||
|
<Value name="SHADER_LOC_VERTEX_BONEIDS" integer="26" desc="Shader location: vertex attribute: boneIds" />
|
||||||
|
<Value name="SHADER_LOC_VERTEX_BONEWEIGHTS" integer="27" desc="Shader location: vertex attribute: boneWeights" />
|
||||||
|
<Value name="SHADER_LOC_BONE_MATRICES" integer="28" desc="Shader location: array of matrices uniform: boneMatrices" />
|
||||||
</Enum>
|
</Enum>
|
||||||
<Enum name="ShaderUniformDataType" valueCount="9" desc="Shader uniform data type">
|
<Enum name="ShaderUniformDataType" valueCount="9" desc="Shader uniform data type">
|
||||||
<Value name="SHADER_UNIFORM_FLOAT" integer="0" desc="Shader uniform type: float" />
|
<Value name="SHADER_UNIFORM_FLOAT" integer="0" desc="Shader uniform type: float" />
|
||||||
|
|
@ -670,7 +675,7 @@
|
||||||
<Param type="unsigned int" name="frames" desc="" />
|
<Param type="unsigned int" name="frames" desc="" />
|
||||||
</Callback>
|
</Callback>
|
||||||
</Callbacks>
|
</Callbacks>
|
||||||
<Functions count="573">
|
<Functions count="578">
|
||||||
<Function name="InitWindow" retType="void" paramCount="3" desc="Initialize window and OpenGL context">
|
<Function name="InitWindow" retType="void" paramCount="3" desc="Initialize window and OpenGL context">
|
||||||
<Param type="int" name="width" desc="" />
|
<Param type="int" name="width" desc="" />
|
||||||
<Param type="int" name="height" desc="" />
|
<Param type="int" name="height" desc="" />
|
||||||
|
|
@ -703,9 +708,9 @@
|
||||||
<Function name="ClearWindowState" retType="void" paramCount="1" desc="Clear window configuration state flags">
|
<Function name="ClearWindowState" retType="void" paramCount="1" desc="Clear window configuration state flags">
|
||||||
<Param type="unsigned int" name="flags" desc="" />
|
<Param type="unsigned int" name="flags" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
<Function name="ToggleFullscreen" retType="void" paramCount="0" desc="Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP)">
|
<Function name="ToggleFullscreen" retType="void" paramCount="0" desc="Toggle window state: fullscreen/windowed [resizes monitor to match window resolution] (only PLATFORM_DESKTOP)">
|
||||||
</Function>
|
</Function>
|
||||||
<Function name="ToggleBorderlessWindowed" retType="void" paramCount="0" desc="Toggle window state: borderless windowed (only PLATFORM_DESKTOP)">
|
<Function name="ToggleBorderlessWindowed" retType="void" paramCount="0" desc="Toggle window state: borderless windowed [resizes window to match monitor resolution] (only PLATFORM_DESKTOP)">
|
||||||
</Function>
|
</Function>
|
||||||
<Function name="MaximizeWindow" retType="void" paramCount="0" desc="Set window state: maximized, if resizable (only PLATFORM_DESKTOP)">
|
<Function name="MaximizeWindow" retType="void" paramCount="0" desc="Set window state: maximized, if resizable (only PLATFORM_DESKTOP)">
|
||||||
</Function>
|
</Function>
|
||||||
|
|
@ -1069,6 +1074,9 @@
|
||||||
</Function>
|
</Function>
|
||||||
<Function name="GetApplicationDirectory" retType="const char *" paramCount="0" desc="Get the directory of the running application (uses static string)">
|
<Function name="GetApplicationDirectory" retType="const char *" paramCount="0" desc="Get the directory of the running application (uses static string)">
|
||||||
</Function>
|
</Function>
|
||||||
|
<Function name="MakeDirectory" retType="int" paramCount="1" desc="Create directories (including full path requested), returns 0 on success">
|
||||||
|
<Param type="const char *" name="dirPath" desc="" />
|
||||||
|
</Function>
|
||||||
<Function name="ChangeDirectory" retType="bool" paramCount="1" desc="Change working directory, return true on success">
|
<Function name="ChangeDirectory" retType="bool" paramCount="1" desc="Change working directory, return true on success">
|
||||||
<Param type="const char *" name="dir" desc="" />
|
<Param type="const char *" name="dir" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
|
|
@ -1081,7 +1089,7 @@
|
||||||
<Function name="LoadDirectoryFiles" retType="FilePathList" paramCount="1" desc="Load directory filepaths">
|
<Function name="LoadDirectoryFiles" retType="FilePathList" paramCount="1" desc="Load directory filepaths">
|
||||||
<Param type="const char *" name="dirPath" desc="" />
|
<Param type="const char *" name="dirPath" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
<Function name="LoadDirectoryFilesEx" retType="FilePathList" paramCount="3" desc="Load directory filepaths with extension filtering and recursive directory scan">
|
<Function name="LoadDirectoryFilesEx" retType="FilePathList" paramCount="3" desc="Load directory filepaths with extension filtering and recursive directory scan. Use 'DIR' in the filter string to include directories in the result">
|
||||||
<Param type="const char *" name="basePath" desc="" />
|
<Param type="const char *" name="basePath" desc="" />
|
||||||
<Param type="const char *" name="filter" desc="" />
|
<Param type="const char *" name="filter" desc="" />
|
||||||
<Param type="bool" name="scanSubdirs" desc="" />
|
<Param type="bool" name="scanSubdirs" desc="" />
|
||||||
|
|
@ -1289,12 +1297,12 @@
|
||||||
</Function>
|
</Function>
|
||||||
<Function name="GetShapesTextureRectangle" retType="Rectangle" paramCount="0" desc="Get texture source rectangle that is used for shapes drawing">
|
<Function name="GetShapesTextureRectangle" retType="Rectangle" paramCount="0" desc="Get texture source rectangle that is used for shapes drawing">
|
||||||
</Function>
|
</Function>
|
||||||
<Function name="DrawPixel" retType="void" paramCount="3" desc="Draw a pixel">
|
<Function name="DrawPixel" retType="void" paramCount="3" desc="Draw a pixel using geometry [Can be slow, use with care]">
|
||||||
<Param type="int" name="posX" desc="" />
|
<Param type="int" name="posX" desc="" />
|
||||||
<Param type="int" name="posY" desc="" />
|
<Param type="int" name="posY" desc="" />
|
||||||
<Param type="Color" name="color" desc="" />
|
<Param type="Color" name="color" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
<Function name="DrawPixelV" retType="void" paramCount="2" desc="Draw a pixel (Vector version)">
|
<Function name="DrawPixelV" retType="void" paramCount="2" desc="Draw a pixel using geometry (Vector version) [Can be slow, use with care]">
|
||||||
<Param type="Vector2" name="position" desc="" />
|
<Param type="Vector2" name="position" desc="" />
|
||||||
<Param type="Color" name="color" desc="" />
|
<Param type="Color" name="color" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
|
|
@ -2219,6 +2227,11 @@
|
||||||
<Param type="Color" name="src" desc="" />
|
<Param type="Color" name="src" desc="" />
|
||||||
<Param type="Color" name="tint" desc="" />
|
<Param type="Color" name="tint" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
|
<Function name="ColorLerp" retType="Color" paramCount="3" desc="Get color lerp interpolation between two colors, factor [0.0f..1.0f]">
|
||||||
|
<Param type="Color" name="color1" desc="" />
|
||||||
|
<Param type="Color" name="color2" desc="" />
|
||||||
|
<Param type="float" name="factor" desc="" />
|
||||||
|
</Function>
|
||||||
<Function name="GetColor" retType="Color" paramCount="1" desc="Get Color structure from hexadecimal value">
|
<Function name="GetColor" retType="Color" paramCount="1" desc="Get Color structure from hexadecimal value">
|
||||||
<Param type="unsigned int" name="hexValue" desc="" />
|
<Param type="unsigned int" name="hexValue" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
|
|
@ -2241,7 +2254,7 @@
|
||||||
<Function name="LoadFont" retType="Font" paramCount="1" desc="Load font from file into GPU memory (VRAM)">
|
<Function name="LoadFont" retType="Font" paramCount="1" desc="Load font from file into GPU memory (VRAM)">
|
||||||
<Param type="const char *" name="fileName" desc="" />
|
<Param type="const char *" name="fileName" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
<Function name="LoadFontEx" retType="Font" paramCount="4" desc="Load font from file with extended parameters, use NULL for codepoints and 0 for codepointCount to load the default character setFont">
|
<Function name="LoadFontEx" retType="Font" paramCount="4" desc="Load font from file with extended parameters, use NULL for codepoints and 0 for codepointCount to load the default character set, font size is provided in pixels height">
|
||||||
<Param type="const char *" name="fileName" desc="" />
|
<Param type="const char *" name="fileName" desc="" />
|
||||||
<Param type="int" name="fontSize" desc="" />
|
<Param type="int" name="fontSize" desc="" />
|
||||||
<Param type="int *" name="codepoints" desc="" />
|
<Param type="int *" name="codepoints" desc="" />
|
||||||
|
|
@ -2637,6 +2650,20 @@
|
||||||
<Param type="Vector3" name="scale" desc="" />
|
<Param type="Vector3" name="scale" desc="" />
|
||||||
<Param type="Color" name="tint" desc="" />
|
<Param type="Color" name="tint" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
|
<Function name="DrawModelPoints" retType="void" paramCount="4" desc="Draw a model as points">
|
||||||
|
<Param type="Model" name="model" desc="" />
|
||||||
|
<Param type="Vector3" name="position" desc="" />
|
||||||
|
<Param type="float" name="scale" desc="" />
|
||||||
|
<Param type="Color" name="tint" desc="" />
|
||||||
|
</Function>
|
||||||
|
<Function name="DrawModelPointsEx" retType="void" paramCount="6" desc="Draw a model as points with extended parameters">
|
||||||
|
<Param type="Model" name="model" desc="" />
|
||||||
|
<Param type="Vector3" name="position" desc="" />
|
||||||
|
<Param type="Vector3" name="rotationAxis" desc="" />
|
||||||
|
<Param type="float" name="rotationAngle" desc="" />
|
||||||
|
<Param type="Vector3" name="scale" desc="" />
|
||||||
|
<Param type="Color" name="tint" desc="" />
|
||||||
|
</Function>
|
||||||
<Function name="DrawBoundingBox" retType="void" paramCount="2" desc="Draw bounding box (wires)">
|
<Function name="DrawBoundingBox" retType="void" paramCount="2" desc="Draw bounding box (wires)">
|
||||||
<Param type="BoundingBox" name="box" desc="" />
|
<Param type="BoundingBox" name="box" desc="" />
|
||||||
<Param type="Color" name="color" desc="" />
|
<Param type="Color" name="color" desc="" />
|
||||||
|
|
@ -2803,6 +2830,11 @@
|
||||||
<Param type="Model" name="model" desc="" />
|
<Param type="Model" name="model" desc="" />
|
||||||
<Param type="ModelAnimation" name="anim" desc="" />
|
<Param type="ModelAnimation" name="anim" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
|
<Function name="UpdateModelAnimationBoneMatrices" retType="void" paramCount="3" desc="Update model animation mesh bone matrices (Note GPU skinning does not work on Mac)">
|
||||||
|
<Param type="Model" name="model" desc="" />
|
||||||
|
<Param type="ModelAnimation" name="anim" desc="" />
|
||||||
|
<Param type="int" name="frame" desc="" />
|
||||||
|
</Function>
|
||||||
<Function name="CheckCollisionSpheres" retType="bool" paramCount="4" desc="Check collision between two spheres">
|
<Function name="CheckCollisionSpheres" retType="bool" paramCount="4" desc="Check collision between two spheres">
|
||||||
<Param type="Vector3" name="center1" desc="" />
|
<Param type="Vector3" name="center1" desc="" />
|
||||||
<Param type="float" name="radius1" desc="" />
|
<Param type="float" name="radius1" desc="" />
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@
|
||||||
#define MAX_CALLBACKS_TO_PARSE 64 // Maximum number of callbacks to parse
|
#define MAX_CALLBACKS_TO_PARSE 64 // Maximum number of callbacks to parse
|
||||||
#define MAX_FUNCS_TO_PARSE 1024 // Maximum number of functions to parse
|
#define MAX_FUNCS_TO_PARSE 1024 // Maximum number of functions to parse
|
||||||
|
|
||||||
#define MAX_LINE_LENGTH 512 // Maximum length of one line (including comments)
|
#define MAX_LINE_LENGTH 1024 // Maximum length of one line (including comments)
|
||||||
|
|
||||||
#define MAX_STRUCT_FIELDS 64 // Maximum number of struct fields
|
#define MAX_STRUCT_FIELDS 64 // Maximum number of struct fields
|
||||||
#define MAX_ENUM_VALUES 512 // Maximum number of enum values
|
#define MAX_ENUM_VALUES 512 // Maximum number of enum values
|
||||||
|
|
@ -139,7 +139,7 @@ typedef struct EnumInfo {
|
||||||
// Function info data
|
// Function info data
|
||||||
typedef struct FunctionInfo {
|
typedef struct FunctionInfo {
|
||||||
char name[64]; // Function name
|
char name[64]; // Function name
|
||||||
char desc[128]; // Function description (comment at the end)
|
char desc[512]; // Function description (comment at the end)
|
||||||
char retType[32]; // Return value type
|
char retType[32]; // Return value type
|
||||||
int paramCount; // Number of function parameters
|
int paramCount; // Number of function parameters
|
||||||
char paramType[MAX_FUNCTION_PARAMETERS][32]; // Parameters type
|
char paramType[MAX_FUNCTION_PARAMETERS][32]; // Parameters type
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue