Merge branch 'master' into event-recording-enhancements
This commit is contained in:
commit
f6b7dbc5df
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@v11
|
uses: mymindstorm/setup-emsdk@v11
|
||||||
with:
|
with:
|
||||||
version: 3.0.0
|
version: 3.1.30
|
||||||
actions-cache-folder: 'emsdk-cache'
|
actions-cache-folder: 'emsdk-cache'
|
||||||
|
|
||||||
- name: Setup Release Version
|
- name: Setup Release Version
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ Some people ported raylib to other languages in form of bindings or wrappers to
|
||||||
| raylib-go | **4.2** | [Go](https://golang.org/) | Zlib | https://github.com/gen2brain/raylib-go |
|
| raylib-go | **4.2** | [Go](https://golang.org/) | Zlib | https://github.com/gen2brain/raylib-go |
|
||||||
| raylib-guile | auto | [Guile](https://www.gnu.org/software/guile/) | Zlib | https://github.com/petelliott/raylib-guile |
|
| raylib-guile | auto | [Guile](https://www.gnu.org/software/guile/) | Zlib | https://github.com/petelliott/raylib-guile |
|
||||||
| gforth-raylib | 3.5 | [Gforth](https://gforth.org/) | MIT | https://github.com/ArnautDaniel/gforth-raylib |
|
| gforth-raylib | 3.5 | [Gforth](https://gforth.org/) | MIT | https://github.com/ArnautDaniel/gforth-raylib |
|
||||||
| h-raylib | 4.5-dev | [Haskell](https://haskell.org/) | Apache-2.0 | https://github.com/Anut-py/h-raylib |
|
| h-raylib | **4.5** | [Haskell](https://haskell.org/) | Apache-2.0 | https://github.com/Anut-py/h-raylib |
|
||||||
| raylib-hx | **4.2** | [Haxe](https://haxe.org/) | Zlib | https://github.com/foreignsasquatch/raylib-hx |
|
| raylib-hx | **4.2** | [Haxe](https://haxe.org/) | Zlib | https://github.com/foreignsasquatch/raylib-hx |
|
||||||
| hb-raylib | 3.5 | [Harbour](https://harbour.github.io) | MIT | https://github.com/MarcosLeonardoMendezGerencir/hb-raylib |
|
| hb-raylib | 3.5 | [Harbour](https://harbour.github.io) | MIT | https://github.com/MarcosLeonardoMendezGerencir/hb-raylib |
|
||||||
| jaylib | **4.2** | [Java](https://en.wikipedia.org/wiki/Java_(programming_language)) | GPLv3+CE | https://github.com/electronstudio/jaylib/ |
|
| jaylib | **4.2** | [Java](https://en.wikipedia.org/wiki/Java_(programming_language)) | GPLv3+CE | https://github.com/electronstudio/jaylib/ |
|
||||||
|
|
@ -68,9 +68,10 @@ Some people ported raylib to other languages in form of bindings or wrappers to
|
||||||
| raylib-vapi | **4.2** | [Vala](https://vala.dev/) | Zlib | https://github.com/lxmcf/raylib-vapi |
|
| raylib-vapi | **4.2** | [Vala](https://vala.dev/) | Zlib | https://github.com/lxmcf/raylib-vapi |
|
||||||
| raylib-wren | **4.0** | [Wren](http://wren.io/) | ISC | https://github.com/TSnake41/raylib-wren |
|
| raylib-wren | **4.0** | [Wren](http://wren.io/) | ISC | https://github.com/TSnake41/raylib-wren |
|
||||||
| raylib-zig | **4.2** | [Zig](https://ziglang.org/) | MIT | https://github.com/Not-Nik/raylib-zig |
|
| raylib-zig | **4.2** | [Zig](https://ziglang.org/) | MIT | https://github.com/Not-Nik/raylib-zig |
|
||||||
| raylib.zig | **4.2** | [Zig](https://ziglang.org/) | MIT | https://github.com/ryupold/raylib.zig |
|
| raylib.zig | **4.5** | [Zig](https://ziglang.org/) | MIT | https://github.com/ryupold/raylib.zig |
|
||||||
| hare-raylib | auto | [Hare](https://harelang.org/) | Zlib | https://git.sr.ht/~evantj/hare-raylib |
|
| hare-raylib | auto | [Hare](https://harelang.org/) | Zlib | https://git.sr.ht/~evantj/hare-raylib |
|
||||||
|
| raylib-sunder | auto | [Sunder](https://github.com/ashn-dot-dev/sunder) | 0BSD | https://github.com/ashn-dot-dev/raylib-sunder |
|
||||||
|
| rayed-bqn | auto | [BQN](https://mlochbaum.github.io/BQN/) | MIT | https://github.com/Brian-ED/rayed-bqn |
|
||||||
|
|
||||||
|
|
||||||
### Utility Wrapers
|
### Utility Wrapers
|
||||||
|
|
|
||||||
50
CHANGELOG
50
CHANGELOG
|
|
@ -1,25 +1,26 @@
|
||||||
changelog
|
changelog
|
||||||
---------
|
---------
|
||||||
|
|
||||||
Current Release: raylib 4.2.0 (11 August 2022)
|
Current Release: raylib 4.5.0 (18 March 2023)
|
||||||
|
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
Release: raylib 4.5 (xx February 2023) -WIP-
|
Release: raylib 4.5 (18 March 2023)
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
KEY CHANGES:
|
KEY CHANGES:
|
||||||
- ADDED: M3D model format support with animations
|
- ADDED: Improved ANGLE support on Desktop platforms
|
||||||
- ADDED: GLTF animation support
|
- ADDED: rcamera module, simpler and more extendable
|
||||||
- ADDED: QOA audio format support (import/export) -WIP-
|
- ADDED: Support for M3D models and M3D/GLTF animations
|
||||||
- rlgl redesign to avoid render batch triangles limits pre-check: rlCheckRenderBatchLimit()
|
- ADDED: Support QOA audio format (import/export)
|
||||||
- rshapes simplification to minimize the requirement of rlgl functionality, now it only depends on 6 functions
|
- ADDED: rl_gputex module for compressed textures loading
|
||||||
- rl_gputex.h: Compressed textures loading, required by rtextures module, has been moved to a separate self-contained library
|
- REDESIGNED: rlgl module for automatic render-batch limits checking
|
||||||
- raygui 3.5: New version of the immediate-mode gui system for tools development with raylib
|
- REDESIGNED: rshapes module to minimize the rlgl dependency
|
||||||
|
|
||||||
Detailed changes:
|
Detailed changes:
|
||||||
[core] ADDED: RAYLIB_VERSION_* values to raylib.h (#2856) by @RobLoach
|
[core] ADDED: RAYLIB_VERSION_* values to raylib.h (#2856) by @RobLoach
|
||||||
[core] ADDED: Basic gamepad support for Android (#2709) by @deniska
|
[core] ADDED: Basic gamepad support for Android (#2709) by @deniska
|
||||||
[core] ADDED: Support CAPS/NUM lock keys registering if locked
|
[core] ADDED: Support CAPS/NUM lock keys registering if locked
|
||||||
[core] ADDED: _GNU_SOURCE define on Linux (#2729)
|
[core] ADDED: _GNU_SOURCE define on Linux (#2729)
|
||||||
|
[core] ADDED: SetWindowIcons() to set multiple icon image sizes
|
||||||
[core] `WARNING`: RENAMED: Exported raylib version symbol to raylib_version #2671
|
[core] `WARNING`: RENAMED: Exported raylib version symbol to raylib_version #2671
|
||||||
[core] REMOVED: Touch points on touch up events on Android (#2711) by @deniska
|
[core] REMOVED: Touch points on touch up events on Android (#2711) by @deniska
|
||||||
[core] REVIEWED: Window position setup on InitWindow() (#2732) by @RandomErrorMessage
|
[core] REVIEWED: Window position setup on InitWindow() (#2732) by @RandomErrorMessage
|
||||||
|
|
@ -43,6 +44,17 @@ Detailed changes:
|
||||||
[core] REVIEWED: Initial window position for display-sized fullscreen (#2742) by @daipom
|
[core] REVIEWED: Initial window position for display-sized fullscreen (#2742) by @daipom
|
||||||
[core] REVIEWED: Sticky touches input (#2857) by @ImazighenGhost
|
[core] REVIEWED: Sticky touches input (#2857) by @ImazighenGhost
|
||||||
[core] REVIEWED: Enable GetWindowHandle() on macOS (#2915) by @Not-Nik
|
[core] REVIEWED: Enable GetWindowHandle() on macOS (#2915) by @Not-Nik
|
||||||
|
[core] REVIEWED: Window position always inits centered in current monitor
|
||||||
|
[core] REVIEWED: IsWindowFocused() to consider Android App state (#2935)
|
||||||
|
[core] REVIEWED: GetMonitorWidth() and GetMonitorHeight() (#2934)
|
||||||
|
[core] REVIEWED: GetWindowHandle() to return Linux window (#2938)
|
||||||
|
[core] REVIEWED: WindowDropCallback(), additional security check (#2943)
|
||||||
|
[core] REVIEWED: Security checks for emscripten_run_script() (#2954)
|
||||||
|
[utils] REVIEWED: TraceLog() message size limit overflow
|
||||||
|
[rcamera] REDESIGNED: New implementation from scratch (#2563) by @Crydsch
|
||||||
|
[rcamera] REVIEWED: Make orbital camera work as expected (#2926) by @JeffM2501
|
||||||
|
[rcamera] REVIEWED: Multiple reviews on the new implementation
|
||||||
|
[rcamera] ADDED: UpdateCameraPro(), supporting custom user inputs
|
||||||
[rlgl] ADDED: OpenGL ES 2.0 support on PLATFORM_DESKTOP (#2840) by @wtnbgo
|
[rlgl] ADDED: OpenGL ES 2.0 support on PLATFORM_DESKTOP (#2840) by @wtnbgo
|
||||||
[rlgl] ADDED: Separate blending modes for color and alpha, BLEND_CUSTOM_SEPARATE (#2741)
|
[rlgl] ADDED: Separate blending modes for color and alpha, BLEND_CUSTOM_SEPARATE (#2741)
|
||||||
[rlgl] ADDED: rlSetBlendFactorsSeparate and custom blend mode modification checks (#2741) by @pure01fx
|
[rlgl] ADDED: rlSetBlendFactorsSeparate and custom blend mode modification checks (#2741) by @pure01fx
|
||||||
|
|
@ -58,6 +70,7 @@ Detailed changes:
|
||||||
[rlgl] REVIEWED: rlMultMatrixf(), use const pointer (#2807) by @planetis-m
|
[rlgl] REVIEWED: rlMultMatrixf(), use const pointer (#2807) by @planetis-m
|
||||||
[rlgl] REVIEWED: Expose OpenGL blending mode factors and functions/equations
|
[rlgl] REVIEWED: Expose OpenGL blending mode factors and functions/equations
|
||||||
[rlgl] REVIEWED: rLoadTextureDepth(), issue with depth textures on WebGL (#2824)
|
[rlgl] REVIEWED: rLoadTextureDepth(), issue with depth textures on WebGL (#2824)
|
||||||
|
[rlgl] REVIEWED: rlUnloadFramebuffer() (#2937)
|
||||||
[raymath] ADDED: Vector2LineAngle() (#2887)
|
[raymath] ADDED: Vector2LineAngle() (#2887)
|
||||||
[raymath] REVIEWED: Vector2Angle() (#2829, #2832) by @AlxHnr, @planetis-m
|
[raymath] REVIEWED: Vector2Angle() (#2829, #2832) by @AlxHnr, @planetis-m
|
||||||
[shapes] ADDED: CheckCollisionPointPoly() (#2685) by @acejacek
|
[shapes] ADDED: CheckCollisionPointPoly() (#2685) by @acejacek
|
||||||
|
|
@ -81,7 +94,6 @@ Detailed changes:
|
||||||
[text] `WARNING`: RENAMED: TextCodepointsToUTF8() to LoadUTF8()
|
[text] `WARNING`: RENAMED: TextCodepointsToUTF8() to LoadUTF8()
|
||||||
[text] `WARNING`: RENAMED: GetCodepoint() -> GetCodepointNext()
|
[text] `WARNING`: RENAMED: GetCodepoint() -> GetCodepointNext()
|
||||||
[text] REDESIGNED: GetCodepointNext()
|
[text] REDESIGNED: GetCodepointNext()
|
||||||
[text] REVIEWED text_codepoints_loading.c
|
|
||||||
[text] REVIEWED: MeasureTextEx(), avoid crash on bad data
|
[text] REVIEWED: MeasureTextEx(), avoid crash on bad data
|
||||||
[text] REVIEWED: UnloadFontData(), avoid crash on invalid font data
|
[text] REVIEWED: UnloadFontData(), avoid crash on invalid font data
|
||||||
[models] ADDED: Support M3D model file format (meshes and materials) (#2648) by @bztsrc
|
[models] ADDED: Support M3D model file format (meshes and materials) (#2648) by @bztsrc
|
||||||
|
|
@ -89,41 +101,53 @@ Detailed changes:
|
||||||
[models] ADDED: GLTF animation support (#2844) by @charles-l
|
[models] ADDED: GLTF animation support (#2844) by @charles-l
|
||||||
[models] ADDED: DrawCapsule() and DrawCapsuleWires() (#2761) by @IanBand
|
[models] ADDED: DrawCapsule() and DrawCapsuleWires() (#2761) by @IanBand
|
||||||
[models] ADDED: LoadMaterials(), MTL files loading, same code as OBJ loader (#2872) by @JeffM2501
|
[models] ADDED: LoadMaterials(), MTL files loading, same code as OBJ loader (#2872) by @JeffM2501
|
||||||
|
[models] `WARNING`: REMOVED: UnloadModelKeepMeshes()
|
||||||
|
[models] `WARNING`: REMOVED: DrawCubeTexture(), DrawCubeTextureRec(), functions moved to new example: `models_draw_cube_texture`
|
||||||
[models] REVIEWED: DrawMesh(), using SHADER_LOC_COLOR_SPECULAR as a material map (#2908) by @haved
|
[models] REVIEWED: DrawMesh(), using SHADER_LOC_COLOR_SPECULAR as a material map (#2908) by @haved
|
||||||
[models] REVIEWED: LoadM3D() vertex color support (#2878) by @GithubPrankster, @bztsrc
|
[models] REVIEWED: LoadM3D() vertex color support (#2878) by @GithubPrankster, @bztsrc
|
||||||
[models] REVIEWED: GenMeshHeightmap() (#2716)
|
[models] REVIEWED: GenMeshHeightmap() (#2716)
|
||||||
[models] REVIEWED: LoadIQM() (#2676)
|
[models] REVIEWED: LoadIQM() (#2676)
|
||||||
[models] REVIEWED: Simplify .vox signature check (#2752) by @CrezyDud
|
[models] REVIEWED: Simplify .vox signature check (#2752) by @CrezyDud
|
||||||
[models] REVIEWED: LoadIQM(), support bone names loading if available (#2882) by @PencilAmazing
|
[models] REVIEWED: LoadIQM(), support bone names loading if available (#2882) by @PencilAmazing
|
||||||
[models] `WARNING`: REMOVED: DrawCubeTexture(), DrawCubeTextureRec(), functions moved to new example: `models_draw_cube_texture`
|
[models] REVIEWED: GenMeshTangents(), avoid crash on missing texcoords data (#2927)
|
||||||
|
[audio] ADDED: Full support for QOA audio file format
|
||||||
|
[audio] ADDED: Mixed audio processor (#2929) by @hatkidchan
|
||||||
[audio] ADDED: IsWaveReady()`, IsSoundReady(), IsMusicReady() (#2892) by @RobLoach
|
[audio] ADDED: IsWaveReady()`, IsSoundReady(), IsMusicReady() (#2892) by @RobLoach
|
||||||
|
[audio] `WARNING`: REMOVED: Multichannel audio API: PlaySoundMulti(), StopSoundMulti()
|
||||||
[audio] REVIEWED: Clear PCM buffer state when closing audio device (#2736) by @veins1
|
[audio] REVIEWED: Clear PCM buffer state when closing audio device (#2736) by @veins1
|
||||||
[audio] REVIEWED: Android backend selected (#2118, #2875) by @planetis-m
|
[audio] REVIEWED: Android backend selected (#2118, #2875) by @planetis-m
|
||||||
|
[audio] REVIEWED: Change default threading model for COM objects in miniaudio
|
||||||
[multi] ADDED: IsShaderReady(), IsImageReady(), IsFontReady() (#2892) by @RobLoach
|
[multi] ADDED: IsShaderReady(), IsImageReady(), IsFontReady() (#2892) by @RobLoach
|
||||||
[multi] ADDED: IsModelReady(), IsMaterialReady(), IsTextureReady(), IsRenderTextureReady() (#2895) by @RobLoach
|
[multi] ADDED: IsModelReady(), IsMaterialReady(), IsTextureReady(), IsRenderTextureReady() (#2895) by @RobLoach
|
||||||
[multi] REVIEWED: Multiple code/comment typos by @sDos280
|
[multi] REVIEWED: Multiple code/comment typos by @sDos280
|
||||||
[multi] REVIEWED: Grammar mistakes and typos (#2914) by @stickM4N
|
[multi] REVIEWED: Grammar mistakes and typos (#2914) by @stickM4N
|
||||||
[multi] REVIEWED: Use TRACELOG() macro instead of TraceLog() in internal modules (#2881) by @RobLoach
|
[multi] REVIEWED: Use TRACELOG() macro instead of TraceLog() in internal modules (#2881) by @RobLoach
|
||||||
[examples] ADDED: textures_textured_curve (#2821) by @JeffM2501
|
[examples] ADDED: textures_textured_curve (#2821) by @JeffM2501
|
||||||
|
[examples] ADDED: models_draw_cube_texture
|
||||||
|
[examples] ADDED: models_loading_m3d (#2648) by @bztsrc
|
||||||
[examples] ADDED: shaders_write_depth (#2836) by @BugraAlptekinSari
|
[examples] ADDED: shaders_write_depth (#2836) by @BugraAlptekinSari
|
||||||
[examples] ADDED: shaders_hybrid_render (#2919) by @BugraAlptekinSari
|
[examples] ADDED: shaders_hybrid_render (#2919) by @BugraAlptekinSari
|
||||||
|
[examples] REMOVED: audio_multichannel_sound
|
||||||
[examples] RENAMED: Several shaders for naming consistency (#2707)
|
[examples] RENAMED: Several shaders for naming consistency (#2707)
|
||||||
[examples] RENAMED: lighting_instanced.fs to lighting_instancing.fs (glsl100) (#2805) by @gtrxAC
|
[examples] RENAMED: lighting_instanced.fs to lighting_instancing.fs (glsl100) (#2805) by @gtrxAC
|
||||||
[examples] REVIEWED: core_custom_logging.c (#2692) by @hartmannathan
|
[examples] REVIEWED: core_custom_logging.c (#2692) by @hartmannathan
|
||||||
[examples] REVIEWED: core_camera_2d_platformer (#2687) by @skylar779
|
[examples] REVIEWED: core_camera_2d_platformer (#2687) by @skylar779
|
||||||
[examples] REVIEWED: core_input_gamepad.c (#2903) by @planetis-m
|
[examples] REVIEWED: core_input_gamepad.c (#2903) by @planetis-m
|
||||||
[examples] REVIEWED: core_custom_frame_control
|
[examples] REVIEWED: core_custom_frame_control
|
||||||
|
[examples] REVIEWED: core_drop_files (#2943)
|
||||||
[examples] REVIEWED: text_rectangle_bounds (#2746) by @SzieberthAdam
|
[examples] REVIEWED: text_rectangle_bounds (#2746) by @SzieberthAdam
|
||||||
[examples] REVIEWED: textures_image_processing, added gaussian blurring (#2775) by @nobytesgiven
|
[examples] REVIEWED: textures_image_processing, added gaussian blurring (#2775) by @nobytesgiven
|
||||||
[examples] REVIEWED: models_billboard, highlighting rotation and draw order (#2779) by @nobytesgiven
|
[examples] REVIEWED: models_billboard, highlighting rotation and draw order (#2779) by @nobytesgiven
|
||||||
[examples] REVIEWED: core_loading_thread, join thread on completion (#2845) by @planetis-m
|
[examples] REVIEWED: core_loading_thread, join thread on completion (#2845) by @planetis-m
|
||||||
[examples] REVIEWED: models_loading_gltf
|
[examples] REVIEWED: models_loading_gltf
|
||||||
[examples] REVIEWED: Shader lighting.fs for GLSL120 (#2651)
|
[examples] REVIEWED: Shader lighting.fs for GLSL120 (#2651)
|
||||||
|
[examples] REVIEWED: text_codepoints_loading.c
|
||||||
[parser] REVIEWED: raylib-parser Makefile (#2765) by @Peter0x44
|
[parser] REVIEWED: raylib-parser Makefile (#2765) by @Peter0x44
|
||||||
[build] ADDED: Packaging for distros with deb-based and rpm-based packages (#2877) by @KOLANICH
|
[build] ADDED: Packaging for distros with deb-based and rpm-based packages (#2877) by @KOLANICH
|
||||||
[build] ADDED: Linkage library -latomic on Linux (only required for ARM32)
|
[build] ADDED: Linkage library -latomic on Linux (only required for ARM32)
|
||||||
[build] ADDED: Required frameworks on macOS (#2793) by @SpexGuy
|
[build] ADDED: Required frameworks on macOS (#2793) by @SpexGuy
|
||||||
[build] ADDED: WASM support for Zig build (#2901) by @Not-Nik
|
[build] ADDED: WASM support for Zig build (#2901) by @Not-Nik
|
||||||
|
[build] ADDED: New raylib examples as VS2022 project (to raylib solution)
|
||||||
[build] REVIEWED: config.h format and inconsistencies
|
[build] REVIEWED: config.h format and inconsistencies
|
||||||
[build] REVIEWED: Zig build to latest master, avoid deprecated functions (#2910) by @star-tek-mb
|
[build] REVIEWED: Zig build to latest master, avoid deprecated functions (#2910) by @star-tek-mb
|
||||||
[build] REVIEWED: CMake project template to easily target raylib version (#2700) by @RobLoach
|
[build] REVIEWED: CMake project template to easily target raylib version (#2700) by @RobLoach
|
||||||
|
|
@ -137,6 +161,7 @@ Detailed changes:
|
||||||
[build] REVIEWED: Several compilation warnings (for strict rules)
|
[build] REVIEWED: Several compilation warnings (for strict rules)
|
||||||
[build] REVIEWED: All github workflows using deprecated actions
|
[build] REVIEWED: All github workflows using deprecated actions
|
||||||
[build] REVIEWED: CMake when compiling for web (#2820) by @object71
|
[build] REVIEWED: CMake when compiling for web (#2820) by @object71
|
||||||
|
[build] REVIEWED: DLL build on Windows (#2951) by @Skaytacium
|
||||||
[build] REVIEWED: Avoid MSVC warnings in raylib project (#2871) by @JeffM2501
|
[build] REVIEWED: Avoid MSVC warnings in raylib project (#2871) by @JeffM2501
|
||||||
[build] REVIEWED: Paths in .bat files to build examples (#2870) by @masoudd
|
[build] REVIEWED: Paths in .bat files to build examples (#2870) by @masoudd
|
||||||
[build] REVIEWED: CMake, use GLVND for old cmake versions (#2826) by @simendsjo
|
[build] REVIEWED: CMake, use GLVND for old cmake versions (#2826) by @simendsjo
|
||||||
|
|
@ -153,6 +178,9 @@ Detailed changes:
|
||||||
[bindings] ADDED: TurboRaylib (Object Pascal) by @turborium
|
[bindings] ADDED: TurboRaylib (Object Pascal) by @turborium
|
||||||
[bindings] ADDED: Kaylib (Kotlin/Native) by @Its-Kenta
|
[bindings] ADDED: Kaylib (Kotlin/Native) by @Its-Kenta
|
||||||
[bindings] ADDED: Raylib-Nelua (Nelua) by @Its-Kenta
|
[bindings] ADDED: Raylib-Nelua (Nelua) by @Its-Kenta
|
||||||
|
[bindings] ADDED: Cyber (Cyber) by @fubark
|
||||||
|
[bindings] ADDED: raylib-sunder (Sunder) by @ashn-dot-dev
|
||||||
|
[bindings] ADDED: raylib BQN (#2962) by @Brian-ED
|
||||||
[misc] REVIEWED: Update external libraries to latest versions
|
[misc] REVIEWED: Update external libraries to latest versions
|
||||||
|
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
|
|
|
||||||
37
HISTORY.md
37
HISTORY.md
|
|
@ -395,3 +395,40 @@ Highlights for `raylib 4.2`:
|
||||||
As always, there are more improvements than the key features listed, make sure to check raylib [CHANGELOG](CHANGELOG) for the detailed list of changes; for this release a `WARNING` flag has been added to all the changes that could affect bindings or productivity code. **raylib keeps improving one more version** and a special focus on maintainability has been put on the library for the future. Specific/advance functionality will be provided through **raylib-extras** repos and raylib main repo devlelopment will be focused on what made raylib popular: being a simple and easy-to-use library to **enjoy videogames programming**.
|
As always, there are more improvements than the key features listed, make sure to check raylib [CHANGELOG](CHANGELOG) for the detailed list of changes; for this release a `WARNING` flag has been added to all the changes that could affect bindings or productivity code. **raylib keeps improving one more version** and a special focus on maintainability has been put on the library for the future. Specific/advance functionality will be provided through **raylib-extras** repos and raylib main repo devlelopment will be focused on what made raylib popular: being a simple and easy-to-use library to **enjoy videogames programming**.
|
||||||
|
|
||||||
**Enjoy gamedev/tools/graphics programming!** :)
|
**Enjoy gamedev/tools/graphics programming!** :)
|
||||||
|
|
||||||
|
notes on raylib 4.5
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
It's been **7 months** since latest raylib release. As usual, **many parts of the library have been reviewed and improved** along those months. Many issues have been closed, staying under 10 open issues at the moment of this writting and also many PRs from contributors have been received, reviewed and merged into raylib library. Some new functions have been added and some others have been removed to improve library coherence and avoid moving too high level, giving the users the tools to implement advance functionality themselfs over raylib. Again, this is a big release with a considerable amount of changes and improvements. Here it is a small summary highlighting this new **rayib 4.5**.
|
||||||
|
|
||||||
|
Some numbers for this release:
|
||||||
|
|
||||||
|
- **+100** closed issues (for a TOTAL of **+1340**!)
|
||||||
|
- **+350** commits since previous RELEASE (for a TOTAL of **+6350**!)
|
||||||
|
- **+25** functions ADDED to raylib API (for a TOTAL of **516**!)
|
||||||
|
- **+40** functions REVIEWED/REDESIGNED
|
||||||
|
- **+40** new contributors (for a TOTAL of **405**!)
|
||||||
|
|
||||||
|
Highlights for `raylib 4.5`:
|
||||||
|
|
||||||
|
- **`NEW` Improved ANGLE support on Desktop platforms**: Support for OpenGL ES 2.0 on Desktop platforms (Windows, Linux, macOS) has been reviewed by @wtnbgo GitHub user. Now raylib can be compiled on desktop for OpenGL ES 2.0 and linked against [`ANGLE`](https://github.com/google/angle). This _small_ addition open the door to building raylib for all **ANGLE supported backends: Direct3D 11, Vulkan and Metal**. Please note that this new feature is still experimental and requires further testing!
|
||||||
|
|
||||||
|
- **`NEW` Camera module**: A brand new implementation from scratch for `rcamera` module, contributed by @Crydsch GitHub user! **New camera system is simpler, more flexible, more granular and more extendable**. Specific camera math transformations (movement/rotation) have been moved to individual functions, exposing them to users if required. Global state has been removed from the module and standalone usage has been greatly improved; now `rcamera.h` single-file header-only library can be used externally, independently of raylib. A new `UpdateCameraPro()` function has been added to address input-dependency of `UpdateCamera()`, now advance users have **full control over camera inputs and movement/rotation speeds**!
|
||||||
|
|
||||||
|
- **`NEW` Support for M3D models and M3D/GLTF animations**: 3d models animations support has been a limited aspect of raylib for long time, some versions ago IQM animations were supported but raylib 4.5 also adds support for the brand new [M3D file format](https://bztsrc.gitlab.io/model3d/), including animations and the long expected support for **GLTF animations**! The new M3D file format is **simple, portable, feature complete, extensible and open source**. It also provides a complete set of tools to export/visualize M3D models from/to Blender! Now raylib supports up to **3 model file-formats with animations**: `IQM`, `GLTF` and `M3D`.
|
||||||
|
|
||||||
|
- **`NEW` Support QOA audio format (import/export)**: Just a couple of months ago the new [QOA file format](https://qoaformat.org/) was published, a very simple, portable and open source quite-ok-audio file format. raylib already supports it, added to `raudio` module and including audio loading from file, loading from memory, streaming from file, streaming from memory and **exporting to QOA** audio format. **Because simplicity really matters to raylib!**
|
||||||
|
|
||||||
|
- **`NEW` Module for compressed textures loading**: [`rl_gputex`](https://github.com/raysan5/raylib/blob/master/src/external/rl_gputex.h), a portable single-file header-only small library to load compressed texture file-formats (DDS, PKM, KTX, PVR, ASTC). Provided functionality is not new to raylib but it was part of the raylib `rtextures` module, now it has been moved into a separate self-contained library, **improving portability**. Note that this module is only intended to **load compressed data from files, ready to be uploaded to GPU**, no compression/decompression functionality is provided. This change is a first step towards a better modularization of raylib library.
|
||||||
|
|
||||||
|
- **Reviewed `rlgl` module for automatic limits checking**: Again, [`rlgl`](https://github.com/raysan5/raylib/blob/master/src/rlgl.h) has been reviewed to simplify usage. Now users do not need to worry about reaching the internal render-batch limits when they send their triangles to draw 2d/3d, `rlgl` manages it automatically! This change allows a **great simplification for other modules** like `rshapes`, `rtextures` and `rmodels` that do not need to worry about bufffer overflows and can just define as many vertex as desired!
|
||||||
|
|
||||||
|
- **Reviewed `rshapes` module to minimize the rlgl dependency**: Now `rshapes` 2d shapes drawing functions **only depend on 6 low-level functions**: `rlBegin()`, `rlEnd()`, `rlVertex3f()`, `rlTexCoord2f()`, `rlNormal3f()`, `rlSetTexture()`. With only those pseudo-OpenGl 1.1 minimal functionality, everything can be drawn! This improvement converts `rshapes` module in a **self-contained, portable shapes-drawing library that can be used independently of raylib**, as far as entry points for those 6 functions are provided by the user. It even allows to be used for software rendering, with the proper backend!
|
||||||
|
|
||||||
|
- **Added data structures validation functions**: Multiple functions have been added by @RobLoach GitHub user to ease the validation of raylib data structures: `IsImageReady()`, `IsTextureReady()`, `IsSoundReady()`... Now users have a simple mechanism to **make sure data has been correctly loaded**, instead of checking internal structure values by themselfs.
|
||||||
|
|
||||||
|
As usual, those are only some highlights but there is much more! New image generators, new color transformation functionality, improved blending support for color/alpha, etc... Make sure to check raylib [CHANGELOG]([CHANGELOG](https://github.com/raysan5/raylib/blob/master/CHANGELOG)) for a detailed list of changes! Please, note that all breaking changes have been flagged with a `WARNING` in the CHANGELOG, specially useful for binding creators!
|
||||||
|
|
||||||
|
**raylib keeps improving one more version** with a special focus on maintainability and sustainability. Always working towards making the library more **simple and easy-to-use**.
|
||||||
|
|
||||||
|
Let's keep **enjoying games/tools/graphics programming!** :)
|
||||||
|
|
|
||||||
|
|
@ -38,10 +38,10 @@ features
|
||||||
--------
|
--------
|
||||||
- **NO external dependencies**, all required libraries are [bundled into raylib](https://github.com/raysan5/raylib/tree/master/src/external)
|
- **NO external dependencies**, all required libraries are [bundled into raylib](https://github.com/raysan5/raylib/tree/master/src/external)
|
||||||
- Multiple platforms supported: **Windows, Linux, MacOS, RPI, Android, HTML5... and more!**
|
- Multiple platforms supported: **Windows, Linux, MacOS, RPI, Android, HTML5... and more!**
|
||||||
- Written in plain C code (C99) in PascalCase/camelCase notation
|
- Written in plain C code (C99) using PascalCase/camelCase notation
|
||||||
- Hardware accelerated with OpenGL (**1.1, 2.1, 3.3, 4.3 or ES 2.0**)
|
- Hardware accelerated with OpenGL (**1.1, 2.1, 3.3, 4.3 or ES 2.0**)
|
||||||
- **Unique OpenGL abstraction layer** (usable as standalone module): [rlgl](https://github.com/raysan5/raylib/blob/master/src/rlgl.h)
|
- **Unique OpenGL abstraction layer** (usable as standalone module): [rlgl](https://github.com/raysan5/raylib/blob/master/src/rlgl.h)
|
||||||
- Multiple **Fonts** formats supported (TTF, XNA fonts, AngelCode fonts)
|
- Multiple **Fonts** formats supported (TTF, Image fonts, AngelCode fonts)
|
||||||
- Multiple texture formats supported, including **compressed formats** (DXT, ETC, ASTC)
|
- Multiple texture formats supported, including **compressed formats** (DXT, ETC, ASTC)
|
||||||
- **Full 3D support**, including 3D Shapes, Models, Billboards, Heightmaps and more!
|
- **Full 3D support**, including 3D Shapes, Models, Billboards, Heightmaps and more!
|
||||||
- Flexible Materials system, supporting classic maps and **PBR maps**
|
- Flexible Materials system, supporting classic maps and **PBR maps**
|
||||||
|
|
@ -51,7 +51,7 @@ features
|
||||||
- Audio loading and playing with streaming support (WAV, OGG, MP3, FLAC, XM, MOD)
|
- Audio loading and playing with streaming support (WAV, OGG, MP3, FLAC, XM, MOD)
|
||||||
- **VR stereo rendering** support with configurable HMD device parameters
|
- **VR stereo rendering** support with configurable HMD device parameters
|
||||||
- Huge examples collection with [+120 code examples](https://github.com/raysan5/raylib/tree/master/examples)!
|
- Huge examples collection with [+120 code examples](https://github.com/raysan5/raylib/tree/master/examples)!
|
||||||
- Bindings to [+50 programming languages](https://github.com/raysan5/raylib/blob/master/BINDINGS.md)!
|
- Bindings to [+60 programming languages](https://github.com/raysan5/raylib/blob/master/BINDINGS.md)!
|
||||||
- **Free and open source**.
|
- **Free and open source**.
|
||||||
|
|
||||||
basic example
|
basic example
|
||||||
|
|
|
||||||
13
ROADMAP.md
13
ROADMAP.md
|
|
@ -4,15 +4,20 @@ Here it is a wishlist with features and ideas to improve the library. Note that
|
||||||
|
|
||||||
- [GitHub Issues](https://github.com/raysan5/raylib/issues) has several open issues for possible improvements or bugs to fix.
|
- [GitHub Issues](https://github.com/raysan5/raylib/issues) has several open issues for possible improvements or bugs to fix.
|
||||||
- [raylib source code](https://github.com/raysan5/raylib/tree/master/src) has multiple *TODO* comments around code with pending things to review or improve.
|
- [raylib source code](https://github.com/raysan5/raylib/tree/master/src) has multiple *TODO* comments around code with pending things to review or improve.
|
||||||
- raylib wishlists discussions (https://github.com/raysan5/raylib/discussions/1502, https://github.com/raysan5/raylib/discussions/2272) are open to everyone to ask for improvements, feel free to check and comment.
|
- raylib wishlists discussions are open to everyone to ask for improvements, feel free to check and comment:
|
||||||
|
- [raylib wishlist 2021](https://github.com/raysan5/raylib/discussions/1502)
|
||||||
|
- [raylib wishlist 2022](https://github.com/raysan5/raylib/discussions/2272)
|
||||||
|
- [raylib 5.0 wishlist](https://github.com/raysan5/raylib/discussions/2952)
|
||||||
|
|
||||||
_Current version of raylib is complete and functional but there is always room for improvements._
|
_Current version of raylib is complete and functional but there is always room for improvements._
|
||||||
|
|
||||||
**raylib 4.x**
|
**raylib 4.x**
|
||||||
- [ ] Redesign camera module (more flexible) ([#1143](https://github.com/raysan5/raylib/issues/1143), https://github.com/raysan5/raylib/discussions/2507)
|
- [ ] Split core module into separate platforms?
|
||||||
|
- [ ] Basic 2d software renderer, using `Image` provided API
|
||||||
- [ ] Redesign gestures system, improve touch inputs management
|
- [ ] Redesign gestures system, improve touch inputs management
|
||||||
- [ ] Redesign raudio module, implement miniaudio high-level provided features
|
- [ ] Redesign audio module, implement miniaudio high-level provided features
|
||||||
- [x] Better documentation and improved examples
|
- [x] Redesign camera module (more flexible) ([#1143](https://github.com/raysan5/raylib/issues/1143), https://github.com/raysan5/raylib/discussions/2507)
|
||||||
|
- [x] Better documentation and improved examples, reviewed webpage with examples complexity level
|
||||||
- [x] Focus on HTML5 ([raylib 5k gamejam](https://itch.io/jam/raylib-5k-gamejam)) and embedded platforms (RPI and similar SOCs)
|
- [x] Focus on HTML5 ([raylib 5k gamejam](https://itch.io/jam/raylib-5k-gamejam)) and embedded platforms (RPI and similar SOCs)
|
||||||
- [x] Additional support libraries: [raygui](https://github.com/raysan5/raygui), [rres](https://github.com/raysan5/rres)
|
- [x] Additional support libraries: [raygui](https://github.com/raysan5/raygui), [rres](https://github.com/raysan5/rres)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ PLATFORM ?= PLATFORM_DESKTOP
|
||||||
|
|
||||||
# Define required raylib variables
|
# Define required raylib variables
|
||||||
PROJECT_NAME ?= raylib_examples
|
PROJECT_NAME ?= raylib_examples
|
||||||
RAYLIB_VERSION ?= 4.2.0
|
RAYLIB_VERSION ?= 4.5.0
|
||||||
RAYLIB_PATH ?= ..
|
RAYLIB_PATH ?= ..
|
||||||
|
|
||||||
# Locations of raylib.h and libraylib.a/libraylib.so
|
# Locations of raylib.h and libraylib.a/libraylib.so
|
||||||
|
|
@ -129,7 +129,7 @@ endif
|
||||||
RAYLIB_RELEASE_PATH ?= $(RAYLIB_PATH)/src
|
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:/emsdk
|
||||||
EMSCRIPTEN_PATH ?= $(EMSDK_PATH)/upstream/emscripten
|
EMSCRIPTEN_PATH ?= $(EMSDK_PATH)/upstream/emscripten
|
||||||
|
|
@ -137,7 +137,7 @@ ifeq ($(PLATFORM),PLATFORM_WEB)
|
||||||
PYTHON_PATH = $(EMSDK_PATH)/python/3.9.2-1_64bit
|
PYTHON_PATH = $(EMSDK_PATH)/python/3.9.2-1_64bit
|
||||||
NODE_PATH = $(EMSDK_PATH)/node/14.15.5_64bit/bin
|
NODE_PATH = $(EMSDK_PATH)/node/14.15.5_64bit/bin
|
||||||
export PATH = $(EMSDK_PATH);$(EMSCRIPTEN_PATH);$(CLANG_PATH);$(NODE_PATH);$(PYTHON_PATH):$$(PATH)
|
export PATH = $(EMSDK_PATH);$(EMSCRIPTEN_PATH);$(CLANG_PATH);$(NODE_PATH);$(PYTHON_PATH):$$(PATH)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Define default C compiler: CC
|
# Define default C compiler: CC
|
||||||
|
|
@ -210,7 +210,7 @@ else
|
||||||
CFLAGS += -Os
|
CFLAGS += -Os
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
CFLAGS += -s -O2
|
CFLAGS += -O2
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
@ -489,6 +489,7 @@ MODELS = \
|
||||||
models/models_billboard \
|
models/models_billboard \
|
||||||
models/models_box_collisions \
|
models/models_box_collisions \
|
||||||
models/models_cubicmap \
|
models/models_cubicmap \
|
||||||
|
models/models_draw_cube_texture \
|
||||||
models/models_first_person_maze \
|
models/models_first_person_maze \
|
||||||
models/models_geometric_shapes \
|
models/models_geometric_shapes \
|
||||||
models/models_mesh_generation \
|
models/models_mesh_generation \
|
||||||
|
|
@ -531,8 +532,8 @@ AUDIO = \
|
||||||
audio/audio_music_stream \
|
audio/audio_music_stream \
|
||||||
audio/audio_raw_stream \
|
audio/audio_raw_stream \
|
||||||
audio/audio_sound_loading \
|
audio/audio_sound_loading \
|
||||||
audio/audio_multichannel_sound \
|
audio/audio_stream_effects \
|
||||||
audio/audio_stream_effects
|
audio/audio_mixed_processor
|
||||||
|
|
||||||
CURRENT_MAKEFILE = $(lastword $(MAKEFILE_LIST))
|
CURRENT_MAKEFILE = $(lastword $(MAKEFILE_LIST))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ PLATFORM ?= PLATFORM_WEB
|
||||||
|
|
||||||
# Define required raylib variables
|
# Define required raylib variables
|
||||||
PROJECT_NAME ?= raylib_examples
|
PROJECT_NAME ?= raylib_examples
|
||||||
RAYLIB_VERSION ?= 4.2.0
|
RAYLIB_VERSION ?= 4.5.0
|
||||||
RAYLIB_PATH ?= ..
|
RAYLIB_PATH ?= ..
|
||||||
|
|
||||||
# Locations of raylib.h and libraylib.a/libraylib.so
|
# Locations of raylib.h and libraylib.a/libraylib.so
|
||||||
|
|
@ -60,8 +60,8 @@ ifeq ($(PLATFORM),PLATFORM_RPI)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Determine PLATFORM_OS in case PLATFORM_DESKTOP selected
|
# Determine PLATFORM_OS in case PLATFORM_DESKTOP or PLATFORM_WEB selected
|
||||||
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
ifeq ($(PLATFORM),$(filter $(PLATFORM),PLATFORM_DESKTOP PLATFORM_WEB))
|
||||||
# No uname.exe on MinGW!, but OS=Windows_NT on Windows!
|
# No uname.exe on MinGW!, but OS=Windows_NT on Windows!
|
||||||
# ifeq ($(UNAME),Msys) -> Windows
|
# ifeq ($(UNAME),Msys) -> Windows
|
||||||
ifeq ($(OS),Windows_NT)
|
ifeq ($(OS),Windows_NT)
|
||||||
|
|
@ -119,16 +119,18 @@ ifeq ($(PLATFORM),PLATFORM_DRM)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Define raylib release directory for compiled library
|
# Define raylib release directory for compiled library
|
||||||
RAYLIB_RELEASE_PATH ?= $(RAYLIB_PATH)/src
|
RAYLIB_RELEASE_PATH ?= $(RAYLIB_PATH)/src
|
||||||
|
|
||||||
ifeq ($(PLATFORM),PLATFORM_WEB)
|
ifeq ($(PLATFORM),PLATFORM_WEB)
|
||||||
# Emscripten required variables
|
ifeq ($(PLATFORM_OS),WINDOWS)
|
||||||
EMSDK_PATH ?= C:/emsdk
|
# Emscripten required variables
|
||||||
EMSCRIPTEN_PATH ?= $(EMSDK_PATH)/upstream/emscripten
|
EMSDK_PATH ?= C:/emsdk
|
||||||
CLANG_PATH = $(EMSDK_PATH)/upstream/bin
|
EMSCRIPTEN_PATH ?= $(EMSDK_PATH)/upstream/emscripten
|
||||||
PYTHON_PATH = $(EMSDK_PATH)/python/3.9.2-1_64bit
|
CLANG_PATH = $(EMSDK_PATH)/upstream/bin
|
||||||
NODE_PATH = $(EMSDK_PATH)/node/14.15.5_64bit/bin
|
PYTHON_PATH = $(EMSDK_PATH)/python/3.9.2-1_64bit
|
||||||
export PATH = $(EMSDK_PATH);$(EMSCRIPTEN_PATH);$(CLANG_PATH);$(NODE_PATH);$(PYTHON_PATH):$$(PATH)
|
NODE_PATH = $(EMSDK_PATH)/node/14.15.5_64bit/bin
|
||||||
|
export PATH = $(EMSDK_PATH);$(EMSCRIPTEN_PATH);$(CLANG_PATH);$(NODE_PATH);$(PYTHON_PATH):$$(PATH)
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Define default C compiler: CC
|
# Define default C compiler: CC
|
||||||
|
|
@ -195,9 +197,13 @@ ifeq ($(BUILD_MODE),DEBUG)
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
ifeq ($(PLATFORM),PLATFORM_WEB)
|
ifeq ($(PLATFORM),PLATFORM_WEB)
|
||||||
CFLAGS += -Os
|
ifeq ($(BUILD_WEB_ASYNCIFY),TRUE)
|
||||||
|
CFLAGS += -O3
|
||||||
|
else
|
||||||
|
CFLAGS += -Os
|
||||||
|
endif
|
||||||
else
|
else
|
||||||
CFLAGS += -s -O1
|
CFLAGS += -s -O2
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
@ -394,13 +400,13 @@ CORE = \
|
||||||
core/core_scissor_test \
|
core/core_scissor_test \
|
||||||
core/core_storage_values \
|
core/core_storage_values \
|
||||||
core/core_vr_simulator \
|
core/core_vr_simulator \
|
||||||
core/core_loading_thread \
|
|
||||||
core/core_window_flags \
|
core/core_window_flags \
|
||||||
core/core_window_letterbox \
|
core/core_window_letterbox \
|
||||||
core/core_window_should_close \
|
core/core_window_should_close \
|
||||||
core/core_split_screen \
|
core/core_split_screen \
|
||||||
core/core_smooth_pixelperfect \
|
core/core_smooth_pixelperfect \
|
||||||
core/core_custom_frame_control
|
core/core_custom_frame_control \
|
||||||
|
core/core_loading_thread
|
||||||
|
|
||||||
SHAPES = \
|
SHAPES = \
|
||||||
shapes/shapes_basic_shapes \
|
shapes/shapes_basic_shapes \
|
||||||
|
|
@ -437,6 +443,7 @@ TEXTURES = \
|
||||||
textures/textures_sprite_anim \
|
textures/textures_sprite_anim \
|
||||||
textures/textures_sprite_button \
|
textures/textures_sprite_button \
|
||||||
textures/textures_sprite_explosion \
|
textures/textures_sprite_explosion \
|
||||||
|
textures/textures_textured_curve \
|
||||||
textures/textures_bunnymark \
|
textures/textures_bunnymark \
|
||||||
textures/textures_blend_modes \
|
textures/textures_blend_modes \
|
||||||
textures/textures_draw_tiled \
|
textures/textures_draw_tiled \
|
||||||
|
|
@ -463,6 +470,7 @@ MODELS = \
|
||||||
models/models_billboard \
|
models/models_billboard \
|
||||||
models/models_box_collisions \
|
models/models_box_collisions \
|
||||||
models/models_cubicmap \
|
models/models_cubicmap \
|
||||||
|
models/models_draw_cube_texture \
|
||||||
models/models_first_person_maze \
|
models/models_first_person_maze \
|
||||||
models/models_geometric_shapes \
|
models/models_geometric_shapes \
|
||||||
models/models_mesh_generation \
|
models/models_mesh_generation \
|
||||||
|
|
@ -496,15 +504,17 @@ SHADERS = \
|
||||||
shaders/shaders_spotlight \
|
shaders/shaders_spotlight \
|
||||||
shaders/shaders_hot_reloading \
|
shaders/shaders_hot_reloading \
|
||||||
shaders/shaders_mesh_instancing \
|
shaders/shaders_mesh_instancing \
|
||||||
shaders/shaders_multi_sample2d
|
shaders/shaders_multi_sample2d \
|
||||||
|
shaders/shaders_write_depth \
|
||||||
|
shaders/shaders_hybrid_render
|
||||||
|
|
||||||
AUDIO = \
|
AUDIO = \
|
||||||
audio/audio_module_playing \
|
audio/audio_module_playing \
|
||||||
audio/audio_music_stream \
|
audio/audio_music_stream \
|
||||||
audio/audio_raw_stream \
|
audio/audio_raw_stream \
|
||||||
audio/audio_sound_loading \
|
audio/audio_sound_loading \
|
||||||
audio/audio_multichannel_sound \
|
audio/audio_stream_effects \
|
||||||
audio/audio_stream_effects
|
audio/audio_mixed_processor
|
||||||
|
|
||||||
CURRENT_MAKEFILE = $(lastword $(MAKEFILE_LIST))
|
CURRENT_MAKEFILE = $(lastword $(MAKEFILE_LIST))
|
||||||
|
|
||||||
|
|
@ -594,13 +604,6 @@ core/core_vr_simulator: core/core_vr_simulator.c
|
||||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
|
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
|
||||||
--preload-file core/resources/distortion100.fs@resources/distortion100.fs
|
--preload-file core/resources/distortion100.fs@resources/distortion100.fs
|
||||||
|
|
||||||
# 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: It requires raylib to be compiled using -pthread, so atomic operations and thread-local data (if any)
|
|
||||||
# in its source were transformed to non-atomic operations and non-thread-local data
|
|
||||||
core/core_loading_thread: core/core_loading_thread.c
|
|
||||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) -s USE_PTHREADS=1
|
|
||||||
|
|
||||||
core/core_window_flags: core/core_window_flags.c
|
core/core_window_flags: core/core_window_flags.c
|
||||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
|
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
|
||||||
|
|
||||||
|
|
@ -616,6 +619,14 @@ core/core_custom_frame_control: core/core_custom_frame_control.c
|
||||||
core/core_window_should_close: core/core_window_should_close.c
|
core/core_window_should_close: core/core_window_should_close.c
|
||||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
|
$(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)
|
||||||
|
# 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)
|
||||||
|
# in its source were transformed to non-atomic operations and non-thread-local data
|
||||||
|
core/core_loading_thread: core/core_loading_thread.c
|
||||||
|
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) -s USE_PTHREADS=1
|
||||||
|
|
||||||
|
|
||||||
# Compile SHAPES examples
|
# Compile SHAPES examples
|
||||||
shapes/shapes_basic_shapes: shapes/shapes_basic_shapes.c
|
shapes/shapes_basic_shapes: shapes/shapes_basic_shapes.c
|
||||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
|
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
|
||||||
|
|
@ -735,6 +746,10 @@ textures/textures_sprite_explosion: textures/textures_sprite_explosion.c
|
||||||
--preload-file textures/resources/explosion.png@resources/explosion.png \
|
--preload-file textures/resources/explosion.png@resources/explosion.png \
|
||||||
--preload-file textures/resources/boom.wav@resources/boom.wav
|
--preload-file textures/resources/boom.wav@resources/boom.wav
|
||||||
|
|
||||||
|
textures/textures_textured_curve: textures/textures_textured_curve.c
|
||||||
|
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
|
||||||
|
--preload-file textures/resources/road.png@resources/road.png
|
||||||
|
|
||||||
textures/textures_bunnymark: textures/textures_bunnymark.c
|
textures/textures_bunnymark: textures/textures_bunnymark.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/wabbit_alpha.png@resources/wabbit_alpha.png
|
--preload-file textures/resources/wabbit_alpha.png@resources/wabbit_alpha.png
|
||||||
|
|
@ -840,6 +855,10 @@ models/models_cubicmap: models/models_cubicmap.c
|
||||||
--preload-file models/resources/cubicmap.png@resources/cubicmap.png \
|
--preload-file models/resources/cubicmap.png@resources/cubicmap.png \
|
||||||
--preload-file models/resources/cubicmap_atlas.png@resources/cubicmap_atlas.png
|
--preload-file models/resources/cubicmap_atlas.png@resources/cubicmap_atlas.png
|
||||||
|
|
||||||
|
models/models_draw_cube_texture: models/models_draw_cube_texture.c
|
||||||
|
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
|
||||||
|
--preload-file models/resources/cubicmap_atlas.png@resources/cubicmap_atlas.png
|
||||||
|
|
||||||
models/models_first_person_maze: models/models_first_person_maze.c
|
models/models_first_person_maze: models/models_first_person_maze.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/cubicmap.png@resources/cubicmap.png \
|
--preload-file models/resources/cubicmap.png@resources/cubicmap.png \
|
||||||
|
|
@ -871,6 +890,10 @@ models/models_loading_gltf: models/models_loading_gltf.c
|
||||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) -s TOTAL_MEMORY=67108864 \
|
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) -s TOTAL_MEMORY=67108864 \
|
||||||
--preload-file models/resources/models/gltf/robot.glb@resources/models/gltf/robot.glb
|
--preload-file models/resources/models/gltf/robot.glb@resources/models/gltf/robot.glb
|
||||||
|
|
||||||
|
models/models_loading_m3d: models/models_loading_m3d.c
|
||||||
|
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) -s TOTAL_MEMORY=67108864 \
|
||||||
|
--preload-file models/resources/models/m3d/cesium_man.m3d@resources/models/m3d/cesium_man.m3d
|
||||||
|
|
||||||
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)
|
||||||
|
|
||||||
|
|
@ -951,13 +974,13 @@ shaders/shaders_basic_lighting: shaders/shaders_basic_lighting.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/texel_checker.png@resources/texel_checker.png \
|
--preload-file shaders/resources/texel_checker.png@resources/texel_checker.png \
|
||||||
--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/base_lighting.vs@resources/shaders/glsl100/base_lighting.vs
|
--preload-file shaders/resources/shaders/glsl100/lighting.vs@resources/shaders/glsl100/lighting.vs
|
||||||
|
|
||||||
shaders/shaders_fog: shaders/shaders_fog.c
|
shaders/shaders_fog: shaders/shaders_fog.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/texel_checker.png@resources/texel_checker.png \
|
--preload-file shaders/resources/texel_checker.png@resources/texel_checker.png \
|
||||||
--preload-file shaders/resources/shaders/glsl100/fog.fs@resources/shaders/glsl100/fog.fs \
|
--preload-file shaders/resources/shaders/glsl100/fog.fs@resources/shaders/glsl100/fog.fs \
|
||||||
--preload-file shaders/resources/shaders/glsl100/base_lighting.vs@resources/shaders/glsl100/base_lighting.vs
|
--preload-file shaders/resources/shaders/glsl100/lighting.vs@resources/shaders/glsl100/lighting.vs
|
||||||
|
|
||||||
shaders/shaders_simple_mask: shaders/shaders_simple_mask.c
|
shaders/shaders_simple_mask: shaders/shaders_simple_mask.c
|
||||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
|
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
|
||||||
|
|
@ -976,10 +999,9 @@ shaders/shaders_hot_reloading: shaders/shaders_hot_reloading.c
|
||||||
|
|
||||||
shaders/shaders_mesh_instancing: shaders/shaders_mesh_instancing.c
|
shaders/shaders_mesh_instancing: shaders/shaders_mesh_instancing.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/base_lighting_instanced.vs@resources/shaders/glsl100/base_lighting_instanced.vs \
|
--preload-file shaders/resources/shaders/glsl100/lighting_instancing.vs@resources/shaders/glsl100/lighting_instancing.vs \
|
||||||
--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
|
||||||
|
|
||||||
|
|
||||||
shaders/shaders_multi_sample2d: shaders/shaders_multi_sample2d.c
|
shaders/shaders_multi_sample2d: shaders/shaders_multi_sample2d.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/color_mix.fs@resources/shaders/glsl100/color_mix.fs
|
--preload-file shaders/resources/shaders/glsl100/color_mix.fs@resources/shaders/glsl100/color_mix.fs
|
||||||
|
|
@ -989,6 +1011,15 @@ shaders/shaders_texture_outline: shaders/shaders_texture_outline.c
|
||||||
--preload-file shaders/resources/shaders/glsl100/outline.fs@resources/shaders/glsl100/outline.fs \
|
--preload-file shaders/resources/shaders/glsl100/outline.fs@resources/shaders/glsl100/outline.fs \
|
||||||
--preload-file shaders/resources/fudesumi.png@resources/fudesumi.png
|
--preload-file shaders/resources/fudesumi.png@resources/fudesumi.png
|
||||||
|
|
||||||
|
shaders/shaders_write_depth: shaders/shaders_write_depth.c
|
||||||
|
$(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
|
||||||
|
|
||||||
|
shaders/shaders_hybrid_render: shaders/shaders_hybrid_render.c
|
||||||
|
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
|
||||||
|
--preload-file shaders/resources/shaders/glsl100/hybrid_raymarch.fs@resources/shaders/glsl100/hybrid_raymarch.fs \
|
||||||
|
--preload-file shaders/resources/shaders/glsl100/hybrid_raster.fs@resources/shaders/glsl100/hybrid_raster.fs
|
||||||
|
|
||||||
# Compile AUDIO examples
|
# Compile AUDIO examples
|
||||||
audio/audio_module_playing: audio/audio_module_playing.c
|
audio/audio_module_playing: audio/audio_module_playing.c
|
||||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
|
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
|
||||||
|
|
@ -1006,15 +1037,15 @@ audio/audio_sound_loading: audio/audio_sound_loading.c
|
||||||
--preload-file audio/resources/sound.wav@resources/sound.wav \
|
--preload-file audio/resources/sound.wav@resources/sound.wav \
|
||||||
--preload-file audio/resources/target.ogg@resources/target.ogg
|
--preload-file audio/resources/target.ogg@resources/target.ogg
|
||||||
|
|
||||||
audio/audio_multichannel_sound: audio/audio_multichannel_sound.c
|
|
||||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
|
|
||||||
--preload-file audio/resources/sound.wav@resources/sound.wav \
|
|
||||||
--preload-file audio/resources/target.ogg@resources/target.ogg
|
|
||||||
|
|
||||||
audio/audio_stream_effects: audio/audio_stream_effects.c
|
audio/audio_stream_effects: audio/audio_stream_effects.c
|
||||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) -s TOTAL_MEMORY=67108864 \
|
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) -s TOTAL_MEMORY=67108864 \
|
||||||
--preload-file audio/resources/country.mp3@resources/country.mp3
|
--preload-file audio/resources/country.mp3@resources/country.mp3
|
||||||
|
|
||||||
|
audio/audio_mixed_processor: audio/audio_mixed_processor.c
|
||||||
|
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) -s TOTAL_MEMORY=67108864 \
|
||||||
|
--preload-file audio/resources/country.mp3@resources/country.mp3 \
|
||||||
|
--preload-file audio/resources/coin.wav@resources/coin.wav
|
||||||
|
|
||||||
# Clean everything
|
# Clean everything
|
||||||
clean:
|
clean:
|
||||||
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||||
|
|
|
||||||
|
|
@ -186,7 +186,6 @@ Examples using raylib audio functionality, including sound/music loading and pla
|
||||||
| 118 | [audio_music_stream](audio/audio_music_stream.c) | <img src="audio/audio_music_stream.png" alt="audio_music_stream" width="80"> | ⭐️☆☆☆ | 1.3 | **4.2** | [Ray](https://github.com/raysan5) |
|
| 118 | [audio_music_stream](audio/audio_music_stream.c) | <img src="audio/audio_music_stream.png" alt="audio_music_stream" width="80"> | ⭐️☆☆☆ | 1.3 | **4.2** | [Ray](https://github.com/raysan5) |
|
||||||
| 119 | [audio_raw_stream](audio/audio_raw_stream.c) | <img src="audio/audio_raw_stream.png" alt="audio_raw_stream" width="80"> | ⭐️⭐️⭐️☆ | 1.6 | **4.2** | [Ray](https://github.com/raysan5) |
|
| 119 | [audio_raw_stream](audio/audio_raw_stream.c) | <img src="audio/audio_raw_stream.png" alt="audio_raw_stream" width="80"> | ⭐️⭐️⭐️☆ | 1.6 | **4.2** | [Ray](https://github.com/raysan5) |
|
||||||
| 120 | [audio_sound_loading](audio/audio_sound_loading.c) | <img src="audio/audio_sound_loading.png" alt="audio_sound_loading" width="80"> | ⭐️☆☆☆ | 1.1 | 3.5 | [Ray](https://github.com/raysan5) |
|
| 120 | [audio_sound_loading](audio/audio_sound_loading.c) | <img src="audio/audio_sound_loading.png" alt="audio_sound_loading" width="80"> | ⭐️☆☆☆ | 1.1 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||||
| 121 | [audio_multichannel_sound](audio/audio_multichannel_sound.c) | <img src="audio/audio_multichannel_sound.png" alt="audio_multichannel_sound" width="80"> | ⭐️☆☆☆ | 3.0 | 3.5 | [Chris Camacho](https://github.com/codifies) |
|
|
||||||
|
|
||||||
### category: others
|
### category: others
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,78 +0,0 @@
|
||||||
/*******************************************************************************************
|
|
||||||
*
|
|
||||||
* raylib [audio] example - Multichannel sound playing
|
|
||||||
*
|
|
||||||
* Example originally created with raylib 3.0, last time updated with raylib 3.5
|
|
||||||
*
|
|
||||||
* Example contributed by Chris Camacho (@chriscamacho) 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) 2019-2023 Chris Camacho (@chriscamacho) and Ramon Santamaria (@raysan5)
|
|
||||||
*
|
|
||||||
********************************************************************************************/
|
|
||||||
|
|
||||||
#include "raylib.h"
|
|
||||||
|
|
||||||
//------------------------------------------------------------------------------------
|
|
||||||
// Program main entry point
|
|
||||||
//------------------------------------------------------------------------------------
|
|
||||||
int main(void)
|
|
||||||
{
|
|
||||||
// Initialization
|
|
||||||
//--------------------------------------------------------------------------------------
|
|
||||||
const int screenWidth = 800;
|
|
||||||
const int screenHeight = 450;
|
|
||||||
|
|
||||||
InitWindow(screenWidth, screenHeight, "raylib [audio] example - Multichannel sound playing");
|
|
||||||
|
|
||||||
InitAudioDevice(); // Initialize audio device
|
|
||||||
|
|
||||||
Sound fxWav = LoadSound("resources/sound.wav"); // Load WAV audio file
|
|
||||||
Sound fxOgg = LoadSound("resources/target.ogg"); // Load OGG audio file
|
|
||||||
|
|
||||||
SetSoundVolume(fxWav, 0.2f);
|
|
||||||
|
|
||||||
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
|
|
||||||
//----------------------------------------------------------------------------------
|
|
||||||
if (IsKeyPressed(KEY_ENTER)) PlaySoundMulti(fxWav); // Play a new wav sound instance
|
|
||||||
if (IsKeyPressed(KEY_SPACE)) PlaySoundMulti(fxOgg); // Play a new ogg sound instance
|
|
||||||
//----------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
// Draw
|
|
||||||
//----------------------------------------------------------------------------------
|
|
||||||
BeginDrawing();
|
|
||||||
|
|
||||||
ClearBackground(RAYWHITE);
|
|
||||||
|
|
||||||
DrawText("MULTICHANNEL SOUND PLAYING", 20, 20, 20, GRAY);
|
|
||||||
DrawText("Press SPACE to play new ogg instance!", 200, 120, 20, LIGHTGRAY);
|
|
||||||
DrawText("Press ENTER to play new wav instance!", 200, 180, 20, LIGHTGRAY);
|
|
||||||
|
|
||||||
DrawText(TextFormat("CONCURRENT SOUNDS PLAYING: %02i", GetSoundsPlaying()), 220, 280, 20, RED);
|
|
||||||
|
|
||||||
EndDrawing();
|
|
||||||
//----------------------------------------------------------------------------------
|
|
||||||
}
|
|
||||||
|
|
||||||
// De-Initialization
|
|
||||||
//--------------------------------------------------------------------------------------
|
|
||||||
StopSoundMulti(); // We must stop the buffer pool before unloading
|
|
||||||
|
|
||||||
UnloadSound(fxWav); // Unload sound data
|
|
||||||
UnloadSound(fxOgg); // Unload sound data
|
|
||||||
|
|
||||||
CloseAudioDevice(); // Close audio device
|
|
||||||
|
|
||||||
CloseWindow(); // Close window and OpenGL context
|
|
||||||
//--------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 16 KiB |
|
|
@ -113,7 +113,30 @@ int main(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Update camera computes movement internally depending on the camera mode
|
||||||
|
// Some default standard keyboard/mouse inputs are hardcoded to simplify use
|
||||||
|
// For advance camera controls, it's reecommended to compute camera movement manually
|
||||||
UpdateCamera(&camera, cameraMode); // Update camera
|
UpdateCamera(&camera, cameraMode); // Update camera
|
||||||
|
|
||||||
|
/*
|
||||||
|
// Camera PRO usage example (EXPERIMENTAL)
|
||||||
|
// This new camera function allows custom movement/rotation values to be directly provided
|
||||||
|
// as input parameters, with this approach, rcamera module is internally independent of raylib inputs
|
||||||
|
UpdateCameraPro(&camera,
|
||||||
|
(Vector3){
|
||||||
|
(IsKeyDown(KEY_W) || IsKeyDown(KEY_UP))*0.1f - // Move forward-backward
|
||||||
|
(IsKeyDown(KEY_S) || IsKeyDown(KEY_DOWN))*0.1f,
|
||||||
|
(IsKeyDown(KEY_D) || IsKeyDown(KEY_RIGHT))*0.1f - // Move right-left
|
||||||
|
(IsKeyDown(KEY_A) || IsKeyDown(KEY_LEFT))*0.1f,
|
||||||
|
0.0f // Move up-down
|
||||||
|
},
|
||||||
|
(Vector3){
|
||||||
|
GetMouseDelta().x*0.05f, // Rotation: yaw
|
||||||
|
GetMouseDelta().y*0.05f, // Rotation: pitch
|
||||||
|
0.0f // Rotation: roll
|
||||||
|
},
|
||||||
|
GetMouseWheelMove()*2.0f); // Move to target (zoom)
|
||||||
|
*/
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|
||||||
// Draw
|
// Draw
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@
|
||||||
|
|
||||||
#include "raylib.h"
|
#include "raylib.h"
|
||||||
|
|
||||||
|
// WARNING: This example does not build on Windows with MSVC compiler
|
||||||
#include "pthread.h" // POSIX style threads management
|
#include "pthread.h" // POSIX style threads management
|
||||||
|
|
||||||
#include <stdatomic.h> // C11 atomic data types
|
#include <stdatomic.h> // C11 atomic data types
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
*
|
*
|
||||||
* raylib [models] example - Load models M3D
|
* raylib [models] example - Load models M3D
|
||||||
*
|
*
|
||||||
* Example originally created with raylib 4.5-dev, last time updated with raylib 4.5-dev
|
* Example originally created with raylib 4.5, last time updated with raylib 4.5
|
||||||
*
|
*
|
||||||
* Example contributed by bzt (@bztsrc) and reviewed by Ramon Santamaria (@raysan5)
|
* Example contributed by bzt (@bztsrc) and reviewed by Ramon Santamaria (@raysan5)
|
||||||
*
|
*
|
||||||
|
|
@ -41,7 +41,7 @@ int main(void)
|
||||||
|
|
||||||
Vector3 position = { 0.0f, 0.0f, 0.0f }; // Set model position
|
Vector3 position = { 0.0f, 0.0f, 0.0f }; // Set model position
|
||||||
|
|
||||||
char modelFileName[128] = "resources/models/m3d/CesiumMan.m3d";
|
char modelFileName[128] = "resources/models/m3d/cesium_man.m3d";
|
||||||
bool drawMesh = 1;
|
bool drawMesh = 1;
|
||||||
bool drawSkeleton = 1;
|
bool drawSkeleton = 1;
|
||||||
bool animPlaying = false; // Store anim state, what to draw
|
bool animPlaying = false; // Store anim state, what to draw
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,20 @@
|
||||||
#version 330
|
#version 330
|
||||||
|
|
||||||
|
// Input vertex attributes (from vertex shader)
|
||||||
in vec2 fragTexCoord;
|
in vec2 fragTexCoord;
|
||||||
in vec4 fragColor;
|
in vec4 fragColor;
|
||||||
|
|
||||||
|
// Input uniform values
|
||||||
uniform sampler2D texture0;
|
uniform sampler2D texture0;
|
||||||
uniform vec4 colDiffuse;
|
uniform vec4 colDiffuse;
|
||||||
|
|
||||||
|
// Output fragment color
|
||||||
|
out vec4 finalColor;
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
vec4 texelColor = texture2D(texture0, fragTexCoord);
|
vec4 texelColor = texture(texture0, fragTexCoord);
|
||||||
|
|
||||||
gl_FragColor = texelColor*colDiffuse*fragColor;
|
finalColor = texelColor*colDiffuse*fragColor;
|
||||||
gl_FragDepth = 1.0 - gl_FragCoord.z;
|
gl_FragDepth = 1.0 - finalColor.z;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
*
|
*
|
||||||
* raylib [textures] example - Draw a texture along a segmented curve
|
* raylib [textures] example - Draw a texture along a segmented curve
|
||||||
*
|
*
|
||||||
* Example originally created with raylib 4.5-dev
|
* Example originally created with raylib 4.5, last time updated with raylib 4.5
|
||||||
*
|
*
|
||||||
* Example contributed by Jeffery Myers and reviewed by Ramon Santamaria (@raysan5)
|
* Example contributed by Jeffery Myers and reviewed by Ramon Santamaria (@raysan5)
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -6,10 +6,28 @@
|
||||||
"value": "",
|
"value": "",
|
||||||
"description": ""
|
"description": ""
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "RAYLIB_VERSION_MAJOR",
|
||||||
|
"type": "INT",
|
||||||
|
"value": 4,
|
||||||
|
"description": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "RAYLIB_VERSION_MINOR",
|
||||||
|
"type": "INT",
|
||||||
|
"value": 5,
|
||||||
|
"description": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "RAYLIB_VERSION_PATCH",
|
||||||
|
"type": "INT",
|
||||||
|
"value": 0,
|
||||||
|
"description": ""
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "RAYLIB_VERSION",
|
"name": "RAYLIB_VERSION",
|
||||||
"type": "STRING",
|
"type": "STRING",
|
||||||
"value": "4.5-dev",
|
"value": "4.5",
|
||||||
"description": ""
|
"description": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -385,7 +403,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Matrix",
|
"name": "Matrix",
|
||||||
"description": "Matrix, 4x4 components, column major, OpenGL style, right handed",
|
"description": "Matrix, 4x4 components, column major, OpenGL style, right-handed",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"type": "float",
|
"type": "float",
|
||||||
|
|
@ -1045,12 +1063,12 @@
|
||||||
{
|
{
|
||||||
"type": "float",
|
"type": "float",
|
||||||
"name": "distance",
|
"name": "distance",
|
||||||
"description": "Distance to nearest hit"
|
"description": "Distance to the nearest hit"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "Vector3",
|
"type": "Vector3",
|
||||||
"name": "point",
|
"name": "point",
|
||||||
"description": "Point of nearest hit"
|
"description": "Point of the nearest hit"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "Vector3",
|
"type": "Vector3",
|
||||||
|
|
@ -2112,7 +2130,7 @@
|
||||||
{
|
{
|
||||||
"name": "MOUSE_CURSOR_RESIZE_ALL",
|
"name": "MOUSE_CURSOR_RESIZE_ALL",
|
||||||
"value": 9,
|
"value": 9,
|
||||||
"description": "The omni-directional resize/move cursor shape"
|
"description": "The omnidirectional resize/move cursor shape"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "MOUSE_CURSOR_NOT_ALLOWED",
|
"name": "MOUSE_CURSOR_NOT_ALLOWED",
|
||||||
|
|
@ -2717,7 +2735,7 @@
|
||||||
{
|
{
|
||||||
"name": "CUBEMAP_LAYOUT_LINE_HORIZONTAL",
|
"name": "CUBEMAP_LAYOUT_LINE_HORIZONTAL",
|
||||||
"value": 2,
|
"value": 2,
|
||||||
"description": "Layout is defined by an horizontal line with faces"
|
"description": "Layout is defined by a horizontal line with faces"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR",
|
"name": "CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR",
|
||||||
|
|
@ -2732,7 +2750,7 @@
|
||||||
{
|
{
|
||||||
"name": "CUBEMAP_LAYOUT_PANORAMA",
|
"name": "CUBEMAP_LAYOUT_PANORAMA",
|
||||||
"value": 5,
|
"value": 5,
|
||||||
"description": "Layout is defined by a panorama image (equirectangular map)"
|
"description": "Layout is defined by a panorama image (equirrectangular map)"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
@ -2794,12 +2812,12 @@
|
||||||
{
|
{
|
||||||
"name": "BLEND_CUSTOM",
|
"name": "BLEND_CUSTOM",
|
||||||
"value": 6,
|
"value": 6,
|
||||||
"description": "Blend textures using custom src/dst factors (use rlSetBlendMode())"
|
"description": "Blend textures using custom src/dst factors (use rlSetBlendFactors())"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "BLEND_CUSTOM_SEPARATE",
|
"name": "BLEND_CUSTOM_SEPARATE",
|
||||||
"value": 7,
|
"value": 7,
|
||||||
"description": "Blend textures using custom rgb/alpha separate src/dst factors (use rlSetBlendModeSeparate())"
|
"description": "Blend textures using custom rgb/alpha separate src/dst factors (use rlSetBlendFactorsSeparate())"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
@ -3149,7 +3167,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "SetWindowIcon",
|
"name": "SetWindowIcon",
|
||||||
"description": "Set icon for window (only PLATFORM_DESKTOP)",
|
"description": "Set icon for window (single image, RGBA 32bit, only PLATFORM_DESKTOP)",
|
||||||
"returnType": "void",
|
"returnType": "void",
|
||||||
"params": [
|
"params": [
|
||||||
{
|
{
|
||||||
|
|
@ -3158,6 +3176,21 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "SetWindowIcons",
|
||||||
|
"description": "Set icon for window (multiple images, RGBA 32bit, only PLATFORM_DESKTOP)",
|
||||||
|
"returnType": "void",
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"type": "Image *",
|
||||||
|
"name": "images"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "int",
|
||||||
|
"name": "count"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "SetWindowTitle",
|
"name": "SetWindowTitle",
|
||||||
"description": "Set title for window (only PLATFORM_DESKTOP)",
|
"description": "Set title for window (only PLATFORM_DESKTOP)",
|
||||||
|
|
@ -3632,6 +3665,17 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "IsShaderReady",
|
||||||
|
"description": "Check if a shader is ready",
|
||||||
|
"returnType": "bool",
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"type": "Shader",
|
||||||
|
"name": "shader"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "GetShaderLocation",
|
"name": "GetShaderLocation",
|
||||||
"description": "Get shader uniform location",
|
"description": "Get shader uniform location",
|
||||||
|
|
@ -4124,7 +4168,7 @@
|
||||||
"returnType": "bool",
|
"returnType": "bool",
|
||||||
"params": [
|
"params": [
|
||||||
{
|
{
|
||||||
"type": "const char *",
|
"type": "const unsigned char *",
|
||||||
"name": "data"
|
"name": "data"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -4863,12 +4907,12 @@
|
||||||
"returnType": "float"
|
"returnType": "float"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "SetCameraMode",
|
"name": "UpdateCamera",
|
||||||
"description": "Set camera mode (multiple camera modes available)",
|
"description": "Update camera position for selected mode",
|
||||||
"returnType": "void",
|
"returnType": "void",
|
||||||
"params": [
|
"params": [
|
||||||
{
|
{
|
||||||
"type": "Camera",
|
"type": "Camera *",
|
||||||
"name": "camera"
|
"name": "camera"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -4878,77 +4922,25 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "UpdateCamera",
|
"name": "UpdateCameraPro",
|
||||||
"description": "Update camera position for selected mode",
|
"description": "Update camera movement/rotation",
|
||||||
"returnType": "void",
|
"returnType": "void",
|
||||||
"params": [
|
"params": [
|
||||||
{
|
{
|
||||||
"type": "Camera *",
|
"type": "Camera *",
|
||||||
"name": "camera"
|
"name": "camera"
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "SetCameraPanControl",
|
|
||||||
"description": "Set camera pan key to combine with mouse movement (free camera)",
|
|
||||||
"returnType": "void",
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"type": "int",
|
|
||||||
"name": "keyPan"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "SetCameraAltControl",
|
|
||||||
"description": "Set camera alt key to combine with mouse movement (free camera)",
|
|
||||||
"returnType": "void",
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"type": "int",
|
|
||||||
"name": "keyAlt"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "SetCameraSmoothZoomControl",
|
|
||||||
"description": "Set camera smooth zoom key to combine with mouse (free camera)",
|
|
||||||
"returnType": "void",
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"type": "int",
|
|
||||||
"name": "keySmoothZoom"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "SetCameraMoveControls",
|
|
||||||
"description": "Set camera move controls (1st person and 3rd person cameras)",
|
|
||||||
"returnType": "void",
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"type": "int",
|
|
||||||
"name": "keyFront"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "int",
|
"type": "Vector3",
|
||||||
"name": "keyBack"
|
"name": "movement"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "int",
|
"type": "Vector3",
|
||||||
"name": "keyRight"
|
"name": "rotation"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "int",
|
"type": "float",
|
||||||
"name": "keyLeft"
|
"name": "zoom"
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "int",
|
|
||||||
"name": "keyUp"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "int",
|
|
||||||
"name": "keyDown"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
@ -6172,6 +6164,17 @@
|
||||||
"description": "Load image from screen buffer and (screenshot)",
|
"description": "Load image from screen buffer and (screenshot)",
|
||||||
"returnType": "Image"
|
"returnType": "Image"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "IsImageReady",
|
||||||
|
"description": "Check if an image is ready",
|
||||||
|
"returnType": "bool",
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"type": "Image",
|
||||||
|
"name": "image"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "UnloadImage",
|
"name": "UnloadImage",
|
||||||
"description": "Unload image from CPU memory (RAM)",
|
"description": "Unload image from CPU memory (RAM)",
|
||||||
|
|
@ -6401,6 +6404,25 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "GenImageText",
|
||||||
|
"description": "Generate image: grayscale image from text data",
|
||||||
|
"returnType": "Image",
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"type": "int",
|
||||||
|
"name": "width"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "int",
|
||||||
|
"name": "height"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "const char *",
|
||||||
|
"name": "text"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "ImageCopy",
|
"name": "ImageCopy",
|
||||||
"description": "Create an image duplicate (useful for transformations)",
|
"description": "Create an image duplicate (useful for transformations)",
|
||||||
|
|
@ -6578,6 +6600,21 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "ImageBlurGaussian",
|
||||||
|
"description": "Apply Gaussian blur using a box blur approximation",
|
||||||
|
"returnType": "void",
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"type": "Image *",
|
||||||
|
"name": "image"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "int",
|
||||||
|
"name": "blurSize"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "ImageResize",
|
"name": "ImageResize",
|
||||||
"description": "Resize image (Bicubic scaling algorithm)",
|
"description": "Resize image (Bicubic scaling algorithm)",
|
||||||
|
|
@ -7353,6 +7390,17 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "IsTextureReady",
|
||||||
|
"description": "Check if a texture is ready",
|
||||||
|
"returnType": "bool",
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"type": "Texture2D",
|
||||||
|
"name": "texture"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "UnloadTexture",
|
"name": "UnloadTexture",
|
||||||
"description": "Unload texture from GPU memory (VRAM)",
|
"description": "Unload texture from GPU memory (VRAM)",
|
||||||
|
|
@ -7364,6 +7412,17 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "IsRenderTextureReady",
|
||||||
|
"description": "Check if a render texture is ready",
|
||||||
|
"returnType": "bool",
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"type": "RenderTexture2D",
|
||||||
|
"name": "target"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "UnloadRenderTexture",
|
"name": "UnloadRenderTexture",
|
||||||
"description": "Unload render texture from GPU memory (VRAM)",
|
"description": "Unload render texture from GPU memory (VRAM)",
|
||||||
|
|
@ -7542,68 +7601,6 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "DrawTextureQuad",
|
|
||||||
"description": "Draw texture quad with tiling and offset parameters",
|
|
||||||
"returnType": "void",
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"type": "Texture2D",
|
|
||||||
"name": "texture"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Vector2",
|
|
||||||
"name": "tiling"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Vector2",
|
|
||||||
"name": "offset"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Rectangle",
|
|
||||||
"name": "quad"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Color",
|
|
||||||
"name": "tint"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "DrawTextureTiled",
|
|
||||||
"description": "Draw part of a texture (defined by a rectangle) with rotation and scale tiled into dest.",
|
|
||||||
"returnType": "void",
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"type": "Texture2D",
|
|
||||||
"name": "texture"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Rectangle",
|
|
||||||
"name": "source"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Rectangle",
|
|
||||||
"name": "dest"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Vector2",
|
|
||||||
"name": "origin"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "float",
|
|
||||||
"name": "rotation"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "float",
|
|
||||||
"name": "scale"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Color",
|
|
||||||
"name": "tint"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "DrawTexturePro",
|
"name": "DrawTexturePro",
|
||||||
"description": "Draw a part of a texture defined by a rectangle with 'pro' parameters",
|
"description": "Draw a part of a texture defined by a rectangle with 'pro' parameters",
|
||||||
|
|
@ -7666,37 +7663,6 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "DrawTexturePoly",
|
|
||||||
"description": "Draw a textured polygon",
|
|
||||||
"returnType": "void",
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"type": "Texture2D",
|
|
||||||
"name": "texture"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Vector2",
|
|
||||||
"name": "center"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Vector2 *",
|
|
||||||
"name": "points"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Vector2 *",
|
|
||||||
"name": "texcoords"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "int",
|
|
||||||
"name": "pointCount"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Color",
|
|
||||||
"name": "tint"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "Fade",
|
"name": "Fade",
|
||||||
"description": "Get color with alpha applied, alpha goes from 0.0f to 1.0f",
|
"description": "Get color with alpha applied, alpha goes from 0.0f to 1.0f",
|
||||||
|
|
@ -7775,6 +7741,51 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "ColorTint",
|
||||||
|
"description": "Get color multiplied with another color",
|
||||||
|
"returnType": "Color",
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"type": "Color",
|
||||||
|
"name": "color"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Color",
|
||||||
|
"name": "tint"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ColorBrightness",
|
||||||
|
"description": "Get color with brightness correction, brightness factor goes from -1.0f to 1.0f",
|
||||||
|
"returnType": "Color",
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"type": "Color",
|
||||||
|
"name": "color"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "float",
|
||||||
|
"name": "factor"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ColorContrast",
|
||||||
|
"description": "Get color with contrast correction, contrast values between -1.0f and 1.0f",
|
||||||
|
"returnType": "Color",
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"type": "Color",
|
||||||
|
"name": "color"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "float",
|
||||||
|
"name": "contrast"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "ColorAlpha",
|
"name": "ColorAlpha",
|
||||||
"description": "Get color with alpha applied, alpha goes from 0.0f to 1.0f",
|
"description": "Get color with alpha applied, alpha goes from 0.0f to 1.0f",
|
||||||
|
|
@ -7962,6 +7973,17 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "IsFontReady",
|
||||||
|
"description": "Check if a font is ready",
|
||||||
|
"returnType": "bool",
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"type": "Font",
|
||||||
|
"name": "font"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "LoadFontData",
|
"name": "LoadFontData",
|
||||||
"description": "Load font data for further use",
|
"description": "Load font data for further use",
|
||||||
|
|
@ -8869,72 +8891,6 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "DrawCubeTexture",
|
|
||||||
"description": "Draw cube textured",
|
|
||||||
"returnType": "void",
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"type": "Texture2D",
|
|
||||||
"name": "texture"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Vector3",
|
|
||||||
"name": "position"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "float",
|
|
||||||
"name": "width"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "float",
|
|
||||||
"name": "height"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "float",
|
|
||||||
"name": "length"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Color",
|
|
||||||
"name": "color"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "DrawCubeTextureRec",
|
|
||||||
"description": "Draw cube with a region of a texture",
|
|
||||||
"returnType": "void",
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"type": "Texture2D",
|
|
||||||
"name": "texture"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Rectangle",
|
|
||||||
"name": "source"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Vector3",
|
|
||||||
"name": "position"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "float",
|
|
||||||
"name": "width"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "float",
|
|
||||||
"name": "height"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "float",
|
|
||||||
"name": "length"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Color",
|
|
||||||
"name": "color"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "DrawSphere",
|
"name": "DrawSphere",
|
||||||
"description": "Draw sphere",
|
"description": "Draw sphere",
|
||||||
|
|
@ -9132,6 +9088,68 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "DrawCapsule",
|
||||||
|
"description": "Draw a capsule with the center of its sphere caps at startPos and endPos",
|
||||||
|
"returnType": "void",
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"type": "Vector3",
|
||||||
|
"name": "startPos"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Vector3",
|
||||||
|
"name": "endPos"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "float",
|
||||||
|
"name": "radius"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "int",
|
||||||
|
"name": "slices"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "int",
|
||||||
|
"name": "rings"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Color",
|
||||||
|
"name": "color"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "DrawCapsuleWires",
|
||||||
|
"description": "Draw capsule wireframe with the center of its sphere caps at startPos and endPos",
|
||||||
|
"returnType": "void",
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"type": "Vector3",
|
||||||
|
"name": "startPos"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Vector3",
|
||||||
|
"name": "endPos"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "float",
|
||||||
|
"name": "radius"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "int",
|
||||||
|
"name": "slices"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "int",
|
||||||
|
"name": "rings"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "Color",
|
||||||
|
"name": "color"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "DrawPlane",
|
"name": "DrawPlane",
|
||||||
"description": "Draw a plane XZ",
|
"description": "Draw a plane XZ",
|
||||||
|
|
@ -9204,9 +9222,9 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "UnloadModel",
|
"name": "IsModelReady",
|
||||||
"description": "Unload model (including meshes) from memory (RAM and/or VRAM)",
|
"description": "Check if a model is ready",
|
||||||
"returnType": "void",
|
"returnType": "bool",
|
||||||
"params": [
|
"params": [
|
||||||
{
|
{
|
||||||
"type": "Model",
|
"type": "Model",
|
||||||
|
|
@ -9215,8 +9233,8 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "UnloadModelKeepMeshes",
|
"name": "UnloadModel",
|
||||||
"description": "Unload model (but not meshes) from memory (RAM and/or VRAM)",
|
"description": "Unload model (including meshes) from memory (RAM and/or VRAM)",
|
||||||
"returnType": "void",
|
"returnType": "void",
|
||||||
"params": [
|
"params": [
|
||||||
{
|
{
|
||||||
|
|
@ -9821,6 +9839,17 @@
|
||||||
"description": "Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps)",
|
"description": "Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps)",
|
||||||
"returnType": "Material"
|
"returnType": "Material"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "IsMaterialReady",
|
||||||
|
"description": "Check if a material is ready",
|
||||||
|
"returnType": "bool",
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"type": "Material",
|
||||||
|
"name": "material"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "UnloadMaterial",
|
"name": "UnloadMaterial",
|
||||||
"description": "Unload material from GPU memory (VRAM)",
|
"description": "Unload material from GPU memory (VRAM)",
|
||||||
|
|
@ -10161,6 +10190,17 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "IsWaveReady",
|
||||||
|
"description": "Checks if wave data is ready",
|
||||||
|
"returnType": "bool",
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"type": "Wave",
|
||||||
|
"name": "wave"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "LoadSound",
|
"name": "LoadSound",
|
||||||
"description": "Load sound from file",
|
"description": "Load sound from file",
|
||||||
|
|
@ -10183,6 +10223,17 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "IsSoundReady",
|
||||||
|
"description": "Checks if a sound is ready",
|
||||||
|
"returnType": "bool",
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"type": "Sound",
|
||||||
|
"name": "sound"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "UpdateSound",
|
"name": "UpdateSound",
|
||||||
"description": "Update sound buffer with new data",
|
"description": "Update sound buffer with new data",
|
||||||
|
|
@ -10298,27 +10349,6 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "PlaySoundMulti",
|
|
||||||
"description": "Play a sound (using multichannel buffer pool)",
|
|
||||||
"returnType": "void",
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"type": "Sound",
|
|
||||||
"name": "sound"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "StopSoundMulti",
|
|
||||||
"description": "Stop any sound playing (using multichannel buffer pool)",
|
|
||||||
"returnType": "void"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "GetSoundsPlaying",
|
|
||||||
"description": "Get number of sounds playing in the multichannel",
|
|
||||||
"returnType": "int"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "IsSoundPlaying",
|
"name": "IsSoundPlaying",
|
||||||
"description": "Check if a sound is currently playing",
|
"description": "Check if a sound is currently playing",
|
||||||
|
|
@ -10480,6 +10510,17 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "IsMusicReady",
|
||||||
|
"description": "Checks if a music stream is ready",
|
||||||
|
"returnType": "bool",
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"type": "Music",
|
||||||
|
"name": "music"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "UnloadMusicStream",
|
"name": "UnloadMusicStream",
|
||||||
"description": "Unload music stream",
|
"description": "Unload music stream",
|
||||||
|
|
@ -10658,6 +10699,17 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "IsAudioStreamReady",
|
||||||
|
"description": "Checks if an audio stream is ready",
|
||||||
|
"returnType": "bool",
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"type": "AudioStream",
|
||||||
|
"name": "stream"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "UnloadAudioStream",
|
"name": "UnloadAudioStream",
|
||||||
"description": "Unload audio stream and free memory",
|
"description": "Unload audio stream and free memory",
|
||||||
|
|
@ -10854,6 +10906,28 @@
|
||||||
"name": "processor"
|
"name": "processor"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "AttachAudioMixedProcessor",
|
||||||
|
"description": "Attach audio stream processor to the entire audio pipeline",
|
||||||
|
"returnType": "void",
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"type": "AudioCallback",
|
||||||
|
"name": "processor"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "DetachAudioMixedProcessor",
|
||||||
|
"description": "Detach audio stream processor from the entire audio pipeline",
|
||||||
|
"returnType": "void",
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"type": "AudioCallback",
|
||||||
|
"name": "processor"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,10 +6,28 @@ return {
|
||||||
value = "",
|
value = "",
|
||||||
description = ""
|
description = ""
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name = "RAYLIB_VERSION_MAJOR",
|
||||||
|
type = "INT",
|
||||||
|
value = 4,
|
||||||
|
description = ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name = "RAYLIB_VERSION_MINOR",
|
||||||
|
type = "INT",
|
||||||
|
value = 5,
|
||||||
|
description = ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name = "RAYLIB_VERSION_PATCH",
|
||||||
|
type = "INT",
|
||||||
|
value = 0,
|
||||||
|
description = ""
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name = "RAYLIB_VERSION",
|
name = "RAYLIB_VERSION",
|
||||||
type = "STRING",
|
type = "STRING",
|
||||||
value = "4.5-dev",
|
value = "4.5",
|
||||||
description = ""
|
description = ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -385,7 +403,7 @@ return {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name = "Matrix",
|
name = "Matrix",
|
||||||
description = "Matrix, 4x4 components, column major, OpenGL style, right handed",
|
description = "Matrix, 4x4 components, column major, OpenGL style, right-handed",
|
||||||
fields = {
|
fields = {
|
||||||
{
|
{
|
||||||
type = "float",
|
type = "float",
|
||||||
|
|
@ -1045,12 +1063,12 @@ return {
|
||||||
{
|
{
|
||||||
type = "float",
|
type = "float",
|
||||||
name = "distance",
|
name = "distance",
|
||||||
description = "Distance to nearest hit"
|
description = "Distance to the nearest hit"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type = "Vector3",
|
type = "Vector3",
|
||||||
name = "point",
|
name = "point",
|
||||||
description = "Point of nearest hit"
|
description = "Point of the nearest hit"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type = "Vector3",
|
type = "Vector3",
|
||||||
|
|
@ -2112,7 +2130,7 @@ return {
|
||||||
{
|
{
|
||||||
name = "MOUSE_CURSOR_RESIZE_ALL",
|
name = "MOUSE_CURSOR_RESIZE_ALL",
|
||||||
value = 9,
|
value = 9,
|
||||||
description = "The omni-directional resize/move cursor shape"
|
description = "The omnidirectional resize/move cursor shape"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name = "MOUSE_CURSOR_NOT_ALLOWED",
|
name = "MOUSE_CURSOR_NOT_ALLOWED",
|
||||||
|
|
@ -2717,7 +2735,7 @@ return {
|
||||||
{
|
{
|
||||||
name = "CUBEMAP_LAYOUT_LINE_HORIZONTAL",
|
name = "CUBEMAP_LAYOUT_LINE_HORIZONTAL",
|
||||||
value = 2,
|
value = 2,
|
||||||
description = "Layout is defined by an horizontal line with faces"
|
description = "Layout is defined by a horizontal line with faces"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name = "CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR",
|
name = "CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR",
|
||||||
|
|
@ -2732,7 +2750,7 @@ return {
|
||||||
{
|
{
|
||||||
name = "CUBEMAP_LAYOUT_PANORAMA",
|
name = "CUBEMAP_LAYOUT_PANORAMA",
|
||||||
value = 5,
|
value = 5,
|
||||||
description = "Layout is defined by a panorama image (equirectangular map)"
|
description = "Layout is defined by a panorama image (equirrectangular map)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -2794,12 +2812,12 @@ return {
|
||||||
{
|
{
|
||||||
name = "BLEND_CUSTOM",
|
name = "BLEND_CUSTOM",
|
||||||
value = 6,
|
value = 6,
|
||||||
description = "Blend textures using custom src/dst factors (use rlSetBlendMode())"
|
description = "Blend textures using custom src/dst factors (use rlSetBlendFactors())"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name = "BLEND_CUSTOM_SEPARATE",
|
name = "BLEND_CUSTOM_SEPARATE",
|
||||||
value = 7,
|
value = 7,
|
||||||
description = "Blend textures using custom rgb/alpha separate src/dst factors (use rlSetBlendModeSeparate())"
|
description = "Blend textures using custom rgb/alpha separate src/dst factors (use rlSetBlendFactorsSeparate())"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -3092,12 +3110,21 @@ return {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name = "SetWindowIcon",
|
name = "SetWindowIcon",
|
||||||
description = "Set icon for window (only PLATFORM_DESKTOP)",
|
description = "Set icon for window (single image, RGBA 32bit, only PLATFORM_DESKTOP)",
|
||||||
returnType = "void",
|
returnType = "void",
|
||||||
params = {
|
params = {
|
||||||
{type = "Image", name = "image"}
|
{type = "Image", name = "image"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name = "SetWindowIcons",
|
||||||
|
description = "Set icon for window (multiple images, RGBA 32bit, only PLATFORM_DESKTOP)",
|
||||||
|
returnType = "void",
|
||||||
|
params = {
|
||||||
|
{type = "Image *", name = "images"},
|
||||||
|
{type = "int", name = "count"}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name = "SetWindowTitle",
|
name = "SetWindowTitle",
|
||||||
description = "Set title for window (only PLATFORM_DESKTOP)",
|
description = "Set title for window (only PLATFORM_DESKTOP)",
|
||||||
|
|
@ -3467,6 +3494,14 @@ return {
|
||||||
{type = "const char *", name = "fsCode"}
|
{type = "const char *", name = "fsCode"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name = "IsShaderReady",
|
||||||
|
description = "Check if a shader is ready",
|
||||||
|
returnType = "bool",
|
||||||
|
params = {
|
||||||
|
{type = "Shader", name = "shader"}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name = "GetShaderLocation",
|
name = "GetShaderLocation",
|
||||||
description = "Get shader uniform location",
|
description = "Get shader uniform location",
|
||||||
|
|
@ -3778,7 +3813,7 @@ return {
|
||||||
description = "Export data to code (.h), returns true on success",
|
description = "Export data to code (.h), returns true on success",
|
||||||
returnType = "bool",
|
returnType = "bool",
|
||||||
params = {
|
params = {
|
||||||
{type = "const char *", name = "data"},
|
{type = "const unsigned char *", name = "data"},
|
||||||
{type = "unsigned int", name = "size"},
|
{type = "unsigned int", name = "size"},
|
||||||
{type = "const char *", name = "fileName"}
|
{type = "const char *", name = "fileName"}
|
||||||
}
|
}
|
||||||
|
|
@ -4304,58 +4339,24 @@ return {
|
||||||
description = "Get gesture pinch angle",
|
description = "Get gesture pinch angle",
|
||||||
returnType = "float"
|
returnType = "float"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name = "SetCameraMode",
|
|
||||||
description = "Set camera mode (multiple camera modes available)",
|
|
||||||
returnType = "void",
|
|
||||||
params = {
|
|
||||||
{type = "Camera", name = "camera"},
|
|
||||||
{type = "int", name = "mode"}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name = "UpdateCamera",
|
name = "UpdateCamera",
|
||||||
description = "Update camera position for selected mode",
|
description = "Update camera position for selected mode",
|
||||||
returnType = "void",
|
returnType = "void",
|
||||||
params = {
|
params = {
|
||||||
{type = "Camera *", name = "camera"}
|
{type = "Camera *", name = "camera"},
|
||||||
|
{type = "int", name = "mode"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name = "SetCameraPanControl",
|
name = "UpdateCameraPro",
|
||||||
description = "Set camera pan key to combine with mouse movement (free camera)",
|
description = "Update camera movement/rotation",
|
||||||
returnType = "void",
|
returnType = "void",
|
||||||
params = {
|
params = {
|
||||||
{type = "int", name = "keyPan"}
|
{type = "Camera *", name = "camera"},
|
||||||
}
|
{type = "Vector3", name = "movement"},
|
||||||
},
|
{type = "Vector3", name = "rotation"},
|
||||||
{
|
{type = "float", name = "zoom"}
|
||||||
name = "SetCameraAltControl",
|
|
||||||
description = "Set camera alt key to combine with mouse movement (free camera)",
|
|
||||||
returnType = "void",
|
|
||||||
params = {
|
|
||||||
{type = "int", name = "keyAlt"}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name = "SetCameraSmoothZoomControl",
|
|
||||||
description = "Set camera smooth zoom key to combine with mouse (free camera)",
|
|
||||||
returnType = "void",
|
|
||||||
params = {
|
|
||||||
{type = "int", name = "keySmoothZoom"}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name = "SetCameraMoveControls",
|
|
||||||
description = "Set camera move controls (1st person and 3rd person cameras)",
|
|
||||||
returnType = "void",
|
|
||||||
params = {
|
|
||||||
{type = "int", name = "keyFront"},
|
|
||||||
{type = "int", name = "keyBack"},
|
|
||||||
{type = "int", name = "keyRight"},
|
|
||||||
{type = "int", name = "keyLeft"},
|
|
||||||
{type = "int", name = "keyUp"},
|
|
||||||
{type = "int", name = "keyDown"}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -4945,6 +4946,14 @@ return {
|
||||||
description = "Load image from screen buffer and (screenshot)",
|
description = "Load image from screen buffer and (screenshot)",
|
||||||
returnType = "Image"
|
returnType = "Image"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name = "IsImageReady",
|
||||||
|
description = "Check if an image is ready",
|
||||||
|
returnType = "bool",
|
||||||
|
params = {
|
||||||
|
{type = "Image", name = "image"}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name = "UnloadImage",
|
name = "UnloadImage",
|
||||||
description = "Unload image from CPU memory (RAM)",
|
description = "Unload image from CPU memory (RAM)",
|
||||||
|
|
@ -5060,6 +5069,16 @@ return {
|
||||||
{type = "int", name = "tileSize"}
|
{type = "int", name = "tileSize"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name = "GenImageText",
|
||||||
|
description = "Generate image: grayscale image from text data",
|
||||||
|
returnType = "Image",
|
||||||
|
params = {
|
||||||
|
{type = "int", name = "width"},
|
||||||
|
{type = "int", name = "height"},
|
||||||
|
{type = "const char *", name = "text"}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name = "ImageCopy",
|
name = "ImageCopy",
|
||||||
description = "Create an image duplicate (useful for transformations)",
|
description = "Create an image duplicate (useful for transformations)",
|
||||||
|
|
@ -5162,6 +5181,15 @@ return {
|
||||||
{type = "Image *", name = "image"}
|
{type = "Image *", name = "image"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name = "ImageBlurGaussian",
|
||||||
|
description = "Apply Gaussian blur using a box blur approximation",
|
||||||
|
returnType = "void",
|
||||||
|
params = {
|
||||||
|
{type = "Image *", name = "image"},
|
||||||
|
{type = "int", name = "blurSize"}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name = "ImageResize",
|
name = "ImageResize",
|
||||||
description = "Resize image (Bicubic scaling algorithm)",
|
description = "Resize image (Bicubic scaling algorithm)",
|
||||||
|
|
@ -5571,6 +5599,14 @@ return {
|
||||||
{type = "int", name = "height"}
|
{type = "int", name = "height"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name = "IsTextureReady",
|
||||||
|
description = "Check if a texture is ready",
|
||||||
|
returnType = "bool",
|
||||||
|
params = {
|
||||||
|
{type = "Texture2D", name = "texture"}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name = "UnloadTexture",
|
name = "UnloadTexture",
|
||||||
description = "Unload texture from GPU memory (VRAM)",
|
description = "Unload texture from GPU memory (VRAM)",
|
||||||
|
|
@ -5579,6 +5615,14 @@ return {
|
||||||
{type = "Texture2D", name = "texture"}
|
{type = "Texture2D", name = "texture"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name = "IsRenderTextureReady",
|
||||||
|
description = "Check if a render texture is ready",
|
||||||
|
returnType = "bool",
|
||||||
|
params = {
|
||||||
|
{type = "RenderTexture2D", name = "target"}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name = "UnloadRenderTexture",
|
name = "UnloadRenderTexture",
|
||||||
description = "Unload render texture from GPU memory (VRAM)",
|
description = "Unload render texture from GPU memory (VRAM)",
|
||||||
|
|
@ -5676,32 +5720,6 @@ return {
|
||||||
{type = "Color", name = "tint"}
|
{type = "Color", name = "tint"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name = "DrawTextureQuad",
|
|
||||||
description = "Draw texture quad with tiling and offset parameters",
|
|
||||||
returnType = "void",
|
|
||||||
params = {
|
|
||||||
{type = "Texture2D", name = "texture"},
|
|
||||||
{type = "Vector2", name = "tiling"},
|
|
||||||
{type = "Vector2", name = "offset"},
|
|
||||||
{type = "Rectangle", name = "quad"},
|
|
||||||
{type = "Color", name = "tint"}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name = "DrawTextureTiled",
|
|
||||||
description = "Draw part of a texture (defined by a rectangle) with rotation and scale tiled into dest.",
|
|
||||||
returnType = "void",
|
|
||||||
params = {
|
|
||||||
{type = "Texture2D", name = "texture"},
|
|
||||||
{type = "Rectangle", name = "source"},
|
|
||||||
{type = "Rectangle", name = "dest"},
|
|
||||||
{type = "Vector2", name = "origin"},
|
|
||||||
{type = "float", name = "rotation"},
|
|
||||||
{type = "float", name = "scale"},
|
|
||||||
{type = "Color", name = "tint"}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name = "DrawTexturePro",
|
name = "DrawTexturePro",
|
||||||
description = "Draw a part of a texture defined by a rectangle with 'pro' parameters",
|
description = "Draw a part of a texture defined by a rectangle with 'pro' parameters",
|
||||||
|
|
@ -5728,19 +5746,6 @@ return {
|
||||||
{type = "Color", name = "tint"}
|
{type = "Color", name = "tint"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name = "DrawTexturePoly",
|
|
||||||
description = "Draw a textured polygon",
|
|
||||||
returnType = "void",
|
|
||||||
params = {
|
|
||||||
{type = "Texture2D", name = "texture"},
|
|
||||||
{type = "Vector2", name = "center"},
|
|
||||||
{type = "Vector2 *", name = "points"},
|
|
||||||
{type = "Vector2 *", name = "texcoords"},
|
|
||||||
{type = "int", name = "pointCount"},
|
|
||||||
{type = "Color", name = "tint"}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name = "Fade",
|
name = "Fade",
|
||||||
description = "Get color with alpha applied, alpha goes from 0.0f to 1.0f",
|
description = "Get color with alpha applied, alpha goes from 0.0f to 1.0f",
|
||||||
|
|
@ -5792,6 +5797,33 @@ return {
|
||||||
{type = "float", name = "value"}
|
{type = "float", name = "value"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name = "ColorTint",
|
||||||
|
description = "Get color multiplied with another color",
|
||||||
|
returnType = "Color",
|
||||||
|
params = {
|
||||||
|
{type = "Color", name = "color"},
|
||||||
|
{type = "Color", name = "tint"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name = "ColorBrightness",
|
||||||
|
description = "Get color with brightness correction, brightness factor goes from -1.0f to 1.0f",
|
||||||
|
returnType = "Color",
|
||||||
|
params = {
|
||||||
|
{type = "Color", name = "color"},
|
||||||
|
{type = "float", name = "factor"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name = "ColorContrast",
|
||||||
|
description = "Get color with contrast correction, contrast values between -1.0f and 1.0f",
|
||||||
|
returnType = "Color",
|
||||||
|
params = {
|
||||||
|
{type = "Color", name = "color"},
|
||||||
|
{type = "float", name = "contrast"}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name = "ColorAlpha",
|
name = "ColorAlpha",
|
||||||
description = "Get color with alpha applied, alpha goes from 0.0f to 1.0f",
|
description = "Get color with alpha applied, alpha goes from 0.0f to 1.0f",
|
||||||
|
|
@ -5895,6 +5927,14 @@ return {
|
||||||
{type = "int", name = "glyphCount"}
|
{type = "int", name = "glyphCount"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name = "IsFontReady",
|
||||||
|
description = "Check if a font is ready",
|
||||||
|
returnType = "bool",
|
||||||
|
params = {
|
||||||
|
{type = "Font", name = "font"}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name = "LoadFontData",
|
name = "LoadFontData",
|
||||||
description = "Load font data for further use",
|
description = "Load font data for further use",
|
||||||
|
|
@ -6379,33 +6419,6 @@ return {
|
||||||
{type = "Color", name = "color"}
|
{type = "Color", name = "color"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name = "DrawCubeTexture",
|
|
||||||
description = "Draw cube textured",
|
|
||||||
returnType = "void",
|
|
||||||
params = {
|
|
||||||
{type = "Texture2D", name = "texture"},
|
|
||||||
{type = "Vector3", name = "position"},
|
|
||||||
{type = "float", name = "width"},
|
|
||||||
{type = "float", name = "height"},
|
|
||||||
{type = "float", name = "length"},
|
|
||||||
{type = "Color", name = "color"}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name = "DrawCubeTextureRec",
|
|
||||||
description = "Draw cube with a region of a texture",
|
|
||||||
returnType = "void",
|
|
||||||
params = {
|
|
||||||
{type = "Texture2D", name = "texture"},
|
|
||||||
{type = "Rectangle", name = "source"},
|
|
||||||
{type = "Vector3", name = "position"},
|
|
||||||
{type = "float", name = "width"},
|
|
||||||
{type = "float", name = "height"},
|
|
||||||
{type = "float", name = "length"},
|
|
||||||
{type = "Color", name = "color"}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name = "DrawSphere",
|
name = "DrawSphere",
|
||||||
description = "Draw sphere",
|
description = "Draw sphere",
|
||||||
|
|
@ -6492,6 +6505,32 @@ return {
|
||||||
{type = "Color", name = "color"}
|
{type = "Color", name = "color"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name = "DrawCapsule",
|
||||||
|
description = "Draw a capsule with the center of its sphere caps at startPos and endPos",
|
||||||
|
returnType = "void",
|
||||||
|
params = {
|
||||||
|
{type = "Vector3", name = "startPos"},
|
||||||
|
{type = "Vector3", name = "endPos"},
|
||||||
|
{type = "float", name = "radius"},
|
||||||
|
{type = "int", name = "slices"},
|
||||||
|
{type = "int", name = "rings"},
|
||||||
|
{type = "Color", name = "color"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name = "DrawCapsuleWires",
|
||||||
|
description = "Draw capsule wireframe with the center of its sphere caps at startPos and endPos",
|
||||||
|
returnType = "void",
|
||||||
|
params = {
|
||||||
|
{type = "Vector3", name = "startPos"},
|
||||||
|
{type = "Vector3", name = "endPos"},
|
||||||
|
{type = "float", name = "radius"},
|
||||||
|
{type = "int", name = "slices"},
|
||||||
|
{type = "int", name = "rings"},
|
||||||
|
{type = "Color", name = "color"}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name = "DrawPlane",
|
name = "DrawPlane",
|
||||||
description = "Draw a plane XZ",
|
description = "Draw a plane XZ",
|
||||||
|
|
@ -6537,16 +6576,16 @@ return {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name = "UnloadModel",
|
name = "IsModelReady",
|
||||||
description = "Unload model (including meshes) from memory (RAM and/or VRAM)",
|
description = "Check if a model is ready",
|
||||||
returnType = "void",
|
returnType = "bool",
|
||||||
params = {
|
params = {
|
||||||
{type = "Model", name = "model"}
|
{type = "Model", name = "model"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name = "UnloadModelKeepMeshes",
|
name = "UnloadModel",
|
||||||
description = "Unload model (but not meshes) from memory (RAM and/or VRAM)",
|
description = "Unload model (including meshes) from memory (RAM and/or VRAM)",
|
||||||
returnType = "void",
|
returnType = "void",
|
||||||
params = {
|
params = {
|
||||||
{type = "Model", name = "model"}
|
{type = "Model", name = "model"}
|
||||||
|
|
@ -6857,6 +6896,14 @@ return {
|
||||||
description = "Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps)",
|
description = "Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps)",
|
||||||
returnType = "Material"
|
returnType = "Material"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name = "IsMaterialReady",
|
||||||
|
description = "Check if a material is ready",
|
||||||
|
returnType = "bool",
|
||||||
|
params = {
|
||||||
|
{type = "Material", name = "material"}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name = "UnloadMaterial",
|
name = "UnloadMaterial",
|
||||||
description = "Unload material from GPU memory (VRAM)",
|
description = "Unload material from GPU memory (VRAM)",
|
||||||
|
|
@ -7053,6 +7100,14 @@ return {
|
||||||
{type = "int", name = "dataSize"}
|
{type = "int", name = "dataSize"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name = "IsWaveReady",
|
||||||
|
description = "Checks if wave data is ready",
|
||||||
|
returnType = "bool",
|
||||||
|
params = {
|
||||||
|
{type = "Wave", name = "wave"}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name = "LoadSound",
|
name = "LoadSound",
|
||||||
description = "Load sound from file",
|
description = "Load sound from file",
|
||||||
|
|
@ -7069,6 +7124,14 @@ return {
|
||||||
{type = "Wave", name = "wave"}
|
{type = "Wave", name = "wave"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name = "IsSoundReady",
|
||||||
|
description = "Checks if a sound is ready",
|
||||||
|
returnType = "bool",
|
||||||
|
params = {
|
||||||
|
{type = "Sound", name = "sound"}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name = "UpdateSound",
|
name = "UpdateSound",
|
||||||
description = "Update sound buffer with new data",
|
description = "Update sound buffer with new data",
|
||||||
|
|
@ -7145,24 +7208,6 @@ return {
|
||||||
{type = "Sound", name = "sound"}
|
{type = "Sound", name = "sound"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name = "PlaySoundMulti",
|
|
||||||
description = "Play a sound (using multichannel buffer pool)",
|
|
||||||
returnType = "void",
|
|
||||||
params = {
|
|
||||||
{type = "Sound", name = "sound"}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name = "StopSoundMulti",
|
|
||||||
description = "Stop any sound playing (using multichannel buffer pool)",
|
|
||||||
returnType = "void"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name = "GetSoundsPlaying",
|
|
||||||
description = "Get number of sounds playing in the multichannel",
|
|
||||||
returnType = "int"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name = "IsSoundPlaying",
|
name = "IsSoundPlaying",
|
||||||
description = "Check if a sound is currently playing",
|
description = "Check if a sound is currently playing",
|
||||||
|
|
@ -7261,6 +7306,14 @@ return {
|
||||||
{type = "int", name = "dataSize"}
|
{type = "int", name = "dataSize"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name = "IsMusicReady",
|
||||||
|
description = "Checks if a music stream is ready",
|
||||||
|
returnType = "bool",
|
||||||
|
params = {
|
||||||
|
{type = "Music", name = "music"}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name = "UnloadMusicStream",
|
name = "UnloadMusicStream",
|
||||||
description = "Unload music stream",
|
description = "Unload music stream",
|
||||||
|
|
@ -7379,6 +7432,14 @@ return {
|
||||||
{type = "unsigned int", name = "channels"}
|
{type = "unsigned int", name = "channels"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name = "IsAudioStreamReady",
|
||||||
|
description = "Checks if an audio stream is ready",
|
||||||
|
returnType = "bool",
|
||||||
|
params = {
|
||||||
|
{type = "AudioStream", name = "stream"}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name = "UnloadAudioStream",
|
name = "UnloadAudioStream",
|
||||||
description = "Unload audio stream and free memory",
|
description = "Unload audio stream and free memory",
|
||||||
|
|
@ -7506,6 +7567,22 @@ return {
|
||||||
{type = "AudioStream", name = "stream"},
|
{type = "AudioStream", name = "stream"},
|
||||||
{type = "AudioCallback", name = "processor"}
|
{type = "AudioCallback", name = "processor"}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name = "AttachAudioMixedProcessor",
|
||||||
|
description = "Attach audio stream processor to the entire audio pipeline",
|
||||||
|
returnType = "void",
|
||||||
|
params = {
|
||||||
|
{type = "AudioCallback", name = "processor"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name = "DetachAudioMixedProcessor",
|
||||||
|
description = "Detach audio stream processor from the entire audio pipeline",
|
||||||
|
returnType = "void",
|
||||||
|
params = {
|
||||||
|
{type = "AudioCallback", name = "processor"}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,8 +1,11 @@
|
||||||
<?xml version="1.0" encoding="Windows-1252" ?>
|
<?xml version="1.0" encoding="Windows-1252" ?>
|
||||||
<raylibAPI>
|
<raylibAPI>
|
||||||
<Defines count="53">
|
<Defines count="56">
|
||||||
<Define name="RAYLIB_H" type="GUARD" value="" desc="" />
|
<Define name="RAYLIB_H" type="GUARD" value="" desc="" />
|
||||||
<Define name="RAYLIB_VERSION" type="STRING" value="4.5-dev" desc="" />
|
<Define name="RAYLIB_VERSION_MAJOR" type="INT" value="4" desc="" />
|
||||||
|
<Define name="RAYLIB_VERSION_MINOR" type="INT" value="5" desc="" />
|
||||||
|
<Define name="RAYLIB_VERSION_PATCH" type="INT" value="0" desc="" />
|
||||||
|
<Define name="RAYLIB_VERSION" type="STRING" value="4.5" desc="" />
|
||||||
<Define name="__declspec(x)" type="MACRO" value="__attribute__((x))" desc="" />
|
<Define name="__declspec(x)" type="MACRO" value="__attribute__((x))" desc="" />
|
||||||
<Define name="RLAPI" type="UNKNOWN" value="__declspec(dllexport)" desc="We are building the library as a Win32 shared library (.dll)" />
|
<Define name="RLAPI" type="UNKNOWN" value="__declspec(dllexport)" desc="We are building the library as a Win32 shared library (.dll)" />
|
||||||
<Define name="PI" type="FLOAT" value="3.14159265358979323846" desc="" />
|
<Define name="PI" type="FLOAT" value="3.14159265358979323846" desc="" />
|
||||||
|
|
@ -71,7 +74,7 @@
|
||||||
<Field type="float" name="z" desc="Vector z component" />
|
<Field type="float" name="z" desc="Vector z component" />
|
||||||
<Field type="float" name="w" desc="Vector w component" />
|
<Field type="float" name="w" desc="Vector w component" />
|
||||||
</Struct>
|
</Struct>
|
||||||
<Struct name="Matrix" fieldCount="16" desc="Matrix, 4x4 components, column major, OpenGL style, right handed">
|
<Struct name="Matrix" fieldCount="16" desc="Matrix, 4x4 components, column major, OpenGL style, right-handed">
|
||||||
<Field type="float" name="m0" desc="Matrix first row (4 components)" />
|
<Field type="float" name="m0" desc="Matrix first row (4 components)" />
|
||||||
<Field type="float" name="m4" desc="Matrix first row (4 components)" />
|
<Field type="float" name="m4" desc="Matrix first row (4 components)" />
|
||||||
<Field type="float" name="m8" desc="Matrix first row (4 components)" />
|
<Field type="float" name="m8" desc="Matrix first row (4 components)" />
|
||||||
|
|
@ -219,8 +222,8 @@
|
||||||
</Struct>
|
</Struct>
|
||||||
<Struct name="RayCollision" fieldCount="4" desc="RayCollision, ray hit information">
|
<Struct name="RayCollision" fieldCount="4" desc="RayCollision, ray hit information">
|
||||||
<Field type="bool" name="hit" desc="Did the ray hit something?" />
|
<Field type="bool" name="hit" desc="Did the ray hit something?" />
|
||||||
<Field type="float" name="distance" desc="Distance to nearest hit" />
|
<Field type="float" name="distance" desc="Distance to the nearest hit" />
|
||||||
<Field type="Vector3" name="point" desc="Point of nearest hit" />
|
<Field type="Vector3" name="point" desc="Point of the nearest hit" />
|
||||||
<Field type="Vector3" name="normal" desc="Surface normal of hit" />
|
<Field type="Vector3" name="normal" desc="Surface normal of hit" />
|
||||||
</Struct>
|
</Struct>
|
||||||
<Struct name="BoundingBox" fieldCount="2" desc="BoundingBox">
|
<Struct name="BoundingBox" fieldCount="2" desc="BoundingBox">
|
||||||
|
|
@ -446,7 +449,7 @@
|
||||||
<Value name="MOUSE_CURSOR_RESIZE_NS" integer="6" desc="Vertical resize/move arrow shape" />
|
<Value name="MOUSE_CURSOR_RESIZE_NS" integer="6" desc="Vertical resize/move arrow shape" />
|
||||||
<Value name="MOUSE_CURSOR_RESIZE_NWSE" integer="7" desc="Top-left to bottom-right diagonal resize/move arrow shape" />
|
<Value name="MOUSE_CURSOR_RESIZE_NWSE" integer="7" desc="Top-left to bottom-right diagonal resize/move arrow shape" />
|
||||||
<Value name="MOUSE_CURSOR_RESIZE_NESW" integer="8" desc="The top-right to bottom-left diagonal resize/move arrow shape" />
|
<Value name="MOUSE_CURSOR_RESIZE_NESW" integer="8" desc="The top-right to bottom-left diagonal resize/move arrow shape" />
|
||||||
<Value name="MOUSE_CURSOR_RESIZE_ALL" integer="9" desc="The omni-directional resize/move cursor shape" />
|
<Value name="MOUSE_CURSOR_RESIZE_ALL" integer="9" desc="The omnidirectional resize/move cursor shape" />
|
||||||
<Value name="MOUSE_CURSOR_NOT_ALLOWED" integer="10" desc="The operation-not-allowed shape" />
|
<Value name="MOUSE_CURSOR_NOT_ALLOWED" integer="10" desc="The operation-not-allowed shape" />
|
||||||
</Enum>
|
</Enum>
|
||||||
<Enum name="GamepadButton" valueCount="18" desc="Gamepad buttons">
|
<Enum name="GamepadButton" valueCount="18" desc="Gamepad buttons">
|
||||||
|
|
@ -575,10 +578,10 @@
|
||||||
<Enum name="CubemapLayout" valueCount="6" desc="Cubemap layouts">
|
<Enum name="CubemapLayout" valueCount="6" desc="Cubemap layouts">
|
||||||
<Value name="CUBEMAP_LAYOUT_AUTO_DETECT" integer="0" desc="Automatically detect layout type" />
|
<Value name="CUBEMAP_LAYOUT_AUTO_DETECT" integer="0" desc="Automatically detect layout type" />
|
||||||
<Value name="CUBEMAP_LAYOUT_LINE_VERTICAL" integer="1" desc="Layout is defined by a vertical line with faces" />
|
<Value name="CUBEMAP_LAYOUT_LINE_VERTICAL" integer="1" desc="Layout is defined by a vertical line with faces" />
|
||||||
<Value name="CUBEMAP_LAYOUT_LINE_HORIZONTAL" integer="2" desc="Layout is defined by an horizontal line with faces" />
|
<Value name="CUBEMAP_LAYOUT_LINE_HORIZONTAL" integer="2" desc="Layout is defined by a horizontal line with faces" />
|
||||||
<Value name="CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR" integer="3" desc="Layout is defined by a 3x4 cross with cubemap faces" />
|
<Value name="CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR" integer="3" desc="Layout is defined by a 3x4 cross with cubemap faces" />
|
||||||
<Value name="CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE" integer="4" desc="Layout is defined by a 4x3 cross with cubemap faces" />
|
<Value name="CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE" integer="4" desc="Layout is defined by a 4x3 cross with cubemap faces" />
|
||||||
<Value name="CUBEMAP_LAYOUT_PANORAMA" integer="5" desc="Layout is defined by a panorama image (equirectangular map)" />
|
<Value name="CUBEMAP_LAYOUT_PANORAMA" integer="5" desc="Layout is defined by a panorama image (equirrectangular map)" />
|
||||||
</Enum>
|
</Enum>
|
||||||
<Enum name="FontType" valueCount="3" desc="Font type, defines generation method">
|
<Enum name="FontType" valueCount="3" desc="Font type, defines generation method">
|
||||||
<Value name="FONT_DEFAULT" integer="0" desc="Default font generation, anti-aliased" />
|
<Value name="FONT_DEFAULT" integer="0" desc="Default font generation, anti-aliased" />
|
||||||
|
|
@ -592,8 +595,8 @@
|
||||||
<Value name="BLEND_ADD_COLORS" integer="3" desc="Blend textures adding colors (alternative)" />
|
<Value name="BLEND_ADD_COLORS" integer="3" desc="Blend textures adding colors (alternative)" />
|
||||||
<Value name="BLEND_SUBTRACT_COLORS" integer="4" desc="Blend textures subtracting colors (alternative)" />
|
<Value name="BLEND_SUBTRACT_COLORS" integer="4" desc="Blend textures subtracting colors (alternative)" />
|
||||||
<Value name="BLEND_ALPHA_PREMULTIPLY" integer="5" desc="Blend premultiplied textures considering alpha" />
|
<Value name="BLEND_ALPHA_PREMULTIPLY" integer="5" desc="Blend premultiplied textures considering alpha" />
|
||||||
<Value name="BLEND_CUSTOM" integer="6" desc="Blend textures using custom src/dst factors (use rlSetBlendMode())" />
|
<Value name="BLEND_CUSTOM" integer="6" desc="Blend textures using custom src/dst factors (use rlSetBlendFactors())" />
|
||||||
<Value name="BLEND_CUSTOM_SEPARATE" integer="7" desc="Blend textures using custom rgb/alpha separate src/dst factors (use rlSetBlendModeSeparate())" />
|
<Value name="BLEND_CUSTOM_SEPARATE" integer="7" desc="Blend textures using custom rgb/alpha separate src/dst factors (use rlSetBlendFactorsSeparate())" />
|
||||||
</Enum>
|
</Enum>
|
||||||
<Enum name="Gesture" valueCount="11" desc="Gesture">
|
<Enum name="Gesture" valueCount="11" desc="Gesture">
|
||||||
<Value name="GESTURE_NONE" integer="0" desc="No gesture" />
|
<Value name="GESTURE_NONE" integer="0" desc="No gesture" />
|
||||||
|
|
@ -652,7 +655,7 @@
|
||||||
<Param type="unsigned int" name="frames" desc="" />
|
<Param type="unsigned int" name="frames" desc="" />
|
||||||
</Callback>
|
</Callback>
|
||||||
</Callbacks>
|
</Callbacks>
|
||||||
<Functions count="509">
|
<Functions count="517">
|
||||||
<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="" />
|
||||||
|
|
@ -693,9 +696,13 @@
|
||||||
</Function>
|
</Function>
|
||||||
<Function name="RestoreWindow" retType="void" paramCount="0" desc="Set window state: not minimized/maximized (only PLATFORM_DESKTOP)">
|
<Function name="RestoreWindow" retType="void" paramCount="0" desc="Set window state: not minimized/maximized (only PLATFORM_DESKTOP)">
|
||||||
</Function>
|
</Function>
|
||||||
<Function name="SetWindowIcon" retType="void" paramCount="1" desc="Set icon for window (only PLATFORM_DESKTOP)">
|
<Function name="SetWindowIcon" retType="void" paramCount="1" desc="Set icon for window (single image, RGBA 32bit, only PLATFORM_DESKTOP)">
|
||||||
<Param type="Image" name="image" desc="" />
|
<Param type="Image" name="image" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
|
<Function name="SetWindowIcons" retType="void" paramCount="2" desc="Set icon for window (multiple images, RGBA 32bit, only PLATFORM_DESKTOP)">
|
||||||
|
<Param type="Image *" name="images" desc="" />
|
||||||
|
<Param type="int" name="count" desc="" />
|
||||||
|
</Function>
|
||||||
<Function name="SetWindowTitle" retType="void" paramCount="1" desc="Set title for window (only PLATFORM_DESKTOP)">
|
<Function name="SetWindowTitle" retType="void" paramCount="1" desc="Set title for window (only PLATFORM_DESKTOP)">
|
||||||
<Param type="const char *" name="title" desc="" />
|
<Param type="const char *" name="title" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
|
|
@ -843,6 +850,9 @@
|
||||||
<Param type="const char *" name="vsCode" desc="" />
|
<Param type="const char *" name="vsCode" desc="" />
|
||||||
<Param type="const char *" name="fsCode" desc="" />
|
<Param type="const char *" name="fsCode" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
|
<Function name="IsShaderReady" retType="bool" paramCount="1" desc="Check if a shader is ready">
|
||||||
|
<Param type="Shader" name="shader" desc="" />
|
||||||
|
</Function>
|
||||||
<Function name="GetShaderLocation" retType="int" paramCount="2" desc="Get shader uniform location">
|
<Function name="GetShaderLocation" retType="int" paramCount="2" desc="Get shader uniform location">
|
||||||
<Param type="Shader" name="shader" desc="" />
|
<Param type="Shader" name="shader" desc="" />
|
||||||
<Param type="const char *" name="uniformName" desc="" />
|
<Param type="const char *" name="uniformName" desc="" />
|
||||||
|
|
@ -976,7 +986,7 @@
|
||||||
<Param type="unsigned int" name="bytesToWrite" desc="" />
|
<Param type="unsigned int" name="bytesToWrite" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
<Function name="ExportDataAsCode" retType="bool" paramCount="3" desc="Export data to code (.h), returns true on success">
|
<Function name="ExportDataAsCode" retType="bool" paramCount="3" desc="Export data to code (.h), returns true on success">
|
||||||
<Param type="const char *" name="data" desc="" />
|
<Param type="const unsigned char *" name="data" desc="" />
|
||||||
<Param type="unsigned int" name="size" desc="" />
|
<Param type="unsigned int" name="size" desc="" />
|
||||||
<Param type="const char *" name="fileName" desc="" />
|
<Param type="const char *" name="fileName" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
|
|
@ -1190,29 +1200,15 @@
|
||||||
</Function>
|
</Function>
|
||||||
<Function name="GetGesturePinchAngle" retType="float" paramCount="0" desc="Get gesture pinch angle">
|
<Function name="GetGesturePinchAngle" retType="float" paramCount="0" desc="Get gesture pinch angle">
|
||||||
</Function>
|
</Function>
|
||||||
<Function name="SetCameraMode" retType="void" paramCount="2" desc="Set camera mode (multiple camera modes available)">
|
<Function name="UpdateCamera" retType="void" paramCount="2" desc="Update camera position for selected mode">
|
||||||
<Param type="Camera" name="camera" desc="" />
|
<Param type="Camera *" name="camera" desc="" />
|
||||||
<Param type="int" name="mode" desc="" />
|
<Param type="int" name="mode" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
<Function name="UpdateCamera" retType="void" paramCount="1" desc="Update camera position for selected mode">
|
<Function name="UpdateCameraPro" retType="void" paramCount="4" desc="Update camera movement/rotation">
|
||||||
<Param type="Camera *" name="camera" desc="" />
|
<Param type="Camera *" name="camera" desc="" />
|
||||||
</Function>
|
<Param type="Vector3" name="movement" desc="" />
|
||||||
<Function name="SetCameraPanControl" retType="void" paramCount="1" desc="Set camera pan key to combine with mouse movement (free camera)">
|
<Param type="Vector3" name="rotation" desc="" />
|
||||||
<Param type="int" name="keyPan" desc="" />
|
<Param type="float" name="zoom" desc="" />
|
||||||
</Function>
|
|
||||||
<Function name="SetCameraAltControl" retType="void" paramCount="1" desc="Set camera alt key to combine with mouse movement (free camera)">
|
|
||||||
<Param type="int" name="keyAlt" desc="" />
|
|
||||||
</Function>
|
|
||||||
<Function name="SetCameraSmoothZoomControl" retType="void" paramCount="1" desc="Set camera smooth zoom key to combine with mouse (free camera)">
|
|
||||||
<Param type="int" name="keySmoothZoom" desc="" />
|
|
||||||
</Function>
|
|
||||||
<Function name="SetCameraMoveControls" retType="void" paramCount="6" desc="Set camera move controls (1st person and 3rd person cameras)">
|
|
||||||
<Param type="int" name="keyFront" desc="" />
|
|
||||||
<Param type="int" name="keyBack" desc="" />
|
|
||||||
<Param type="int" name="keyRight" desc="" />
|
|
||||||
<Param type="int" name="keyLeft" desc="" />
|
|
||||||
<Param type="int" name="keyUp" desc="" />
|
|
||||||
<Param type="int" name="keyDown" desc="" />
|
|
||||||
</Function>
|
</Function>
|
||||||
<Function name="SetShapesTexture" retType="void" paramCount="2" desc="Set texture and rectangle to be used on shapes drawing">
|
<Function name="SetShapesTexture" retType="void" paramCount="2" desc="Set texture and rectangle to be used on shapes drawing">
|
||||||
<Param type="Texture2D" name="texture" desc="" />
|
<Param type="Texture2D" name="texture" desc="" />
|
||||||
|
|
@ -1533,6 +1529,9 @@
|
||||||
</Function>
|
</Function>
|
||||||
<Function name="LoadImageFromScreen" retType="Image" paramCount="0" desc="Load image from screen buffer and (screenshot)">
|
<Function name="LoadImageFromScreen" retType="Image" paramCount="0" desc="Load image from screen buffer and (screenshot)">
|
||||||
</Function>
|
</Function>
|
||||||
|
<Function name="IsImageReady" retType="bool" paramCount="1" desc="Check if an image is ready">
|
||||||
|
<Param type="Image" name="image" desc="" />
|
||||||
|
</Function>
|
||||||
<Function name="UnloadImage" retType="void" paramCount="1" desc="Unload image from CPU memory (RAM)">
|
<Function name="UnloadImage" retType="void" paramCount="1" desc="Unload image from CPU memory (RAM)">
|
||||||
<Param type="Image" name="image" desc="" />
|
<Param type="Image" name="image" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
|
|
@ -1593,6 +1592,11 @@
|
||||||
<Param type="int" name="height" desc="" />
|
<Param type="int" name="height" desc="" />
|
||||||
<Param type="int" name="tileSize" desc="" />
|
<Param type="int" name="tileSize" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
|
<Function name="GenImageText" retType="Image" paramCount="3" desc="Generate image: grayscale image from text data">
|
||||||
|
<Param type="int" name="width" desc="" />
|
||||||
|
<Param type="int" name="height" desc="" />
|
||||||
|
<Param type="const char *" name="text" desc="" />
|
||||||
|
</Function>
|
||||||
<Function name="ImageCopy" retType="Image" paramCount="1" desc="Create an image duplicate (useful for transformations)">
|
<Function name="ImageCopy" retType="Image" paramCount="1" desc="Create an image duplicate (useful for transformations)">
|
||||||
<Param type="Image" name="image" desc="" />
|
<Param type="Image" name="image" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
|
|
@ -1640,6 +1644,10 @@
|
||||||
<Function name="ImageAlphaPremultiply" retType="void" paramCount="1" desc="Premultiply alpha channel">
|
<Function name="ImageAlphaPremultiply" retType="void" paramCount="1" desc="Premultiply alpha channel">
|
||||||
<Param type="Image *" name="image" desc="" />
|
<Param type="Image *" name="image" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
|
<Function name="ImageBlurGaussian" retType="void" paramCount="2" desc="Apply Gaussian blur using a box blur approximation">
|
||||||
|
<Param type="Image *" name="image" desc="" />
|
||||||
|
<Param type="int" name="blurSize" desc="" />
|
||||||
|
</Function>
|
||||||
<Function name="ImageResize" retType="void" paramCount="3" desc="Resize image (Bicubic scaling algorithm)">
|
<Function name="ImageResize" retType="void" paramCount="3" desc="Resize image (Bicubic scaling algorithm)">
|
||||||
<Param type="Image *" name="image" desc="" />
|
<Param type="Image *" name="image" desc="" />
|
||||||
<Param type="int" name="newWidth" desc="" />
|
<Param type="int" name="newWidth" desc="" />
|
||||||
|
|
@ -1844,9 +1852,15 @@
|
||||||
<Param type="int" name="width" desc="" />
|
<Param type="int" name="width" desc="" />
|
||||||
<Param type="int" name="height" desc="" />
|
<Param type="int" name="height" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
|
<Function name="IsTextureReady" retType="bool" paramCount="1" desc="Check if a texture is ready">
|
||||||
|
<Param type="Texture2D" name="texture" desc="" />
|
||||||
|
</Function>
|
||||||
<Function name="UnloadTexture" retType="void" paramCount="1" desc="Unload texture from GPU memory (VRAM)">
|
<Function name="UnloadTexture" retType="void" paramCount="1" desc="Unload texture from GPU memory (VRAM)">
|
||||||
<Param type="Texture2D" name="texture" desc="" />
|
<Param type="Texture2D" name="texture" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
|
<Function name="IsRenderTextureReady" retType="bool" paramCount="1" desc="Check if a render texture is ready">
|
||||||
|
<Param type="RenderTexture2D" name="target" desc="" />
|
||||||
|
</Function>
|
||||||
<Function name="UnloadRenderTexture" retType="void" paramCount="1" desc="Unload render texture from GPU memory (VRAM)">
|
<Function name="UnloadRenderTexture" retType="void" paramCount="1" desc="Unload render texture from GPU memory (VRAM)">
|
||||||
<Param type="RenderTexture2D" name="target" desc="" />
|
<Param type="RenderTexture2D" name="target" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
|
|
@ -1894,22 +1908,6 @@
|
||||||
<Param type="Vector2" name="position" desc="" />
|
<Param type="Vector2" name="position" desc="" />
|
||||||
<Param type="Color" name="tint" desc="" />
|
<Param type="Color" name="tint" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
<Function name="DrawTextureQuad" retType="void" paramCount="5" desc="Draw texture quad with tiling and offset parameters">
|
|
||||||
<Param type="Texture2D" name="texture" desc="" />
|
|
||||||
<Param type="Vector2" name="tiling" desc="" />
|
|
||||||
<Param type="Vector2" name="offset" desc="" />
|
|
||||||
<Param type="Rectangle" name="quad" desc="" />
|
|
||||||
<Param type="Color" name="tint" desc="" />
|
|
||||||
</Function>
|
|
||||||
<Function name="DrawTextureTiled" retType="void" paramCount="7" desc="Draw part of a texture (defined by a rectangle) with rotation and scale tiled into dest.">
|
|
||||||
<Param type="Texture2D" name="texture" desc="" />
|
|
||||||
<Param type="Rectangle" name="source" desc="" />
|
|
||||||
<Param type="Rectangle" name="dest" desc="" />
|
|
||||||
<Param type="Vector2" name="origin" desc="" />
|
|
||||||
<Param type="float" name="rotation" desc="" />
|
|
||||||
<Param type="float" name="scale" desc="" />
|
|
||||||
<Param type="Color" name="tint" desc="" />
|
|
||||||
</Function>
|
|
||||||
<Function name="DrawTexturePro" retType="void" paramCount="6" desc="Draw a part of a texture defined by a rectangle with 'pro' parameters">
|
<Function name="DrawTexturePro" retType="void" paramCount="6" desc="Draw a part of a texture defined by a rectangle with 'pro' parameters">
|
||||||
<Param type="Texture2D" name="texture" desc="" />
|
<Param type="Texture2D" name="texture" desc="" />
|
||||||
<Param type="Rectangle" name="source" desc="" />
|
<Param type="Rectangle" name="source" desc="" />
|
||||||
|
|
@ -1926,14 +1924,6 @@
|
||||||
<Param type="float" name="rotation" desc="" />
|
<Param type="float" name="rotation" desc="" />
|
||||||
<Param type="Color" name="tint" desc="" />
|
<Param type="Color" name="tint" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
<Function name="DrawTexturePoly" retType="void" paramCount="6" desc="Draw a textured polygon">
|
|
||||||
<Param type="Texture2D" name="texture" desc="" />
|
|
||||||
<Param type="Vector2" name="center" desc="" />
|
|
||||||
<Param type="Vector2 *" name="points" desc="" />
|
|
||||||
<Param type="Vector2 *" name="texcoords" desc="" />
|
|
||||||
<Param type="int" name="pointCount" desc="" />
|
|
||||||
<Param type="Color" name="tint" desc="" />
|
|
||||||
</Function>
|
|
||||||
<Function name="Fade" retType="Color" paramCount="2" desc="Get color with alpha applied, alpha goes from 0.0f to 1.0f">
|
<Function name="Fade" retType="Color" paramCount="2" desc="Get color with alpha applied, alpha goes from 0.0f to 1.0f">
|
||||||
<Param type="Color" name="color" desc="" />
|
<Param type="Color" name="color" desc="" />
|
||||||
<Param type="float" name="alpha" desc="" />
|
<Param type="float" name="alpha" desc="" />
|
||||||
|
|
@ -1955,6 +1945,18 @@
|
||||||
<Param type="float" name="saturation" desc="" />
|
<Param type="float" name="saturation" desc="" />
|
||||||
<Param type="float" name="value" desc="" />
|
<Param type="float" name="value" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
|
<Function name="ColorTint" retType="Color" paramCount="2" desc="Get color multiplied with another color">
|
||||||
|
<Param type="Color" name="color" desc="" />
|
||||||
|
<Param type="Color" name="tint" desc="" />
|
||||||
|
</Function>
|
||||||
|
<Function name="ColorBrightness" retType="Color" paramCount="2" desc="Get color with brightness correction, brightness factor goes from -1.0f to 1.0f">
|
||||||
|
<Param type="Color" name="color" desc="" />
|
||||||
|
<Param type="float" name="factor" desc="" />
|
||||||
|
</Function>
|
||||||
|
<Function name="ColorContrast" retType="Color" paramCount="2" desc="Get color with contrast correction, contrast values between -1.0f and 1.0f">
|
||||||
|
<Param type="Color" name="color" desc="" />
|
||||||
|
<Param type="float" name="contrast" desc="" />
|
||||||
|
</Function>
|
||||||
<Function name="ColorAlpha" retType="Color" paramCount="2" desc="Get color with alpha applied, alpha goes from 0.0f to 1.0f">
|
<Function name="ColorAlpha" retType="Color" paramCount="2" desc="Get color with alpha applied, alpha goes from 0.0f to 1.0f">
|
||||||
<Param type="Color" name="color" desc="" />
|
<Param type="Color" name="color" desc="" />
|
||||||
<Param type="float" name="alpha" desc="" />
|
<Param type="float" name="alpha" desc="" />
|
||||||
|
|
@ -2005,6 +2007,9 @@
|
||||||
<Param type="int *" name="fontChars" desc="" />
|
<Param type="int *" name="fontChars" desc="" />
|
||||||
<Param type="int" name="glyphCount" desc="" />
|
<Param type="int" name="glyphCount" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
|
<Function name="IsFontReady" retType="bool" paramCount="1" desc="Check if a font is ready">
|
||||||
|
<Param type="Font" name="font" desc="" />
|
||||||
|
</Function>
|
||||||
<Function name="LoadFontData" retType="GlyphInfo *" paramCount="6" desc="Load font data for further use">
|
<Function name="LoadFontData" retType="GlyphInfo *" paramCount="6" desc="Load font data for further use">
|
||||||
<Param type="const unsigned char *" name="fileData" desc="" />
|
<Param type="const unsigned char *" name="fileData" desc="" />
|
||||||
<Param type="int" name="dataSize" desc="" />
|
<Param type="int" name="dataSize" desc="" />
|
||||||
|
|
@ -2244,23 +2249,6 @@
|
||||||
<Param type="Vector3" name="size" desc="" />
|
<Param type="Vector3" name="size" desc="" />
|
||||||
<Param type="Color" name="color" desc="" />
|
<Param type="Color" name="color" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
<Function name="DrawCubeTexture" retType="void" paramCount="6" desc="Draw cube textured">
|
|
||||||
<Param type="Texture2D" name="texture" desc="" />
|
|
||||||
<Param type="Vector3" name="position" desc="" />
|
|
||||||
<Param type="float" name="width" desc="" />
|
|
||||||
<Param type="float" name="height" desc="" />
|
|
||||||
<Param type="float" name="length" desc="" />
|
|
||||||
<Param type="Color" name="color" desc="" />
|
|
||||||
</Function>
|
|
||||||
<Function name="DrawCubeTextureRec" retType="void" paramCount="7" desc="Draw cube with a region of a texture">
|
|
||||||
<Param type="Texture2D" name="texture" desc="" />
|
|
||||||
<Param type="Rectangle" name="source" desc="" />
|
|
||||||
<Param type="Vector3" name="position" desc="" />
|
|
||||||
<Param type="float" name="width" desc="" />
|
|
||||||
<Param type="float" name="height" desc="" />
|
|
||||||
<Param type="float" name="length" desc="" />
|
|
||||||
<Param type="Color" name="color" desc="" />
|
|
||||||
</Function>
|
|
||||||
<Function name="DrawSphere" retType="void" paramCount="3" desc="Draw sphere">
|
<Function name="DrawSphere" retType="void" paramCount="3" desc="Draw sphere">
|
||||||
<Param type="Vector3" name="centerPos" desc="" />
|
<Param type="Vector3" name="centerPos" desc="" />
|
||||||
<Param type="float" name="radius" desc="" />
|
<Param type="float" name="radius" desc="" />
|
||||||
|
|
@ -2312,6 +2300,22 @@
|
||||||
<Param type="int" name="sides" desc="" />
|
<Param type="int" name="sides" desc="" />
|
||||||
<Param type="Color" name="color" desc="" />
|
<Param type="Color" name="color" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
|
<Function name="DrawCapsule" retType="void" paramCount="6" desc="Draw a capsule with the center of its sphere caps at startPos and endPos">
|
||||||
|
<Param type="Vector3" name="startPos" desc="" />
|
||||||
|
<Param type="Vector3" name="endPos" desc="" />
|
||||||
|
<Param type="float" name="radius" desc="" />
|
||||||
|
<Param type="int" name="slices" desc="" />
|
||||||
|
<Param type="int" name="rings" desc="" />
|
||||||
|
<Param type="Color" name="color" desc="" />
|
||||||
|
</Function>
|
||||||
|
<Function name="DrawCapsuleWires" retType="void" paramCount="6" desc="Draw capsule wireframe with the center of its sphere caps at startPos and endPos">
|
||||||
|
<Param type="Vector3" name="startPos" desc="" />
|
||||||
|
<Param type="Vector3" name="endPos" desc="" />
|
||||||
|
<Param type="float" name="radius" desc="" />
|
||||||
|
<Param type="int" name="slices" desc="" />
|
||||||
|
<Param type="int" name="rings" desc="" />
|
||||||
|
<Param type="Color" name="color" desc="" />
|
||||||
|
</Function>
|
||||||
<Function name="DrawPlane" retType="void" paramCount="3" desc="Draw a plane XZ">
|
<Function name="DrawPlane" retType="void" paramCount="3" desc="Draw a plane XZ">
|
||||||
<Param type="Vector3" name="centerPos" desc="" />
|
<Param type="Vector3" name="centerPos" desc="" />
|
||||||
<Param type="Vector2" name="size" desc="" />
|
<Param type="Vector2" name="size" desc="" />
|
||||||
|
|
@ -2331,10 +2335,10 @@
|
||||||
<Function name="LoadModelFromMesh" retType="Model" paramCount="1" desc="Load model from generated mesh (default material)">
|
<Function name="LoadModelFromMesh" retType="Model" paramCount="1" desc="Load model from generated mesh (default material)">
|
||||||
<Param type="Mesh" name="mesh" desc="" />
|
<Param type="Mesh" name="mesh" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
<Function name="UnloadModel" retType="void" paramCount="1" desc="Unload model (including meshes) from memory (RAM and/or VRAM)">
|
<Function name="IsModelReady" retType="bool" paramCount="1" desc="Check if a model is ready">
|
||||||
<Param type="Model" name="model" desc="" />
|
<Param type="Model" name="model" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
<Function name="UnloadModelKeepMeshes" retType="void" paramCount="1" desc="Unload model (but not meshes) from memory (RAM and/or VRAM)">
|
<Function name="UnloadModel" retType="void" paramCount="1" desc="Unload model (including meshes) from memory (RAM and/or VRAM)">
|
||||||
<Param type="Model" name="model" desc="" />
|
<Param type="Model" name="model" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
<Function name="GetModelBoundingBox" retType="BoundingBox" paramCount="1" desc="Compute model bounding box limits (considers all meshes)">
|
<Function name="GetModelBoundingBox" retType="BoundingBox" paramCount="1" desc="Compute model bounding box limits (considers all meshes)">
|
||||||
|
|
@ -2494,6 +2498,9 @@
|
||||||
</Function>
|
</Function>
|
||||||
<Function name="LoadMaterialDefault" retType="Material" paramCount="0" desc="Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps)">
|
<Function name="LoadMaterialDefault" retType="Material" paramCount="0" desc="Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps)">
|
||||||
</Function>
|
</Function>
|
||||||
|
<Function name="IsMaterialReady" retType="bool" paramCount="1" desc="Check if a material is ready">
|
||||||
|
<Param type="Material" name="material" desc="" />
|
||||||
|
</Function>
|
||||||
<Function name="UnloadMaterial" retType="void" paramCount="1" desc="Unload material from GPU memory (VRAM)">
|
<Function name="UnloadMaterial" retType="void" paramCount="1" desc="Unload material from GPU memory (VRAM)">
|
||||||
<Param type="Material" name="material" desc="" />
|
<Param type="Material" name="material" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
|
|
@ -2586,12 +2593,18 @@
|
||||||
<Param type="const unsigned char *" name="fileData" desc="" />
|
<Param type="const unsigned char *" name="fileData" desc="" />
|
||||||
<Param type="int" name="dataSize" desc="" />
|
<Param type="int" name="dataSize" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
|
<Function name="IsWaveReady" retType="bool" paramCount="1" desc="Checks if wave data is ready">
|
||||||
|
<Param type="Wave" name="wave" desc="" />
|
||||||
|
</Function>
|
||||||
<Function name="LoadSound" retType="Sound" paramCount="1" desc="Load sound from file">
|
<Function name="LoadSound" retType="Sound" paramCount="1" desc="Load sound from file">
|
||||||
<Param type="const char *" name="fileName" desc="" />
|
<Param type="const char *" name="fileName" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
<Function name="LoadSoundFromWave" retType="Sound" paramCount="1" desc="Load sound from wave data">
|
<Function name="LoadSoundFromWave" retType="Sound" paramCount="1" desc="Load sound from wave data">
|
||||||
<Param type="Wave" name="wave" desc="" />
|
<Param type="Wave" name="wave" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
|
<Function name="IsSoundReady" retType="bool" paramCount="1" desc="Checks if a sound is ready">
|
||||||
|
<Param type="Sound" name="sound" desc="" />
|
||||||
|
</Function>
|
||||||
<Function name="UpdateSound" retType="void" paramCount="3" desc="Update sound buffer with new data">
|
<Function name="UpdateSound" retType="void" paramCount="3" desc="Update sound buffer with new data">
|
||||||
<Param type="Sound" name="sound" desc="" />
|
<Param type="Sound" name="sound" desc="" />
|
||||||
<Param type="const void *" name="data" desc="" />
|
<Param type="const void *" name="data" desc="" />
|
||||||
|
|
@ -2623,13 +2636,6 @@
|
||||||
<Function name="ResumeSound" retType="void" paramCount="1" desc="Resume a paused sound">
|
<Function name="ResumeSound" retType="void" paramCount="1" desc="Resume a paused sound">
|
||||||
<Param type="Sound" name="sound" desc="" />
|
<Param type="Sound" name="sound" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
<Function name="PlaySoundMulti" retType="void" paramCount="1" desc="Play a sound (using multichannel buffer pool)">
|
|
||||||
<Param type="Sound" name="sound" desc="" />
|
|
||||||
</Function>
|
|
||||||
<Function name="StopSoundMulti" retType="void" paramCount="0" desc="Stop any sound playing (using multichannel buffer pool)">
|
|
||||||
</Function>
|
|
||||||
<Function name="GetSoundsPlaying" retType="int" paramCount="0" desc="Get number of sounds playing in the multichannel">
|
|
||||||
</Function>
|
|
||||||
<Function name="IsSoundPlaying" retType="bool" paramCount="1" desc="Check if a sound is currently playing">
|
<Function name="IsSoundPlaying" retType="bool" paramCount="1" desc="Check if a sound is currently playing">
|
||||||
<Param type="Sound" name="sound" desc="" />
|
<Param type="Sound" name="sound" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
|
|
@ -2673,6 +2679,9 @@
|
||||||
<Param type="const unsigned char *" name="data" desc="" />
|
<Param type="const unsigned char *" name="data" desc="" />
|
||||||
<Param type="int" name="dataSize" desc="" />
|
<Param type="int" name="dataSize" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
|
<Function name="IsMusicReady" retType="bool" paramCount="1" desc="Checks if a music stream is ready">
|
||||||
|
<Param type="Music" name="music" desc="" />
|
||||||
|
</Function>
|
||||||
<Function name="UnloadMusicStream" retType="void" paramCount="1" desc="Unload music stream">
|
<Function name="UnloadMusicStream" retType="void" paramCount="1" desc="Unload music stream">
|
||||||
<Param type="Music" name="music" desc="" />
|
<Param type="Music" name="music" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
|
|
@ -2721,6 +2730,9 @@
|
||||||
<Param type="unsigned int" name="sampleSize" desc="" />
|
<Param type="unsigned int" name="sampleSize" desc="" />
|
||||||
<Param type="unsigned int" name="channels" desc="" />
|
<Param type="unsigned int" name="channels" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
|
<Function name="IsAudioStreamReady" retType="bool" paramCount="1" desc="Checks if an audio stream is ready">
|
||||||
|
<Param type="AudioStream" name="stream" desc="" />
|
||||||
|
</Function>
|
||||||
<Function name="UnloadAudioStream" retType="void" paramCount="1" desc="Unload audio stream and free memory">
|
<Function name="UnloadAudioStream" retType="void" paramCount="1" desc="Unload audio stream and free memory">
|
||||||
<Param type="AudioStream" name="stream" desc="" />
|
<Param type="AudioStream" name="stream" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
|
|
@ -2774,5 +2786,11 @@
|
||||||
<Param type="AudioStream" name="stream" desc="" />
|
<Param type="AudioStream" name="stream" desc="" />
|
||||||
<Param type="AudioCallback" name="processor" desc="" />
|
<Param type="AudioCallback" name="processor" desc="" />
|
||||||
</Function>
|
</Function>
|
||||||
|
<Function name="AttachAudioMixedProcessor" retType="void" paramCount="1" desc="Attach audio stream processor to the entire audio pipeline">
|
||||||
|
<Param type="AudioCallback" name="processor" desc="" />
|
||||||
|
</Function>
|
||||||
|
<Function name="DetachAudioMixedProcessor" retType="void" paramCount="1" desc="Detach audio stream processor from the entire audio pipeline">
|
||||||
|
<Param type="AudioCallback" name="processor" desc="" />
|
||||||
|
</Function>
|
||||||
</Functions>
|
</Functions>
|
||||||
</raylibAPI>
|
</raylibAPI>
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
|
@ -65,10 +65,16 @@
|
||||||
<Overload retVal="void" descr="Set window state: not minimized/maximized (only PLATFORM_DESKTOP)"></Overload>
|
<Overload retVal="void" descr="Set window state: not minimized/maximized (only PLATFORM_DESKTOP)"></Overload>
|
||||||
</KeyWord>
|
</KeyWord>
|
||||||
<KeyWord name="SetWindowIcon" func="yes">
|
<KeyWord name="SetWindowIcon" func="yes">
|
||||||
<Overload retVal="void" descr="Set icon for window (only PLATFORM_DESKTOP)">
|
<Overload retVal="void" descr="Set icon for window (single image, RGBA 32bit, only PLATFORM_DESKTOP)">
|
||||||
<Param name="Image image" />
|
<Param name="Image image" />
|
||||||
</Overload>
|
</Overload>
|
||||||
</KeyWord>
|
</KeyWord>
|
||||||
|
<KeyWord name="SetWindowIcons" func="yes">
|
||||||
|
<Overload retVal="void" descr="Set icon for window (multiple images, RGBA 32bit, only PLATFORM_DESKTOP)">
|
||||||
|
<Param name="Image *images" />
|
||||||
|
<Param name="int count" />
|
||||||
|
</Overload>
|
||||||
|
</KeyWord>
|
||||||
<KeyWord name="SetWindowTitle" func="yes">
|
<KeyWord name="SetWindowTitle" func="yes">
|
||||||
<Overload retVal="void" descr="Set title for window (only PLATFORM_DESKTOP)">
|
<Overload retVal="void" descr="Set title for window (only PLATFORM_DESKTOP)">
|
||||||
<Param name="const char *title" />
|
<Param name="const char *title" />
|
||||||
|
|
@ -181,7 +187,7 @@
|
||||||
|
|
||||||
<!-- Custom frame control functions -->
|
<!-- Custom frame control functions -->
|
||||||
<!-- NOTE: Those functions are intended for advance users that want full control over the frame processing -->
|
<!-- NOTE: Those functions are intended for advance users that want full control over the frame processing -->
|
||||||
<!-- By default EndDrawing() does this job: draws everything + SwapScreenBuffer() + manage frame timming + PollInputEvents() -->
|
<!-- By default EndDrawing() does this job: draws everything + SwapScreenBuffer() + manage frame timing + PollInputEvents() -->
|
||||||
<!-- To avoid that behaviour and control frame processes manually, enable in config.h: SUPPORT_CUSTOM_FRAME_CONTROL -->
|
<!-- To avoid that behaviour and control frame processes manually, enable in config.h: SUPPORT_CUSTOM_FRAME_CONTROL -->
|
||||||
<KeyWord name="SwapScreenBuffer" func="yes">
|
<KeyWord name="SwapScreenBuffer" func="yes">
|
||||||
<Overload retVal="void" descr="Swap back buffer with front buffer (screen drawing)"></Overload>
|
<Overload retVal="void" descr="Swap back buffer with front buffer (screen drawing)"></Overload>
|
||||||
|
|
@ -313,6 +319,11 @@
|
||||||
<Param name="const char *fsCode" />
|
<Param name="const char *fsCode" />
|
||||||
</Overload>
|
</Overload>
|
||||||
</KeyWord>
|
</KeyWord>
|
||||||
|
<KeyWord name="IsShaderReady" func="yes">
|
||||||
|
<Overload retVal="bool" descr="Check if a shader is ready">
|
||||||
|
<Param name="Shader shader" />
|
||||||
|
</Overload>
|
||||||
|
</KeyWord>
|
||||||
<KeyWord name="GetShaderLocation" func="yes">
|
<KeyWord name="GetShaderLocation" func="yes">
|
||||||
<Overload retVal="int" descr="Get shader uniform location">
|
<Overload retVal="int" descr="Get shader uniform location">
|
||||||
<Param name="Shader shader" />
|
<Param name="Shader shader" />
|
||||||
|
|
@ -459,7 +470,7 @@
|
||||||
</KeyWord>
|
</KeyWord>
|
||||||
<KeyWord name="MemAlloc" func="yes">
|
<KeyWord name="MemAlloc" func="yes">
|
||||||
<Overload retVal="void" descr="Internal memory allocator">
|
<Overload retVal="void" descr="Internal memory allocator">
|
||||||
<Param name="int size" />
|
<Param name="unsigned int size" />
|
||||||
</Overload>
|
</Overload>
|
||||||
</KeyWord>
|
</KeyWord>
|
||||||
<KeyWord name="MemRealloc" func="yes">
|
<KeyWord name="MemRealloc" func="yes">
|
||||||
|
|
@ -521,7 +532,7 @@
|
||||||
</KeyWord>
|
</KeyWord>
|
||||||
<KeyWord name="ExportDataAsCode" func="yes">
|
<KeyWord name="ExportDataAsCode" func="yes">
|
||||||
<Overload retVal="bool" descr="Export data to code (.h), returns true on success">
|
<Overload retVal="bool" descr="Export data to code (.h), returns true on success">
|
||||||
<Param name="const char *data" />
|
<Param name="const unsigned char" />
|
||||||
<Param name="unsigned int size" />
|
<Param name="unsigned int size" />
|
||||||
<Param name="const char *fileName" />
|
<Param name="const char *fileName" />
|
||||||
</Overload>
|
</Overload>
|
||||||
|
|
@ -878,41 +889,18 @@
|
||||||
<!-------------------------------------------------------------------------------------- -->
|
<!-------------------------------------------------------------------------------------- -->
|
||||||
<!-- Camera System Functions (Module: rcamera) -->
|
<!-- Camera System Functions (Module: rcamera) -->
|
||||||
<!-------------------------------------------------------------------------------------- -->
|
<!-------------------------------------------------------------------------------------- -->
|
||||||
<KeyWord name="SetCameraMode" func="yes">
|
|
||||||
<Overload retVal="void" descr="Set camera mode (multiple camera modes available)">
|
|
||||||
<Param name="Camera camera" />
|
|
||||||
<Param name="int mode" />
|
|
||||||
</Overload>
|
|
||||||
</KeyWord>
|
|
||||||
<KeyWord name="UpdateCamera" func="yes">
|
<KeyWord name="UpdateCamera" func="yes">
|
||||||
<Overload retVal="void" descr="Update camera position for selected mode">
|
<Overload retVal="void" descr="Update camera position for selected mode">
|
||||||
<Param name="Camera *camera" />
|
<Param name="Camera *camera" />
|
||||||
|
<Param name="int mode" />
|
||||||
</Overload>
|
</Overload>
|
||||||
</KeyWord>
|
</KeyWord>
|
||||||
|
<KeyWord name="UpdateCameraPro" func="yes">
|
||||||
<KeyWord name="SetCameraPanControl" func="yes">
|
<Overload retVal="void" descr="Update camera movement/rotation">
|
||||||
<Overload retVal="void" descr="Set camera pan key to combine with mouse movement (free camera)">
|
<Param name="Camera *camera" />
|
||||||
<Param name="int keyPan" />
|
<Param name="Vector3 movement" />
|
||||||
</Overload>
|
<Param name="Vector3 rotation" />
|
||||||
</KeyWord>
|
<Param name="float zoom" />
|
||||||
<KeyWord name="SetCameraAltControl" func="yes">
|
|
||||||
<Overload retVal="void" descr="Set camera alt key to combine with mouse movement (free camera)">
|
|
||||||
<Param name="int keyAlt" />
|
|
||||||
</Overload>
|
|
||||||
</KeyWord>
|
|
||||||
<KeyWord name="SetCameraSmoothZoomControl" func="yes">
|
|
||||||
<Overload retVal="void" descr="Set camera smooth zoom key to combine with mouse (free camera)">
|
|
||||||
<Param name="int keySmoothZoom" />
|
|
||||||
</Overload>
|
|
||||||
</KeyWord>
|
|
||||||
<KeyWord name="SetCameraMoveControls" func="yes">
|
|
||||||
<Overload retVal="void" descr="Set camera move controls (1st person and 3rd person cameras)">
|
|
||||||
<Param name="int keyFront" />
|
|
||||||
<Param name="int keyBack" />
|
|
||||||
<Param name="int keyRight" />
|
|
||||||
<Param name="int keyLeft" />
|
|
||||||
<Param name="int keyUp" />
|
|
||||||
<Param name="int keyDown" />
|
|
||||||
</Overload>
|
</Overload>
|
||||||
</KeyWord>
|
</KeyWord>
|
||||||
|
|
||||||
|
|
@ -1287,6 +1275,13 @@
|
||||||
<Param name="Vector2 p3" />
|
<Param name="Vector2 p3" />
|
||||||
</Overload>
|
</Overload>
|
||||||
</KeyWord>
|
</KeyWord>
|
||||||
|
<KeyWord name="CheckCollisionPointPoly" func="yes">
|
||||||
|
<Overload retVal="bool" descr="Check if point is within a polygon described by array of vertices">
|
||||||
|
<Param name="Vector2 point" />
|
||||||
|
<Param name="Vector2 *points" />
|
||||||
|
<Param name="int pointCount" />
|
||||||
|
</Overload>
|
||||||
|
</KeyWord>
|
||||||
<KeyWord name="CheckCollisionLines" func="yes">
|
<KeyWord name="CheckCollisionLines" func="yes">
|
||||||
<Overload retVal="bool" descr="Check the collision between two lines defined by two points each, returns collision point by reference">
|
<Overload retVal="bool" descr="Check the collision between two lines defined by two points each, returns collision point by reference">
|
||||||
<Param name="Vector2 startPos1" />
|
<Param name="Vector2 startPos1" />
|
||||||
|
|
@ -1316,7 +1311,7 @@
|
||||||
<!-------------------------------------------------------------------------------------- -->
|
<!-------------------------------------------------------------------------------------- -->
|
||||||
|
|
||||||
<!-- Image loading functions -->
|
<!-- Image loading functions -->
|
||||||
<!-- NOTE: This functions do not require GPU access -->
|
<!-- NOTE: These functions do not require GPU access -->
|
||||||
<KeyWord name="LoadImage" func="yes">
|
<KeyWord name="LoadImage" func="yes">
|
||||||
<Overload retVal="Image" descr="Load image from file into CPU memory (RAM)">
|
<Overload retVal="Image" descr="Load image from file into CPU memory (RAM)">
|
||||||
<Param name="const char *fileName" />
|
<Param name="const char *fileName" />
|
||||||
|
|
@ -1352,6 +1347,11 @@
|
||||||
<KeyWord name="LoadImageFromScreen" func="yes">
|
<KeyWord name="LoadImageFromScreen" func="yes">
|
||||||
<Overload retVal="Image" descr="Load image from screen buffer and (screenshot)"></Overload>
|
<Overload retVal="Image" descr="Load image from screen buffer and (screenshot)"></Overload>
|
||||||
</KeyWord>
|
</KeyWord>
|
||||||
|
<KeyWord name="IsImageReady" func="yes">
|
||||||
|
<Overload retVal="bool" descr="Check if an image is ready">
|
||||||
|
<Param name="Image image" />
|
||||||
|
</Overload>
|
||||||
|
</KeyWord>
|
||||||
<KeyWord name="UnloadImage" func="yes">
|
<KeyWord name="UnloadImage" func="yes">
|
||||||
<Overload retVal="void" descr="Unload image from CPU memory (RAM)">
|
<Overload retVal="void" descr="Unload image from CPU memory (RAM)">
|
||||||
<Param name="Image image" />
|
<Param name="Image image" />
|
||||||
|
|
@ -1420,6 +1420,15 @@
|
||||||
<Param name="float factor" />
|
<Param name="float factor" />
|
||||||
</Overload>
|
</Overload>
|
||||||
</KeyWord>
|
</KeyWord>
|
||||||
|
<KeyWord name="GenImagePerlinNoise" func="yes">
|
||||||
|
<Overload retVal="Image" descr="Generate image: perlin noise">
|
||||||
|
<Param name="int width" />
|
||||||
|
<Param name="int height" />
|
||||||
|
<Param name="int offsetX" />
|
||||||
|
<Param name="int offsetY" />
|
||||||
|
<Param name="float scale" />
|
||||||
|
</Overload>
|
||||||
|
</KeyWord>
|
||||||
<KeyWord name="GenImageCellular" func="yes">
|
<KeyWord name="GenImageCellular" func="yes">
|
||||||
<Overload retVal="Image" descr="Generate image: cellular algorithm, bigger tileSize means bigger cells">
|
<Overload retVal="Image" descr="Generate image: cellular algorithm, bigger tileSize means bigger cells">
|
||||||
<Param name="int width" />
|
<Param name="int width" />
|
||||||
|
|
@ -1427,6 +1436,13 @@
|
||||||
<Param name="int tileSize" />
|
<Param name="int tileSize" />
|
||||||
</Overload>
|
</Overload>
|
||||||
</KeyWord>
|
</KeyWord>
|
||||||
|
<KeyWord name="GenImageText" func="yes">
|
||||||
|
<Overload retVal="Image" descr="Generate image: grayscale image from text data">
|
||||||
|
<Param name="int width" />
|
||||||
|
<Param name="int height" />
|
||||||
|
<Param name="const char *text" />
|
||||||
|
</Overload>
|
||||||
|
</KeyWord>
|
||||||
|
|
||||||
<!-- Image manipulation functions -->
|
<!-- Image manipulation functions -->
|
||||||
<KeyWord name="ImageCopy" func="yes">
|
<KeyWord name="ImageCopy" func="yes">
|
||||||
|
|
@ -1498,6 +1514,12 @@
|
||||||
<Param name="Image *image" />
|
<Param name="Image *image" />
|
||||||
</Overload>
|
</Overload>
|
||||||
</KeyWord>
|
</KeyWord>
|
||||||
|
<KeyWord name="ImageBlurGaussian" func="yes">
|
||||||
|
<Overload retVal="void" descr="Apply Gaussian blur using a box blur approximation">
|
||||||
|
<Param name="Image *image" />
|
||||||
|
<Param name="int blurSize" />
|
||||||
|
</Overload>
|
||||||
|
</KeyWord>
|
||||||
<KeyWord name="ImageResize" func="yes">
|
<KeyWord name="ImageResize" func="yes">
|
||||||
<Overload retVal="void" descr="Resize image (Bicubic scaling algorithm)">
|
<Overload retVal="void" descr="Resize image (Bicubic scaling algorithm)">
|
||||||
<Param name="Image *image" />
|
<Param name="Image *image" />
|
||||||
|
|
@ -1669,7 +1691,7 @@
|
||||||
</Overload>
|
</Overload>
|
||||||
</KeyWord>
|
</KeyWord>
|
||||||
<KeyWord name="ImageDrawCircle" func="yes">
|
<KeyWord name="ImageDrawCircle" func="yes">
|
||||||
<Overload retVal="void" descr="Draw circle within an image">
|
<Overload retVal="void" descr="Draw a filled circle within an image">
|
||||||
<Param name="Image *dst" />
|
<Param name="Image *dst" />
|
||||||
<Param name="int centerX" />
|
<Param name="int centerX" />
|
||||||
<Param name="int centerY" />
|
<Param name="int centerY" />
|
||||||
|
|
@ -1678,7 +1700,24 @@
|
||||||
</Overload>
|
</Overload>
|
||||||
</KeyWord>
|
</KeyWord>
|
||||||
<KeyWord name="ImageDrawCircleV" func="yes">
|
<KeyWord name="ImageDrawCircleV" func="yes">
|
||||||
<Overload retVal="void" descr="Draw circle within an image (Vector version)">
|
<Overload retVal="void" descr="Draw a filled circle within an image (Vector version)">
|
||||||
|
<Param name="Image *dst" />
|
||||||
|
<Param name="Vector2 center" />
|
||||||
|
<Param name="int radius" />
|
||||||
|
<Param name="Color color" />
|
||||||
|
</Overload>
|
||||||
|
</KeyWord>
|
||||||
|
<KeyWord name="ImageDrawCircleLines" func="yes">
|
||||||
|
<Overload retVal="void" descr="Draw circle outline within an image">
|
||||||
|
<Param name="Image *dst" />
|
||||||
|
<Param name="int centerX" />
|
||||||
|
<Param name="int centerY" />
|
||||||
|
<Param name="int radius" />
|
||||||
|
<Param name="Color color" />
|
||||||
|
</Overload>
|
||||||
|
</KeyWord>
|
||||||
|
<KeyWord name="ImageDrawCircleLinesV" func="yes">
|
||||||
|
<Overload retVal="void" descr="Draw circle outline within an image (Vector version)">
|
||||||
<Param name="Image *dst" />
|
<Param name="Image *dst" />
|
||||||
<Param name="Vector2 center" />
|
<Param name="Vector2 center" />
|
||||||
<Param name="int radius" />
|
<Param name="int radius" />
|
||||||
|
|
@ -1773,11 +1812,21 @@
|
||||||
<Param name="int height" />
|
<Param name="int height" />
|
||||||
</Overload>
|
</Overload>
|
||||||
</KeyWord>
|
</KeyWord>
|
||||||
|
<KeyWord name="IsTextureReady" func="yes">
|
||||||
|
<Overload retVal="bool" descr="Check if a texture is ready">
|
||||||
|
<Param name="Texture2D texture" />
|
||||||
|
</Overload>
|
||||||
|
</KeyWord>
|
||||||
<KeyWord name="UnloadTexture" func="yes">
|
<KeyWord name="UnloadTexture" func="yes">
|
||||||
<Overload retVal="void" descr="Unload texture from GPU memory (VRAM)">
|
<Overload retVal="void" descr="Unload texture from GPU memory (VRAM)">
|
||||||
<Param name="Texture2D texture" />
|
<Param name="Texture2D texture" />
|
||||||
</Overload>
|
</Overload>
|
||||||
</KeyWord>
|
</KeyWord>
|
||||||
|
<KeyWord name="IsRenderTextureReady" func="yes">
|
||||||
|
<Overload retVal="bool" descr="Check if a render texture is ready">
|
||||||
|
<Param name="RenderTexture2D target" />
|
||||||
|
</Overload>
|
||||||
|
</KeyWord>
|
||||||
<KeyWord name="UnloadRenderTexture" func="yes">
|
<KeyWord name="UnloadRenderTexture" func="yes">
|
||||||
<Overload retVal="void" descr="Unload render texture from GPU memory (VRAM)">
|
<Overload retVal="void" descr="Unload render texture from GPU memory (VRAM)">
|
||||||
<Param name="RenderTexture2D target" />
|
<Param name="RenderTexture2D target" />
|
||||||
|
|
@ -1849,26 +1898,6 @@
|
||||||
<Param name="Color tint" />
|
<Param name="Color tint" />
|
||||||
</Overload>
|
</Overload>
|
||||||
</KeyWord>
|
</KeyWord>
|
||||||
<KeyWord name="DrawTextureQuad" func="yes">
|
|
||||||
<Overload retVal="void" descr="Draw texture quad with tiling and offset parameters">
|
|
||||||
<Param name="Texture2D texture" />
|
|
||||||
<Param name="Vector2 tiling" />
|
|
||||||
<Param name="Vector2 offset" />
|
|
||||||
<Param name="Rectangle quad" />
|
|
||||||
<Param name="Color tint" />
|
|
||||||
</Overload>
|
|
||||||
</KeyWord>
|
|
||||||
<KeyWord name="DrawTextureTiled" func="yes">
|
|
||||||
<Overload retVal="void" descr="Draw part of a texture (defined by a rectangle) with rotation and scale tiled into dest.">
|
|
||||||
<Param name="Texture2D texture" />
|
|
||||||
<Param name="Rectangle source" />
|
|
||||||
<Param name="Rectangle dest" />
|
|
||||||
<Param name="Vector2 origin" />
|
|
||||||
<Param name="float rotation" />
|
|
||||||
<Param name="float scale" />
|
|
||||||
<Param name="Color tint" />
|
|
||||||
</Overload>
|
|
||||||
</KeyWord>
|
|
||||||
<KeyWord name="DrawTexturePro" func="yes">
|
<KeyWord name="DrawTexturePro" func="yes">
|
||||||
<Overload retVal="void" descr="Draw a part of a texture defined by a rectangle with 'pro' parameters">
|
<Overload retVal="void" descr="Draw a part of a texture defined by a rectangle with 'pro' parameters">
|
||||||
<Param name="Texture2D texture" />
|
<Param name="Texture2D texture" />
|
||||||
|
|
@ -1889,16 +1918,6 @@
|
||||||
<Param name="Color tint" />
|
<Param name="Color tint" />
|
||||||
</Overload>
|
</Overload>
|
||||||
</KeyWord>
|
</KeyWord>
|
||||||
<KeyWord name="DrawTexturePoly" func="yes">
|
|
||||||
<Overload retVal="void" descr="Draw a textured polygon">
|
|
||||||
<Param name="Texture2D texture" />
|
|
||||||
<Param name="Vector2 center" />
|
|
||||||
<Param name="Vector2 *points" />
|
|
||||||
<Param name="Vector2 *texcoords" />
|
|
||||||
<Param name="int pointCount" />
|
|
||||||
<Param name="Color tint" />
|
|
||||||
</Overload>
|
|
||||||
</KeyWord>
|
|
||||||
|
|
||||||
<!-- Color/pixel related functions -->
|
<!-- Color/pixel related functions -->
|
||||||
<KeyWord name="Fade" func="yes">
|
<KeyWord name="Fade" func="yes">
|
||||||
|
|
@ -1934,6 +1953,24 @@
|
||||||
<Param name="float value" />
|
<Param name="float value" />
|
||||||
</Overload>
|
</Overload>
|
||||||
</KeyWord>
|
</KeyWord>
|
||||||
|
<KeyWord name="ColorTint" func="yes">
|
||||||
|
<Overload retVal="Color" descr="Get color multiplied with another color">
|
||||||
|
<Param name="Color color" />
|
||||||
|
<Param name="Color tint" />
|
||||||
|
</Overload>
|
||||||
|
</KeyWord>
|
||||||
|
<KeyWord name="ColorBrightness" func="yes">
|
||||||
|
<Overload retVal="Color" descr="Get color with brightness correction, brightness factor goes from -1.0f to 1.0f">
|
||||||
|
<Param name="Color color" />
|
||||||
|
<Param name="float factor" />
|
||||||
|
</Overload>
|
||||||
|
</KeyWord>
|
||||||
|
<KeyWord name="ColorContrast" func="yes">
|
||||||
|
<Overload retVal="Color" descr="Get color with contrast correction, contrast values between -1.0f and 1.0f">
|
||||||
|
<Param name="Color color" />
|
||||||
|
<Param name="float contrast" />
|
||||||
|
</Overload>
|
||||||
|
</KeyWord>
|
||||||
<KeyWord name="ColorAlpha" func="yes">
|
<KeyWord name="ColorAlpha" func="yes">
|
||||||
<Overload retVal="Color" descr="Get color with alpha applied, alpha goes from 0.0f to 1.0f">
|
<Overload retVal="Color" descr="Get color with alpha applied, alpha goes from 0.0f to 1.0f">
|
||||||
<Param name="Color color" />
|
<Param name="Color color" />
|
||||||
|
|
@ -2004,6 +2041,11 @@
|
||||||
<Param name="int glyphCount" />
|
<Param name="int glyphCount" />
|
||||||
</Overload>
|
</Overload>
|
||||||
</KeyWord>
|
</KeyWord>
|
||||||
|
<KeyWord name="IsFontReady" func="yes">
|
||||||
|
<Overload retVal="bool" descr="Check if a font is ready">
|
||||||
|
<Param name="Font font" />
|
||||||
|
</Overload>
|
||||||
|
</KeyWord>
|
||||||
<KeyWord name="LoadFontData" func="yes">
|
<KeyWord name="LoadFontData" func="yes">
|
||||||
<Overload retVal="GlyphInfo" descr="Load font data for further use">
|
<Overload retVal="GlyphInfo" descr="Load font data for further use">
|
||||||
<Param name="const unsigned char" />
|
<Param name="const unsigned char" />
|
||||||
|
|
@ -2136,6 +2178,17 @@
|
||||||
</KeyWord>
|
</KeyWord>
|
||||||
|
|
||||||
<!-- Text codepoints management functions (unicode characters) -->
|
<!-- Text codepoints management functions (unicode characters) -->
|
||||||
|
<KeyWord name="LoadUTF8" func="yes">
|
||||||
|
<Overload retVal="char" descr="Load UTF-8 text encoded from codepoints array">
|
||||||
|
<Param name="const int *codepoints" />
|
||||||
|
<Param name="int length" />
|
||||||
|
</Overload>
|
||||||
|
</KeyWord>
|
||||||
|
<KeyWord name="UnloadUTF8" func="yes">
|
||||||
|
<Overload retVal="void" descr="Unload UTF-8 text encoded from codepoints array">
|
||||||
|
<Param name="char *text" />
|
||||||
|
</Overload>
|
||||||
|
</KeyWord>
|
||||||
<KeyWord name="LoadCodepoints" func="yes">
|
<KeyWord name="LoadCodepoints" func="yes">
|
||||||
<Overload retVal="int" descr="Load all codepoints from a UTF-8 text string, codepoints count returned by parameter">
|
<Overload retVal="int" descr="Load all codepoints from a UTF-8 text string, codepoints count returned by parameter">
|
||||||
<Param name="const char *text" />
|
<Param name="const char *text" />
|
||||||
|
|
@ -2155,19 +2208,25 @@
|
||||||
<KeyWord name="GetCodepoint" func="yes">
|
<KeyWord name="GetCodepoint" func="yes">
|
||||||
<Overload retVal="int" descr="Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure">
|
<Overload retVal="int" descr="Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure">
|
||||||
<Param name="const char *text" />
|
<Param name="const char *text" />
|
||||||
<Param name="int *bytesProcessed" />
|
<Param name="int *codepointSize" />
|
||||||
|
</Overload>
|
||||||
|
</KeyWord>
|
||||||
|
<KeyWord name="GetCodepointNext" func="yes">
|
||||||
|
<Overload retVal="int" descr="Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure">
|
||||||
|
<Param name="const char *text" />
|
||||||
|
<Param name="int *codepointSize" />
|
||||||
|
</Overload>
|
||||||
|
</KeyWord>
|
||||||
|
<KeyWord name="GetCodepointPrevious" func="yes">
|
||||||
|
<Overload retVal="int" descr="Get previous codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure">
|
||||||
|
<Param name="const char *text" />
|
||||||
|
<Param name="int *codepointSize" />
|
||||||
</Overload>
|
</Overload>
|
||||||
</KeyWord>
|
</KeyWord>
|
||||||
<KeyWord name="CodepointToUTF8" func="yes">
|
<KeyWord name="CodepointToUTF8" func="yes">
|
||||||
<Overload retVal="const char" descr="Encode one codepoint into UTF-8 byte array (array length returned as parameter)">
|
<Overload retVal="const char" descr="Encode one codepoint into UTF-8 byte array (array length returned as parameter)">
|
||||||
<Param name="int codepoint" />
|
<Param name="int codepoint" />
|
||||||
<Param name="int *byteSize" />
|
<Param name="int *utf8Size" />
|
||||||
</Overload>
|
|
||||||
</KeyWord>
|
|
||||||
<KeyWord name="TextCodepointsToUTF8" func="yes">
|
|
||||||
<Overload retVal="char" descr="Encode text as codepoints array into UTF-8 text string (WARNING: memory must be freed!)">
|
|
||||||
<Param name="const int *codepoints" />
|
|
||||||
<Param name="int length" />
|
|
||||||
</Overload>
|
</Overload>
|
||||||
</KeyWord>
|
</KeyWord>
|
||||||
|
|
||||||
|
|
@ -2339,27 +2398,6 @@
|
||||||
<Param name="Color color" />
|
<Param name="Color color" />
|
||||||
</Overload>
|
</Overload>
|
||||||
</KeyWord>
|
</KeyWord>
|
||||||
<KeyWord name="DrawCubeTexture" func="yes">
|
|
||||||
<Overload retVal="void" descr="Draw cube textured">
|
|
||||||
<Param name="Texture2D texture" />
|
|
||||||
<Param name="Vector3 position" />
|
|
||||||
<Param name="float width" />
|
|
||||||
<Param name="float height" />
|
|
||||||
<Param name="float length" />
|
|
||||||
<Param name="Color color" />
|
|
||||||
</Overload>
|
|
||||||
</KeyWord>
|
|
||||||
<KeyWord name="DrawCubeTextureRec" func="yes">
|
|
||||||
<Overload retVal="void" descr="Draw cube with a region of a texture">
|
|
||||||
<Param name="Texture2D texture" />
|
|
||||||
<Param name="Rectangle source" />
|
|
||||||
<Param name="Vector3 position" />
|
|
||||||
<Param name="float width" />
|
|
||||||
<Param name="float height" />
|
|
||||||
<Param name="float length" />
|
|
||||||
<Param name="Color color" />
|
|
||||||
</Overload>
|
|
||||||
</KeyWord>
|
|
||||||
<KeyWord name="DrawSphere" func="yes">
|
<KeyWord name="DrawSphere" func="yes">
|
||||||
<Overload retVal="void" descr="Draw sphere">
|
<Overload retVal="void" descr="Draw sphere">
|
||||||
<Param name="Vector3 centerPos" />
|
<Param name="Vector3 centerPos" />
|
||||||
|
|
@ -2425,6 +2463,26 @@
|
||||||
<Param name="Color color" />
|
<Param name="Color color" />
|
||||||
</Overload>
|
</Overload>
|
||||||
</KeyWord>
|
</KeyWord>
|
||||||
|
<KeyWord name="DrawCapsule" func="yes">
|
||||||
|
<Overload retVal="void" descr="Draw a capsule with the center of its sphere caps at startPos and endPos">
|
||||||
|
<Param name="Vector3 startPos" />
|
||||||
|
<Param name="Vector3 endPos" />
|
||||||
|
<Param name="float radius" />
|
||||||
|
<Param name="int slices" />
|
||||||
|
<Param name="int rings" />
|
||||||
|
<Param name="Color color" />
|
||||||
|
</Overload>
|
||||||
|
</KeyWord>
|
||||||
|
<KeyWord name="DrawCapsuleWires" func="yes">
|
||||||
|
<Overload retVal="void" descr="Draw capsule wireframe with the center of its sphere caps at startPos and endPos">
|
||||||
|
<Param name="Vector3 startPos" />
|
||||||
|
<Param name="Vector3 endPos" />
|
||||||
|
<Param name="float radius" />
|
||||||
|
<Param name="int slices" />
|
||||||
|
<Param name="int rings" />
|
||||||
|
<Param name="Color color" />
|
||||||
|
</Overload>
|
||||||
|
</KeyWord>
|
||||||
<KeyWord name="DrawPlane" func="yes">
|
<KeyWord name="DrawPlane" func="yes">
|
||||||
<Overload retVal="void" descr="Draw a plane XZ">
|
<Overload retVal="void" descr="Draw a plane XZ">
|
||||||
<Param name="Vector3 centerPos" />
|
<Param name="Vector3 centerPos" />
|
||||||
|
|
@ -2460,13 +2518,13 @@
|
||||||
<Param name="Mesh mesh" />
|
<Param name="Mesh mesh" />
|
||||||
</Overload>
|
</Overload>
|
||||||
</KeyWord>
|
</KeyWord>
|
||||||
<KeyWord name="UnloadModel" func="yes">
|
<KeyWord name="IsModelReady" func="yes">
|
||||||
<Overload retVal="void" descr="Unload model (including meshes) from memory (RAM and/or VRAM)">
|
<Overload retVal="bool" descr="Check if a model is ready">
|
||||||
<Param name="Model model" />
|
<Param name="Model model" />
|
||||||
</Overload>
|
</Overload>
|
||||||
</KeyWord>
|
</KeyWord>
|
||||||
<KeyWord name="UnloadModelKeepMeshes" func="yes">
|
<KeyWord name="UnloadModel" func="yes">
|
||||||
<Overload retVal="void" descr="Unload model (but not meshes) from memory (RAM and/or VRAM)">
|
<Overload retVal="void" descr="Unload model (including meshes) from memory (RAM and/or VRAM)">
|
||||||
<Param name="Model model" />
|
<Param name="Model model" />
|
||||||
</Overload>
|
</Overload>
|
||||||
</KeyWord>
|
</KeyWord>
|
||||||
|
|
@ -2694,6 +2752,11 @@
|
||||||
<KeyWord name="LoadMaterialDefault" func="yes">
|
<KeyWord name="LoadMaterialDefault" func="yes">
|
||||||
<Overload retVal="Material" descr="Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps)"></Overload>
|
<Overload retVal="Material" descr="Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps)"></Overload>
|
||||||
</KeyWord>
|
</KeyWord>
|
||||||
|
<KeyWord name="IsMaterialReady" func="yes">
|
||||||
|
<Overload retVal="bool" descr="Check if a material is ready">
|
||||||
|
<Param name="Material material" />
|
||||||
|
</Overload>
|
||||||
|
</KeyWord>
|
||||||
<KeyWord name="UnloadMaterial" func="yes">
|
<KeyWord name="UnloadMaterial" func="yes">
|
||||||
<Overload retVal="void" descr="Unload material from GPU memory (VRAM)">
|
<Overload retVal="void" descr="Unload material from GPU memory (VRAM)">
|
||||||
<Param name="Material material" />
|
<Param name="Material material" />
|
||||||
|
|
@ -2839,6 +2902,11 @@
|
||||||
<Param name="int dataSize" />
|
<Param name="int dataSize" />
|
||||||
</Overload>
|
</Overload>
|
||||||
</KeyWord>
|
</KeyWord>
|
||||||
|
<KeyWord name="IsWaveReady" func="yes">
|
||||||
|
<Overload retVal="bool" descr="Checks if wave data is ready">
|
||||||
|
<Param name="Wave wave" />
|
||||||
|
</Overload>
|
||||||
|
</KeyWord>
|
||||||
<KeyWord name="LoadSound" func="yes">
|
<KeyWord name="LoadSound" func="yes">
|
||||||
<Overload retVal="Sound" descr="Load sound from file">
|
<Overload retVal="Sound" descr="Load sound from file">
|
||||||
<Param name="const char *fileName" />
|
<Param name="const char *fileName" />
|
||||||
|
|
@ -2849,6 +2917,11 @@
|
||||||
<Param name="Wave wave" />
|
<Param name="Wave wave" />
|
||||||
</Overload>
|
</Overload>
|
||||||
</KeyWord>
|
</KeyWord>
|
||||||
|
<KeyWord name="IsSoundReady" func="yes">
|
||||||
|
<Overload retVal="bool" descr="Checks if a sound is ready">
|
||||||
|
<Param name="Sound sound" />
|
||||||
|
</Overload>
|
||||||
|
</KeyWord>
|
||||||
<KeyWord name="UpdateSound" func="yes">
|
<KeyWord name="UpdateSound" func="yes">
|
||||||
<Overload retVal="void" descr="Update sound buffer with new data">
|
<Overload retVal="void" descr="Update sound buffer with new data">
|
||||||
<Param name="Sound sound" />
|
<Param name="Sound sound" />
|
||||||
|
|
@ -2900,17 +2973,6 @@
|
||||||
<Param name="Sound sound" />
|
<Param name="Sound sound" />
|
||||||
</Overload>
|
</Overload>
|
||||||
</KeyWord>
|
</KeyWord>
|
||||||
<KeyWord name="PlaySoundMulti" func="yes">
|
|
||||||
<Overload retVal="void" descr="Play a sound (using multichannel buffer pool)">
|
|
||||||
<Param name="Sound sound" />
|
|
||||||
</Overload>
|
|
||||||
</KeyWord>
|
|
||||||
<KeyWord name="StopSoundMulti" func="yes">
|
|
||||||
<Overload retVal="void" descr="Stop any sound playing (using multichannel buffer pool)"></Overload>
|
|
||||||
</KeyWord>
|
|
||||||
<KeyWord name="GetSoundsPlaying" func="yes">
|
|
||||||
<Overload retVal="int" descr="Get number of sounds playing in the multichannel"></Overload>
|
|
||||||
</KeyWord>
|
|
||||||
<KeyWord name="IsSoundPlaying" func="yes">
|
<KeyWord name="IsSoundPlaying" func="yes">
|
||||||
<Overload retVal="bool" descr="Check if a sound is currently playing">
|
<Overload retVal="bool" descr="Check if a sound is currently playing">
|
||||||
<Param name="Sound sound" />
|
<Param name="Sound sound" />
|
||||||
|
|
@ -2978,6 +3040,11 @@
|
||||||
<Param name="int dataSize" />
|
<Param name="int dataSize" />
|
||||||
</Overload>
|
</Overload>
|
||||||
</KeyWord>
|
</KeyWord>
|
||||||
|
<KeyWord name="IsMusicReady" func="yes">
|
||||||
|
<Overload retVal="bool" descr="Checks if a music stream is ready">
|
||||||
|
<Param name="Music music" />
|
||||||
|
</Overload>
|
||||||
|
</KeyWord>
|
||||||
<KeyWord name="UnloadMusicStream" func="yes">
|
<KeyWord name="UnloadMusicStream" func="yes">
|
||||||
<Overload retVal="void" descr="Unload music stream">
|
<Overload retVal="void" descr="Unload music stream">
|
||||||
<Param name="Music music" />
|
<Param name="Music music" />
|
||||||
|
|
@ -3056,6 +3123,11 @@
|
||||||
<Param name="unsigned int channels" />
|
<Param name="unsigned int channels" />
|
||||||
</Overload>
|
</Overload>
|
||||||
</KeyWord>
|
</KeyWord>
|
||||||
|
<KeyWord name="IsAudioStreamReady" func="yes">
|
||||||
|
<Overload retVal="bool" descr="Checks if an audio stream is ready">
|
||||||
|
<Param name="AudioStream stream" />
|
||||||
|
</Overload>
|
||||||
|
</KeyWord>
|
||||||
<KeyWord name="UnloadAudioStream" func="yes">
|
<KeyWord name="UnloadAudioStream" func="yes">
|
||||||
<Overload retVal="void" descr="Unload audio stream and free memory">
|
<Overload retVal="void" descr="Unload audio stream and free memory">
|
||||||
<Param name="AudioStream stream" />
|
<Param name="AudioStream stream" />
|
||||||
|
|
@ -3141,4 +3213,15 @@
|
||||||
</Overload>
|
</Overload>
|
||||||
</KeyWord>
|
</KeyWord>
|
||||||
|
|
||||||
|
<KeyWord name="AttachAudioMixedProcessor" func="yes">
|
||||||
|
<Overload retVal="void" descr="Attach audio stream processor to the entire audio pipeline">
|
||||||
|
<Param name="AudioCallback processor" />
|
||||||
|
</Overload>
|
||||||
|
</KeyWord>
|
||||||
|
<KeyWord name="DetachAudioMixedProcessor" func="yes">
|
||||||
|
<Overload retVal="void" descr="Detach audio stream processor from the entire audio pipeline">
|
||||||
|
<Param name="AudioCallback processor" />
|
||||||
|
</Overload>
|
||||||
|
</KeyWord>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,8 @@ RLAPI void ToggleFullscreen(void); // Toggle wind
|
||||||
RLAPI void MaximizeWindow(void); // Set window state: maximized, if resizable (only PLATFORM_DESKTOP)
|
RLAPI void MaximizeWindow(void); // Set window state: maximized, if resizable (only PLATFORM_DESKTOP)
|
||||||
RLAPI void MinimizeWindow(void); // Set window state: minimized, if resizable (only PLATFORM_DESKTOP)
|
RLAPI void MinimizeWindow(void); // Set window state: minimized, if resizable (only PLATFORM_DESKTOP)
|
||||||
RLAPI void RestoreWindow(void); // Set window state: not minimized/maximized (only PLATFORM_DESKTOP)
|
RLAPI void RestoreWindow(void); // Set window state: not minimized/maximized (only PLATFORM_DESKTOP)
|
||||||
RLAPI void SetWindowIcon(Image image); // Set icon for window (only PLATFORM_DESKTOP)
|
RLAPI void SetWindowIcon(Image image); // Set icon for window (single image, RGBA 32bit, only PLATFORM_DESKTOP)
|
||||||
|
RLAPI void SetWindowIcons(Image *images, int count); // Set icon for window (multiple images, RGBA 32bit, only PLATFORM_DESKTOP)
|
||||||
RLAPI void SetWindowTitle(const char *title); // Set title for window (only PLATFORM_DESKTOP)
|
RLAPI void SetWindowTitle(const char *title); // Set title for window (only PLATFORM_DESKTOP)
|
||||||
RLAPI void SetWindowPosition(int x, int y); // Set window position on screen (only PLATFORM_DESKTOP)
|
RLAPI void SetWindowPosition(int x, int y); // Set window position on screen (only PLATFORM_DESKTOP)
|
||||||
RLAPI void SetWindowMonitor(int monitor); // Set monitor for the current window (fullscreen mode)
|
RLAPI void SetWindowMonitor(int monitor); // Set monitor for the current window (fullscreen mode)
|
||||||
|
|
@ -50,7 +51,7 @@ RLAPI void DisableEventWaiting(void); // Disable wai
|
||||||
|
|
||||||
// Custom frame control functions
|
// Custom frame control functions
|
||||||
// NOTE: Those functions are intended for advance users that want full control over the frame processing
|
// NOTE: Those functions are intended for advance users that want full control over the frame processing
|
||||||
// By default EndDrawing() does this job: draws everything + SwapScreenBuffer() + manage frame timming + PollInputEvents()
|
// By default EndDrawing() does this job: draws everything + SwapScreenBuffer() + manage frame timing + PollInputEvents()
|
||||||
// To avoid that behaviour and control frame processes manually, enable in config.h: SUPPORT_CUSTOM_FRAME_CONTROL
|
// To avoid that behaviour and control frame processes manually, enable in config.h: SUPPORT_CUSTOM_FRAME_CONTROL
|
||||||
RLAPI void SwapScreenBuffer(void); // Swap back buffer with front buffer (screen drawing)
|
RLAPI void SwapScreenBuffer(void); // Swap back buffer with front buffer (screen drawing)
|
||||||
RLAPI void PollInputEvents(void); // Register all input events
|
RLAPI void PollInputEvents(void); // Register all input events
|
||||||
|
|
@ -91,6 +92,7 @@ RLAPI void UnloadVrStereoConfig(VrStereoConfig config); // Unload VR s
|
||||||
// NOTE: Shader functionality is not available on OpenGL 1.1
|
// NOTE: Shader functionality is not available on OpenGL 1.1
|
||||||
RLAPI Shader LoadShader(const char *vsFileName, const char *fsFileName); // Load shader from files and bind default locations
|
RLAPI Shader LoadShader(const char *vsFileName, const char *fsFileName); // Load shader from files and bind default locations
|
||||||
RLAPI Shader LoadShaderFromMemory(const char *vsCode, const char *fsCode); // Load shader from code strings and bind default locations
|
RLAPI Shader LoadShaderFromMemory(const char *vsCode, const char *fsCode); // Load shader from code strings and bind default locations
|
||||||
|
RLAPI bool IsShaderReady(Shader shader); // Check if a shader is ready
|
||||||
RLAPI int GetShaderLocation(Shader shader, const char *uniformName); // Get shader uniform location
|
RLAPI int GetShaderLocation(Shader shader, const char *uniformName); // Get shader uniform location
|
||||||
RLAPI int GetShaderLocationAttrib(Shader shader, const char *attribName); // Get shader attribute location
|
RLAPI int GetShaderLocationAttrib(Shader shader, const char *attribName); // Get shader attribute location
|
||||||
RLAPI void SetShaderValue(Shader shader, int locIndex, const void *value, int uniformType); // Set shader uniform value
|
RLAPI void SetShaderValue(Shader shader, int locIndex, const void *value, int uniformType); // Set shader uniform value
|
||||||
|
|
@ -122,8 +124,8 @@ RLAPI void SetConfigFlags(unsigned int flags); // Setup init
|
||||||
|
|
||||||
RLAPI void TraceLog(int logLevel, const char *text, ...); // Show trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR...)
|
RLAPI void TraceLog(int logLevel, const char *text, ...); // Show trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR...)
|
||||||
RLAPI void SetTraceLogLevel(int logLevel); // Set the current threshold (minimum) log level
|
RLAPI void SetTraceLogLevel(int logLevel); // Set the current threshold (minimum) log level
|
||||||
RLAPI void *MemAlloc(int size); // Internal memory allocator
|
RLAPI void *MemAlloc(unsigned int size); // Internal memory allocator
|
||||||
RLAPI void *MemRealloc(void *ptr, int size); // Internal memory reallocator
|
RLAPI void *MemRealloc(void *ptr, unsigned int size); // Internal memory reallocator
|
||||||
RLAPI void MemFree(void *ptr); // Internal memory free
|
RLAPI void MemFree(void *ptr); // Internal memory free
|
||||||
|
|
||||||
RLAPI void OpenURL(const char *url); // Open URL with default system browser (if available)
|
RLAPI void OpenURL(const char *url); // Open URL with default system browser (if available)
|
||||||
|
|
@ -140,7 +142,7 @@ RLAPI void SetSaveFileTextCallback(SaveFileTextCallback callback); // Set custom
|
||||||
RLAPI unsigned char *LoadFileData(const char *fileName, unsigned int *bytesRead); // Load file data as byte array (read)
|
RLAPI unsigned char *LoadFileData(const char *fileName, unsigned int *bytesRead); // Load file data as byte array (read)
|
||||||
RLAPI void UnloadFileData(unsigned char *data); // Unload file data allocated by LoadFileData()
|
RLAPI void UnloadFileData(unsigned char *data); // Unload file data allocated by LoadFileData()
|
||||||
RLAPI bool SaveFileData(const char *fileName, void *data, unsigned int bytesToWrite); // Save data to file from byte array (write), returns true on success
|
RLAPI bool SaveFileData(const char *fileName, void *data, unsigned int bytesToWrite); // Save data to file from byte array (write), returns true on success
|
||||||
RLAPI bool ExportDataAsCode(const char *data, unsigned int size, const char *fileName); // Export data to code (.h), returns true on success
|
RLAPI bool ExportDataAsCode(const unsigned char *data, unsigned int size, const char *fileName); // Export data to code (.h), returns true on success
|
||||||
RLAPI char *LoadFileText(const char *fileName); // Load text data from file (read), returns a '\0' terminated string
|
RLAPI char *LoadFileText(const char *fileName); // Load text data from file (read), returns a '\0' terminated string
|
||||||
RLAPI void UnloadFileText(char *text); // Unload file text data allocated by LoadFileText()
|
RLAPI void UnloadFileText(char *text); // Unload file text data allocated by LoadFileText()
|
||||||
RLAPI bool SaveFileText(const char *fileName, char *text); // Save text data to file (write), string must be '\0' terminated, returns true on success
|
RLAPI bool SaveFileText(const char *fileName, char *text); // Save text data to file (write), string must be '\0' terminated, returns true on success
|
||||||
|
|
@ -234,13 +236,8 @@ RLAPI float GetGesturePinchAngle(void); // Get gesture pinch ang
|
||||||
//------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
// Camera System Functions (Module: rcamera)
|
// Camera System Functions (Module: rcamera)
|
||||||
//------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
RLAPI void SetCameraMode(Camera camera, int mode); // Set camera mode (multiple camera modes available)
|
RLAPI void UpdateCamera(Camera *camera, int mode); // Update camera position for selected mode
|
||||||
RLAPI void UpdateCamera(Camera *camera); // Update camera position for selected mode
|
RLAPI void UpdateCameraPro(Camera *camera, Vector3 movement, Vector3 rotation, float zoom); // Update camera movement/rotation
|
||||||
|
|
||||||
RLAPI void SetCameraPanControl(int keyPan); // Set camera pan key to combine with mouse movement (free camera)
|
|
||||||
RLAPI void SetCameraAltControl(int keyAlt); // Set camera alt key to combine with mouse movement (free camera)
|
|
||||||
RLAPI void SetCameraSmoothZoomControl(int keySmoothZoom); // Set camera smooth zoom key to combine with mouse (free camera)
|
|
||||||
RLAPI void SetCameraMoveControls(int keyFront, int keyBack, int keyRight, int keyLeft, int keyUp, int keyDown); // Set camera move controls (1st person and 3rd person cameras)
|
|
||||||
|
|
||||||
//------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
// Basic Shapes Drawing Functions (Module: shapes)
|
// Basic Shapes Drawing Functions (Module: shapes)
|
||||||
|
|
@ -296,6 +293,7 @@ RLAPI bool CheckCollisionCircleRec(Vector2 center, float radius, Rectangle rec);
|
||||||
RLAPI bool CheckCollisionPointRec(Vector2 point, Rectangle rec); // Check if point is inside rectangle
|
RLAPI bool CheckCollisionPointRec(Vector2 point, Rectangle rec); // Check if point is inside rectangle
|
||||||
RLAPI bool CheckCollisionPointCircle(Vector2 point, Vector2 center, float radius); // Check if point is inside circle
|
RLAPI bool CheckCollisionPointCircle(Vector2 point, Vector2 center, float radius); // Check if point is inside circle
|
||||||
RLAPI bool CheckCollisionPointTriangle(Vector2 point, Vector2 p1, Vector2 p2, Vector2 p3); // Check if point is inside a triangle
|
RLAPI bool CheckCollisionPointTriangle(Vector2 point, Vector2 p1, Vector2 p2, Vector2 p3); // Check if point is inside a triangle
|
||||||
|
RLAPI bool CheckCollisionPointPoly(Vector2 point, Vector2 *points, int pointCount); // Check if point is within a polygon described by array of vertices
|
||||||
RLAPI bool CheckCollisionLines(Vector2 startPos1, Vector2 endPos1, Vector2 startPos2, Vector2 endPos2, Vector2 *collisionPoint); // Check the collision between two lines defined by two points each, returns collision point by reference
|
RLAPI bool CheckCollisionLines(Vector2 startPos1, Vector2 endPos1, Vector2 startPos2, Vector2 endPos2, Vector2 *collisionPoint); // Check the collision between two lines defined by two points each, returns collision point by reference
|
||||||
RLAPI bool CheckCollisionPointLine(Vector2 point, Vector2 p1, Vector2 p2, int threshold); // Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold]
|
RLAPI bool CheckCollisionPointLine(Vector2 point, Vector2 p1, Vector2 p2, int threshold); // Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold]
|
||||||
RLAPI Rectangle GetCollisionRec(Rectangle rec1, Rectangle rec2); // Get collision rectangle for two rectangles collision
|
RLAPI Rectangle GetCollisionRec(Rectangle rec1, Rectangle rec2); // Get collision rectangle for two rectangles collision
|
||||||
|
|
@ -305,13 +303,14 @@ RLAPI Rectangle GetCollisionRec(Rectangle rec1, Rectangle rec2);
|
||||||
//------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
|
|
||||||
// Image loading functions
|
// Image loading functions
|
||||||
// NOTE: This functions do not require GPU access
|
// NOTE: These functions do not require GPU access
|
||||||
RLAPI Image LoadImage(const char *fileName); // Load image from file into CPU memory (RAM)
|
RLAPI Image LoadImage(const char *fileName); // Load image from file into CPU memory (RAM)
|
||||||
RLAPI Image LoadImageRaw(const char *fileName, int width, int height, int format, int headerSize); // Load image from RAW file data
|
RLAPI Image LoadImageRaw(const char *fileName, int width, int height, int format, int headerSize); // Load image from RAW file data
|
||||||
RLAPI Image LoadImageAnim(const char *fileName, int *frames); // Load image sequence from file (frames appended to image.data)
|
RLAPI Image LoadImageAnim(const char *fileName, int *frames); // Load image sequence from file (frames appended to image.data)
|
||||||
RLAPI Image LoadImageFromMemory(const char *fileType, const unsigned char *fileData, int dataSize); // Load image from memory buffer, fileType refers to extension: i.e. '.png'
|
RLAPI Image LoadImageFromMemory(const char *fileType, const unsigned char *fileData, int dataSize); // Load image from memory buffer, fileType refers to extension: i.e. '.png'
|
||||||
RLAPI Image LoadImageFromTexture(Texture2D texture); // Load image from GPU texture data
|
RLAPI Image LoadImageFromTexture(Texture2D texture); // Load image from GPU texture data
|
||||||
RLAPI Image LoadImageFromScreen(void); // Load image from screen buffer and (screenshot)
|
RLAPI Image LoadImageFromScreen(void); // Load image from screen buffer and (screenshot)
|
||||||
|
RLAPI bool IsImageReady(Image image); // Check if an image is ready
|
||||||
RLAPI void UnloadImage(Image image); // Unload image from CPU memory (RAM)
|
RLAPI void UnloadImage(Image image); // Unload image from CPU memory (RAM)
|
||||||
RLAPI bool ExportImage(Image image, const char *fileName); // Export image data to file, returns true on success
|
RLAPI bool ExportImage(Image image, const char *fileName); // Export image data to file, returns true on success
|
||||||
RLAPI bool ExportImageAsCode(Image image, const char *fileName); // Export image as code file defining an array of bytes, returns true on success
|
RLAPI bool ExportImageAsCode(Image image, const char *fileName); // Export image as code file defining an array of bytes, returns true on success
|
||||||
|
|
@ -323,7 +322,9 @@ RLAPI Image GenImageGradientH(int width, int height, Color left, Color right);
|
||||||
RLAPI Image GenImageGradientRadial(int width, int height, float density, Color inner, Color outer); // Generate image: radial gradient
|
RLAPI Image GenImageGradientRadial(int width, int height, float density, Color inner, Color outer); // Generate image: radial gradient
|
||||||
RLAPI Image GenImageChecked(int width, int height, int checksX, int checksY, Color col1, Color col2); // Generate image: checked
|
RLAPI Image GenImageChecked(int width, int height, int checksX, int checksY, Color col1, Color col2); // Generate image: checked
|
||||||
RLAPI Image GenImageWhiteNoise(int width, int height, float factor); // Generate image: white noise
|
RLAPI Image GenImageWhiteNoise(int width, int height, float factor); // Generate image: white noise
|
||||||
|
RLAPI Image GenImagePerlinNoise(int width, int height, int offsetX, int offsetY, float scale); // Generate image: perlin noise
|
||||||
RLAPI Image GenImageCellular(int width, int height, int tileSize); // Generate image: cellular algorithm, bigger tileSize means bigger cells
|
RLAPI Image GenImageCellular(int width, int height, int tileSize); // Generate image: cellular algorithm, bigger tileSize means bigger cells
|
||||||
|
RLAPI Image GenImageText(int width, int height, const char *text); // Generate image: grayscale image from text data
|
||||||
|
|
||||||
// Image manipulation functions
|
// Image manipulation functions
|
||||||
RLAPI Image ImageCopy(Image image); // Create an image duplicate (useful for transformations)
|
RLAPI Image ImageCopy(Image image); // Create an image duplicate (useful for transformations)
|
||||||
|
|
@ -337,6 +338,7 @@ RLAPI void ImageAlphaCrop(Image *image, float threshold);
|
||||||
RLAPI void ImageAlphaClear(Image *image, Color color, float threshold); // Clear alpha channel to desired color
|
RLAPI void ImageAlphaClear(Image *image, Color color, float threshold); // Clear alpha channel to desired color
|
||||||
RLAPI void ImageAlphaMask(Image *image, Image alphaMask); // Apply alpha mask to image
|
RLAPI void ImageAlphaMask(Image *image, Image alphaMask); // Apply alpha mask to image
|
||||||
RLAPI void ImageAlphaPremultiply(Image *image); // Premultiply alpha channel
|
RLAPI void ImageAlphaPremultiply(Image *image); // Premultiply alpha channel
|
||||||
|
RLAPI void ImageBlurGaussian(Image *image, int blurSize); // Apply Gaussian blur using a box blur approximation
|
||||||
RLAPI void ImageResize(Image *image, int newWidth, int newHeight); // Resize image (Bicubic scaling algorithm)
|
RLAPI void ImageResize(Image *image, int newWidth, int newHeight); // Resize image (Bicubic scaling algorithm)
|
||||||
RLAPI void ImageResizeNN(Image *image, int newWidth,int newHeight); // Resize image (Nearest-Neighbor scaling algorithm)
|
RLAPI void ImageResizeNN(Image *image, int newWidth,int newHeight); // Resize image (Nearest-Neighbor scaling algorithm)
|
||||||
RLAPI void ImageResizeCanvas(Image *image, int newWidth, int newHeight, int offsetX, int offsetY, Color fill); // Resize canvas and fill with color
|
RLAPI void ImageResizeCanvas(Image *image, int newWidth, int newHeight, int offsetX, int offsetY, Color fill); // Resize canvas and fill with color
|
||||||
|
|
@ -366,8 +368,10 @@ RLAPI void ImageDrawPixel(Image *dst, int posX, int posY, Color color);
|
||||||
RLAPI void ImageDrawPixelV(Image *dst, Vector2 position, Color color); // Draw pixel within an image (Vector version)
|
RLAPI void ImageDrawPixelV(Image *dst, Vector2 position, Color color); // Draw pixel within an image (Vector version)
|
||||||
RLAPI void ImageDrawLine(Image *dst, int startPosX, int startPosY, int endPosX, int endPosY, Color color); // Draw line within an image
|
RLAPI void ImageDrawLine(Image *dst, int startPosX, int startPosY, int endPosX, int endPosY, Color color); // Draw line within an image
|
||||||
RLAPI void ImageDrawLineV(Image *dst, Vector2 start, Vector2 end, Color color); // Draw line within an image (Vector version)
|
RLAPI void ImageDrawLineV(Image *dst, Vector2 start, Vector2 end, Color color); // Draw line within an image (Vector version)
|
||||||
RLAPI void ImageDrawCircle(Image *dst, int centerX, int centerY, int radius, Color color); // Draw circle within an image
|
RLAPI void ImageDrawCircle(Image *dst, int centerX, int centerY, int radius, Color color); // Draw a filled circle within an image
|
||||||
RLAPI void ImageDrawCircleV(Image *dst, Vector2 center, int radius, Color color); // Draw circle within an image (Vector version)
|
RLAPI void ImageDrawCircleV(Image *dst, Vector2 center, int radius, Color color); // Draw a filled circle within an image (Vector version)
|
||||||
|
RLAPI void ImageDrawCircleLines(Image *dst, int centerX, int centerY, int radius, Color color); // Draw circle outline within an image
|
||||||
|
RLAPI void ImageDrawCircleLinesV(Image *dst, Vector2 center, int radius, Color color); // Draw circle outline within an image (Vector version)
|
||||||
RLAPI void ImageDrawRectangle(Image *dst, int posX, int posY, int width, int height, Color color); // Draw rectangle within an image
|
RLAPI void ImageDrawRectangle(Image *dst, int posX, int posY, int width, int height, Color color); // Draw rectangle within an image
|
||||||
RLAPI void ImageDrawRectangleV(Image *dst, Vector2 position, Vector2 size, Color color); // Draw rectangle within an image (Vector version)
|
RLAPI void ImageDrawRectangleV(Image *dst, Vector2 position, Vector2 size, Color color); // Draw rectangle within an image (Vector version)
|
||||||
RLAPI void ImageDrawRectangleRec(Image *dst, Rectangle rec, Color color); // Draw rectangle within an image
|
RLAPI void ImageDrawRectangleRec(Image *dst, Rectangle rec, Color color); // Draw rectangle within an image
|
||||||
|
|
@ -382,7 +386,9 @@ RLAPI Texture2D LoadTexture(const char *fileName);
|
||||||
RLAPI Texture2D LoadTextureFromImage(Image image); // Load texture from image data
|
RLAPI Texture2D LoadTextureFromImage(Image image); // Load texture from image data
|
||||||
RLAPI TextureCubemap LoadTextureCubemap(Image image, int layout); // Load cubemap from image, multiple image cubemap layouts supported
|
RLAPI TextureCubemap LoadTextureCubemap(Image image, int layout); // Load cubemap from image, multiple image cubemap layouts supported
|
||||||
RLAPI RenderTexture2D LoadRenderTexture(int width, int height); // Load texture for rendering (framebuffer)
|
RLAPI RenderTexture2D LoadRenderTexture(int width, int height); // Load texture for rendering (framebuffer)
|
||||||
|
RLAPI bool IsTextureReady(Texture2D texture); // Check if a texture is ready
|
||||||
RLAPI void UnloadTexture(Texture2D texture); // Unload texture from GPU memory (VRAM)
|
RLAPI void UnloadTexture(Texture2D texture); // Unload texture from GPU memory (VRAM)
|
||||||
|
RLAPI bool IsRenderTextureReady(RenderTexture2D target); // Check if a render texture is ready
|
||||||
RLAPI void UnloadRenderTexture(RenderTexture2D target); // Unload render texture from GPU memory (VRAM)
|
RLAPI void UnloadRenderTexture(RenderTexture2D target); // Unload render texture from GPU memory (VRAM)
|
||||||
RLAPI void UpdateTexture(Texture2D texture, const void *pixels); // Update GPU texture with new data
|
RLAPI void UpdateTexture(Texture2D texture, const void *pixels); // Update GPU texture with new data
|
||||||
RLAPI void UpdateTextureRec(Texture2D texture, Rectangle rec, const void *pixels); // Update GPU texture rectangle with new data
|
RLAPI void UpdateTextureRec(Texture2D texture, Rectangle rec, const void *pixels); // Update GPU texture rectangle with new data
|
||||||
|
|
@ -397,11 +403,8 @@ RLAPI void DrawTexture(Texture2D texture, int posX, int posY, Color tint);
|
||||||
RLAPI void DrawTextureV(Texture2D texture, Vector2 position, Color tint); // Draw a Texture2D with position defined as Vector2
|
RLAPI void DrawTextureV(Texture2D texture, Vector2 position, Color tint); // Draw a Texture2D with position defined as Vector2
|
||||||
RLAPI void DrawTextureEx(Texture2D texture, Vector2 position, float rotation, float scale, Color tint); // Draw a Texture2D with extended parameters
|
RLAPI void DrawTextureEx(Texture2D texture, Vector2 position, float rotation, float scale, Color tint); // Draw a Texture2D with extended parameters
|
||||||
RLAPI void DrawTextureRec(Texture2D texture, Rectangle source, Vector2 position, Color tint); // Draw a part of a texture defined by a rectangle
|
RLAPI void DrawTextureRec(Texture2D texture, Rectangle source, Vector2 position, Color tint); // Draw a part of a texture defined by a rectangle
|
||||||
RLAPI void DrawTextureQuad(Texture2D texture, Vector2 tiling, Vector2 offset, Rectangle quad, Color tint); // Draw texture quad with tiling and offset parameters
|
RLAPI void DrawTexturePro(Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, Color tint); // Draw a part of a texture defined by a rectangle with 'pro' parameters
|
||||||
RLAPI void DrawTextureTiled(Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, float scale, Color tint); // Draw part of a texture (defined by a rectangle) with rotation and scale tiled into dest.
|
RLAPI void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, Rectangle dest, Vector2 origin, float rotation, Color tint); // Draws a texture (or part of it) that stretches or shrinks nicely
|
||||||
RLAPI void DrawTexturePro(Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, Color tint); // Draw a part of a texture defined by a rectangle with 'pro' parameters
|
|
||||||
RLAPI void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, Rectangle dest, Vector2 origin, float rotation, Color tint); // Draws a texture (or part of it) that stretches or shrinks nicely
|
|
||||||
RLAPI void DrawTexturePoly(Texture2D texture, Vector2 center, Vector2 *points, Vector2 *texcoords, int pointCount, Color tint); // Draw a textured polygon
|
|
||||||
|
|
||||||
// Color/pixel related functions
|
// Color/pixel related functions
|
||||||
RLAPI Color Fade(Color color, float alpha); // Get color with alpha applied, alpha goes from 0.0f to 1.0f
|
RLAPI Color Fade(Color color, float alpha); // Get color with alpha applied, alpha goes from 0.0f to 1.0f
|
||||||
|
|
@ -410,6 +413,9 @@ RLAPI Vector4 ColorNormalize(Color color); // G
|
||||||
RLAPI Color ColorFromNormalized(Vector4 normalized); // Get Color from normalized values [0..1]
|
RLAPI Color ColorFromNormalized(Vector4 normalized); // Get Color from normalized values [0..1]
|
||||||
RLAPI Vector3 ColorToHSV(Color color); // Get HSV values for a Color, hue [0..360], saturation/value [0..1]
|
RLAPI Vector3 ColorToHSV(Color color); // Get HSV values for a Color, hue [0..360], saturation/value [0..1]
|
||||||
RLAPI Color ColorFromHSV(float hue, float saturation, float value); // Get a Color from HSV values, hue [0..360], saturation/value [0..1]
|
RLAPI Color ColorFromHSV(float hue, float saturation, float value); // Get a Color from HSV values, hue [0..360], saturation/value [0..1]
|
||||||
|
RLAPI Color ColorTint(Color color, Color tint); // Get color multiplied with another color
|
||||||
|
RLAPI Color ColorBrightness(Color color, float factor); // Get color with brightness correction, brightness factor goes from -1.0f to 1.0f
|
||||||
|
RLAPI Color ColorContrast(Color color, float contrast); // Get color with contrast correction, contrast values between -1.0f and 1.0f
|
||||||
RLAPI Color ColorAlpha(Color color, float alpha); // Get color with alpha applied, alpha goes from 0.0f to 1.0f
|
RLAPI Color ColorAlpha(Color color, float alpha); // Get color with alpha applied, alpha goes from 0.0f to 1.0f
|
||||||
RLAPI Color ColorAlphaBlend(Color dst, Color src, Color tint); // Get src alpha-blended into dst color with tint
|
RLAPI Color ColorAlphaBlend(Color dst, Color src, Color tint); // Get src alpha-blended into dst color with tint
|
||||||
RLAPI Color GetColor(unsigned int hexValue); // Get Color structure from hexadecimal value
|
RLAPI Color GetColor(unsigned int hexValue); // Get Color structure from hexadecimal value
|
||||||
|
|
@ -427,6 +433,7 @@ RLAPI Font LoadFont(const char *fileName);
|
||||||
RLAPI Font LoadFontEx(const char *fileName, int fontSize, int *fontChars, int glyphCount); // Load font from file with extended parameters, use NULL for fontChars and 0 for glyphCount to load the default character set
|
RLAPI Font LoadFontEx(const char *fileName, int fontSize, int *fontChars, int glyphCount); // Load font from file with extended parameters, use NULL for fontChars and 0 for glyphCount to load the default character set
|
||||||
RLAPI Font LoadFontFromImage(Image image, Color key, int firstChar); // Load font from Image (XNA style)
|
RLAPI Font LoadFontFromImage(Image image, Color key, int firstChar); // Load font from Image (XNA style)
|
||||||
RLAPI Font LoadFontFromMemory(const char *fileType, const unsigned char *fileData, int dataSize, int fontSize, int *fontChars, int glyphCount); // Load font from memory buffer, fileType refers to extension: i.e. '.ttf'
|
RLAPI Font LoadFontFromMemory(const char *fileType, const unsigned char *fileData, int dataSize, int fontSize, int *fontChars, int glyphCount); // Load font from memory buffer, fileType refers to extension: i.e. '.ttf'
|
||||||
|
RLAPI bool IsFontReady(Font font); // Check if a font is ready
|
||||||
RLAPI GlyphInfo *LoadFontData(const unsigned char *fileData, int dataSize, int fontSize, int *fontChars, int glyphCount, int type); // Load font data for further use
|
RLAPI GlyphInfo *LoadFontData(const unsigned char *fileData, int dataSize, int fontSize, int *fontChars, int glyphCount, int type); // Load font data for further use
|
||||||
RLAPI Image GenImageFontAtlas(const GlyphInfo *chars, Rectangle **recs, int glyphCount, int fontSize, int padding, int packMethod); // Generate image font atlas using chars info
|
RLAPI Image GenImageFontAtlas(const GlyphInfo *chars, Rectangle **recs, int glyphCount, int fontSize, int padding, int packMethod); // Generate image font atlas using chars info
|
||||||
RLAPI void UnloadFontData(GlyphInfo *chars, int glyphCount); // Unload font chars info data (RAM)
|
RLAPI void UnloadFontData(GlyphInfo *chars, int glyphCount); // Unload font chars info data (RAM)
|
||||||
|
|
@ -449,12 +456,15 @@ RLAPI GlyphInfo GetGlyphInfo(Font font, int codepoint);
|
||||||
RLAPI Rectangle GetGlyphAtlasRec(Font font, int codepoint); // Get glyph rectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found
|
RLAPI Rectangle GetGlyphAtlasRec(Font font, int codepoint); // Get glyph rectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found
|
||||||
|
|
||||||
// Text codepoints management functions (unicode characters)
|
// Text codepoints management functions (unicode characters)
|
||||||
RLAPI int *LoadCodepoints(const char *text, int *count); // Load all codepoints from a UTF-8 text string, codepoints count returned by parameter
|
RLAPI char *LoadUTF8(const int *codepoints, int length); // Load UTF-8 text encoded from codepoints array
|
||||||
RLAPI void UnloadCodepoints(int *codepoints); // Unload codepoints data from memory
|
RLAPI void UnloadUTF8(char *text); // Unload UTF-8 text encoded from codepoints array
|
||||||
RLAPI int GetCodepointCount(const char *text); // Get total number of codepoints in a UTF-8 encoded string
|
RLAPI int *LoadCodepoints(const char *text, int *count); // Load all codepoints from a UTF-8 text string, codepoints count returned by parameter
|
||||||
RLAPI int GetCodepoint(const char *text, int *bytesProcessed); // Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure
|
RLAPI void UnloadCodepoints(int *codepoints); // Unload codepoints data from memory
|
||||||
RLAPI const char *CodepointToUTF8(int codepoint, int *byteSize); // Encode one codepoint into UTF-8 byte array (array length returned as parameter)
|
RLAPI int GetCodepointCount(const char *text); // Get total number of codepoints in a UTF-8 encoded string
|
||||||
RLAPI char *TextCodepointsToUTF8(const int *codepoints, int length); // Encode text as codepoints array into UTF-8 text string (WARNING: memory must be freed!)
|
RLAPI int GetCodepoint(const char *text, int *codepointSize); // Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure
|
||||||
|
RLAPI int GetCodepointNext(const char *text, int *codepointSize); // Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure
|
||||||
|
RLAPI int GetCodepointPrevious(const char *text, int *codepointSize); // Get previous codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure
|
||||||
|
RLAPI const char *CodepointToUTF8(int codepoint, int *utf8Size); // Encode one codepoint into UTF-8 byte array (array length returned as parameter)
|
||||||
|
|
||||||
// Text strings management functions (no UTF-8 strings, only byte chars)
|
// Text strings management functions (no UTF-8 strings, only byte chars)
|
||||||
// NOTE: Some strings allocate memory internally for returned strings, just be careful!
|
// NOTE: Some strings allocate memory internally for returned strings, just be careful!
|
||||||
|
|
@ -488,8 +498,6 @@ RLAPI void DrawCube(Vector3 position, float width, float height, float length, C
|
||||||
RLAPI void DrawCubeV(Vector3 position, Vector3 size, Color color); // Draw cube (Vector version)
|
RLAPI void DrawCubeV(Vector3 position, Vector3 size, Color color); // Draw cube (Vector version)
|
||||||
RLAPI void DrawCubeWires(Vector3 position, float width, float height, float length, Color color); // Draw cube wires
|
RLAPI void DrawCubeWires(Vector3 position, float width, float height, float length, Color color); // Draw cube wires
|
||||||
RLAPI void DrawCubeWiresV(Vector3 position, Vector3 size, Color color); // Draw cube wires (Vector version)
|
RLAPI void DrawCubeWiresV(Vector3 position, Vector3 size, Color color); // Draw cube wires (Vector version)
|
||||||
RLAPI void DrawCubeTexture(Texture2D texture, Vector3 position, float width, float height, float length, Color color); // Draw cube textured
|
|
||||||
RLAPI void DrawCubeTextureRec(Texture2D texture, Rectangle source, Vector3 position, float width, float height, float length, Color color); // Draw cube with a region of a texture
|
|
||||||
RLAPI void DrawSphere(Vector3 centerPos, float radius, Color color); // Draw sphere
|
RLAPI void DrawSphere(Vector3 centerPos, float radius, Color color); // Draw sphere
|
||||||
RLAPI void DrawSphereEx(Vector3 centerPos, float radius, int rings, int slices, Color color); // Draw sphere with extended parameters
|
RLAPI void DrawSphereEx(Vector3 centerPos, float radius, int rings, int slices, Color color); // Draw sphere with extended parameters
|
||||||
RLAPI void DrawSphereWires(Vector3 centerPos, float radius, int rings, int slices, Color color); // Draw sphere wires
|
RLAPI void DrawSphereWires(Vector3 centerPos, float radius, int rings, int slices, Color color); // Draw sphere wires
|
||||||
|
|
@ -497,6 +505,8 @@ RLAPI void DrawCylinder(Vector3 position, float radiusTop, float radiusBottom, f
|
||||||
RLAPI void DrawCylinderEx(Vector3 startPos, Vector3 endPos, float startRadius, float endRadius, int sides, Color color); // Draw a cylinder with base at startPos and top at endPos
|
RLAPI void DrawCylinderEx(Vector3 startPos, Vector3 endPos, float startRadius, float endRadius, int sides, Color color); // Draw a cylinder with base at startPos and top at endPos
|
||||||
RLAPI void DrawCylinderWires(Vector3 position, float radiusTop, float radiusBottom, float height, int slices, Color color); // Draw a cylinder/cone wires
|
RLAPI void DrawCylinderWires(Vector3 position, float radiusTop, float radiusBottom, float height, int slices, Color color); // Draw a cylinder/cone wires
|
||||||
RLAPI void DrawCylinderWiresEx(Vector3 startPos, Vector3 endPos, float startRadius, float endRadius, int sides, Color color); // Draw a cylinder wires with base at startPos and top at endPos
|
RLAPI void DrawCylinderWiresEx(Vector3 startPos, Vector3 endPos, float startRadius, float endRadius, int sides, Color color); // Draw a cylinder wires with base at startPos and top at endPos
|
||||||
|
RLAPI void DrawCapsule(Vector3 startPos, Vector3 endPos, float radius, int slices, int rings, Color color); // Draw a capsule with the center of its sphere caps at startPos and endPos
|
||||||
|
RLAPI void DrawCapsuleWires(Vector3 startPos, Vector3 endPos, float radius, int slices, int rings, Color color); // Draw capsule wireframe with the center of its sphere caps at startPos and endPos
|
||||||
RLAPI void DrawPlane(Vector3 centerPos, Vector2 size, Color color); // Draw a plane XZ
|
RLAPI void DrawPlane(Vector3 centerPos, Vector2 size, Color color); // Draw a plane XZ
|
||||||
RLAPI void DrawRay(Ray ray, Color color); // Draw a ray line
|
RLAPI void DrawRay(Ray ray, Color color); // Draw a ray line
|
||||||
RLAPI void DrawGrid(int slices, float spacing); // Draw a grid (centered at (0, 0, 0))
|
RLAPI void DrawGrid(int slices, float spacing); // Draw a grid (centered at (0, 0, 0))
|
||||||
|
|
@ -508,16 +518,16 @@ RLAPI void DrawGrid(int slices, float spacing);
|
||||||
// Model management functions
|
// Model management functions
|
||||||
RLAPI Model LoadModel(const char *fileName); // Load model from files (meshes and materials)
|
RLAPI Model LoadModel(const char *fileName); // Load model from files (meshes and materials)
|
||||||
RLAPI Model LoadModelFromMesh(Mesh mesh); // Load model from generated mesh (default material)
|
RLAPI Model LoadModelFromMesh(Mesh mesh); // Load model from generated mesh (default material)
|
||||||
|
RLAPI bool IsModelReady(Model model); // Check if a model is ready
|
||||||
RLAPI void UnloadModel(Model model); // Unload model (including meshes) from memory (RAM and/or VRAM)
|
RLAPI void UnloadModel(Model model); // Unload model (including meshes) from memory (RAM and/or VRAM)
|
||||||
RLAPI void UnloadModelKeepMeshes(Model model); // Unload model (but not meshes) from memory (RAM and/or VRAM)
|
|
||||||
RLAPI BoundingBox GetModelBoundingBox(Model model); // Compute model bounding box limits (considers all meshes)
|
RLAPI BoundingBox GetModelBoundingBox(Model model); // Compute model bounding box limits (considers all meshes)
|
||||||
|
|
||||||
// Model drawing functions
|
// Model drawing functions
|
||||||
RLAPI void DrawModel(Model model, Vector3 position, float scale, Color tint); // Draw a model (with texture if set)
|
RLAPI void DrawModel(Model model, Vector3 position, float scale, Color tint); // Draw a model (with texture if set)
|
||||||
RLAPI void DrawModelEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model with extended parameters
|
RLAPI void DrawModelEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model with extended parameters
|
||||||
RLAPI void DrawModelWires(Model model, Vector3 position, float scale, Color tint); // Draw a model wires (with texture if set)
|
RLAPI void DrawModelWires(Model model, Vector3 position, float scale, Color tint); // Draw a model wires (with texture if set)
|
||||||
RLAPI void DrawModelWiresEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model wires (with texture if set) with extended parameters
|
RLAPI void DrawModelWiresEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model wires (with texture if set) with extended parameters
|
||||||
RLAPI void DrawBoundingBox(BoundingBox box, Color color); // Draw bounding box (wires)
|
RLAPI void DrawBoundingBox(BoundingBox box, Color color); // Draw bounding box (wires)
|
||||||
RLAPI void DrawBillboard(Camera camera, Texture2D texture, Vector3 position, float size, Color tint); // Draw a billboard texture
|
RLAPI void DrawBillboard(Camera camera, Texture2D texture, Vector3 position, float size, Color tint); // Draw a billboard texture
|
||||||
RLAPI void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector2 size, Color tint); // Draw a billboard texture defined by source
|
RLAPI void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector2 size, Color tint); // Draw a billboard texture defined by source
|
||||||
RLAPI void DrawBillboardPro(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector3 up, Vector2 size, Vector2 origin, float rotation, Color tint); // Draw a billboard texture defined by source and rotation
|
RLAPI void DrawBillboardPro(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector3 up, Vector2 size, Vector2 origin, float rotation, Color tint); // Draw a billboard texture defined by source and rotation
|
||||||
|
|
@ -548,6 +558,7 @@ RLAPI Mesh GenMeshCubicmap(Image cubicmap, Vector3 cubeSize);
|
||||||
// Material loading/unloading functions
|
// Material loading/unloading functions
|
||||||
RLAPI Material *LoadMaterials(const char *fileName, int *materialCount); // Load materials from model file
|
RLAPI Material *LoadMaterials(const char *fileName, int *materialCount); // Load materials from model file
|
||||||
RLAPI Material LoadMaterialDefault(void); // Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps)
|
RLAPI Material LoadMaterialDefault(void); // Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps)
|
||||||
|
RLAPI bool IsMaterialReady(Material material); // Check if a material is ready
|
||||||
RLAPI void UnloadMaterial(Material material); // Unload material from GPU memory (VRAM)
|
RLAPI void UnloadMaterial(Material material); // Unload material from GPU memory (VRAM)
|
||||||
RLAPI void SetMaterialTexture(Material *material, int mapType, Texture2D texture); // Set texture for a material map type (MATERIAL_MAP_DIFFUSE, MATERIAL_MAP_SPECULAR...)
|
RLAPI void SetMaterialTexture(Material *material, int mapType, Texture2D texture); // Set texture for a material map type (MATERIAL_MAP_DIFFUSE, MATERIAL_MAP_SPECULAR...)
|
||||||
RLAPI void SetModelMeshMaterial(Model *model, int meshId, int materialId); // Set material for a mesh
|
RLAPI void SetModelMeshMaterial(Model *model, int meshId, int materialId); // Set material for a mesh
|
||||||
|
|
@ -583,8 +594,10 @@ RLAPI void SetMasterVolume(float volume); // Set mas
|
||||||
// Wave/Sound loading/unloading functions
|
// Wave/Sound loading/unloading functions
|
||||||
RLAPI Wave LoadWave(const char *fileName); // Load wave data from file
|
RLAPI Wave LoadWave(const char *fileName); // Load wave data from file
|
||||||
RLAPI Wave LoadWaveFromMemory(const char *fileType, const unsigned char *fileData, int dataSize); // Load wave from memory buffer, fileType refers to extension: i.e. '.wav'
|
RLAPI Wave LoadWaveFromMemory(const char *fileType, const unsigned char *fileData, int dataSize); // Load wave from memory buffer, fileType refers to extension: i.e. '.wav'
|
||||||
|
RLAPI bool IsWaveReady(Wave wave); // Checks if wave data is ready
|
||||||
RLAPI Sound LoadSound(const char *fileName); // Load sound from file
|
RLAPI Sound LoadSound(const char *fileName); // Load sound from file
|
||||||
RLAPI Sound LoadSoundFromWave(Wave wave); // Load sound from wave data
|
RLAPI Sound LoadSoundFromWave(Wave wave); // Load sound from wave data
|
||||||
|
RLAPI bool IsSoundReady(Sound sound); // Checks if a sound is ready
|
||||||
RLAPI void UpdateSound(Sound sound, const void *data, int sampleCount); // Update sound buffer with new data
|
RLAPI void UpdateSound(Sound sound, const void *data, int sampleCount); // Update sound buffer with new data
|
||||||
RLAPI void UnloadWave(Wave wave); // Unload wave data
|
RLAPI void UnloadWave(Wave wave); // Unload wave data
|
||||||
RLAPI void UnloadSound(Sound sound); // Unload sound
|
RLAPI void UnloadSound(Sound sound); // Unload sound
|
||||||
|
|
@ -596,9 +609,6 @@ RLAPI void PlaySound(Sound sound); // Play a
|
||||||
RLAPI void StopSound(Sound sound); // Stop playing a sound
|
RLAPI void StopSound(Sound sound); // Stop playing a sound
|
||||||
RLAPI void PauseSound(Sound sound); // Pause a sound
|
RLAPI void PauseSound(Sound sound); // Pause a sound
|
||||||
RLAPI void ResumeSound(Sound sound); // Resume a paused sound
|
RLAPI void ResumeSound(Sound sound); // Resume a paused sound
|
||||||
RLAPI void PlaySoundMulti(Sound sound); // Play a sound (using multichannel buffer pool)
|
|
||||||
RLAPI void StopSoundMulti(void); // Stop any sound playing (using multichannel buffer pool)
|
|
||||||
RLAPI int GetSoundsPlaying(void); // Get number of sounds playing in the multichannel
|
|
||||||
RLAPI bool IsSoundPlaying(Sound sound); // Check if a sound is currently playing
|
RLAPI bool IsSoundPlaying(Sound sound); // Check if a sound is currently playing
|
||||||
RLAPI void SetSoundVolume(Sound sound, float volume); // Set volume for a sound (1.0 is max level)
|
RLAPI void SetSoundVolume(Sound sound, float volume); // Set volume for a sound (1.0 is max level)
|
||||||
RLAPI void SetSoundPitch(Sound sound, float pitch); // Set pitch for a sound (1.0 is base level)
|
RLAPI void SetSoundPitch(Sound sound, float pitch); // Set pitch for a sound (1.0 is base level)
|
||||||
|
|
@ -612,6 +622,7 @@ RLAPI void UnloadWaveSamples(float *samples); // Unload
|
||||||
// Music management functions
|
// Music management functions
|
||||||
RLAPI Music LoadMusicStream(const char *fileName); // Load music stream from file
|
RLAPI Music LoadMusicStream(const char *fileName); // Load music stream from file
|
||||||
RLAPI Music LoadMusicStreamFromMemory(const char *fileType, const unsigned char *data, int dataSize); // Load music stream from data
|
RLAPI Music LoadMusicStreamFromMemory(const char *fileType, const unsigned char *data, int dataSize); // Load music stream from data
|
||||||
|
RLAPI bool IsMusicReady(Music music); // Checks if a music stream is ready
|
||||||
RLAPI void UnloadMusicStream(Music music); // Unload music stream
|
RLAPI void UnloadMusicStream(Music music); // Unload music stream
|
||||||
RLAPI void PlayMusicStream(Music music); // Start music playing
|
RLAPI void PlayMusicStream(Music music); // Start music playing
|
||||||
RLAPI bool IsMusicStreamPlaying(Music music); // Check if music is playing
|
RLAPI bool IsMusicStreamPlaying(Music music); // Check if music is playing
|
||||||
|
|
@ -628,6 +639,7 @@ RLAPI float GetMusicTimePlayed(Music music); // Get cur
|
||||||
|
|
||||||
// AudioStream management functions
|
// AudioStream management functions
|
||||||
RLAPI AudioStream LoadAudioStream(unsigned int sampleRate, unsigned int sampleSize, unsigned int channels); // Load audio stream (to stream raw audio pcm data)
|
RLAPI AudioStream LoadAudioStream(unsigned int sampleRate, unsigned int sampleSize, unsigned int channels); // Load audio stream (to stream raw audio pcm data)
|
||||||
|
RLAPI bool IsAudioStreamReady(AudioStream stream); // Checks if an audio stream is ready
|
||||||
RLAPI void UnloadAudioStream(AudioStream stream); // Unload audio stream and free memory
|
RLAPI void UnloadAudioStream(AudioStream stream); // Unload audio stream and free memory
|
||||||
RLAPI void UpdateAudioStream(AudioStream stream, const void *data, int frameCount); // Update audio stream buffers with data
|
RLAPI void UpdateAudioStream(AudioStream stream, const void *data, int frameCount); // Update audio stream buffers with data
|
||||||
RLAPI bool IsAudioStreamProcessed(AudioStream stream); // Check if any audio stream buffers requires refill
|
RLAPI bool IsAudioStreamProcessed(AudioStream stream); // Check if any audio stream buffers requires refill
|
||||||
|
|
@ -645,3 +657,6 @@ RLAPI void SetAudioStreamCallback(AudioStream stream, AudioCallback callback);
|
||||||
RLAPI void AttachAudioStreamProcessor(AudioStream stream, AudioCallback processor); // Attach audio stream processor to stream
|
RLAPI void AttachAudioStreamProcessor(AudioStream stream, AudioCallback processor); // Attach audio stream processor to stream
|
||||||
RLAPI void DetachAudioStreamProcessor(AudioStream stream, AudioCallback processor); // Detach audio stream processor from stream
|
RLAPI void DetachAudioStreamProcessor(AudioStream stream, AudioCallback processor); // Detach audio stream processor from stream
|
||||||
|
|
||||||
|
RLAPI void AttachAudioMixedProcessor(AudioCallback processor); // Attach audio stream processor to the entire audio pipeline
|
||||||
|
RLAPI void DetachAudioMixedProcessor(AudioCallback processor); // Detach audio stream processor from the entire audio pipeline
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,390 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
|
||||||
<ProjectConfiguration Include="Debug.DLL|Win32">
|
|
||||||
<Configuration>Debug.DLL</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Debug.DLL|x64">
|
|
||||||
<Configuration>Debug.DLL</Configuration>
|
|
||||||
<Platform>x64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Debug|Win32">
|
|
||||||
<Configuration>Debug</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Debug|x64">
|
|
||||||
<Configuration>Debug</Configuration>
|
|
||||||
<Platform>x64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Release.DLL|Win32">
|
|
||||||
<Configuration>Release.DLL</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Release.DLL|x64">
|
|
||||||
<Configuration>Release.DLL</Configuration>
|
|
||||||
<Platform>x64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Release|Win32">
|
|
||||||
<Configuration>Release</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Release|x64">
|
|
||||||
<Configuration>Release</Configuration>
|
|
||||||
<Platform>x64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
</ItemGroup>
|
|
||||||
<PropertyGroup Label="Globals">
|
|
||||||
<ProjectGuid>{9875B0C8-3893-43F8-88B2-4BAAAE3E8E6F}</ProjectGuid>
|
|
||||||
<Keyword>Win32Proj</Keyword>
|
|
||||||
<RootNamespace>audio_multichannel_sound</RootNamespace>
|
|
||||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
|
||||||
<ProjectName>audio_multichannel_sound</ProjectName>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
|
||||||
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
|
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
|
||||||
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
|
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug.DLL|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
|
||||||
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
|
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug.DLL|x64'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
|
||||||
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
|
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
|
||||||
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
|
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
|
||||||
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
|
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release.DLL|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
|
||||||
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
|
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release.DLL|x64'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
|
||||||
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
|
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
|
||||||
<ImportGroup Label="ExtensionSettings">
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="Shared">
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug.DLL|Win32'" Label="PropertySheets">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug.DLL|x64'" Label="PropertySheets">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release.DLL|Win32'" Label="PropertySheets">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release.DLL|x64'" Label="PropertySheets">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<PropertyGroup Label="UserMacros" />
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
<LinkIncremental>true</LinkIncremental>
|
|
||||||
<OutDir>$(SolutionDir)\build\$(ProjectName)\bin\$(Platform)\$(Configuration)\</OutDir>
|
|
||||||
<IntDir>$(SolutionDir)\build\$(ProjectName)\obj\$(Platform)\$(Configuration)\</IntDir>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
||||||
<LinkIncremental>true</LinkIncremental>
|
|
||||||
<OutDir>$(SolutionDir)\build\$(ProjectName)\bin\$(Platform)\$(Configuration)\</OutDir>
|
|
||||||
<IntDir>$(SolutionDir)\build\$(ProjectName)\obj\$(Platform)\$(Configuration)\</IntDir>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug.DLL|Win32'">
|
|
||||||
<LinkIncremental>true</LinkIncremental>
|
|
||||||
<OutDir>$(SolutionDir)\build\$(ProjectName)\bin\$(Platform)\$(Configuration)\</OutDir>
|
|
||||||
<IntDir>$(SolutionDir)\build\$(ProjectName)\obj\$(Platform)\$(Configuration)\</IntDir>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug.DLL|x64'">
|
|
||||||
<LinkIncremental>true</LinkIncremental>
|
|
||||||
<OutDir>$(SolutionDir)\build\$(ProjectName)\bin\$(Platform)\$(Configuration)\</OutDir>
|
|
||||||
<IntDir>$(SolutionDir)\build\$(ProjectName)\obj\$(Platform)\$(Configuration)\</IntDir>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
<LinkIncremental>false</LinkIncremental>
|
|
||||||
<OutDir>$(SolutionDir)\build\$(ProjectName)\bin\$(Platform)\$(Configuration)\</OutDir>
|
|
||||||
<IntDir>$(SolutionDir)\build\$(ProjectName)\obj\$(Platform)\$(Configuration)\</IntDir>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
||||||
<LinkIncremental>false</LinkIncremental>
|
|
||||||
<OutDir>$(SolutionDir)\build\$(ProjectName)\bin\$(Platform)\$(Configuration)\</OutDir>
|
|
||||||
<IntDir>$(SolutionDir)\build\$(ProjectName)\obj\$(Platform)\$(Configuration)\</IntDir>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release.DLL|Win32'">
|
|
||||||
<LinkIncremental>false</LinkIncremental>
|
|
||||||
<OutDir>$(SolutionDir)\build\$(ProjectName)\bin\$(Platform)\$(Configuration)\</OutDir>
|
|
||||||
<IntDir>$(SolutionDir)\build\$(ProjectName)\obj\$(Platform)\$(Configuration)\</IntDir>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release.DLL|x64'">
|
|
||||||
<LinkIncremental>false</LinkIncremental>
|
|
||||||
<OutDir>$(SolutionDir)\build\$(ProjectName)\bin\$(Platform)\$(Configuration)\</OutDir>
|
|
||||||
<IntDir>$(SolutionDir)\build\$(ProjectName)\obj\$(Platform)\$(Configuration)\</IntDir>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug.DLL|Win32'">
|
|
||||||
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\audio</LocalDebuggerWorkingDirectory>
|
|
||||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug.DLL|x64'">
|
|
||||||
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\audio</LocalDebuggerWorkingDirectory>
|
|
||||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\audio</LocalDebuggerWorkingDirectory>
|
|
||||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\audio</LocalDebuggerWorkingDirectory>
|
|
||||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release.DLL|Win32'">
|
|
||||||
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\audio</LocalDebuggerWorkingDirectory>
|
|
||||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
||||||
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\audio</LocalDebuggerWorkingDirectory>
|
|
||||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
||||||
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\audio</LocalDebuggerWorkingDirectory>
|
|
||||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release.DLL|x64'">
|
|
||||||
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\audio</LocalDebuggerWorkingDirectory>
|
|
||||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
<ClCompile>
|
|
||||||
<PrecompiledHeader>
|
|
||||||
</PrecompiledHeader>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<Optimization>Disabled</Optimization>
|
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<CompileAs>CompileAsC</CompileAs>
|
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<SubSystem>Console</SubSystem>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<AdditionalLibraryDirectories>$(SolutionDir)\build\raylib\bin\$(Platform)\$(Configuration)\</AdditionalLibraryDirectories>
|
|
||||||
<AdditionalDependencies>raylib.lib;opengl32.lib;kernel32.lib;user32.lib;gdi32.lib;winmm.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
||||||
<ClCompile>
|
|
||||||
<PrecompiledHeader>
|
|
||||||
</PrecompiledHeader>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<Optimization>Disabled</Optimization>
|
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<CompileAs>CompileAsC</CompileAs>
|
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
<AdditionalOptions>/FS %(AdditionalOptions)</AdditionalOptions>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<SubSystem>Console</SubSystem>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<AdditionalLibraryDirectories>$(SolutionDir)\build\raylib\bin\$(Platform)\$(Configuration)\</AdditionalLibraryDirectories>
|
|
||||||
<AdditionalDependencies>raylib.lib;opengl32.lib;kernel32.lib;user32.lib;gdi32.lib;winmm.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug.DLL|Win32'">
|
|
||||||
<ClCompile>
|
|
||||||
<PrecompiledHeader>
|
|
||||||
</PrecompiledHeader>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<Optimization>Disabled</Optimization>
|
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<CompileAs>CompileAsC</CompileAs>
|
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<SubSystem>Console</SubSystem>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<AdditionalLibraryDirectories>$(SolutionDir)\build\raylib\bin\$(Platform)\$(Configuration)\</AdditionalLibraryDirectories>
|
|
||||||
<AdditionalDependencies>raylib.lib;opengl32.lib;kernel32.lib;user32.lib;gdi32.lib;winmm.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
</Link>
|
|
||||||
<PostBuildEvent>
|
|
||||||
<Command>xcopy /y /d "$(SolutionDir)\build\raylib\bin\$(Platform)\$(Configuration)\raylib.dll" "$(SolutionDir)\build\$(ProjectName)\bin\$(Platform)\$(Configuration)"</Command>
|
|
||||||
<Message>Copy Debug DLL to output directory</Message>
|
|
||||||
</PostBuildEvent>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug.DLL|x64'">
|
|
||||||
<ClCompile>
|
|
||||||
<PrecompiledHeader>
|
|
||||||
</PrecompiledHeader>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<Optimization>Disabled</Optimization>
|
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<CompileAs>CompileAsC</CompileAs>
|
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<SubSystem>Console</SubSystem>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<AdditionalLibraryDirectories>$(SolutionDir)\build\raylib\bin\$(Platform)\$(Configuration)\</AdditionalLibraryDirectories>
|
|
||||||
<AdditionalDependencies>raylib.lib;opengl32.lib;kernel32.lib;user32.lib;gdi32.lib;winmm.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
</Link>
|
|
||||||
<PostBuildEvent>
|
|
||||||
<Command>xcopy /y /d "$(SolutionDir)\build\raylib\bin\$(Platform)\$(Configuration)\raylib.dll" "$(SolutionDir)\build\$(ProjectName)\bin\$(Platform)\$(Configuration)"</Command>
|
|
||||||
<Message>Copy Debug DLL to output directory</Message>
|
|
||||||
</PostBuildEvent>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
<ClCompile>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<PrecompiledHeader>
|
|
||||||
</PrecompiledHeader>
|
|
||||||
<Optimization>MaxSpeed</Optimization>
|
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions>
|
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
<CompileAs>CompileAsC</CompileAs>
|
|
||||||
<RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<SubSystem>Console</SubSystem>
|
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<AdditionalDependencies>raylib.lib;opengl32.lib;kernel32.lib;user32.lib;gdi32.lib;winmm.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
<AdditionalLibraryDirectories>$(SolutionDir)\build\raylib\bin\$(Platform)\$(Configuration)\</AdditionalLibraryDirectories>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
||||||
<ClCompile>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<PrecompiledHeader>
|
|
||||||
</PrecompiledHeader>
|
|
||||||
<Optimization>MaxSpeed</Optimization>
|
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions>
|
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
<CompileAs>CompileAsC</CompileAs>
|
|
||||||
<RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<SubSystem>Console</SubSystem>
|
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<AdditionalDependencies>raylib.lib;opengl32.lib;kernel32.lib;user32.lib;gdi32.lib;winmm.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
<AdditionalLibraryDirectories>$(SolutionDir)\build\raylib\bin\$(Platform)\$(Configuration)\</AdditionalLibraryDirectories>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release.DLL|Win32'">
|
|
||||||
<ClCompile>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<PrecompiledHeader>
|
|
||||||
</PrecompiledHeader>
|
|
||||||
<Optimization>MaxSpeed</Optimization>
|
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions>
|
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
<CompileAs>CompileAsC</CompileAs>
|
|
||||||
<RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<SubSystem>Console</SubSystem>
|
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<AdditionalDependencies>raylib.lib;opengl32.lib;kernel32.lib;user32.lib;gdi32.lib;winmm.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
<AdditionalLibraryDirectories>$(SolutionDir)\build\raylib\bin\$(Platform)\$(Configuration)\</AdditionalLibraryDirectories>
|
|
||||||
</Link>
|
|
||||||
<PostBuildEvent>
|
|
||||||
<Command>xcopy /y /d "$(SolutionDir)\build\raylib\bin\$(Platform)\$(Configuration)\raylib.dll" "$(SolutionDir)\build\$(ProjectName)\bin\$(Platform)\$(Configuration)"</Command>
|
|
||||||
</PostBuildEvent>
|
|
||||||
<PostBuildEvent>
|
|
||||||
<Message>Copy Release DLL to output directory</Message>
|
|
||||||
</PostBuildEvent>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release.DLL|x64'">
|
|
||||||
<ClCompile>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<PrecompiledHeader>
|
|
||||||
</PrecompiledHeader>
|
|
||||||
<Optimization>MaxSpeed</Optimization>
|
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP</PreprocessorDefinitions>
|
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir)..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
<CompileAs>CompileAsC</CompileAs>
|
|
||||||
<RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<SubSystem>Console</SubSystem>
|
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<AdditionalDependencies>raylib.lib;opengl32.lib;kernel32.lib;user32.lib;gdi32.lib;winmm.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
<AdditionalLibraryDirectories>$(SolutionDir)\build\raylib\bin\$(Platform)\$(Configuration)\</AdditionalLibraryDirectories>
|
|
||||||
</Link>
|
|
||||||
<PostBuildEvent>
|
|
||||||
<Command>xcopy /y /d "$(SolutionDir)\build\raylib\bin\$(Platform)\$(Configuration)\raylib.dll" "$(SolutionDir)\build\$(ProjectName)\bin\$(Platform)\$(Configuration)"</Command>
|
|
||||||
</PostBuildEvent>
|
|
||||||
<PostBuildEvent>
|
|
||||||
<Message>Copy Release DLL to output directory</Message>
|
|
||||||
</PostBuildEvent>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClCompile Include="..\..\..\examples\audio\audio_multichannel_sound.c" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ResourceCompile Include="..\..\..\src\raylib.rc" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\raylib\raylib.vcxproj">
|
|
||||||
<Project>{e89d61ac-55de-4482-afd4-df7242ebc859}</Project>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
|
||||||
<ImportGroup Label="ExtensionTargets">
|
|
||||||
</ImportGroup>
|
|
||||||
</Project>
|
|
||||||
|
|
@ -17,8 +17,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "textures_image_drawing", "e
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "audio_module_playing", "examples\audio_module_playing.vcxproj", "{E6784F91-4E4E-4956-A079-73FAB1AC7BE6}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "audio_module_playing", "examples\audio_module_playing.vcxproj", "{E6784F91-4E4E-4956-A079-73FAB1AC7BE6}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "audio_multichannel_sound", "examples\audio_multichannel_sound.vcxproj", "{9875B0C8-3893-43F8-88B2-4BAAAE3E8E6F}"
|
|
||||||
EndProject
|
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "audio_music_stream", "examples\audio_music_stream.vcxproj", "{BFB22AB2-041B-4A1B-80C0-1D4BE410C8A9}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "audio_music_stream", "examples\audio_music_stream.vcxproj", "{BFB22AB2-041B-4A1B-80C0-1D4BE410C8A9}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "audio_raw_stream", "examples\audio_raw_stream.vcxproj", "{93A1F656-0D29-4C5E-B140-11F23FF5D6AB}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "audio_raw_stream", "examples\audio_raw_stream.vcxproj", "{93A1F656-0D29-4C5E-B140-11F23FF5D6AB}"
|
||||||
|
|
@ -2289,7 +2287,6 @@ Global
|
||||||
{103B292B-049B-4B15-85A1-9F902840DB2C} = {DA049009-21FF-4AC0-84E4-830DD1BCD0CE}
|
{103B292B-049B-4B15-85A1-9F902840DB2C} = {DA049009-21FF-4AC0-84E4-830DD1BCD0CE}
|
||||||
{0C2D2F82-AE67-400C-B19C-8C9B957B132A} = {DA049009-21FF-4AC0-84E4-830DD1BCD0CE}
|
{0C2D2F82-AE67-400C-B19C-8C9B957B132A} = {DA049009-21FF-4AC0-84E4-830DD1BCD0CE}
|
||||||
{E6784F91-4E4E-4956-A079-73FAB1AC7BE6} = {CC132A4D-D081-4C26-BFB9-AB11984054F8}
|
{E6784F91-4E4E-4956-A079-73FAB1AC7BE6} = {CC132A4D-D081-4C26-BFB9-AB11984054F8}
|
||||||
{9875B0C8-3893-43F8-88B2-4BAAAE3E8E6F} = {CC132A4D-D081-4C26-BFB9-AB11984054F8}
|
|
||||||
{BFB22AB2-041B-4A1B-80C0-1D4BE410C8A9} = {CC132A4D-D081-4C26-BFB9-AB11984054F8}
|
{BFB22AB2-041B-4A1B-80C0-1D4BE410C8A9} = {CC132A4D-D081-4C26-BFB9-AB11984054F8}
|
||||||
{93A1F656-0D29-4C5E-B140-11F23FF5D6AB} = {CC132A4D-D081-4C26-BFB9-AB11984054F8}
|
{93A1F656-0D29-4C5E-B140-11F23FF5D6AB} = {CC132A4D-D081-4C26-BFB9-AB11984054F8}
|
||||||
{F81C5819-85B6-4D2E-B6DC-104A7634461B} = {CC132A4D-D081-4C26-BFB9-AB11984054F8}
|
{F81C5819-85B6-4D2E-B6DC-104A7634461B} = {CC132A4D-D081-4C26-BFB9-AB11984054F8}
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ if (NOT BUILD_SHARED_LIBS)
|
||||||
add_library(raylib_static ALIAS raylib)
|
add_library(raylib_static ALIAS raylib)
|
||||||
else()
|
else()
|
||||||
MESSAGE(STATUS "Building raylib shared library")
|
MESSAGE(STATUS "Building raylib shared library")
|
||||||
if (MSVC)
|
if (WIN32)
|
||||||
target_compile_definitions(raylib
|
target_compile_definitions(raylib
|
||||||
PRIVATE $<BUILD_INTERFACE:BUILD_LIBTYPE_SHARED>
|
PRIVATE $<BUILD_INTERFACE:BUILD_LIBTYPE_SHARED>
|
||||||
INTERFACE $<INSTALL_INTERFACE:USE_LIBTYPE_SHARED>
|
INTERFACE $<INSTALL_INTERFACE:USE_LIBTYPE_SHARED>
|
||||||
|
|
|
||||||
12
src/Makefile
12
src/Makefile
|
|
@ -4,7 +4,7 @@
|
||||||
#
|
#
|
||||||
# Platforms supported:
|
# Platforms supported:
|
||||||
# PLATFORM_DESKTOP: Windows (Win32, Win64)
|
# PLATFORM_DESKTOP: Windows (Win32, Win64)
|
||||||
# PLATFORM_DESKTOP: Linux (i386, x64)
|
# PLATFORM_DESKTOP: Linux (arm64, i386, x64)
|
||||||
# PLATFORM_DESKTOP: OSX/macOS (arm64, x86_64)
|
# PLATFORM_DESKTOP: OSX/macOS (arm64, x86_64)
|
||||||
# PLATFORM_DESKTOP: FreeBSD, OpenBSD, NetBSD, DragonFly
|
# PLATFORM_DESKTOP: FreeBSD, OpenBSD, NetBSD, DragonFly
|
||||||
# PLATFORM_ANDROID: Android (arm, i686, arm64, x86_64)
|
# PLATFORM_ANDROID: Android (arm, i686, arm64, x86_64)
|
||||||
|
|
@ -45,8 +45,8 @@
|
||||||
PLATFORM ?= PLATFORM_DESKTOP
|
PLATFORM ?= PLATFORM_DESKTOP
|
||||||
|
|
||||||
# Define required raylib variables
|
# Define required raylib variables
|
||||||
RAYLIB_VERSION = 4.2.0
|
RAYLIB_VERSION = 4.5.0
|
||||||
RAYLIB_API_VERSION = 420
|
RAYLIB_API_VERSION = 450
|
||||||
|
|
||||||
# Define raylib source code path
|
# Define raylib source code path
|
||||||
RAYLIB_SRC_PATH ?= ../src
|
RAYLIB_SRC_PATH ?= ../src
|
||||||
|
|
@ -231,8 +231,10 @@ endif
|
||||||
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||||
# By default use OpenGL 3.3 on desktop platforms
|
# By default use OpenGL 3.3 on desktop platforms
|
||||||
GRAPHICS ?= GRAPHICS_API_OPENGL_33
|
GRAPHICS ?= GRAPHICS_API_OPENGL_33
|
||||||
#GRAPHICS = GRAPHICS_API_OPENGL_11 # Uncomment to use OpenGL 1.1
|
#GRAPHICS = GRAPHICS_API_OPENGL_11 # Uncomment to use OpenGL 1.1
|
||||||
#GRAPHICS = GRAPHICS_API_OPENGL_21 # Uncomment to use OpenGL 2.1
|
#GRAPHICS = GRAPHICS_API_OPENGL_21 # Uncomment to use OpenGL 2.1
|
||||||
|
#GRAPHICS = GRAPHICS_API_OPENGL_43 # Uncomment to use OpenGL 4.3
|
||||||
|
#GRAPHICS = GRAPHICS_API_OPENGL_ES2 # Uncomment to use OpenGL ES 2.0 (ANGLE)
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM),PLATFORM_RPI)
|
ifeq ($(PLATFORM),PLATFORM_RPI)
|
||||||
# On RPI OpenGL ES 2.0 must be used
|
# On RPI OpenGL ES 2.0 must be used
|
||||||
|
|
|
||||||
|
|
@ -239,6 +239,6 @@
|
||||||
|
|
||||||
// utils: Configuration values
|
// utils: Configuration values
|
||||||
//------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
#define MAX_TRACELOG_MSG_LENGTH 128 // Max length of one trace-log message
|
#define MAX_TRACELOG_MSG_LENGTH 256 // Max length of one trace-log message
|
||||||
|
|
||||||
#endif // CONFIG_H
|
#endif // CONFIG_H
|
||||||
|
|
|
||||||
3304
src/external/miniaudio.h
vendored
3304
src/external/miniaudio.h
vendored
File diff suppressed because it is too large
Load Diff
4
src/external/qoaplay.c
vendored
4
src/external/qoaplay.c
vendored
|
|
@ -62,7 +62,7 @@ typedef struct {
|
||||||
extern "C" { // Prevents name mangling of functions
|
extern "C" { // Prevents name mangling of functions
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
qoaplay_desc *qoaplay_open(char *path);
|
qoaplay_desc *qoaplay_open(const char *path);
|
||||||
qoaplay_desc *qoaplay_open_memory(const unsigned char *data, int data_size);
|
qoaplay_desc *qoaplay_open_memory(const unsigned char *data, int data_size);
|
||||||
void qoaplay_close(qoaplay_desc *qoa_ctx);
|
void qoaplay_close(qoaplay_desc *qoa_ctx);
|
||||||
|
|
||||||
|
|
@ -83,7 +83,7 @@ int qoaplay_get_frame(qoaplay_desc *qoa_ctx);
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|
||||||
// Open QOA file, keep FILE pointer to keep reading from file
|
// Open QOA file, keep FILE pointer to keep reading from file
|
||||||
qoaplay_desc *qoaplay_open(char *path)
|
qoaplay_desc *qoaplay_open(const char *path)
|
||||||
{
|
{
|
||||||
FILE *file = fopen(path, "rb");
|
FILE *file = fopen(path, "rb");
|
||||||
if (!file) return NULL;
|
if (!file) return NULL;
|
||||||
|
|
|
||||||
136
src/raudio.c
136
src/raudio.c
|
|
@ -377,11 +377,6 @@ typedef struct AudioData {
|
||||||
int defaultSize; // Default audio buffer size for audio streams
|
int defaultSize; // Default audio buffer size for audio streams
|
||||||
} Buffer;
|
} Buffer;
|
||||||
rAudioProcessor *mixedProcessor;
|
rAudioProcessor *mixedProcessor;
|
||||||
struct {
|
|
||||||
unsigned int poolCounter; // AudioBuffer pointers pool counter
|
|
||||||
AudioBuffer *pool[MAX_AUDIO_BUFFER_POOL_CHANNELS]; // Multichannel AudioBuffer pointers pool
|
|
||||||
unsigned int channels[MAX_AUDIO_BUFFER_POOL_CHANNELS]; // AudioBuffer pool channels
|
|
||||||
} MultiChannel;
|
|
||||||
} AudioData;
|
} AudioData;
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|
@ -490,13 +485,6 @@ void InitAudioDevice(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Init dummy audio buffers pool for multichannel sound playing
|
|
||||||
for (int i = 0; i < MAX_AUDIO_BUFFER_POOL_CHANNELS; i++)
|
|
||||||
{
|
|
||||||
// WARNING: An empty audio buffer is created (data = 0) and added to list, AudioBuffer data is filled on PlaySoundMulti()
|
|
||||||
AUDIO.MultiChannel.pool[i] = LoadAudioBuffer(AUDIO_DEVICE_FORMAT, AUDIO_DEVICE_CHANNELS, AUDIO.System.device.sampleRate, 0, AUDIO_BUFFER_USAGE_STATIC);
|
|
||||||
}
|
|
||||||
|
|
||||||
TRACELOG(LOG_INFO, "AUDIO: Device initialized successfully");
|
TRACELOG(LOG_INFO, "AUDIO: Device initialized successfully");
|
||||||
TRACELOG(LOG_INFO, " > Backend: miniaudio / %s", ma_get_backend_name(AUDIO.System.context.backend));
|
TRACELOG(LOG_INFO, " > Backend: miniaudio / %s", ma_get_backend_name(AUDIO.System.context.backend));
|
||||||
TRACELOG(LOG_INFO, " > Format: %s -> %s", ma_get_format_name(AUDIO.System.device.playback.format), ma_get_format_name(AUDIO.System.device.playback.internalFormat));
|
TRACELOG(LOG_INFO, " > Format: %s -> %s", ma_get_format_name(AUDIO.System.device.playback.format), ma_get_format_name(AUDIO.System.device.playback.internalFormat));
|
||||||
|
|
@ -512,20 +500,6 @@ void CloseAudioDevice(void)
|
||||||
{
|
{
|
||||||
if (AUDIO.System.isReady)
|
if (AUDIO.System.isReady)
|
||||||
{
|
{
|
||||||
// Unload dummy audio buffers pool
|
|
||||||
// WARNING: They can be pointing to already unloaded data
|
|
||||||
for (int i = 0; i < MAX_AUDIO_BUFFER_POOL_CHANNELS; i++)
|
|
||||||
{
|
|
||||||
//UnloadAudioBuffer(AUDIO.MultiChannel.pool[i]);
|
|
||||||
if (AUDIO.MultiChannel.pool[i] != NULL)
|
|
||||||
{
|
|
||||||
ma_data_converter_uninit(&AUDIO.MultiChannel.pool[i]->converter, NULL);
|
|
||||||
UntrackAudioBuffer(AUDIO.MultiChannel.pool[i]);
|
|
||||||
//RL_FREE(buffer->data); // Already unloaded by UnloadSound()
|
|
||||||
RL_FREE(AUDIO.MultiChannel.pool[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ma_mutex_uninit(&AUDIO.System.lock);
|
ma_mutex_uninit(&AUDIO.System.lock);
|
||||||
ma_device_uninit(&AUDIO.System.device);
|
ma_device_uninit(&AUDIO.System.device);
|
||||||
ma_context_uninit(&AUDIO.System.context);
|
ma_context_uninit(&AUDIO.System.context);
|
||||||
|
|
@ -938,11 +912,11 @@ Sound LoadSoundFromWave(Wave wave)
|
||||||
// Checks if a sound is ready
|
// Checks if a sound is ready
|
||||||
bool IsSoundReady(Sound sound)
|
bool IsSoundReady(Sound sound)
|
||||||
{
|
{
|
||||||
return ((sound.frameCount > 0) && // Validate frame count
|
return ((sound.frameCount > 0) && // Validate frame count
|
||||||
(sound.stream.buffer != NULL) && // Validate stream buffer
|
(sound.stream.buffer != NULL) && // Validate stream buffer
|
||||||
(sound.stream.sampleRate > 0) && // Validate sample rate is supported
|
(sound.stream.sampleRate > 0) && // Validate sample rate is supported
|
||||||
(sound.stream.sampleSize > 0) && // Validate sample size is supported
|
(sound.stream.sampleSize > 0) && // Validate sample size is supported
|
||||||
(sound.stream.channels > 0)); // Validate number of channels supported
|
(sound.stream.channels > 0)); // Validate number of channels supported
|
||||||
}
|
}
|
||||||
|
|
||||||
// Unload wave data
|
// Unload wave data
|
||||||
|
|
@ -1100,88 +1074,6 @@ void PlaySound(Sound sound)
|
||||||
PlayAudioBuffer(sound.stream.buffer);
|
PlayAudioBuffer(sound.stream.buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Play a sound in the multichannel buffer pool
|
|
||||||
void PlaySoundMulti(Sound sound)
|
|
||||||
{
|
|
||||||
int index = -1;
|
|
||||||
unsigned int oldAge = 0;
|
|
||||||
int oldIndex = -1;
|
|
||||||
|
|
||||||
// find the first non-playing pool entry
|
|
||||||
for (int i = 0; i < MAX_AUDIO_BUFFER_POOL_CHANNELS; i++)
|
|
||||||
{
|
|
||||||
if (AUDIO.MultiChannel.channels[i] > oldAge)
|
|
||||||
{
|
|
||||||
oldAge = AUDIO.MultiChannel.channels[i];
|
|
||||||
oldIndex = i;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!IsAudioBufferPlaying(AUDIO.MultiChannel.pool[i]))
|
|
||||||
{
|
|
||||||
index = i;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// If no none playing pool members can be indexed choose the oldest
|
|
||||||
if (index == -1)
|
|
||||||
{
|
|
||||||
TRACELOG(LOG_WARNING, "SOUND: Buffer pool is already full, count: %i", AUDIO.MultiChannel.poolCounter);
|
|
||||||
|
|
||||||
if (oldIndex == -1)
|
|
||||||
{
|
|
||||||
// Shouldn't be able to get here... but just in case something odd happens!
|
|
||||||
TRACELOG(LOG_WARNING, "SOUND: Buffer pool could not determine the oldest buffer not playing sound");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
index = oldIndex;
|
|
||||||
|
|
||||||
// Just in case...
|
|
||||||
StopAudioBuffer(AUDIO.MultiChannel.pool[index]);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Experimentally mutex lock doesn't seem to be needed this makes sense
|
|
||||||
// as pool[index] isn't playing and the only stuff we're copying
|
|
||||||
// shouldn't be changing...
|
|
||||||
|
|
||||||
AUDIO.MultiChannel.channels[index] = AUDIO.MultiChannel.poolCounter;
|
|
||||||
AUDIO.MultiChannel.poolCounter++;
|
|
||||||
|
|
||||||
SetAudioBufferVolume(AUDIO.MultiChannel.pool[index], sound.stream.buffer->volume);
|
|
||||||
SetAudioBufferPitch(AUDIO.MultiChannel.pool[index], sound.stream.buffer->pitch);
|
|
||||||
SetAudioBufferPan(AUDIO.MultiChannel.pool[index], sound.stream.buffer->pan);
|
|
||||||
|
|
||||||
AUDIO.MultiChannel.pool[index]->looping = sound.stream.buffer->looping;
|
|
||||||
AUDIO.MultiChannel.pool[index]->usage = sound.stream.buffer->usage;
|
|
||||||
AUDIO.MultiChannel.pool[index]->isSubBufferProcessed[0] = false;
|
|
||||||
AUDIO.MultiChannel.pool[index]->isSubBufferProcessed[1] = false;
|
|
||||||
AUDIO.MultiChannel.pool[index]->sizeInFrames = sound.stream.buffer->sizeInFrames;
|
|
||||||
|
|
||||||
AUDIO.MultiChannel.pool[index]->data = sound.stream.buffer->data; // Fill dummy track with data for playing
|
|
||||||
|
|
||||||
PlayAudioBuffer(AUDIO.MultiChannel.pool[index]);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Stop any sound played with PlaySoundMulti()
|
|
||||||
void StopSoundMulti(void)
|
|
||||||
{
|
|
||||||
for (int i = 0; i < MAX_AUDIO_BUFFER_POOL_CHANNELS; i++) StopAudioBuffer(AUDIO.MultiChannel.pool[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get number of sounds playing in the multichannel buffer pool
|
|
||||||
int GetSoundsPlaying(void)
|
|
||||||
{
|
|
||||||
int counter = 0;
|
|
||||||
|
|
||||||
for (int i = 0; i < MAX_AUDIO_BUFFER_POOL_CHANNELS; i++)
|
|
||||||
{
|
|
||||||
if (IsAudioBufferPlaying(AUDIO.MultiChannel.pool[i])) counter++;
|
|
||||||
}
|
|
||||||
|
|
||||||
return counter;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Pause a sound
|
// Pause a sound
|
||||||
void PauseSound(Sound sound)
|
void PauseSound(Sound sound)
|
||||||
{
|
{
|
||||||
|
|
@ -1898,9 +1790,9 @@ void UpdateMusicStream(Music music)
|
||||||
{
|
{
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
int frameCountRed = (int)drwav_read_pcm_frames_s16((drwav *)music.ctxData, frameCountStillNeeded, (short *)((char *)AUDIO.System.pcmBuffer + frameCountReadTotal*frameSize));
|
int frameCountRead = (int)drwav_read_pcm_frames_s16((drwav *)music.ctxData, frameCountStillNeeded, (short *)((char *)AUDIO.System.pcmBuffer + frameCountReadTotal*frameSize));
|
||||||
frameCountReadTotal += frameCountRed;
|
frameCountReadTotal += frameCountRead;
|
||||||
frameCountStillNeeded -= frameCountRed;
|
frameCountStillNeeded -= frameCountRead;
|
||||||
if (frameCountStillNeeded == 0) break;
|
if (frameCountStillNeeded == 0) break;
|
||||||
else drwav_seek_to_first_pcm_frame((drwav *)music.ctxData);
|
else drwav_seek_to_first_pcm_frame((drwav *)music.ctxData);
|
||||||
}
|
}
|
||||||
|
|
@ -1909,9 +1801,9 @@ void UpdateMusicStream(Music music)
|
||||||
{
|
{
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
int frameCountRed = (int)drwav_read_pcm_frames_f32((drwav *)music.ctxData, frameCountStillNeeded, (float *)((char *)AUDIO.System.pcmBuffer + frameCountReadTotal*frameSize));
|
int frameCountRead = (int)drwav_read_pcm_frames_f32((drwav *)music.ctxData, frameCountStillNeeded, (float *)((char *)AUDIO.System.pcmBuffer + frameCountReadTotal*frameSize));
|
||||||
frameCountReadTotal += frameCountRed;
|
frameCountReadTotal += frameCountRead;
|
||||||
frameCountStillNeeded -= frameCountRed;
|
frameCountStillNeeded -= frameCountRead;
|
||||||
if (frameCountStillNeeded == 0) break;
|
if (frameCountStillNeeded == 0) break;
|
||||||
else drwav_seek_to_first_pcm_frame((drwav *)music.ctxData);
|
else drwav_seek_to_first_pcm_frame((drwav *)music.ctxData);
|
||||||
}
|
}
|
||||||
|
|
@ -1923,9 +1815,9 @@ void UpdateMusicStream(Music music)
|
||||||
{
|
{
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
int frameCountRed = stb_vorbis_get_samples_short_interleaved((stb_vorbis *)music.ctxData, music.stream.channels, (short *)((char *)AUDIO.System.pcmBuffer + frameCountReadTotal*frameSize), frameCountStillNeeded*music.stream.channels);
|
int frameCountRead = stb_vorbis_get_samples_short_interleaved((stb_vorbis *)music.ctxData, music.stream.channels, (short *)((char *)AUDIO.System.pcmBuffer + frameCountReadTotal*frameSize), frameCountStillNeeded*music.stream.channels);
|
||||||
frameCountReadTotal += frameCountRed;
|
frameCountReadTotal += frameCountRead;
|
||||||
frameCountStillNeeded -= frameCountRed;
|
frameCountStillNeeded -= frameCountRead;
|
||||||
if (frameCountStillNeeded == 0) break;
|
if (frameCountStillNeeded == 0) break;
|
||||||
else stb_vorbis_seek_start((stb_vorbis *)music.ctxData);
|
else stb_vorbis_seek_start((stb_vorbis *)music.ctxData);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1,6 +1,6 @@
|
||||||
/**********************************************************************************************
|
/**********************************************************************************************
|
||||||
*
|
*
|
||||||
* raylib v4.5-dev - A simple and easy-to-use library to enjoy videogames programming (www.raylib.com)
|
* raylib v4.5 - A simple and easy-to-use library to enjoy videogames programming (www.raylib.com)
|
||||||
*
|
*
|
||||||
* FEATURES:
|
* FEATURES:
|
||||||
* - NO external dependencies, all required libraries included with raylib
|
* - NO external dependencies, all required libraries included with raylib
|
||||||
|
|
@ -84,7 +84,7 @@
|
||||||
#define RAYLIB_VERSION_MAJOR 4
|
#define RAYLIB_VERSION_MAJOR 4
|
||||||
#define RAYLIB_VERSION_MINOR 5
|
#define RAYLIB_VERSION_MINOR 5
|
||||||
#define RAYLIB_VERSION_PATCH 0
|
#define RAYLIB_VERSION_PATCH 0
|
||||||
#define RAYLIB_VERSION "4.5-dev"
|
#define RAYLIB_VERSION "4.5"
|
||||||
|
|
||||||
// Function specifiers in case library is build/used as a shared library (Windows)
|
// Function specifiers in case library is build/used as a shared library (Windows)
|
||||||
// NOTE: Microsoft specifiers to tell compiler that symbols are imported/exported from a .dll
|
// NOTE: Microsoft specifiers to tell compiler that symbols are imported/exported from a .dll
|
||||||
|
|
@ -1158,6 +1158,7 @@ RLAPI float GetGesturePinchAngle(void); // Get gesture pinch ang
|
||||||
// Camera System Functions (Module: rcamera)
|
// Camera System Functions (Module: rcamera)
|
||||||
//------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
RLAPI void UpdateCamera(Camera *camera, int mode); // Update camera position for selected mode
|
RLAPI void UpdateCamera(Camera *camera, int mode); // Update camera position for selected mode
|
||||||
|
RLAPI void UpdateCameraPro(Camera *camera, Vector3 movement, Vector3 rotation, float zoom); // Update camera movement/rotation
|
||||||
|
|
||||||
//------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
// Basic Shapes Drawing Functions (Module: shapes)
|
// Basic Shapes Drawing Functions (Module: shapes)
|
||||||
|
|
@ -1440,7 +1441,6 @@ RLAPI Model LoadModel(const char *fileName);
|
||||||
RLAPI Model LoadModelFromMesh(Mesh mesh); // Load model from generated mesh (default material)
|
RLAPI Model LoadModelFromMesh(Mesh mesh); // Load model from generated mesh (default material)
|
||||||
RLAPI bool IsModelReady(Model model); // Check if a model is ready
|
RLAPI bool IsModelReady(Model model); // Check if a model is ready
|
||||||
RLAPI void UnloadModel(Model model); // Unload model (including meshes) from memory (RAM and/or VRAM)
|
RLAPI void UnloadModel(Model model); // Unload model (including meshes) from memory (RAM and/or VRAM)
|
||||||
RLAPI void UnloadModelKeepMeshes(Model model); // Unload model (but not meshes) from memory (RAM and/or VRAM)
|
|
||||||
RLAPI BoundingBox GetModelBoundingBox(Model model); // Compute model bounding box limits (considers all meshes)
|
RLAPI BoundingBox GetModelBoundingBox(Model model); // Compute model bounding box limits (considers all meshes)
|
||||||
|
|
||||||
// Model drawing functions
|
// Model drawing functions
|
||||||
|
|
@ -1530,9 +1530,6 @@ RLAPI void PlaySound(Sound sound); // Play a
|
||||||
RLAPI void StopSound(Sound sound); // Stop playing a sound
|
RLAPI void StopSound(Sound sound); // Stop playing a sound
|
||||||
RLAPI void PauseSound(Sound sound); // Pause a sound
|
RLAPI void PauseSound(Sound sound); // Pause a sound
|
||||||
RLAPI void ResumeSound(Sound sound); // Resume a paused sound
|
RLAPI void ResumeSound(Sound sound); // Resume a paused sound
|
||||||
RLAPI void PlaySoundMulti(Sound sound); // Play a sound (using multichannel buffer pool)
|
|
||||||
RLAPI void StopSoundMulti(void); // Stop any sound playing (using multichannel buffer pool)
|
|
||||||
RLAPI int GetSoundsPlaying(void); // Get number of sounds playing in the multichannel
|
|
||||||
RLAPI bool IsSoundPlaying(Sound sound); // Check if a sound is currently playing
|
RLAPI bool IsSoundPlaying(Sound sound); // Check if a sound is currently playing
|
||||||
RLAPI void SetSoundVolume(Sound sound, float volume); // Set volume for a sound (1.0 is max level)
|
RLAPI void SetSoundVolume(Sound sound, float volume); // Set volume for a sound (1.0 is max level)
|
||||||
RLAPI void SetSoundPitch(Sound sound, float pitch); // Set pitch for a sound (1.0 is base level)
|
RLAPI void SetSoundPitch(Sound sound, float pitch); // Set pitch for a sound (1.0 is base level)
|
||||||
|
|
|
||||||
Binary file not shown.
153
src/rcamera.h
153
src/rcamera.h
|
|
@ -46,32 +46,35 @@
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
// Defines and Macros
|
// Defines and Macros
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
//...
|
// Function specifiers definition
|
||||||
|
#ifndef RLAPI
|
||||||
|
#define RLAPI // Functions defined as 'extern' by default (implicit specifiers)
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(CAMERA_STANDALONE)
|
#if defined(CAMERA_STANDALONE)
|
||||||
#define CAMERA_CULL_DISTANCE_NEAR 0.01
|
#define CAMERA_CULL_DISTANCE_NEAR 0.01
|
||||||
#define CAMERA_CULL_DISTANCE_FAR 1000.0
|
#define CAMERA_CULL_DISTANCE_FAR 1000.0
|
||||||
#else
|
#else
|
||||||
#define CAMERA_CULL_DISTANCE_NEAR RL_CULL_DISTANCE_NEAR
|
#define CAMERA_CULL_DISTANCE_NEAR RL_CULL_DISTANCE_NEAR
|
||||||
#define CAMERA_CULL_DISTANCE_FAR RL_CULL_DISTANCE_FAR
|
#define CAMERA_CULL_DISTANCE_FAR RL_CULL_DISTANCE_FAR
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
// Types and Structures Definition
|
// Types and Structures Definition
|
||||||
// NOTE: Below types are required for CAMERA_STANDALONE usage
|
// NOTE: Below types are required for CAMERA_STANDALONE usage
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
// TODO review
|
|
||||||
#if defined(CAMERA_STANDALONE)
|
#if defined(CAMERA_STANDALONE)
|
||||||
// Vector2 type
|
// Vector2, 2 components
|
||||||
typedef struct Vector2 {
|
typedef struct Vector2 {
|
||||||
float x;
|
float x; // Vector x component
|
||||||
float y;
|
float y; // Vector y component
|
||||||
} Vector2;
|
} Vector2;
|
||||||
|
|
||||||
// Vector3 type
|
// Vector3, 3 components
|
||||||
typedef struct Vector3 {
|
typedef struct Vector3 {
|
||||||
float x;
|
float x; // Vector x component
|
||||||
float y;
|
float y; // Vector y component
|
||||||
float z;
|
float z; // Vector z component
|
||||||
} Vector3;
|
} Vector3;
|
||||||
|
|
||||||
// Camera type, defines a camera position/orientation in 3d space
|
// Camera type, defines a camera position/orientation in 3d space
|
||||||
|
|
@ -80,31 +83,31 @@
|
||||||
Vector3 target; // Camera target it looks-at
|
Vector3 target; // Camera target it looks-at
|
||||||
Vector3 up; // Camera up vector (rotation over its axis)
|
Vector3 up; // Camera up vector (rotation over its axis)
|
||||||
float fovy; // Camera field-of-view apperture in Y (degrees) in perspective, used as near plane width in orthographic
|
float fovy; // Camera field-of-view apperture in Y (degrees) in perspective, used as near plane width in orthographic
|
||||||
int projection; // Camera type, defines projection type: CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC
|
int projection; // Camera projection type: CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC
|
||||||
} Camera3D;
|
} Camera3D;
|
||||||
|
|
||||||
typedef Camera3D Camera; // Camera type fallback, defaults to Camera3D
|
typedef Camera3D Camera; // Camera type fallback, defaults to Camera3D
|
||||||
|
|
||||||
|
// Camera projection
|
||||||
|
typedef enum {
|
||||||
|
CAMERA_PERSPECTIVE = 0, // Perspective projection
|
||||||
|
CAMERA_ORTHOGRAPHIC // Orthographic projection
|
||||||
|
} CameraProjection;
|
||||||
|
|
||||||
// Camera system modes
|
// Camera system modes
|
||||||
typedef enum {
|
typedef enum {
|
||||||
CAMERA_CUSTOM = 0,
|
CAMERA_CUSTOM = 0, // Camera custom, controlled by user (UpdateCamera() does nothing)
|
||||||
CAMERA_FREE,
|
CAMERA_FREE, // Camera free mode
|
||||||
CAMERA_ORBITAL,
|
CAMERA_ORBITAL, // Camera orbital, around target, zoom supported
|
||||||
CAMERA_FIRST_PERSON,
|
CAMERA_FIRST_PERSON, // Camera first person
|
||||||
CAMERA_THIRD_PERSON
|
CAMERA_THIRD_PERSON // Camera third person
|
||||||
} CameraMode;
|
} CameraMode;
|
||||||
|
|
||||||
// Camera projection modes
|
|
||||||
typedef enum {
|
|
||||||
CAMERA_PERSPECTIVE = 0,
|
|
||||||
CAMERA_ORTHOGRAPHIC
|
|
||||||
} CameraProjection;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
// Global Variables Definition
|
// Global Variables Definition
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
//...
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
// Module Functions Declaration
|
// Module Functions Declaration
|
||||||
|
|
@ -114,21 +117,23 @@
|
||||||
extern "C" { // Prevents name mangling of functions
|
extern "C" { // Prevents name mangling of functions
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Vector3 GetCameraForward(Camera *camera);
|
RLAPI Vector3 GetCameraForward(Camera *camera);
|
||||||
Vector3 GetCameraUp(Camera *camera);
|
RLAPI Vector3 GetCameraUp(Camera *camera);
|
||||||
Vector3 GetCameraRight(Camera *camera);
|
RLAPI Vector3 GetCameraRight(Camera *camera);
|
||||||
|
|
||||||
void CameraMoveForward(Camera *camera, float distance, bool moveInWorldPlane);
|
// Camera movement
|
||||||
void CameraMoveUp(Camera *camera, float distance);
|
RLAPI void CameraMoveForward(Camera *camera, float distance, bool moveInWorldPlane);
|
||||||
void CameraMoveRight(Camera *camera, float distance, bool moveInWorldPlane);
|
RLAPI void CameraMoveUp(Camera *camera, float distance);
|
||||||
void CameraMoveToTarget(Camera *camera, float delta);
|
RLAPI void CameraMoveRight(Camera *camera, float distance, bool moveInWorldPlane);
|
||||||
|
RLAPI void CameraMoveToTarget(Camera *camera, float delta);
|
||||||
|
|
||||||
void CameraYaw(Camera *camera, float angle, bool rotateAroundTarget);
|
// Camera rotation
|
||||||
void CameraPitch(Camera *camera, float angle, bool lockView, bool rotateAroundTarget, bool rotateUp);
|
RLAPI void CameraYaw(Camera *camera, float angle, bool rotateAroundTarget);
|
||||||
void CameraRoll(Camera *camera, float angle);
|
RLAPI void CameraPitch(Camera *camera, float angle, bool lockView, bool rotateAroundTarget, bool rotateUp);
|
||||||
|
RLAPI void CameraRoll(Camera *camera, float angle);
|
||||||
|
|
||||||
Matrix GetCameraViewMatrix(Camera *camera);
|
RLAPI Matrix GetCameraViewMatrix(Camera *camera);
|
||||||
Matrix GetCameraProjectionMatrix(Camera* camera, float aspect);
|
RLAPI Matrix GetCameraProjectionMatrix(Camera* camera, float aspect);
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
}
|
}
|
||||||
|
|
@ -306,36 +311,35 @@ void CameraYaw(Camera *camera, float angle, bool rotateAroundTarget)
|
||||||
Vector3 up = GetCameraUp(camera);
|
Vector3 up = GetCameraUp(camera);
|
||||||
|
|
||||||
// View vector
|
// View vector
|
||||||
Vector3 target_position = Vector3Subtract(camera->target, camera->position);
|
Vector3 targetPosition = Vector3Subtract(camera->target, camera->position);
|
||||||
|
|
||||||
// Rotate view vector around up axis
|
// Rotate view vector around up axis
|
||||||
target_position = Vector3RotateByAxisAngle(target_position, up, angle);
|
targetPosition = Vector3RotateByAxisAngle(targetPosition, up, angle);
|
||||||
|
|
||||||
if (rotateAroundTarget)
|
if (rotateAroundTarget)
|
||||||
{
|
{
|
||||||
// Move position relative to target
|
// Move position relative to target
|
||||||
camera->position = Vector3Subtract(camera->target, target_position);
|
camera->position = Vector3Subtract(camera->target, targetPosition);
|
||||||
}
|
}
|
||||||
else // rotate around camera.position
|
else // rotate around camera.position
|
||||||
{
|
{
|
||||||
// Move target relative to position
|
// Move target relative to position
|
||||||
camera->target = Vector3Add(camera->position, target_position);
|
camera->target = Vector3Add(camera->position, targetPosition);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Rotates the camera around its right vector
|
// Rotates the camera around its right vector, pitch is "looking up and down"
|
||||||
// Pitch is "looking up and down"
|
// - lockView prevents camera overrotation (aka "somersaults")
|
||||||
// lockView prevents camera overrotation (aka "somersaults")
|
// - rotateAroundTarget defines if rotation is around target or around its position
|
||||||
// If rotateAroundTarget is false, the camera rotates around its position
|
// - rotateUp rotates the up direction as well (typically only usefull in CAMERA_FREE)
|
||||||
// rotateUp rotates the up direction as well (typically only usefull in CAMERA_FREE)
|
// NOTE: angle must be provided in radians
|
||||||
// Note: angle must be provided in radians
|
|
||||||
void CameraPitch(Camera *camera, float angle, bool lockView, bool rotateAroundTarget, bool rotateUp)
|
void CameraPitch(Camera *camera, float angle, bool lockView, bool rotateAroundTarget, bool rotateUp)
|
||||||
{
|
{
|
||||||
// Up direction
|
// Up direction
|
||||||
Vector3 up = GetCameraUp(camera);
|
Vector3 up = GetCameraUp(camera);
|
||||||
|
|
||||||
// View vector
|
// View vector
|
||||||
Vector3 target_position = Vector3Subtract(camera->target, camera->position);
|
Vector3 targetPosition = Vector3Subtract(camera->target, camera->position);
|
||||||
|
|
||||||
if (lockView)
|
if (lockView)
|
||||||
{
|
{
|
||||||
|
|
@ -343,32 +347,32 @@ void CameraPitch(Camera *camera, float angle, bool lockView, bool rotateAroundTa
|
||||||
// to allow only viewing straight up or down.
|
// to allow only viewing straight up or down.
|
||||||
|
|
||||||
// Clamp view up
|
// Clamp view up
|
||||||
float max_angle_up = Vector3Angle(up, target_position);
|
float maxAngleUp = Vector3Angle(up, targetPosition);
|
||||||
max_angle_up -= 0.001f; // avoid numerical errors
|
maxAngleUp -= 0.001f; // avoid numerical errors
|
||||||
if (angle > max_angle_up) angle = max_angle_up;
|
if (angle > maxAngleUp) angle = maxAngleUp;
|
||||||
|
|
||||||
// Clamp view down
|
// Clamp view down
|
||||||
float max_angle_down = Vector3Angle(Vector3Negate(up), target_position);
|
float maxAngleDown = Vector3Angle(Vector3Negate(up), targetPosition);
|
||||||
max_angle_down *= -1.0f; // downwards angle is negative
|
maxAngleDown *= -1.0f; // downwards angle is negative
|
||||||
max_angle_down += 0.001f; // avoid numerical errors
|
maxAngleDown += 0.001f; // avoid numerical errors
|
||||||
if (angle < max_angle_down) angle = max_angle_down;
|
if (angle < maxAngleDown) angle = maxAngleDown;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Rotation axis
|
// Rotation axis
|
||||||
Vector3 right = GetCameraRight(camera);
|
Vector3 right = GetCameraRight(camera);
|
||||||
|
|
||||||
// Rotate view vector around right axis
|
// Rotate view vector around right axis
|
||||||
target_position = Vector3RotateByAxisAngle(target_position, right, angle);
|
targetPosition = Vector3RotateByAxisAngle(targetPosition, right, angle);
|
||||||
|
|
||||||
if (rotateAroundTarget)
|
if (rotateAroundTarget)
|
||||||
{
|
{
|
||||||
// Move position relative to target
|
// Move position relative to target
|
||||||
camera->position = Vector3Subtract(camera->target, target_position);
|
camera->position = Vector3Subtract(camera->target, targetPosition);
|
||||||
}
|
}
|
||||||
else // rotate around camera.position
|
else // rotate around camera.position
|
||||||
{
|
{
|
||||||
// Move target relative to position
|
// Move target relative to position
|
||||||
camera->target = Vector3Add(camera->position, target_position);
|
camera->target = Vector3Add(camera->position, targetPosition);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rotateUp)
|
if (rotateUp)
|
||||||
|
|
@ -466,4 +470,35 @@ void UpdateCamera(Camera *camera, int mode)
|
||||||
}
|
}
|
||||||
#endif // !CAMERA_STANDALONE
|
#endif // !CAMERA_STANDALONE
|
||||||
|
|
||||||
|
// Update camera movement, movement/rotation values should be provided by user
|
||||||
|
void UpdateCameraPro(Camera *camera, Vector3 movement, Vector3 rotation, float zoom)
|
||||||
|
{
|
||||||
|
// Required values
|
||||||
|
// movement.x - Move forward/backward
|
||||||
|
// movement.y - Move right/left
|
||||||
|
// movement.z - Move up/down
|
||||||
|
// rotation.x - yaw
|
||||||
|
// rotation.y - pitch
|
||||||
|
// rotation.z - roll
|
||||||
|
// zoom - Move towards target
|
||||||
|
|
||||||
|
bool lockView = true;
|
||||||
|
bool rotateAroundTarget = false;
|
||||||
|
bool rotateUp = false;
|
||||||
|
bool moveInWorldPlane = true;
|
||||||
|
|
||||||
|
// Camera rotation
|
||||||
|
CameraPitch(camera, -rotation.y*DEG2RAD, lockView, rotateAroundTarget, rotateUp);
|
||||||
|
CameraYaw(camera, -rotation.x*DEG2RAD, rotateAroundTarget);
|
||||||
|
CameraRoll(camera, rotation.z*DEG2RAD);
|
||||||
|
|
||||||
|
// Camera movement
|
||||||
|
CameraMoveForward(camera, movement.x, moveInWorldPlane);
|
||||||
|
CameraMoveRight(camera, movement.y, moveInWorldPlane);
|
||||||
|
CameraMoveUp(camera, movement.z);
|
||||||
|
|
||||||
|
// Zoom target distance
|
||||||
|
CameraMoveToTarget(camera, zoom);
|
||||||
|
}
|
||||||
|
|
||||||
#endif // CAMERA_IMPLEMENTATION
|
#endif // CAMERA_IMPLEMENTATION
|
||||||
|
|
|
||||||
|
|
@ -1,567 +0,0 @@
|
||||||
/*******************************************************************************************
|
|
||||||
*
|
|
||||||
* rcamera - Basic camera system for multiple camera modes
|
|
||||||
*
|
|
||||||
* NOTE: Memory footprint of this library is aproximately 52 bytes (global variables)
|
|
||||||
*
|
|
||||||
* CONFIGURATION:
|
|
||||||
*
|
|
||||||
* #define CAMERA_IMPLEMENTATION
|
|
||||||
* Generates the implementation of the library into the included file.
|
|
||||||
* If not defined, the library is in header only mode and can be included in other headers
|
|
||||||
* or source files without problems. But only ONE file should hold the implementation.
|
|
||||||
*
|
|
||||||
* #define CAMERA_STANDALONE
|
|
||||||
* If defined, the library can be used as standalone as a camera system but some
|
|
||||||
* functions must be redefined to manage inputs accordingly.
|
|
||||||
*
|
|
||||||
* CONTRIBUTORS:
|
|
||||||
* Ramon Santamaria: Supervision, review, update and maintenance
|
|
||||||
* Marc Palau: Initial implementation (2014)
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* LICENSE: zlib/libpng
|
|
||||||
*
|
|
||||||
* Copyright (c) 2015-2022 Ramon Santamaria (@raysan5)
|
|
||||||
*
|
|
||||||
* This software is provided "as-is", without any express or implied warranty. In no event
|
|
||||||
* will the authors be held liable for any damages arising from the use of this software.
|
|
||||||
*
|
|
||||||
* Permission is granted to anyone to use this software for any purpose, including commercial
|
|
||||||
* applications, and to alter it and redistribute it freely, subject to the following restrictions:
|
|
||||||
*
|
|
||||||
* 1. The origin of this software must not be misrepresented; you must not claim that you
|
|
||||||
* wrote the original software. If you use this software in a product, an acknowledgment
|
|
||||||
* in the product documentation would be appreciated but is not required.
|
|
||||||
*
|
|
||||||
* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
|
|
||||||
* as being the original software.
|
|
||||||
*
|
|
||||||
* 3. This notice may not be removed or altered from any source distribution.
|
|
||||||
*
|
|
||||||
**********************************************************************************************/
|
|
||||||
|
|
||||||
#ifndef RCAMERA_H
|
|
||||||
#define RCAMERA_H
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
|
||||||
// Defines and Macros
|
|
||||||
//----------------------------------------------------------------------------------
|
|
||||||
//...
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
|
||||||
// Types and Structures Definition
|
|
||||||
// NOTE: Below types are required for CAMERA_STANDALONE usage
|
|
||||||
//----------------------------------------------------------------------------------
|
|
||||||
#if defined(CAMERA_STANDALONE)
|
|
||||||
// Vector2 type
|
|
||||||
typedef struct Vector2 {
|
|
||||||
float x;
|
|
||||||
float y;
|
|
||||||
} Vector2;
|
|
||||||
|
|
||||||
// Vector3 type
|
|
||||||
typedef struct Vector3 {
|
|
||||||
float x;
|
|
||||||
float y;
|
|
||||||
float z;
|
|
||||||
} Vector3;
|
|
||||||
|
|
||||||
// Camera type, defines a camera position/orientation in 3d space
|
|
||||||
typedef struct Camera3D {
|
|
||||||
Vector3 position; // Camera position
|
|
||||||
Vector3 target; // Camera target it looks-at
|
|
||||||
Vector3 up; // Camera up vector (rotation over its axis)
|
|
||||||
float fovy; // Camera field-of-view apperture in Y (degrees) in perspective, used as near plane width in orthographic
|
|
||||||
int type; // Camera type, defines projection type: CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC
|
|
||||||
} Camera3D;
|
|
||||||
|
|
||||||
typedef Camera3D Camera; // Camera type fallback, defaults to Camera3D
|
|
||||||
|
|
||||||
// Camera system modes
|
|
||||||
typedef enum {
|
|
||||||
CAMERA_CUSTOM = 0,
|
|
||||||
CAMERA_FREE,
|
|
||||||
CAMERA_ORBITAL,
|
|
||||||
CAMERA_FIRST_PERSON,
|
|
||||||
CAMERA_THIRD_PERSON
|
|
||||||
} CameraMode;
|
|
||||||
|
|
||||||
// Camera projection modes
|
|
||||||
typedef enum {
|
|
||||||
CAMERA_PERSPECTIVE = 0,
|
|
||||||
CAMERA_ORTHOGRAPHIC
|
|
||||||
} CameraProjection;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
|
||||||
// Global Variables Definition
|
|
||||||
//----------------------------------------------------------------------------------
|
|
||||||
//...
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
|
||||||
// Module Functions Declaration
|
|
||||||
//----------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" { // Prevents name mangling of functions
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CAMERA_STANDALONE)
|
|
||||||
void SetCameraMode(Camera camera, int mode); // Set camera mode (multiple camera modes available)
|
|
||||||
void UpdateCamera(Camera *camera); // Update camera position for selected mode
|
|
||||||
|
|
||||||
void SetCameraPanControl(int keyPan); // Set camera pan key to combine with mouse movement (free camera)
|
|
||||||
void SetCameraAltControl(int keyAlt); // Set camera alt key to combine with mouse movement (free camera)
|
|
||||||
void SetCameraSmoothZoomControl(int szoomKey); // Set camera smooth zoom key to combine with mouse (free camera)
|
|
||||||
void SetCameraMoveControls(int keyFront, int keyBack,
|
|
||||||
int keyRight, int keyLeft,
|
|
||||||
int keyUp, int keyDown); // Set camera move controls (1st person and 3rd person cameras)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // CAMERA_H
|
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************************
|
|
||||||
*
|
|
||||||
* CAMERA IMPLEMENTATION
|
|
||||||
*
|
|
||||||
************************************************************************************/
|
|
||||||
|
|
||||||
#if defined(CAMERA_IMPLEMENTATION)
|
|
||||||
|
|
||||||
#include <math.h> // Required for: sinf(), cosf(), sqrtf()
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
|
||||||
// Defines and Macros
|
|
||||||
//----------------------------------------------------------------------------------
|
|
||||||
#ifndef PI
|
|
||||||
#define PI 3.14159265358979323846
|
|
||||||
#endif
|
|
||||||
#ifndef DEG2RAD
|
|
||||||
#define DEG2RAD (PI/180.0f)
|
|
||||||
#endif
|
|
||||||
#ifndef RAD2DEG
|
|
||||||
#define RAD2DEG (180.0f/PI)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Camera mouse movement sensitivity
|
|
||||||
#define CAMERA_MOUSE_MOVE_SENSITIVITY 0.003f
|
|
||||||
#define CAMERA_MOUSE_SCROLL_SENSITIVITY 1.5f
|
|
||||||
|
|
||||||
// FREE_CAMERA
|
|
||||||
#define CAMERA_FREE_MOUSE_SENSITIVITY 0.01f
|
|
||||||
#define CAMERA_FREE_DISTANCE_MIN_CLAMP 0.3f
|
|
||||||
#define CAMERA_FREE_DISTANCE_MAX_CLAMP 120.0f
|
|
||||||
#define CAMERA_FREE_MIN_CLAMP 85.0f
|
|
||||||
#define CAMERA_FREE_MAX_CLAMP -85.0f
|
|
||||||
#define CAMERA_FREE_SMOOTH_ZOOM_SENSITIVITY 0.05f
|
|
||||||
#define CAMERA_FREE_PANNING_DIVIDER 5.1f
|
|
||||||
|
|
||||||
// ORBITAL_CAMERA
|
|
||||||
#define CAMERA_ORBITAL_SPEED 0.01f // Radians per frame
|
|
||||||
|
|
||||||
// FIRST_PERSON
|
|
||||||
//#define CAMERA_FIRST_PERSON_MOUSE_SENSITIVITY 0.003f
|
|
||||||
#define CAMERA_FIRST_PERSON_FOCUS_DISTANCE 25.0f
|
|
||||||
#define CAMERA_FIRST_PERSON_MIN_CLAMP 89.0f
|
|
||||||
#define CAMERA_FIRST_PERSON_MAX_CLAMP -89.0f
|
|
||||||
|
|
||||||
#define CAMERA_FIRST_PERSON_STEP_TRIGONOMETRIC_DIVIDER 8.0f
|
|
||||||
#define CAMERA_FIRST_PERSON_STEP_DIVIDER 30.0f
|
|
||||||
#define CAMERA_FIRST_PERSON_WAVING_DIVIDER 200.0f
|
|
||||||
|
|
||||||
// THIRD_PERSON
|
|
||||||
//#define CAMERA_THIRD_PERSON_MOUSE_SENSITIVITY 0.003f
|
|
||||||
#define CAMERA_THIRD_PERSON_DISTANCE_CLAMP 1.2f
|
|
||||||
#define CAMERA_THIRD_PERSON_MIN_CLAMP 5.0f
|
|
||||||
#define CAMERA_THIRD_PERSON_MAX_CLAMP -85.0f
|
|
||||||
#define CAMERA_THIRD_PERSON_OFFSET (Vector3){ 0.4f, 0.0f, 0.0f }
|
|
||||||
|
|
||||||
// PLAYER (used by camera)
|
|
||||||
#define PLAYER_MOVEMENT_SENSITIVITY 20.0f
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
|
||||||
// Types and Structures Definition
|
|
||||||
//----------------------------------------------------------------------------------
|
|
||||||
// Camera move modes (first person and third person cameras)
|
|
||||||
typedef enum {
|
|
||||||
MOVE_FRONT = 0,
|
|
||||||
MOVE_BACK,
|
|
||||||
MOVE_RIGHT,
|
|
||||||
MOVE_LEFT,
|
|
||||||
MOVE_UP,
|
|
||||||
MOVE_DOWN
|
|
||||||
} CameraMove;
|
|
||||||
|
|
||||||
// Camera global state context data [56 bytes]
|
|
||||||
typedef struct {
|
|
||||||
unsigned int mode; // Current camera mode
|
|
||||||
float targetDistance; // Camera distance from position to target
|
|
||||||
float playerEyesPosition; // Player eyes position from ground (in meters)
|
|
||||||
Vector2 angle; // Camera angle in plane XZ
|
|
||||||
Vector2 previousMousePosition; // Previous mouse position
|
|
||||||
|
|
||||||
// Camera movement control keys
|
|
||||||
int moveControl[6]; // Move controls (CAMERA_FIRST_PERSON)
|
|
||||||
int smoothZoomControl; // Smooth zoom control key
|
|
||||||
int altControl; // Alternative control key
|
|
||||||
int panControl; // Pan view control key
|
|
||||||
} CameraData;
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
|
||||||
// Global Variables Definition
|
|
||||||
//----------------------------------------------------------------------------------
|
|
||||||
static CameraData CAMERA = { // Global CAMERA state context
|
|
||||||
.mode = 0,
|
|
||||||
.targetDistance = 0,
|
|
||||||
.playerEyesPosition = 1.85f,
|
|
||||||
.angle = { 0 },
|
|
||||||
.previousMousePosition = { 0 },
|
|
||||||
.moveControl = { 'W', 'S', 'D', 'A', 'E', 'Q' },
|
|
||||||
.smoothZoomControl = 341, // raylib: KEY_LEFT_CONTROL
|
|
||||||
.altControl = 342, // raylib: KEY_LEFT_ALT
|
|
||||||
.panControl = 2 // raylib: MOUSE_BUTTON_MIDDLE
|
|
||||||
};
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
|
||||||
// Module specific Functions Declaration
|
|
||||||
//----------------------------------------------------------------------------------
|
|
||||||
#if defined(CAMERA_STANDALONE)
|
|
||||||
// NOTE: Camera controls depend on some raylib input functions
|
|
||||||
static void EnableCursor() {} // Unlock cursor
|
|
||||||
static void DisableCursor() {} // Lock cursor
|
|
||||||
|
|
||||||
static int IsKeyDown(int key) { return 0; }
|
|
||||||
|
|
||||||
static int IsMouseButtonDown(int button) { return 0;}
|
|
||||||
static float GetMouseWheelMove() { return 0.0f; }
|
|
||||||
static Vector2 GetMousePosition() { return (Vector2){ 0.0f, 0.0f }; }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
|
||||||
// Module Functions Definition
|
|
||||||
//----------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
// Select camera mode (multiple camera modes available)
|
|
||||||
void SetCameraMode(Camera camera, int mode)
|
|
||||||
{
|
|
||||||
Vector3 v1 = camera.position;
|
|
||||||
Vector3 v2 = camera.target;
|
|
||||||
|
|
||||||
float dx = v2.x - v1.x;
|
|
||||||
float dy = v2.y - v1.y;
|
|
||||||
float dz = v2.z - v1.z;
|
|
||||||
|
|
||||||
CAMERA.targetDistance = sqrtf(dx*dx + dy*dy + dz*dz); // Distance to target
|
|
||||||
|
|
||||||
// Camera angle calculation
|
|
||||||
CAMERA.angle.x = atan2f(dx, dz); // Camera angle in plane XZ (0 aligned with Z, move positive CCW)
|
|
||||||
CAMERA.angle.y = atan2f(dy, sqrtf(dx*dx + dz*dz)); // Camera angle in plane XY (0 aligned with X, move positive CW)
|
|
||||||
|
|
||||||
CAMERA.playerEyesPosition = camera.position.y; // Init player eyes position to camera Y position
|
|
||||||
|
|
||||||
CAMERA.previousMousePosition = GetMousePosition(); // Init mouse position
|
|
||||||
|
|
||||||
// Lock cursor for first person and third person cameras
|
|
||||||
if ((mode == CAMERA_FIRST_PERSON) || (mode == CAMERA_THIRD_PERSON)) DisableCursor();
|
|
||||||
else EnableCursor();
|
|
||||||
|
|
||||||
CAMERA.mode = mode;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update camera depending on selected mode
|
|
||||||
// NOTE: Camera controls depend on some raylib functions:
|
|
||||||
// System: EnableCursor(), DisableCursor()
|
|
||||||
// Mouse: IsMouseButtonDown(), GetMousePosition(), GetMouseWheelMove()
|
|
||||||
// Keys: IsKeyDown()
|
|
||||||
void UpdateCamera(Camera *camera)
|
|
||||||
{
|
|
||||||
static int swingCounter = 0; // Used for 1st person swinging movement
|
|
||||||
|
|
||||||
// TODO: Compute CAMERA.targetDistance and CAMERA.angle here (?)
|
|
||||||
|
|
||||||
// Mouse movement detection
|
|
||||||
Vector2 mousePositionDelta = { 0.0f, 0.0f };
|
|
||||||
Vector2 mousePosition = GetMousePosition();
|
|
||||||
float mouseWheelMove = GetMouseWheelMove();
|
|
||||||
|
|
||||||
// Keys input detection
|
|
||||||
// TODO: Input detection is raylib-dependant, it could be moved outside the module
|
|
||||||
bool keyPan = IsMouseButtonDown(CAMERA.panControl);
|
|
||||||
bool keyAlt = IsKeyDown(CAMERA.altControl);
|
|
||||||
bool szoomKey = IsKeyDown(CAMERA.smoothZoomControl);
|
|
||||||
bool direction[6] = { IsKeyDown(CAMERA.moveControl[MOVE_FRONT]),
|
|
||||||
IsKeyDown(CAMERA.moveControl[MOVE_BACK]),
|
|
||||||
IsKeyDown(CAMERA.moveControl[MOVE_RIGHT]),
|
|
||||||
IsKeyDown(CAMERA.moveControl[MOVE_LEFT]),
|
|
||||||
IsKeyDown(CAMERA.moveControl[MOVE_UP]),
|
|
||||||
IsKeyDown(CAMERA.moveControl[MOVE_DOWN]) };
|
|
||||||
|
|
||||||
if (CAMERA.mode != CAMERA_CUSTOM)
|
|
||||||
{
|
|
||||||
mousePositionDelta.x = mousePosition.x - CAMERA.previousMousePosition.x;
|
|
||||||
mousePositionDelta.y = mousePosition.y - CAMERA.previousMousePosition.y;
|
|
||||||
|
|
||||||
CAMERA.previousMousePosition = mousePosition;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Support for multiple automatic camera modes
|
|
||||||
// NOTE: In case of CAMERA_CUSTOM nothing happens here, user must update it manually
|
|
||||||
switch (CAMERA.mode)
|
|
||||||
{
|
|
||||||
case CAMERA_FREE: // Camera free controls, using standard 3d-content-creation scheme
|
|
||||||
{
|
|
||||||
// Camera zoom
|
|
||||||
if ((CAMERA.targetDistance < CAMERA_FREE_DISTANCE_MAX_CLAMP) && (mouseWheelMove < 0))
|
|
||||||
{
|
|
||||||
CAMERA.targetDistance -= (mouseWheelMove*CAMERA_MOUSE_SCROLL_SENSITIVITY);
|
|
||||||
if (CAMERA.targetDistance > CAMERA_FREE_DISTANCE_MAX_CLAMP) CAMERA.targetDistance = CAMERA_FREE_DISTANCE_MAX_CLAMP;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Camera looking down
|
|
||||||
else if ((camera->position.y > camera->target.y) && (CAMERA.targetDistance == CAMERA_FREE_DISTANCE_MAX_CLAMP) && (mouseWheelMove < 0))
|
|
||||||
{
|
|
||||||
camera->target.x += mouseWheelMove*(camera->target.x - camera->position.x)*CAMERA_MOUSE_SCROLL_SENSITIVITY/CAMERA.targetDistance;
|
|
||||||
camera->target.y += mouseWheelMove*(camera->target.y - camera->position.y)*CAMERA_MOUSE_SCROLL_SENSITIVITY/CAMERA.targetDistance;
|
|
||||||
camera->target.z += mouseWheelMove*(camera->target.z - camera->position.z)*CAMERA_MOUSE_SCROLL_SENSITIVITY/CAMERA.targetDistance;
|
|
||||||
}
|
|
||||||
else if ((camera->position.y > camera->target.y) && (camera->target.y >= 0))
|
|
||||||
{
|
|
||||||
camera->target.x += mouseWheelMove*(camera->target.x - camera->position.x)*CAMERA_MOUSE_SCROLL_SENSITIVITY/CAMERA.targetDistance;
|
|
||||||
camera->target.y += mouseWheelMove*(camera->target.y - camera->position.y)*CAMERA_MOUSE_SCROLL_SENSITIVITY/CAMERA.targetDistance;
|
|
||||||
camera->target.z += mouseWheelMove*(camera->target.z - camera->position.z)*CAMERA_MOUSE_SCROLL_SENSITIVITY/CAMERA.targetDistance;
|
|
||||||
|
|
||||||
// if (camera->target.y < 0) camera->target.y = -0.001;
|
|
||||||
}
|
|
||||||
else if ((camera->position.y > camera->target.y) && (camera->target.y < 0) && (mouseWheelMove > 0))
|
|
||||||
{
|
|
||||||
CAMERA.targetDistance -= (mouseWheelMove*CAMERA_MOUSE_SCROLL_SENSITIVITY);
|
|
||||||
if (CAMERA.targetDistance < CAMERA_FREE_DISTANCE_MIN_CLAMP) CAMERA.targetDistance = CAMERA_FREE_DISTANCE_MIN_CLAMP;
|
|
||||||
}
|
|
||||||
// Camera looking up
|
|
||||||
else if ((camera->position.y < camera->target.y) && (CAMERA.targetDistance == CAMERA_FREE_DISTANCE_MAX_CLAMP) && (mouseWheelMove < 0))
|
|
||||||
{
|
|
||||||
camera->target.x += mouseWheelMove*(camera->target.x - camera->position.x)*CAMERA_MOUSE_SCROLL_SENSITIVITY/CAMERA.targetDistance;
|
|
||||||
camera->target.y += mouseWheelMove*(camera->target.y - camera->position.y)*CAMERA_MOUSE_SCROLL_SENSITIVITY/CAMERA.targetDistance;
|
|
||||||
camera->target.z += mouseWheelMove*(camera->target.z - camera->position.z)*CAMERA_MOUSE_SCROLL_SENSITIVITY/CAMERA.targetDistance;
|
|
||||||
}
|
|
||||||
else if ((camera->position.y < camera->target.y) && (camera->target.y <= 0))
|
|
||||||
{
|
|
||||||
camera->target.x += mouseWheelMove*(camera->target.x - camera->position.x)*CAMERA_MOUSE_SCROLL_SENSITIVITY/CAMERA.targetDistance;
|
|
||||||
camera->target.y += mouseWheelMove*(camera->target.y - camera->position.y)*CAMERA_MOUSE_SCROLL_SENSITIVITY/CAMERA.targetDistance;
|
|
||||||
camera->target.z += mouseWheelMove*(camera->target.z - camera->position.z)*CAMERA_MOUSE_SCROLL_SENSITIVITY/CAMERA.targetDistance;
|
|
||||||
|
|
||||||
// if (camera->target.y > 0) camera->target.y = 0.001;
|
|
||||||
}
|
|
||||||
else if ((camera->position.y < camera->target.y) && (camera->target.y > 0) && (mouseWheelMove > 0))
|
|
||||||
{
|
|
||||||
CAMERA.targetDistance -= (mouseWheelMove*CAMERA_MOUSE_SCROLL_SENSITIVITY);
|
|
||||||
if (CAMERA.targetDistance < CAMERA_FREE_DISTANCE_MIN_CLAMP) CAMERA.targetDistance = CAMERA_FREE_DISTANCE_MIN_CLAMP;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Input keys checks
|
|
||||||
if (keyPan)
|
|
||||||
{
|
|
||||||
if (keyAlt) // Alternative key behaviour
|
|
||||||
{
|
|
||||||
if (szoomKey)
|
|
||||||
{
|
|
||||||
// Camera smooth zoom
|
|
||||||
CAMERA.targetDistance += (mousePositionDelta.y*CAMERA_FREE_SMOOTH_ZOOM_SENSITIVITY);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Camera rotation
|
|
||||||
CAMERA.angle.x += mousePositionDelta.x*-CAMERA_FREE_MOUSE_SENSITIVITY;
|
|
||||||
CAMERA.angle.y += mousePositionDelta.y*-CAMERA_FREE_MOUSE_SENSITIVITY;
|
|
||||||
|
|
||||||
// Angle clamp
|
|
||||||
if (CAMERA.angle.y > CAMERA_FREE_MIN_CLAMP*DEG2RAD) CAMERA.angle.y = CAMERA_FREE_MIN_CLAMP*DEG2RAD;
|
|
||||||
else if (CAMERA.angle.y < CAMERA_FREE_MAX_CLAMP*DEG2RAD) CAMERA.angle.y = CAMERA_FREE_MAX_CLAMP*DEG2RAD;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Camera panning
|
|
||||||
camera->target.x += ((mousePositionDelta.x*CAMERA_FREE_MOUSE_SENSITIVITY)*cosf(CAMERA.angle.x) + (mousePositionDelta.y*-CAMERA_FREE_MOUSE_SENSITIVITY)*sinf(CAMERA.angle.x)*sinf(CAMERA.angle.y))*(CAMERA.targetDistance/CAMERA_FREE_PANNING_DIVIDER);
|
|
||||||
camera->target.y += ((mousePositionDelta.y*CAMERA_FREE_MOUSE_SENSITIVITY)*cosf(CAMERA.angle.y))*(CAMERA.targetDistance/CAMERA_FREE_PANNING_DIVIDER);
|
|
||||||
camera->target.z += ((mousePositionDelta.x*-CAMERA_FREE_MOUSE_SENSITIVITY)*sinf(CAMERA.angle.x) + (mousePositionDelta.y*-CAMERA_FREE_MOUSE_SENSITIVITY)*cosf(CAMERA.angle.x)*sinf(CAMERA.angle.y))*(CAMERA.targetDistance/CAMERA_FREE_PANNING_DIVIDER);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update camera position with changes
|
|
||||||
camera->position.x = -sinf(CAMERA.angle.x)*CAMERA.targetDistance*cosf(CAMERA.angle.y) + camera->target.x;
|
|
||||||
camera->position.y = -sinf(CAMERA.angle.y)*CAMERA.targetDistance + camera->target.y;
|
|
||||||
camera->position.z = -cosf(CAMERA.angle.x)*CAMERA.targetDistance*cosf(CAMERA.angle.y) + camera->target.z;
|
|
||||||
|
|
||||||
} break;
|
|
||||||
case CAMERA_ORBITAL: // Camera just orbits around target, only zoom allowed
|
|
||||||
{
|
|
||||||
CAMERA.angle.x += CAMERA_ORBITAL_SPEED; // Camera orbit angle
|
|
||||||
CAMERA.targetDistance -= (mouseWheelMove*CAMERA_MOUSE_SCROLL_SENSITIVITY); // Camera zoom
|
|
||||||
|
|
||||||
// Camera distance clamp
|
|
||||||
if (CAMERA.targetDistance < CAMERA_THIRD_PERSON_DISTANCE_CLAMP) CAMERA.targetDistance = CAMERA_THIRD_PERSON_DISTANCE_CLAMP;
|
|
||||||
|
|
||||||
// Update camera position with changes
|
|
||||||
camera->position.x = sinf(CAMERA.angle.x)*CAMERA.targetDistance*cosf(CAMERA.angle.y) + camera->target.x;
|
|
||||||
camera->position.y = ((CAMERA.angle.y <= 0.0f)? 1 : -1)*sinf(CAMERA.angle.y)*CAMERA.targetDistance*sinf(CAMERA.angle.y) + camera->target.y;
|
|
||||||
camera->position.z = cosf(CAMERA.angle.x)*CAMERA.targetDistance*cosf(CAMERA.angle.y) + camera->target.z;
|
|
||||||
|
|
||||||
} break;
|
|
||||||
case CAMERA_FIRST_PERSON: // Camera moves as in a first-person game, controls are configurable
|
|
||||||
{
|
|
||||||
camera->position.x += (sinf(CAMERA.angle.x)*direction[MOVE_BACK] -
|
|
||||||
sinf(CAMERA.angle.x)*direction[MOVE_FRONT] -
|
|
||||||
cosf(CAMERA.angle.x)*direction[MOVE_LEFT] +
|
|
||||||
cosf(CAMERA.angle.x)*direction[MOVE_RIGHT])/PLAYER_MOVEMENT_SENSITIVITY;
|
|
||||||
|
|
||||||
camera->position.y += (sinf(CAMERA.angle.y)*direction[MOVE_FRONT] -
|
|
||||||
sinf(CAMERA.angle.y)*direction[MOVE_BACK] +
|
|
||||||
1.0f*direction[MOVE_UP] - 1.0f*direction[MOVE_DOWN])/PLAYER_MOVEMENT_SENSITIVITY;
|
|
||||||
|
|
||||||
camera->position.z += (cosf(CAMERA.angle.x)*direction[MOVE_BACK] -
|
|
||||||
cosf(CAMERA.angle.x)*direction[MOVE_FRONT] +
|
|
||||||
sinf(CAMERA.angle.x)*direction[MOVE_LEFT] -
|
|
||||||
sinf(CAMERA.angle.x)*direction[MOVE_RIGHT])/PLAYER_MOVEMENT_SENSITIVITY;
|
|
||||||
|
|
||||||
// Camera orientation calculation
|
|
||||||
CAMERA.angle.x += (mousePositionDelta.x*-CAMERA_MOUSE_MOVE_SENSITIVITY);
|
|
||||||
CAMERA.angle.y += (mousePositionDelta.y*-CAMERA_MOUSE_MOVE_SENSITIVITY);
|
|
||||||
|
|
||||||
// Angle clamp
|
|
||||||
if (CAMERA.angle.y > CAMERA_FIRST_PERSON_MIN_CLAMP*DEG2RAD) CAMERA.angle.y = CAMERA_FIRST_PERSON_MIN_CLAMP*DEG2RAD;
|
|
||||||
else if (CAMERA.angle.y < CAMERA_FIRST_PERSON_MAX_CLAMP*DEG2RAD) CAMERA.angle.y = CAMERA_FIRST_PERSON_MAX_CLAMP*DEG2RAD;
|
|
||||||
|
|
||||||
// Calculate translation matrix
|
|
||||||
Matrix matTranslation = { 1.0f, 0.0f, 0.0f, 0.0f,
|
|
||||||
0.0f, 1.0f, 0.0f, 0.0f,
|
|
||||||
0.0f, 0.0f, 1.0f, (CAMERA.targetDistance/CAMERA_FREE_PANNING_DIVIDER),
|
|
||||||
0.0f, 0.0f, 0.0f, 1.0f };
|
|
||||||
|
|
||||||
// Calculate rotation matrix
|
|
||||||
Matrix matRotation = { 1.0f, 0.0f, 0.0f, 0.0f,
|
|
||||||
0.0f, 1.0f, 0.0f, 0.0f,
|
|
||||||
0.0f, 0.0f, 1.0f, 0.0f,
|
|
||||||
0.0f, 0.0f, 0.0f, 1.0f };
|
|
||||||
|
|
||||||
float cosz = cosf(0.0f);
|
|
||||||
float sinz = sinf(0.0f);
|
|
||||||
float cosy = cosf(-(PI*2 - CAMERA.angle.x));
|
|
||||||
float siny = sinf(-(PI*2 - CAMERA.angle.x));
|
|
||||||
float cosx = cosf(-(PI*2 - CAMERA.angle.y));
|
|
||||||
float sinx = sinf(-(PI*2 - CAMERA.angle.y));
|
|
||||||
|
|
||||||
matRotation.m0 = cosz*cosy;
|
|
||||||
matRotation.m4 = (cosz*siny*sinx) - (sinz*cosx);
|
|
||||||
matRotation.m8 = (cosz*siny*cosx) + (sinz*sinx);
|
|
||||||
matRotation.m1 = sinz*cosy;
|
|
||||||
matRotation.m5 = (sinz*siny*sinx) + (cosz*cosx);
|
|
||||||
matRotation.m9 = (sinz*siny*cosx) - (cosz*sinx);
|
|
||||||
matRotation.m2 = -siny;
|
|
||||||
matRotation.m6 = cosy*sinx;
|
|
||||||
matRotation.m10= cosy*cosx;
|
|
||||||
|
|
||||||
// Multiply translation and rotation matrices
|
|
||||||
Matrix matTransform = { 0 };
|
|
||||||
matTransform.m0 = matTranslation.m0*matRotation.m0 + matTranslation.m1*matRotation.m4 + matTranslation.m2*matRotation.m8 + matTranslation.m3*matRotation.m12;
|
|
||||||
matTransform.m1 = matTranslation.m0*matRotation.m1 + matTranslation.m1*matRotation.m5 + matTranslation.m2*matRotation.m9 + matTranslation.m3*matRotation.m13;
|
|
||||||
matTransform.m2 = matTranslation.m0*matRotation.m2 + matTranslation.m1*matRotation.m6 + matTranslation.m2*matRotation.m10 + matTranslation.m3*matRotation.m14;
|
|
||||||
matTransform.m3 = matTranslation.m0*matRotation.m3 + matTranslation.m1*matRotation.m7 + matTranslation.m2*matRotation.m11 + matTranslation.m3*matRotation.m15;
|
|
||||||
matTransform.m4 = matTranslation.m4*matRotation.m0 + matTranslation.m5*matRotation.m4 + matTranslation.m6*matRotation.m8 + matTranslation.m7*matRotation.m12;
|
|
||||||
matTransform.m5 = matTranslation.m4*matRotation.m1 + matTranslation.m5*matRotation.m5 + matTranslation.m6*matRotation.m9 + matTranslation.m7*matRotation.m13;
|
|
||||||
matTransform.m6 = matTranslation.m4*matRotation.m2 + matTranslation.m5*matRotation.m6 + matTranslation.m6*matRotation.m10 + matTranslation.m7*matRotation.m14;
|
|
||||||
matTransform.m7 = matTranslation.m4*matRotation.m3 + matTranslation.m5*matRotation.m7 + matTranslation.m6*matRotation.m11 + matTranslation.m7*matRotation.m15;
|
|
||||||
matTransform.m8 = matTranslation.m8*matRotation.m0 + matTranslation.m9*matRotation.m4 + matTranslation.m10*matRotation.m8 + matTranslation.m11*matRotation.m12;
|
|
||||||
matTransform.m9 = matTranslation.m8*matRotation.m1 + matTranslation.m9*matRotation.m5 + matTranslation.m10*matRotation.m9 + matTranslation.m11*matRotation.m13;
|
|
||||||
matTransform.m10 = matTranslation.m8*matRotation.m2 + matTranslation.m9*matRotation.m6 + matTranslation.m10*matRotation.m10 + matTranslation.m11*matRotation.m14;
|
|
||||||
matTransform.m11 = matTranslation.m8*matRotation.m3 + matTranslation.m9*matRotation.m7 + matTranslation.m10*matRotation.m11 + matTranslation.m11*matRotation.m15;
|
|
||||||
matTransform.m12 = matTranslation.m12*matRotation.m0 + matTranslation.m13*matRotation.m4 + matTranslation.m14*matRotation.m8 + matTranslation.m15*matRotation.m12;
|
|
||||||
matTransform.m13 = matTranslation.m12*matRotation.m1 + matTranslation.m13*matRotation.m5 + matTranslation.m14*matRotation.m9 + matTranslation.m15*matRotation.m13;
|
|
||||||
matTransform.m14 = matTranslation.m12*matRotation.m2 + matTranslation.m13*matRotation.m6 + matTranslation.m14*matRotation.m10 + matTranslation.m15*matRotation.m14;
|
|
||||||
matTransform.m15 = matTranslation.m12*matRotation.m3 + matTranslation.m13*matRotation.m7 + matTranslation.m14*matRotation.m11 + matTranslation.m15*matRotation.m15;
|
|
||||||
|
|
||||||
camera->target.x = camera->position.x - matTransform.m12;
|
|
||||||
camera->target.y = camera->position.y - matTransform.m13;
|
|
||||||
camera->target.z = camera->position.z - matTransform.m14;
|
|
||||||
|
|
||||||
// If movement detected (some key pressed), increase swinging
|
|
||||||
for (int i = 0; i < 6; i++) if (direction[i]) { swingCounter++; break; }
|
|
||||||
|
|
||||||
// Camera position update
|
|
||||||
// NOTE: On CAMERA_FIRST_PERSON player Y-movement is limited to player 'eyes position'
|
|
||||||
camera->position.y = CAMERA.playerEyesPosition - sinf(swingCounter/CAMERA_FIRST_PERSON_STEP_TRIGONOMETRIC_DIVIDER)/CAMERA_FIRST_PERSON_STEP_DIVIDER;
|
|
||||||
|
|
||||||
camera->up.x = sinf(swingCounter/(CAMERA_FIRST_PERSON_STEP_TRIGONOMETRIC_DIVIDER*2))/CAMERA_FIRST_PERSON_WAVING_DIVIDER;
|
|
||||||
camera->up.z = -sinf(swingCounter/(CAMERA_FIRST_PERSON_STEP_TRIGONOMETRIC_DIVIDER*2))/CAMERA_FIRST_PERSON_WAVING_DIVIDER;
|
|
||||||
|
|
||||||
} break;
|
|
||||||
case CAMERA_THIRD_PERSON: // Camera moves as in a third-person game, following target at a distance, controls are configurable
|
|
||||||
{
|
|
||||||
camera->position.x += (sinf(CAMERA.angle.x)*direction[MOVE_BACK] -
|
|
||||||
sinf(CAMERA.angle.x)*direction[MOVE_FRONT] -
|
|
||||||
cosf(CAMERA.angle.x)*direction[MOVE_LEFT] +
|
|
||||||
cosf(CAMERA.angle.x)*direction[MOVE_RIGHT])/PLAYER_MOVEMENT_SENSITIVITY;
|
|
||||||
|
|
||||||
camera->position.y += (sinf(CAMERA.angle.y)*direction[MOVE_FRONT] -
|
|
||||||
sinf(CAMERA.angle.y)*direction[MOVE_BACK] +
|
|
||||||
1.0f*direction[MOVE_UP] - 1.0f*direction[MOVE_DOWN])/PLAYER_MOVEMENT_SENSITIVITY;
|
|
||||||
|
|
||||||
camera->position.z += (cosf(CAMERA.angle.x)*direction[MOVE_BACK] -
|
|
||||||
cosf(CAMERA.angle.x)*direction[MOVE_FRONT] +
|
|
||||||
sinf(CAMERA.angle.x)*direction[MOVE_LEFT] -
|
|
||||||
sinf(CAMERA.angle.x)*direction[MOVE_RIGHT])/PLAYER_MOVEMENT_SENSITIVITY;
|
|
||||||
|
|
||||||
// Camera orientation calculation
|
|
||||||
CAMERA.angle.x += (mousePositionDelta.x*-CAMERA_MOUSE_MOVE_SENSITIVITY);
|
|
||||||
CAMERA.angle.y += (mousePositionDelta.y*-CAMERA_MOUSE_MOVE_SENSITIVITY);
|
|
||||||
|
|
||||||
// Angle clamp
|
|
||||||
if (CAMERA.angle.y > CAMERA_THIRD_PERSON_MIN_CLAMP*DEG2RAD) CAMERA.angle.y = CAMERA_THIRD_PERSON_MIN_CLAMP*DEG2RAD;
|
|
||||||
else if (CAMERA.angle.y < CAMERA_THIRD_PERSON_MAX_CLAMP*DEG2RAD) CAMERA.angle.y = CAMERA_THIRD_PERSON_MAX_CLAMP*DEG2RAD;
|
|
||||||
|
|
||||||
// Camera zoom
|
|
||||||
CAMERA.targetDistance -= (mouseWheelMove*CAMERA_MOUSE_SCROLL_SENSITIVITY);
|
|
||||||
|
|
||||||
// Camera distance clamp
|
|
||||||
if (CAMERA.targetDistance < CAMERA_THIRD_PERSON_DISTANCE_CLAMP) CAMERA.targetDistance = CAMERA_THIRD_PERSON_DISTANCE_CLAMP;
|
|
||||||
|
|
||||||
camera->position.x = sinf(CAMERA.angle.x)*CAMERA.targetDistance*cosf(CAMERA.angle.y) + camera->target.x;
|
|
||||||
|
|
||||||
if (CAMERA.angle.y <= 0.0f) camera->position.y = sinf(CAMERA.angle.y)*CAMERA.targetDistance*sinf(CAMERA.angle.y) + camera->target.y;
|
|
||||||
else camera->position.y = -sinf(CAMERA.angle.y)*CAMERA.targetDistance*sinf(CAMERA.angle.y) + camera->target.y;
|
|
||||||
|
|
||||||
camera->position.z = cosf(CAMERA.angle.x)*CAMERA.targetDistance*cosf(CAMERA.angle.y) + camera->target.z;
|
|
||||||
|
|
||||||
} break;
|
|
||||||
case CAMERA_CUSTOM: break;
|
|
||||||
default: break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set camera pan key to combine with mouse movement (free camera)
|
|
||||||
void SetCameraPanControl(int keyPan) { CAMERA.panControl = keyPan; }
|
|
||||||
|
|
||||||
// Set camera alt key to combine with mouse movement (free camera)
|
|
||||||
void SetCameraAltControl(int keyAlt) { CAMERA.altControl = keyAlt; }
|
|
||||||
|
|
||||||
// Set camera smooth zoom key to combine with mouse (free camera)
|
|
||||||
void SetCameraSmoothZoomControl(int szoomKey) { CAMERA.smoothZoomControl = szoomKey; }
|
|
||||||
|
|
||||||
// Set camera move controls (1st person and 3rd person cameras)
|
|
||||||
void SetCameraMoveControls(int keyFront, int keyBack, int keyRight, int keyLeft, int keyUp, int keyDown)
|
|
||||||
{
|
|
||||||
CAMERA.moveControl[MOVE_FRONT] = keyFront;
|
|
||||||
CAMERA.moveControl[MOVE_BACK] = keyBack;
|
|
||||||
CAMERA.moveControl[MOVE_RIGHT] = keyRight;
|
|
||||||
CAMERA.moveControl[MOVE_LEFT] = keyLeft;
|
|
||||||
CAMERA.moveControl[MOVE_UP] = keyUp;
|
|
||||||
CAMERA.moveControl[MOVE_DOWN] = keyDown;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // CAMERA_IMPLEMENTATION
|
|
||||||
20
src/rcore.c
20
src/rcore.c
|
|
@ -1720,7 +1720,7 @@ void *GetWindowHandle(void)
|
||||||
// NOTE: Returned handle is: unsigned long Window (X.h)
|
// NOTE: Returned handle is: unsigned long Window (X.h)
|
||||||
// typedef unsigned long XID;
|
// typedef unsigned long XID;
|
||||||
// typedef XID Window;
|
// typedef XID Window;
|
||||||
//unsigned long id = (unsigned long)glfwGetX11Window(window);
|
//unsigned long id = (unsigned long)glfwGetX11Window(CORE.Window.handle);
|
||||||
//return NULL; // TODO: Find a way to return value... cast to void *?
|
//return NULL; // TODO: Find a way to return value... cast to void *?
|
||||||
return (void *)CORE.Window.handle;
|
return (void *)CORE.Window.handle;
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -1997,7 +1997,9 @@ void SetClipboardText(const char *text)
|
||||||
glfwSetClipboardString(CORE.Window.handle, text);
|
glfwSetClipboardString(CORE.Window.handle, text);
|
||||||
#endif
|
#endif
|
||||||
#if defined(PLATFORM_WEB)
|
#if defined(PLATFORM_WEB)
|
||||||
emscripten_run_script(TextFormat("navigator.clipboard.writeText('%s')", text));
|
// Security check to (partially) avoid malicious code
|
||||||
|
if (strchr(text, '\'') != NULL) TRACELOG(LOG_WARNING, "SYSTEM: Provided Clipboard could be potentially malicious, avoid [\'] character");
|
||||||
|
else emscripten_run_script(TextFormat("navigator.clipboard.writeText('%s')", text));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2009,6 +2011,7 @@ const char *GetClipboardText(void)
|
||||||
return glfwGetClipboardString(CORE.Window.handle);
|
return glfwGetClipboardString(CORE.Window.handle);
|
||||||
#endif
|
#endif
|
||||||
#if defined(PLATFORM_WEB)
|
#if defined(PLATFORM_WEB)
|
||||||
|
/*
|
||||||
// Accessing clipboard data from browser is tricky due to security reasons
|
// Accessing clipboard data from browser is tricky due to security reasons
|
||||||
// The method to use is navigator.clipboard.readText() but this is an asynchronous method
|
// The method to use is navigator.clipboard.readText() but this is an asynchronous method
|
||||||
// that will return at some moment after the function is called with the required data
|
// that will return at some moment after the function is called with the required data
|
||||||
|
|
@ -2022,7 +2025,7 @@ const char *GetClipboardText(void)
|
||||||
|
|
||||||
// Another approach could be just copy the data in a HTML text field and try to retrieve it
|
// Another approach could be just copy the data in a HTML text field and try to retrieve it
|
||||||
// later on if available... and clean it for future accesses
|
// later on if available... and clean it for future accesses
|
||||||
|
*/
|
||||||
return NULL;
|
return NULL;
|
||||||
#endif
|
#endif
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
@ -2946,6 +2949,9 @@ void SetConfigFlags(unsigned int flags)
|
||||||
void TakeScreenshot(const char *fileName)
|
void TakeScreenshot(const char *fileName)
|
||||||
{
|
{
|
||||||
#if defined(SUPPORT_MODULE_RTEXTURES)
|
#if defined(SUPPORT_MODULE_RTEXTURES)
|
||||||
|
// Security check to (partially) avoid malicious code on PLATFORM_WEB
|
||||||
|
if (strchr(fileName, '\'') != NULL) { TRACELOG(LOG_WARNING, "SYSTEM: Provided fileName could be potentially malicious, avoid [\'] character"); return; }
|
||||||
|
|
||||||
Vector2 scale = GetWindowScaleDPI();
|
Vector2 scale = GetWindowScaleDPI();
|
||||||
unsigned char *imgData = rlReadScreenPixels((int)((float)CORE.Window.render.width*scale.x), (int)((float)CORE.Window.render.height*scale.y));
|
unsigned char *imgData = rlReadScreenPixels((int)((float)CORE.Window.render.width*scale.x), (int)((float)CORE.Window.render.height*scale.y));
|
||||||
Image image = { imgData, (int)((float)CORE.Window.render.width*scale.x), (int)((float)CORE.Window.render.height*scale.y), 1, PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 };
|
Image image = { imgData, (int)((float)CORE.Window.render.width*scale.x), (int)((float)CORE.Window.render.height*scale.y), 1, PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 };
|
||||||
|
|
@ -3572,12 +3578,8 @@ unsigned char *DecodeDataBase64(const unsigned char *data, int *outputSize)
|
||||||
// Ref: https://github.com/raysan5/raylib/issues/686
|
// Ref: https://github.com/raysan5/raylib/issues/686
|
||||||
void OpenURL(const char *url)
|
void OpenURL(const char *url)
|
||||||
{
|
{
|
||||||
// Small security check trying to avoid (partially) malicious code...
|
// Security check to (aprtially) avoid malicious code on PLATFORM_WEB
|
||||||
// sorry for the inconvenience when you hit this point...
|
if (strchr(url, '\'') != NULL) TRACELOG(LOG_WARNING, "SYSTEM: Provided URL could be potentially malicious, avoid [\'] character");
|
||||||
if (strchr(url, '\'') != NULL)
|
|
||||||
{
|
|
||||||
TRACELOG(LOG_WARNING, "SYSTEM: Provided URL is not valid");
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#if defined(PLATFORM_DESKTOP)
|
#if defined(PLATFORM_DESKTOP)
|
||||||
|
|
|
||||||
|
|
@ -108,6 +108,7 @@
|
||||||
#include "external/glfw/src/posix_module.c"
|
#include "external/glfw/src/posix_module.c"
|
||||||
#include "external/glfw/src/posix_thread.c"
|
#include "external/glfw/src/posix_thread.c"
|
||||||
#include "external/glfw/src/posix_time.c"
|
#include "external/glfw/src/posix_time.c"
|
||||||
|
#include "external/glfw/src/posix_poll.c"
|
||||||
#include "external/glfw/src/null_joystick.c"
|
#include "external/glfw/src/null_joystick.c"
|
||||||
#include "external/glfw/src/xkb_unicode.c"
|
#include "external/glfw/src/xkb_unicode.c"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
/**********************************************************************************************
|
/**********************************************************************************************
|
||||||
*
|
*
|
||||||
* rlgl v4.2 - A multi-OpenGL abstraction layer with an immediate-mode style API
|
* rlgl v4.5 - A multi-OpenGL abstraction layer with an immediate-mode style API
|
||||||
*
|
*
|
||||||
* An abstraction layer for multiple OpenGL versions (1.1, 2.1, 3.3 Core, 4.3 Core, ES 2.0)
|
* An abstraction layer for multiple OpenGL versions (1.1, 2.1, 3.3 Core, 4.3 Core, ES 2.0)
|
||||||
* that provides a pseudo-OpenGL 1.1 immediate-mode style API (rlVertex, rlTranslate, rlRotate...)
|
* that provides a pseudo-OpenGL 1.1 immediate-mode style API (rlVertex, rlTranslate, rlRotate...)
|
||||||
|
|
@ -106,7 +106,7 @@
|
||||||
#ifndef RLGL_H
|
#ifndef RLGL_H
|
||||||
#define RLGL_H
|
#define RLGL_H
|
||||||
|
|
||||||
#define RLGL_VERSION "4.2"
|
#define RLGL_VERSION "4.5"
|
||||||
|
|
||||||
// Function specifiers in case library is build/used as a shared library (Windows)
|
// Function specifiers in case library is build/used as a shared library (Windows)
|
||||||
// NOTE: Microsoft specifiers to tell compiler that symbols are imported/exported from a .dll
|
// NOTE: Microsoft specifiers to tell compiler that symbols are imported/exported from a .dll
|
||||||
|
|
|
||||||
|
|
@ -1112,7 +1112,13 @@ Model LoadModelFromMesh(Mesh mesh)
|
||||||
// Check if a model is ready
|
// Check if a model is ready
|
||||||
bool IsModelReady(Model model)
|
bool IsModelReady(Model model)
|
||||||
{
|
{
|
||||||
return model.meshes != NULL && model.materials != NULL && model.meshMaterial != NULL && model.meshCount > 0 && model.materialCount > 0;
|
return ((model.meshes != NULL) && // Validate model contains some mesh
|
||||||
|
(model.materials != NULL) && // Validate model contains some material (at least default one)
|
||||||
|
(model.meshMaterial != NULL) && // Validate mesh-material linkage
|
||||||
|
(model.meshCount > 0) && // Validate mesh count
|
||||||
|
(model.materialCount > 0)); // Validate material count
|
||||||
|
|
||||||
|
// NOTE: This is a very general model validation, many elements could be validated from a model...
|
||||||
}
|
}
|
||||||
|
|
||||||
// Unload model (meshes/materials) from memory (RAM and/or VRAM)
|
// Unload model (meshes/materials) from memory (RAM and/or VRAM)
|
||||||
|
|
@ -1141,27 +1147,6 @@ void UnloadModel(Model model)
|
||||||
TRACELOG(LOG_INFO, "MODEL: Unloaded model (and meshes) from RAM and VRAM");
|
TRACELOG(LOG_INFO, "MODEL: Unloaded model (and meshes) from RAM and VRAM");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Unload model (but not meshes) from memory (RAM and/or VRAM)
|
|
||||||
void UnloadModelKeepMeshes(Model model)
|
|
||||||
{
|
|
||||||
// Unload materials maps
|
|
||||||
// NOTE: As the user could be sharing shaders and textures between models,
|
|
||||||
// we don't unload the material but just free its maps,
|
|
||||||
// the user is responsible for freeing models shaders and textures
|
|
||||||
for (int i = 0; i < model.materialCount; i++) RL_FREE(model.materials[i].maps);
|
|
||||||
|
|
||||||
// Unload arrays
|
|
||||||
RL_FREE(model.meshes);
|
|
||||||
RL_FREE(model.materials);
|
|
||||||
RL_FREE(model.meshMaterial);
|
|
||||||
|
|
||||||
// Unload animation data
|
|
||||||
RL_FREE(model.bones);
|
|
||||||
RL_FREE(model.bindPose);
|
|
||||||
|
|
||||||
TRACELOG(LOG_INFO, "MODEL: Unloaded model (but not meshes) from RAM and VRAM");
|
|
||||||
}
|
|
||||||
|
|
||||||
// Compute model bounding box limits (considers all meshes)
|
// Compute model bounding box limits (considers all meshes)
|
||||||
BoundingBox GetModelBoundingBox(Model model)
|
BoundingBox GetModelBoundingBox(Model model)
|
||||||
{
|
{
|
||||||
|
|
@ -1959,7 +1944,8 @@ Material LoadMaterialDefault(void)
|
||||||
// Check if a material is ready
|
// Check if a material is ready
|
||||||
bool IsMaterialReady(Material material)
|
bool IsMaterialReady(Material material)
|
||||||
{
|
{
|
||||||
return material.maps != NULL;
|
return ((material.maps != NULL) && // Validate material contain some map
|
||||||
|
(material.shader.id > 0)); // Validate material shader is valid
|
||||||
}
|
}
|
||||||
|
|
||||||
// Unload material from memory
|
// Unload material from memory
|
||||||
|
|
|
||||||
|
|
@ -538,7 +538,14 @@ Font LoadFontFromMemory(const char *fileType, const unsigned char *fileData, int
|
||||||
// Check if a font is ready
|
// Check if a font is ready
|
||||||
bool IsFontReady(Font font)
|
bool IsFontReady(Font font)
|
||||||
{
|
{
|
||||||
return font.glyphs != NULL;
|
return ((font.texture.id > 0) && // Validate OpenGL id fot font texture atlas
|
||||||
|
(font.baseSize > 0) && // Validate font size
|
||||||
|
(font.glyphCount > 0) && // Validate font contains some glyph
|
||||||
|
(font.recs != NULL) && // Validate font recs defining glyphs on texture atlas
|
||||||
|
(font.glyphs != NULL)); // Validate glyph data is loaded
|
||||||
|
|
||||||
|
// NOTE: Further validations could be done to verify if recs count and glyphs count
|
||||||
|
// match glyphCount and to verify that data contained is valid (glyphs values, metrics...)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load font data for further use
|
// Load font data for further use
|
||||||
|
|
|
||||||
|
|
@ -3362,7 +3362,9 @@ void UnloadTexture(Texture2D texture)
|
||||||
// Check if a render texture is ready
|
// Check if a render texture is ready
|
||||||
bool IsRenderTextureReady(RenderTexture2D target)
|
bool IsRenderTextureReady(RenderTexture2D target)
|
||||||
{
|
{
|
||||||
return target.id > 0 && IsTextureReady(target.depth) && IsTextureReady(target.texture);
|
return ((target.id > 0) && // Validate OpenGL id
|
||||||
|
IsTextureReady(target.depth) && // Validate FBO depth texture/renderbuffer
|
||||||
|
IsTextureReady(target.texture)); // Validate FBO texture
|
||||||
}
|
}
|
||||||
|
|
||||||
// Unload render texture from GPU memory (VRAM)
|
// Unload render texture from GPU memory (VRAM)
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@
|
||||||
// Defines and Macros
|
// Defines and Macros
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
#ifndef MAX_TRACELOG_MSG_LENGTH
|
#ifndef MAX_TRACELOG_MSG_LENGTH
|
||||||
#define MAX_TRACELOG_MSG_LENGTH 128 // Max length of one trace-log message
|
#define MAX_TRACELOG_MSG_LENGTH 256 // Max length of one trace-log message
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|
@ -145,7 +145,8 @@ void TraceLog(int logType, const char *text, ...)
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
strcat(buffer, text);
|
unsigned int textSize = strlen(text);
|
||||||
|
memcpy(buffer + strlen(buffer), text, (textSize < (MAX_TRACELOG_MSG_LENGTH - 12))? textSize : (MAX_TRACELOG_MSG_LENGTH - 12));
|
||||||
strcat(buffer, "\n");
|
strcat(buffer, "\n");
|
||||||
vprintf(buffer, args);
|
vprintf(buffer, args);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user