Merge branch 'raysan5:master' into master
2
.github/workflows/webassembly.yml
vendored
|
|
@ -29,7 +29,7 @@ jobs:
|
|||
- name: Setup emsdk
|
||||
uses: mymindstorm/setup-emsdk@v14
|
||||
with:
|
||||
version: 3.1.64
|
||||
version: 3.1.71
|
||||
actions-cache-folder: 'emsdk-cache'
|
||||
|
||||
- name: Setup Release Version
|
||||
|
|
|
|||
16
BINDINGS.md
|
|
@ -7,7 +7,7 @@ Some people ported raylib to other languages in the form of bindings or wrappers
|
|||
| Name | raylib Version | Language | License |
|
||||
| :--------------------------------------------------------------------------------------- | :--------------: | :------------------------------------------------------------------: | :------------------: |
|
||||
| [raylib](https://github.com/raysan5/raylib) | **5.0** | [C/C++](https://en.wikipedia.org/wiki/C_(programming_language)) | Zlib |
|
||||
| [raylib-beef](https://github.com/Starpelly/raylib-beef) | **5.0** | [Beef](https://www.beeflang.org) | MIT |
|
||||
| [raylib-beef](https://github.com/Starpelly/raylib-beef) | **5.5** | [Beef](https://www.beeflang.org) | MIT |
|
||||
| [raylib-boo](https://github.com/Rabios/raylib-boo) | 3.7 | [Boo](http://boo-language.github.io) | MIT |
|
||||
| [raybit](https://github.com/Alex-Velez/raybit) | **5.0** | [Brainfuck](https://en.wikipedia.org/wiki/Brainfuck) | MIT |
|
||||
| [Raylib-cs](https://github.com/ChrisDill/Raylib-cs) | **5.0** | [C#](https://en.wikipedia.org/wiki/C_Sharp_(programming_language)) | Zlib |
|
||||
|
|
@ -23,11 +23,11 @@ Some people ported raylib to other languages in the form of bindings or wrappers
|
|||
| [dart-raylib](https://gitlab.com/wolfenrain/dart-raylib) | 4.0 | [Dart](https://dart.dev) | MIT |
|
||||
| [bindbc-raylib3](https://github.com/o3o/bindbc-raylib3) | **5.0** | [D](https://dlang.org) | BSL-1.0 |
|
||||
| [dray](https://github.com/redthing1/dray) | **5.0** | [D](https://dlang.org) | Apache-2.0 |
|
||||
| [raylib-d](https://github.com/schveiguy/raylib-d) | **5.0** | [D](https://dlang.org) | Zlib |
|
||||
| [raylib-d](https://github.com/schveiguy/raylib-d) | **5.5** | [D](https://dlang.org) | Zlib |
|
||||
| [rayex](https://github.com/shiryel/rayex) | 3.7 | [elixir](https://elixir-lang.org) | Apache-2.0 |
|
||||
| [raylib-factor](https://github.com/factor/factor/blob/master/extra/raylib/raylib.factor) | 4.5 | [Factor](https://factorcode.org) | BSD |
|
||||
| [raylib-freebasic](https://github.com/WIITD/raylib-freebasic) | **5.0** | [FreeBASIC](https://www.freebasic.net) | MIT |
|
||||
| [fortran-raylib](https://github.com/interkosmos/fortran-raylib) | 4.5 | [Fortran](https://fortran-lang.org) | ISC |
|
||||
| [fortran-raylib](https://github.com/interkosmos/fortran-raylib) | **5.5** | [Fortran](https://fortran-lang.org) | ISC |
|
||||
| [raylib-go](https://github.com/gen2brain/raylib-go) | **5.0** | [Go](https://golang.org) | Zlib |
|
||||
| [raylib-guile](https://github.com/petelliott/raylib-guile) | **auto** | [Guile](https://www.gnu.org/software/guile) | Zlib |
|
||||
| [gforth-raylib](https://github.com/ArnautDaniel/gforth-raylib) | 3.5 | [Gforth](https://gforth.org) | **???** |
|
||||
|
|
@ -51,12 +51,12 @@ Some people ported raylib to other languages in the form of bindings or wrappers
|
|||
| [raylib_odin_bindings](https://github.com/Deathbat2190/raylib_odin_bindings) | 4.0-dev | [Odin](https://odin-lang.org) | MIT |
|
||||
| [raylib-ocaml](https://github.com/tjammer/raylib-ocaml) | **5.0** | [OCaml](https://ocaml.org) | MIT |
|
||||
| [TurboRaylib](https://github.com/turborium/TurboRaylib) | 4.5 | [Object Pascal](https://en.wikipedia.org/wiki/Object_Pascal) | MIT |
|
||||
| [Ray4Laz](https://github.com/GuvaCode/Ray4Laz) | **5.0** | [Free Pascal](https://en.wikipedia.org/wiki/Free_Pascal) | Zlib |
|
||||
| [Ray4Laz](https://github.com/GuvaCode/Ray4Laz) | **5.5** | [Free Pascal](https://en.wikipedia.org/wiki/Free_Pascal) | Zlib |
|
||||
| [Raylib.4.0.Pascal](https://github.com/sysrpl/Raylib.4.0.Pascal) | 4.0 | [Free Pascal](https://en.wikipedia.org/wiki/Free_Pascal) | Zlib |
|
||||
| [pyraylib](https://github.com/Ho011/pyraylib) | 3.7 | [Python](https://www.python.org) | Zlib |
|
||||
| [raylib-python-cffi](https://github.com/electronstudio/raylib-python-cffi) | 4.2 | [Python](https://www.python.org) | EPL-2.0 |
|
||||
| [raylib-python-cffi](https://github.com/electronstudio/raylib-python-cffi) | **5.5** | [Python](https://www.python.org) | EPL-2.0 |
|
||||
| [raylibpyctbg](https://github.com/overdev/raylibpyctbg) | 4.5 | [Python](https://www.python.org) | MIT |
|
||||
| [raylib-py](https://github.com/overdev/raylib-py) | **5.0b1** | [Python](https://www.python.org) | MIT |
|
||||
| [raylib-py](https://github.com/overdev/raylib-py) | 5.5 | [Python](https://www.python.org) | MIT |
|
||||
| [raylib-python-ctypes](https://github.com/sDos280/raylib-python-ctypes) | 4.6-dev | [Python](https://www.python.org) | MIT |
|
||||
| [raylib-pkpy-bindings](https://github.com/blueloveTH/pkpy-bindings) | 4.6-dev | [pocketpy](https://pocketpy.dev) | MIT |
|
||||
| [raylib-php](https://github.com/joseph-montanez/raylib-php) | 4.5 | [PHP](https://en.wikipedia.org/wiki/PHP) | Zlib |
|
||||
|
|
@ -87,10 +87,10 @@ Some people ported raylib to other languages in the form of bindings or wrappers
|
|||
|
||||
### Utility Wrapers
|
||||
|
||||
These are utility wrappers for specific languages, they are not required to use raylib in the language but may adapt the raylib API to be more inline with the language's pardigm.
|
||||
These are utility wrappers for specific languages, they are not required to use raylib in the language but may adapt the raylib API to be more inline with the language's paradigm.
|
||||
| Name | raylib Version | Language | License |
|
||||
| ---------------------------------------------------- | :------------: | :------------------------------------------: | :-----: |
|
||||
| [raylib-cpp](https://github.com/robloach/raylib-cpp) | **5.0** | [C++](https://en.wikipedia.org/wiki/C%2B%2B) | Zlib |
|
||||
| [raylib-cpp](https://github.com/robloach/raylib-cpp) | **5.5** | [C++](https://en.wikipedia.org/wiki/C%2B%2B) | Zlib |
|
||||
| [claylib](https://github.com/defun-games/claylib) | 4.5 | [Common Lisp](https://common-lisp.net) | Zlib |
|
||||
| [rayed-bqn](https://github.com/Brian-ED/rayed-bqn) | **5.0** | [BQN](https://mlochbaum.github.io/BQN) | MIT |
|
||||
|
||||
|
|
|
|||
472
CHANGELOG
|
|
@ -1,18 +1,478 @@
|
|||
changelog
|
||||
---------
|
||||
|
||||
Current Release: raylib 5.0 (18 November 2023)
|
||||
Current Release: raylib 5.5 (18 November 2024)
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
Release: raylib 5.5 - 11th Anniversary Edition? (18 November 2024?)
|
||||
Release: raylib 5.5 (18 November 2024)
|
||||
-------------------------------------------------------------------------
|
||||
KEY CHANGES:
|
||||
-
|
||||
-
|
||||
-
|
||||
- New tool: raylib project creator
|
||||
- New rcore backends: RGFW and SDL3
|
||||
- New platforms supported: Dreamcast, N64, PSP, PSVita, PS4
|
||||
- Added GPU Skinning support (all platforms and GL versions)
|
||||
- Added raymath C++ operators
|
||||
|
||||
Detailed changes:
|
||||
...
|
||||
|
||||
WIP: Last update with commit from 02-Nov-2024
|
||||
|
||||
[rcore] ADDED: Working directory info at initialization by @Ray
|
||||
[rcore] ADDED: `GetClipboardImage()`, supported by multiple backends (#4459) by @evertonse
|
||||
[rcore] ADDED: `MakeDirectory()`, supporting recursive directory creation by @Ray
|
||||
[rcore] ADDED: `ComputeSHA1()` (#4390) by @Anthony Carbajal
|
||||
[rcore] ADDED: `ComputeCRC32()` and `ComputeMD5()` by @Ray
|
||||
[rcore] ADDED: `GetKeyName()` (#4161) by @MrScautHD
|
||||
[rcore] ADDED: `IsFileNameValid()` by @Ray
|
||||
[rcore] ADDED: `GetViewRay()`, viewport independent raycast (#3709) by @Luís Almeida
|
||||
[rcore] RENAMED: `GetMouseRay()` to `GetScreenToWorldRay()` (#3830) by @Ray
|
||||
[rcore] RENAMED: `GetViewRay()` to `GetScreenToWorldRayEx()` (#3830) by @Ray
|
||||
[rcore] REVIEWED: `GetApplicationDirectory()` for FreeBSD (#4318) by @base
|
||||
[rcore] REVIEWED: `LoadDirectoryFilesEx()`/`ScanDirectoryFiles()`, support directory on filter (#4302) by @foxblock
|
||||
[rcore] REVIEWED: Update comments on fullscreen and boderless window to describe what they do (#4280) by @Jeffery Myers
|
||||
[rcore] REVIEWED: Correct processing of mouse wheel on Automation events #4263 by @Ray
|
||||
[rcore] REVIEWED: Fix gamepad axis movement and its automation event recording (#4184) by @maxmutant
|
||||
[rcore] REVIEWED: Do not set RL_TEXTURE_FILTER_LINEAR when high dpi flag is enabled (#4189) by @Dave Green
|
||||
[rcore] REVIEWED: `GetScreenWidth()`/`GetScreenHeight()` (#4074) by @Anthony Carbajal
|
||||
[rcore] REVIEWED: Initial window dimensions checks (#3950) by @Christian Haas
|
||||
[rcore] REVIEWED: Set default init values for random #3954 by @Ray
|
||||
[rcore] REVIEWED: Window positioning, avoid out-of-screen window-bar by @Ray
|
||||
[rcore] REVIEWED: Fix framerate recording for .gif (#3894) by @Rob Loach
|
||||
[rcore] REVIEWED: Screen space related functions consistency (#3830) by @aiafrasinei
|
||||
[rcore] REVIEWED: `GetFileNameWithoutExt()` (#3771) by @oblerion
|
||||
[rcore] REVIEWED: `GetWindowScaleDPI()`, simplified (#3701) by @Karl Zylinski
|
||||
[rcore] REVIEWED: `UnloadAutomationEventList()` (#3658) by @Antonis Geralis
|
||||
[rcore] REVIEWED: Flip VR screens (#3633) by @Matthew Oros
|
||||
[rcore] REVIEWED: Remove unused vScreenCenter (#3632) by @Matthew Oros
|
||||
[rcore] REVIEWED: `LoadRandomSequence()`, issue in sequence generation #3612 by @Ray
|
||||
[rcore] REVIEWED: `IsMouseButtonUp()` (#3609) by @Kenneth M
|
||||
[rcore] REVIEWED: Fix typos in src/platforms/rcore_*.c (#3581) by @RadsammyT
|
||||
[rcore] REVIEWED: `ExportDataAsCode()`, change sanitization check (#3837) by @Laurentino Luna
|
||||
[rcore] REVIEWED: `ExportDataAsCode()`, add little sanitization to indentifier names (#3832) by @4rk
|
||||
[rcore] REVIEWED: `GetScreenWidth()`/`GetScreenHeight()` align with all platforms (#4451) by @Arche Washi
|
||||
[rcore] REVIEWED: `SetGamepadVibration()`, added duration parameter (#4410) by @Asdqwe -WARNING-
|
||||
[rcore] REVIEWED: `GetGamepadAxisMovement()`, fix #4405 (#4420) by @Asdqwe
|
||||
[rcore] REVIEWED: `GetGestureHoldDuration()` comments by @Ray
|
||||
[rcore][rlgl] REVIEWED: Fix scale issues when ending a view mode (#3746) by @Jeffery Myers
|
||||
[rcore][GLFW] REVIEWED: Keep CORE.Window.position properly in sync with glfw window position (#4190) by @Dave Green
|
||||
[rcore][GLFW] REVIEWED: Set AUTO_ICONIFY flag to false per default (#4188) by @Dave Green
|
||||
[rcore][GLFW] REVIEWED: `InitPlatform()`, add workaround for NetBSD (#4139) by @NishiOwO
|
||||
[rcore][GLFW] REVIEWED: Fix window not initializing on primary monitor (#3923) by @Rafael Bordoni
|
||||
[rcore][GLFW] REVIEWED: Set relative mouse mode when the cursor is disabled (#3874) by @Jeffery Myers
|
||||
[rcore][GLFW] REVIEWED: Remove GLFW mouse passthrough hack and increase GLFW version in CMake (#3852) by @Alexandre Almeida
|
||||
[rcore][GLFW] REVIEWED: Updated GLFW to 3.4 (#3827) by @Alexandre Almeida
|
||||
[rcore][GLFW] REVIEWED: Feature test macros before include (#3737) by @John
|
||||
[rcore][GLFW] REVIEWED: Fix inconsistent dll linkage warning on windows (#4447) by @Jeffery Myers
|
||||
[rcore][Web] ADDED: `SetWindowOpacity()` implementation (#4403) by @Asdqwe
|
||||
[rcore][Web] ADDED: `MaximizeWindow()` and `RestoreWindow()` implementations (#4397) by @Asdqwe
|
||||
[rcore][Web] ADDED: `ToggleFullscreen()` implementation (#3634) by @ubkp
|
||||
[rcore][Web] ADDED: `GetWindowPosition()` implementation (#3637) by @ubkp
|
||||
[rcore][Web] ADDED: `ToggleBorderlessWindowed()` implementation (#3622) by @ubkp
|
||||
[rcore][Web] ADDED: `GetMonitorWidth()` and `GetMonitorHeight()` implementations (#3636) by @ubkp
|
||||
[rcore][Web] REVIEWED: Update `SetWindowState()` and `ClearWindowState()` to handle `FLAG_WINDOW_MAXIMIZED` (#4402) by @Asdqwe
|
||||
[rcore][Web] REVIEWED: `WindowSizeCallback()`, do not try to handle DPI, already managed by GLFW (#4143) by @SuperUserNameMan
|
||||
[rcore][Web] REVIEWED: Relative mouse mode issues (#3940) by @Cemal Gönültaş
|
||||
[rcore][Web] REVIEWED: `ShowCursor()`, `HideCursor()` and `SetMouseCursor()` (#3647) by @ubkp
|
||||
[rcore][Web] REVIEWED: Fix CORE.Input.Mouse.cursorHidden with callbacks (#3644) by @ubkp
|
||||
[rcore][Web] REVIEWED: Fix `IsMouseButtonUp()` (#3611) by @ubkp
|
||||
[rcore][Web] REVIEWED: HighDPI support #3372 by @Ray
|
||||
[rcore][Web] REVIEWED: `SetWindowSize()` (#4452) by @Asdqwe
|
||||
[rcore][Web] REVIEWED: `EmscriptenResizeCallback()`, simplified (#4415) by @Asdqwe
|
||||
[rcore][SDL] ADDED: `IsCursorOnScreen()` (#3862) by @Peter0x44
|
||||
[rcore][SDL] ADDED: Gamepad rumble/vibration support (#3819) by @GideonSerf
|
||||
[rcore][SDL] REVIEWED: Gamepad support (#3776) by @A
|
||||
[rcore][SDL] REVIEWED: `GetWorkingDirectory()`, return correct path (#4392) by @Asdqwe
|
||||
[rcore][SDL] REVIEWED: `GetClipboardText()`, fix memory leak (#4354) by @Asdqwe
|
||||
[rcore][SDL] REVIEWED: Change SDL_Joystick to SDL_GameController (#4129) by @Frank Kartheuser
|
||||
[rcore][SDL] REVIEWED: Update storage base path, use provided SDL base path by @Ray
|
||||
[rcore][SDL] REVIEWED: Call SDL_GL_SetSwapInterval() after GL context creation (#3997) by @JupiterRider
|
||||
[rcore][SDL] REVIEWED: `GetKeyPressed()` (#3869) by @Arthur
|
||||
[rcore][SDL] REVIEWED: Fix SDL multitouch tracking (#3810) by @mooff
|
||||
[rcore][SDL] REVIEWED: Fix `SUPPORT_WINMM_HIGHRES_TIMER` (#3679) by @ubkp
|
||||
[rcore][SDL] REVIEWED: SDL text input to Unicode codepoints #3650 by @Ray
|
||||
[rcore][SDL] REVIEWED: `IsMouseButtonUp()` and add touch events (#3610) by @ubkp
|
||||
[rcore][SDL] REVIEWED: Fix real touch gestures (#3614) by @ubkp
|
||||
[rcore][SDL] REVIEWED: `IsKeyPressedRepeat()` (#3605) by @ubkp
|
||||
[rcore][SDL] REVIEWED: `GetKeyPressed()` and `GetCharPressed()` for SDL (#3604) by @ubkp
|
||||
[rcore][SDL] REVIEWED: `SetMousePosition()` for SDL (#3580) by @ubkp
|
||||
[rcore][SDL] REVIEWED: `SetWindowIcon()` for SDL (#3578) by @ubkp
|
||||
[rcore][SDL][rlgl] REVIEWED: Fix for running gles2 with SDL on desktop (#3542) by @_Tradam
|
||||
[rcore][Android] REVIEWED: Issue with isGpuReady flag (#4340) by @Menno van der Graaf
|
||||
[rcore][Android] REVIEWED: Allow main() to return it its caller on configuration changes (#4288) by @Hesham Abourgheba
|
||||
[rcore][Android] REVIEWED: Replace deprecated Android function ALooper_pollAll with ALooper_pollOnce (#4275) by @Menno van der Graaf
|
||||
[rcore][Android] REVIEWED: `PollInputEvents()`, register previous gamepad events (#3910) by @Aria
|
||||
[rcore][Android] REVIEWED: Fix Android keycode translation and duplicate key constants (#3733) by @Alexandre Almeida
|
||||
[rcore][DRM] ADDED: uConsole keys mapping (#4297) by @carverdamien
|
||||
[rcore][DRM] ADDED: `GetMonitorWidth/Height()` (#3956) by @gabriel-marques
|
||||
[rcore][DRM] REVIEWED: `IsMouseButtonUp()` (#3611) by @ubkp
|
||||
[rcore][DRM] REVIEWED: Optimize gesture handling (#3616) by @ubkp
|
||||
[rcore][DRM] REVIEWED: `IsKeyPressedRepeat()` for PLATFORM_DRM direct input (#3583) by @ubkp
|
||||
[rcore][DRM] REVIEWED: Fix gamepad buttons not working in drm backend (#3888) by @MrMugame
|
||||
[rcore][DRM] REVIEWED: DRM backend to only use one api to allow for more devices (#3879) by @MrMugame
|
||||
[rcore][DRM] REVIEWED: Avoid separate thread when polling for gamepad events (#3641) by @Cinghy Creations
|
||||
[rcore][DRM] REVIEWED: Connector status reported as UNKNOWN but should be considered as CONNECTED (#4305) by @Michał Jaskólski
|
||||
[rcore][RGFW] ADDED: RGFW, new rcore backend platform (#3941) by @Colleague Riley
|
||||
[rcore][RGFW] REVIEWED: RGFW 1.0 (#4144) by @Colleague Riley
|
||||
[rcore][RGFW] REVIEWED: Fix errors when compiling with mingw (#4282) by @Colleague Riley
|
||||
[rcore][RGFW] REVIEWED: Replace long switch with a lookup table (#4108) by @Colleague Riley
|
||||
[rcore][RGFW] REVIEWED: Fix MSVC build errors (#4441) by @Colleague Riley
|
||||
[rlgl] ADDED: More uniform data type options #4137 by @Ray
|
||||
[rlgl] ADDED: Vertex normals for RLGL immediate drawing mode (#3866) by @bohonghuang -WARNING-
|
||||
[rlgl] ADDED: `rlCullDistance*()` variables and getters (#3912) by @KotzaBoss
|
||||
[rlgl] ADDED: `rlSetClipPlanes()` function (#3912) by @KotzaBoss
|
||||
[rlgl] ADDED: `isGpuReady` flag, allow font loading with no GPU acceleration by @Ray -WARNING-
|
||||
[rlgl] REVIEWED: Changed RLGL_VERSION from 4.5 to 5.0 (#3914) by @Mute
|
||||
[rlgl] REVIEWED: Shader load failing returns 0, instead of fallback by @Ray -WARNING-
|
||||
[rlgl] REVIEWED: Standalone mode default flags (#4334) by @Asdqwe
|
||||
[rlgl] REVIEWED: Fix hardcoded index values in vboID array (#4312) by @Jett
|
||||
[rlgl] REVIEWED: GLint64 did not exist before OpenGL 3.2 (#4284) by @Tchan0
|
||||
[rlgl] REVIEWED: Extra warnings in case OpenGL 4.3 is not enabled (#4202) by @Maxim Knyazkin
|
||||
[rlgl] REVIEWED: Using GLint64 for glGetBufferParameteri64v() (#4197) by @Randy Palamar
|
||||
[rlgl] REVIEWED: Replace `glGetInteger64v()` with `glGetBufferParameteri64v()` (#4154) by @Kai Kitagawa-Jones
|
||||
[rlgl] REVIEWED: `rlMultMatrixf()`, fix matrix multiplication order (#3935) by @bohonghuang
|
||||
[rlgl] REVIEWED: `rlSetVertexAttribute()`, define last parameter as offset #3800 by @Ray
|
||||
[rlgl] REVIEWED: `rlDisableVertexAttribute()`, remove redundat calls for SHADER_LOC_VERTEX_COLOR (#3871) by @Kacper Zybała
|
||||
[rlgl] REVIEWED: `rlLoadTextureCubemap()`, load mipmaps for cubemaps (#4429) by @Nikolas
|
||||
[rlgl] REVIEWED: `rlLoadFramebuffer()`, parameters not required by @Ray
|
||||
[rlgl] REVIEWED: `rlSetUniformSampler()` (#3759) by @veins1
|
||||
[rlgl] REVIEWED: Renamed near/far variables (#4039) by @jgabaut
|
||||
[rlgl] REVIEWED: Expose OpenGL symbols (#3588) by @Peter0x44
|
||||
[rlgl] REVIEWED: Fix OpenGL 1.1 build issues (#3876) by @Ray
|
||||
[rlgl] REVIEWED: Fixed compilation for OpenGL ES (#4243) by @Maxim Knyazkin
|
||||
[rlgl] REVIEWED: rlgl function description and comments by @Ray
|
||||
[rlgl] REVIEWED: Expose glad functions when building raylib as a shared lib (#3572) by @Peter0x44
|
||||
[rlgl] REVIEWED: Fix version info in rlgl.h (#3558) by @Steven Schveighoffer
|
||||
[rlgl] REVIEWED: Use the vertex color to the base shader in GLSL330 (#4431) by @Jeffery Myers
|
||||
[rcamera] REVIEWED: Make camera movement independant of framerate (#4247) by @hanaxars -WARNING-
|
||||
[rcamera] REVIEWED: Updated camera speeds with GetFrameTime() (#4362) by @Anthony Carbajal
|
||||
[rcamera] REVIEWED: `UpdateCamera()`, added CAMERA_CUSTOM check (#3938) by @Tomas Fabrizio Orsi
|
||||
[rcamera] REVIEWED: Support mouse/keyboard and gamepad coexistence for input (#3579) by @ubkp
|
||||
[rcamera] REVIEWED: Cleaned away unused macros(#3762) by @Brian E
|
||||
[rcamera] REVIEWED: Fix for free camera mode (#3603) by @lesleyrs
|
||||
[rcamera] REVIEWED: `GetCameraRight()` (#3784) by @Danil
|
||||
[raymath] ADDED: C++ operator overloads for common math function (#4385) by @Jeffery Myers -WARNING-
|
||||
[raymath] ADDED: Vector4 math functions and Vector2 variants of some Vector3 functions (#3828) by @Bowserinator
|
||||
[raymath] REVIEWED: Fix MSVC warnings/errors in C++ (#4125) by @Jeffery Myers
|
||||
[raymath] REVIEWED: Add extern "C" to raymath header for C++ (#3978) by @Jeffery Myers
|
||||
[raymath] REVIEWED: `QuaternionFromAxisAngle()`, remove redundant axis length calculation (#3900) by @jtainer
|
||||
[raymath] REVIEWED: `Vector3Perpendicular()`, avoid implicit conversion from float to double (#3799) by @João Foscarini
|
||||
[raymath] REVIEWED: `MatrixDecompose()`, incorrect output for certain scale and rotations (#4461) by @waveydave
|
||||
[raymath] REVIEWED: Small code refactor (#3753) by @Idir Carlos Aliane
|
||||
[rshapes] ADDED: `CheckCollisionCircleLine()` (#4018) by @kai-z99
|
||||
[rshapes] REVIEWED: Multisegment Bezier splines (#3744) by @Santiago Pelufo
|
||||
[rshapes] REVIEWED: Expose shapes drawing texture and rectangle (#3677) by @Jeffery Myers
|
||||
[rshapes] REVIEWED: `DrawLine()` #4075 by @Ray
|
||||
[rshapes] REVIEWED: `DrawPixel()` drawing by @Ray
|
||||
[rshapes] REVIEWED: `DrawLine()` to avoid pixel rounding issues #3931 by @Ray
|
||||
[rshapes] REVIEWED: `DrawRectangleLines()`, considering view matrix for lines "alignment" by @Ray
|
||||
[rshapes] REVIEWED: `DrawRectangleLines()`, pixel offset (#4261) by @RadsammyT
|
||||
[rshapes] REVIEWED: `DrawRectangleLines()`, pixel offset when scaling (#3884) by @Ray
|
||||
[rshapes] REVIEWED: `DrawRectangleLinesEx()`, make sure accounts for square tiles (#4382) by @Jojaby
|
||||
[rshapes] REVIEWED: `Draw*Gradient()` color parameter names (#4270) by @Paperdomo101
|
||||
[rshapes] REVIEWED: `DrawGrid()`, remove duplicate color calls (#4148) by @Jeffery Myers
|
||||
[rshapes] REVIEWED: `DrawSplineLinear()` to `SUPPORT_SPLINE_MITERS` by @Ray
|
||||
[rshapes] REVIEWED: `DrawSplineLinear()`, implement miters (#3585) by @Toctave
|
||||
[rshapes] REVIEWED: `CheckCollisionPointRec()` by @Ray
|
||||
[rshapes] REVIEWED: `CheckCollisionPointCircle()`, new implementation (#4135) by @kai-z99
|
||||
[rshapes] REVIEWED: `CheckCollisionCircles()`, optimized (#4065) by @kai-z99
|
||||
[rshapes] REVIEWED: `CheckCollisionPointPoly()` (#3750) by @Antonio Raúl
|
||||
[rshapes] REVIEWED: `CheckCollisionCircleRec()` (#3584) by @ubkp
|
||||
[rshapes] REVIEWED: Add more detail to function comment (#4344) by @Jeffery Myers
|
||||
[rshapes] REVIEWED: Functions that draw point arrays take them as const (#4051) by @Jeffery Myers
|
||||
[rtextures] ADDED: `ColorIsEqual()` by @Ray
|
||||
[rtextures] ADDED: `ColorLerp()`, to mix 2 colors together (#4310) by @SusgUY446
|
||||
[rtextures] ADDED: `LoadImageAnimFromMemory()` (#3681) by @IoIxD
|
||||
[rtextures] ADDED: `ImageKernelConvolution()` (#3528) by @Karim
|
||||
[rtextures] ADDED: `ImageFromChannel()` (#4105) by @Bruno Cabral
|
||||
[rtextures] ADDED: `ImageDrawLineEx()` (#4097) by @Le Juez Victor
|
||||
[rtextures] ADDED: `ImageDrawTriangle()` (#4094) by @Le Juez Victor
|
||||
[rtextures] REMOVED: SVG files loading and drawing, moving it to raylib-extras by @Ray -WARNING-
|
||||
[rtextures] REVIEWED: `LoadImage()`, added support for 3-channel QOI images (#4384) by @R-YaTian
|
||||
[rtextures] REVIEWED: `LoadImageRaw()` #3926 by @Ray
|
||||
[rtextures] REVIEWED: `LoadImageColors()`, advance k in loop (#4120) by @Bruno Cabral
|
||||
[rtextures] REVIEWED: `LoadTextureCubemap()`, added `mipmaps` #3665 by @Ray
|
||||
[rtextures] REVIEWED: `LoadTextureCubemap()`, assign format to cubemap (#3823) by @Gary M
|
||||
[rtextures] REVIEWED: `LoadTextureCubemap()`, load mipmaps for cubemaps (#4429) by @Nikolas
|
||||
[rtextures] REVIEWED: `LoadTextureCubemap()`, avoid dangling re-allocated pointers (#4439) by @Nikolas
|
||||
[rtextures] REVIEWED: `LoadImageFromScreen()`, fix scaling (#3881) by @proberge-dev
|
||||
[rtextures] REVIEWED: `LoadImageFromMemory()`, warnings on invalid image data (#4179) by @Jutastre
|
||||
[rtextures] REVIEWED: `LoadImageAnimFromMemory()`, added security checks (#3924) by @Ray
|
||||
[rtextures] REVIEWED: `ImageColorTint()` and `ColorTint()`, optimized (#4015) by @Le Juez Victor
|
||||
[rtextures] REVIEWED: `ImageKernelConvolution()`, formating and warnings by @Ray
|
||||
[rtextures] REVIEWED: `ImageDrawRectangleRec`, fix bounds check (#3732) by @Blockguy24
|
||||
[rtextures] REVIEWED: `ImageResizeCanvas()`, implemented fill color (#3720) by @Lieven Petersen
|
||||
[rtextures] REVIEWED: `ImageDrawRectangleRec()` (#3721) by @Le Juez Victor
|
||||
[rtextures] REVIEWED: `ImageDraw()`, don't try to blend images without alpha (#4395) by @Nikolas
|
||||
[rtextures] REVIEWED: `GenImagePerlinNoise()` being stretched (#4276) by @Bugsia
|
||||
[rtextures] REVIEWED: `GenImageGradientLinear()`, fix some angles (#4462) by @decromo
|
||||
[rtextures] REVIEWED: `DrawTexturePro()` to avoid negative dest rec #4316 by @Ray
|
||||
[rtextures] REVIEWED: `ColorToInt()`, fix undefined behaviour (#3996) by @OetkenPurveyorOfCode
|
||||
[rtextures] REVIEWED: Remove panorama cubemap layout option (#4425) by @Jeffery Myers
|
||||
[rtextures] REVIEWED: Removed unneeded module check, `rtextures` should not depend on `rtext` by @Ray
|
||||
[rtextures] REVIEWED: Simplified for loop for some image manipulation functions (#3712) by @Alice Nyaa
|
||||
[rtext] ADDED: BDF fonts support (#3735) by @Stanley Fuller -WARNING-
|
||||
[rtext] ADDED: `TextToCamel()` (#4033) by @IoIxD
|
||||
[rtext] ADDED: `TextToSnake()` (#4033) by @IoIxD
|
||||
[rtext] ADDED: `TextToFloat()` (#3627) by @Benjamin Schmid Ties
|
||||
[rtext] REDESIGNED: `SetTextLineSpacing()` by @Ray -WARNING-
|
||||
[rtext] REVIEWED: `LoadFontDataBDF()` name and formating by @Ray
|
||||
[rtext] REVIEWED: `LoadFontDefault()`, initialize glyphs and recs to zero #4319 by @Ray
|
||||
[rtext] REVIEWED: `LoadFontEx()`, avoid default font fallback (#4077) by @Peter0x44 -WARNING-
|
||||
[rtext] REVIEWED: `LoadBMFont()`, extended functionality (#3536) by @Dongkun Lee
|
||||
[rtext] REVIEWED: `LoadBMFont()`, issue on not glyph data initialized by @Ray
|
||||
[rtext] REVIEWED: `LoadFontFromMemory()`, use strncpy() to fix buffer overflow (#3795) by @Mingjie Shen
|
||||
[rtext] REVIEWED: `LoadCodepoints()` returning a freed ptr when count is 0 (#4089) by @Alice Nyaa
|
||||
[rtext] REVIEWED: `LoadFontData()` avoid fallback glyphs by @Ray -WARNING-
|
||||
[rtext] REVIEWED: `LoadFontData()`, load image only if glyph has been found in font by @Ray
|
||||
[rtext] REVIEWED: `ExportFontAsCode()`, fix C++ compiler errors (#4013) by @DarkAssassin23
|
||||
[rtext] REVIEWED: `MeasureTextEx()` height calculation (#3770) by @Marrony Neris
|
||||
[rtext] REVIEWED: `MeasureTextEx()`, additional check for empty input string (#4448) by @mpv-enjoyer
|
||||
[rtext] REVIEWED: `CodepointToUTF8()`, clean static buffer #4379 by @Ray
|
||||
[rtext] REVIEWED: `TextToFloat()`, always multiply by sign (#4273) by @listeria
|
||||
[rtext] REVIEWED: `TextReplace()` const correctness (#3678) by @maverikou
|
||||
[rtext] REVIEWED: `TextToFloat()`, coding style (#3627) by @Benjamin Schmid Ties
|
||||
[rtext] REVIEWED: Some comments to align to style (#3756) by @Idir Carlos Aliane
|
||||
[rtext] REVIEWED: Adjust font atlas area calculation so padding area is not underestimated at small font sizes (#3719) by @Tim Romero
|
||||
[rmodels] ADDED: GPU skinning support for models animations (#4321) by @Daniel Holden -WARNING-
|
||||
[rmodels] ADDED: Support 16-bit unsigned short vec4 format for gltf joint loading (#3821) by @Gary M
|
||||
[rmodels] ADDED: Support animation names for the m3d model format (#3714) by @kolunmi
|
||||
[rmodels] ADDED: `DrawModelPoints()`, more performant point cloud rendering (#4203) by @Reese Gallagher
|
||||
[rmodels] ADDED: `ExportMeshAsCode()` by @Ray
|
||||
[rmodels] REVIEWED: Multiple updates to gltf loading, improved macro (#4373) by @Harald Scheirich
|
||||
[rmodels] REVIEWED: `LoadOBJ()`, correctly split obj meshes by material (#4285) by @Jeffery Myers
|
||||
[rmodels] REVIEWED: `LoadOBJ()`, add warning when loading an OBJ with multiple materials (#4271) by @Jeffery Myers
|
||||
[rmodels] REVIEWED: `LoadOBJ()`, fix bug that fragmented the loaded meshes (#4494) by @Eike Decker
|
||||
[rmodels] REVIEWED: `LoadIQM()`, set model.meshMaterial[] (#4092) by @SuperUserNameMan
|
||||
[rmodels] REVIEWED: `LoadIQM()`, attempt to load texture from IQM at loadtime (#4029) by @Jett
|
||||
[rmodels] REVIEWED: `LoadM3D(), fix vertex colors for m3d files (#3859) by @Jeffery Myers
|
||||
[rmodels] REVIEWED: `LoadGLTF()`, supporting additional vertex data formats (#3546) by @MrScautHD
|
||||
[rmodels] REVIEWED: `LoadGLTF()`, correctly handle the node hierarchy in a glTF file (#4037) by @Paul Melis
|
||||
[rmodels] REVIEWED: `LoadGLTF()`, replaced SQUAD quat interpolation with cubic hermite (gltf 2.0 specs) (#3920) by @Benji
|
||||
[rmodels] REVIEWED: `LoadGLTF()`, support 2nd texture coordinates loading by @Ray
|
||||
[rmodels] REVIEWED: `LoadGLTF()`, support additional vertex attributes data formats #3890 by @Ray
|
||||
[rmodels] REVIEWED: `LoadGLTF()`, set cgltf callbacks to use `LoadFileData()` and `UnloadFileData()` (#3652) by @kolunmi
|
||||
[rmodels] REVIEWED: `LoadGLTF()`, JOINTS loading #3836 by @Ray
|
||||
[rmodels] REVIEWED: `LoadImageFromCgltfImage()`, fix base64 padding support (#4112) by @SuperUserNameMan
|
||||
[rmodels] REVIEWED: `LoadModelAnimationsIQM()`, fix corrupted animation names (#4026) by @Jett
|
||||
[rmodels] REVIEWED: `LoadModelAnimationsGLTF()`, load animations with 1 frame (#3804) by @Nikita Blizniuk
|
||||
[rmodels] REVIEWED: `LoadModelAnimationsGLTF()`, added missing interpolation types (#3919) by @Benji
|
||||
[rmodels] REVIEWED: `LoadModelAnimationsGLTF()` (#4107) by @VitoTringolo
|
||||
[rmodels] REVIEWED: `LoadBoneInfoGLTF()`, add check for animation name being NULL (#4053) by @VitoTringolo
|
||||
[rmodels] REVIEWED: `GenMeshSphere()`, fix artifacts (#4460) by @MikiZX1
|
||||
[rmodels] REVIEWED: `GenMeshTangents()`, read uninitialized values, fix bounding case (#4066) by @kai-z99
|
||||
[rmodels] REVIEWED: `GenMeshTangents()`, fixed out of bounds error (#3990) by @Salvador Galindo
|
||||
[rmodels] REVIEWED: `UpdateModelAnimation()`, performance speedup (#4470) by @JettMonstersGoBoom
|
||||
[rmodels] REVIEWED: `DrawCylinder()`, fix drawing due to imprecise angle (#4034) by @Paul Melis
|
||||
[rmodels] REVIEWED: `DrawCylinder()`, fix drawing of cap (#4478) by @JeffM2501
|
||||
[rmodels] REVIEWED: `DrawMesh()`, send full matModel to shader in DrawMesh (#4005) (#4022) by @David Holland
|
||||
[rmodels] REVIEWED: `DrawMesh()`, fix material specular map retrieval (#3758) by @Victor Gallet
|
||||
[rmodels] REVIEWED: `DrawModelEx()`, simplified multiplication of colors (#4002) by @Le Juez Victor
|
||||
[rmodels] REVIEWED: `DrawBillboardPro()`, to be consistend with `DrawTexturePro()` (#4132) by @bohonghuang
|
||||
[rmodels] REVIEWED: `DrawSphereEx()` optimization (#4106) by @smalltimewizard
|
||||
[raudio] REVIEWED: `LoadMusicStreamFromMemory()`, support 24-bit FLACs (#4279) by @konstruktor227
|
||||
[raudio] REVIEWED: `LoadWaveSamples()`, fix mapping of wave data (#4062) by @listeria
|
||||
[raudio] REVIEWED: `LoadMusicStream()`, remove drwav_uninit() (#3986) by @FishingHacks
|
||||
[raudio] REVIEWED: `LoadMusicStream()` qoa and wav loading (#3966) by @veins1
|
||||
[raudio] REVIEWED: `ExportWaveAsCode()`, segfault (#3769) by @IoIxD
|
||||
[raudio] REVIEWED: `WaveCrop()`, fix issues and use frames instead of samples (#3994) by @listeria
|
||||
[raudio] REVIEWED: Crash from multithreading issues (#3907) by @Christian Haas
|
||||
[raudio] REVIEWED: Reset music.ctxType if loading wasn't succesful (#3917) by @veins1
|
||||
[raudio] REVIEWED: Added missing functions in "standalone" mode (#3760) by @Alessandro Nikolaev
|
||||
[raudio] REVIEWED: Disable unused miniaudio features (#3544) by @Alexandre Almeida
|
||||
[raudio] REVIEWED: Fix crash when switching playback device at runtime (#4102) by @jkaup
|
||||
[raudio] REVIEWED: Support 24 bits samples for FLAC format (#4058) by @Alexey Kutepov
|
||||
[examples] ADDED: `core_random_sequence` (#3846) by @Dalton Overmyer
|
||||
[examples] ADDED: `core_input_virtual_controls` (#4342) by @oblerion
|
||||
[examples] ADDED: `shapes_rectangle_advanced `, implementing `DrawRectangleRoundedGradientH()` (#4435) by @Everton Jr.
|
||||
[examples] ADDED: `models_bone_socket` (#3833) by @iP
|
||||
[examples] ADDED: `shaders_vertex_displacement` (#4186) by @Alex ZH
|
||||
[examples] ADDED: `shaders_shadowmap` (#3653) by @TheManTheMythTheGameDev
|
||||
[examples] REVIEWED: `core_2d_camera_platformer` by @Ray
|
||||
[examples] REVIEWED: `core_2d_camera_mouse_zoom`, use logarithmic scaling for a 2d zoom functionality (#3977) by @Mike Will
|
||||
[examples] REVIEWED: `core_input_gamepad_info`, all buttons displayed within the window (#4241) by @Asdqwe
|
||||
[examples] REVIEWED: `core_input_gamepad_info`, show ps3 controller (#4040) by @Konrad Gutvik Grande
|
||||
[examples] REVIEWED: `core_input_gamepad`, add drawing for generic gamepad (#4424) by @Asdqwe
|
||||
[examples] REVIEWED: `core_input_gamepad`, add deadzone handling (#4422) by @Asdqwe
|
||||
[examples] REVIEWED: `shapes_bouncing_ball` (#4226) by @Anthony Carbajal
|
||||
[examples] REVIEWED: `shapes_following_eyes` (#3710) by @Hongyu Ouyang
|
||||
[examples] REVIEWED: `shapes_draw_rectangle_rounded` by @Ray
|
||||
[examples] REVIEWED: `shapes_draw_ring`, fix other examples (#4211) by @kai-z99
|
||||
[examples] REVIEWED: `shapes_lines_bezier` by @Ray
|
||||
[examples] REVIEWED: `textures_image_kernel` #3556 by @Ray
|
||||
[examples] REVIEWED: `text_input_box` (#4229) by @Anthony Carbajal
|
||||
[examples] REVIEWED: `text_writing_anim` (#4230) by @Anthony Carbajal
|
||||
[examples] REVIEWED: `models_billboard` by @Ray
|
||||
[examples] REVIEWED: `models_cubicmap` by @Ray
|
||||
[examples] REVIEWED: `models_point_rendering` by @Ray
|
||||
[examples] REVIEWED: `models_box_collisions` (#4224) by @Anthony Carbajal
|
||||
[examples] REVIEWED: `models_skybox`, do not use HDR by default (#4115) by @Jeffery Myers
|
||||
[examples] REVIEWED: `shaders_basic_pbr` (#4225) by @Anthony Carbajal
|
||||
[examples] REVIEWED: `shaders_palette_switch` by @Ray
|
||||
[examples] REVIEWED: `shaders_hybrid_render` (#3908) by @Yousif
|
||||
[examples] REVIEWED: `shaders_lighting_instancing`, fix vertex shader (#4056) by @Karl Zylinski
|
||||
[examples] REVIEWED: `shaders_raymarching`, add `raymarching.fs` for GLSL120 (#4183) by @CDM15y
|
||||
[examples] REVIEWED: `shaders_shadowmap`, fix shaders for GLSL 1.20 (#4167) by @CDM15y
|
||||
[examples] REVIEWED: `shaders_deferred_render` (#3655) by @Jett
|
||||
[examples] REVIEWED: `shaders_basic_pbr` (#3621) by @devdad
|
||||
[examples] REVIEWED: `shaders_basic_pbr`, remove dependencies (#3649) by @TheManTheMythTheGameDev
|
||||
[examples] REVIEWED: `shaders_basic_pbr`, added more comments by @Ray
|
||||
[examples] REVIEWED: `shaders_gpu_skinning`, to work with OpenGL ES 2.0 #4412 by @Ray
|
||||
[examples] REVIEWED: `shaders_model_shader`, use free camera (#4428) by @IcyLeave6109
|
||||
[examples] REVIEWED: `audio_stream_effects` (#3618) by @lipx
|
||||
[examples] REVIEWED: `audio_raw_stream` (#3624) by @riadbettole
|
||||
[examples] REVIEWED: `audio_mixed_processor` (#4214) by @Anthony Carbajal
|
||||
[examples] REVIEWED: `raylib_opengl_interop`, fix building on PLATFORM_DESKTOP_SDL (#3826) by @Peter0x44
|
||||
[examples] REVIEWED: Update examples missing UnloadTexture() calls (#4234) by @Anthony Carbajal
|
||||
[examples] REVIEWED: Added GLSL 100 and 120 shaders to lightmap example (#3543) by @Jussi Viitala
|
||||
[examples] REVIEWED: Set FPS to always 60 in all exampels (#4235) by @Anthony Carbajal
|
||||
[build] REVIEWED: Makefile by @Ray
|
||||
[build] REVIEWED: Makefile, fix wrong flag #3593 by @Ray
|
||||
[build] REVIEWED: Makefile, disable wayland by default (#4369) by @Anthony Carbajal
|
||||
[build] REVIEWED: Makefile, VSCode, fix to support multiple .c files (#4391) by @Alan Arrecis
|
||||
[build] REVIEWED: Makefile, fix -Wstringop-truncation warning (#4096) by @Peter0x44
|
||||
[build] REVIEWED: Makefile, fix issues for RGFW on Linux/macOS (#3969) by @Colleague Riley
|
||||
[build] REVIEWED: Makefile, update RAYLIB_VERSION (#3901) by @Belllg
|
||||
[build] REVIEWED: Makefile, use mingw32-make for Windows (#4436) by @Asdqwe
|
||||
[build] REVIEWED: Makefile, move CUSTOM_CFLAGS for better visibility (#4054) by @Lázaro Albuquerque
|
||||
[build] REVIEWED: Makefile, update emsdk paths to latest versions by @Ray
|
||||
[build] REVIEWED: Makefile examples, align /usr/local with /src Makefile (#4286) by @Tchan0
|
||||
[build] REVIEWED: Makefile examples, added `textures_image_kernel` (#3555) by @Sergey Zapunidi
|
||||
[build] REVIEWED: Makefile examples (#4209) by @Anthony Carbajal
|
||||
[build] REVIEWED: Makefile examples, to work on NetBSD (#4438) by @NishiOwO
|
||||
[build] REVIEWED: Makefile examples, WebGL2 (OpenGL ES 3.0) backend flags #4330 by @Ray
|
||||
[build] REVIEWED: Makefile examples, web building (#4434) by @Asdqwe
|
||||
[build] REVIEWED: build.zig, fix various issues around `-Dconfig` (#4398) by @Sage Hane
|
||||
[build] REVIEWED: build.zig, fix type mismatch (#4383) by @yuval_dev
|
||||
[build] REVIEWED: build.zig, minor fixes (#4381) by @Sage Hane
|
||||
[build] REVIEWED: build.zig, fix @src logic and a few things (#4380) by @Sage Hane
|
||||
[build] REVIEWED: build.zig, improve logic (#4375) by @Sage Hane
|
||||
[build] REVIEWED: build.zig, issues (#4374) by @William Culver
|
||||
[build] REVIEWED: build.zig, issues (#4366) by @Visen
|
||||
[build] REVIEWED: build.zig, support desktop backend change (#4358) by @Nikolas
|
||||
[build] REVIEWED: build.zig, use zig fmt (#4242) by @freakmangd
|
||||
[build] REVIEWED: build.zig, check if wayland-scanner is installed (#4217) by @lnc3l0t
|
||||
[build] REVIEWED: build.zig, override config.h definitions (#4193) by @lnc3l0t
|
||||
[build] REVIEWED: build.zig, support GLFW platform detection (#4150) by @InventorXtreme
|
||||
[build] REVIEWED: build.zig, make emscripten build compatible with Zig 0.13.0 (#4121) by @Mike Will
|
||||
[build] REVIEWED: build.zig, pass the real build.zig file (#4113) by @InKryption
|
||||
[build] REVIEWED: build.zig, leverage `dependencyFromBuildZig` (#4109) by @InKryption
|
||||
[build] REVIEWED: build.zig, run examples from their directories (#4063) by @Mike Will
|
||||
[build] REVIEWED: build.zig, fix raygui build when using addRaygui externally (#4027) by @Viktor Pocedulić
|
||||
[build] REVIEWED: build.zig, fix emscripten build (#4012) by @Dylan
|
||||
[build] REVIEWED: build.zig, update to zig 0.12.0dev while keeping 0.11.0 compatibility (#3715) by @freakmangd
|
||||
[build] REVIEWED: build.zig, drop support for 0.11.0 and use more idiomatic build script code (#3927) by @freakmangd
|
||||
[build] REVIEWED: build.zig, sdd shared library build option and update to zig 0.12.0-dev.2139 (#3727) by @Andrew Lee
|
||||
[build] REVIEWED: build.zig, add `opengl_version` option (#3979) by @Alexei Mozaidze
|
||||
[build] REVIEWED: build.zig, fix local dependency break (#3913) by @freakmangd
|
||||
[build] REVIEWED: build.zig, fix breaking builds for Zig v0.11.0 (#3896) by @iarkn
|
||||
[build] REVIEWED: build.zig, update to latest version and simplify (#3905) by @freakmangd
|
||||
[build] REVIEWED: build.zig, remove all uses of deps/mingw (#3805) by @Peter0x44
|
||||
[build] REVIEWED: build.zig, fixed illegal instruction crash (#3682) by @WisonYe
|
||||
[build] REVIEWED: build.zig, fix broken build on #3863 (#3891) by @Nikolas Mauropoulos
|
||||
[build] REVIEWED: build.zig, improve cross-compilation (#4468) by @deathbeam
|
||||
[build] REVIEWED: CMake, update to raylib 5.0 (#3623) by @Peter0x44
|
||||
[build] REVIEWED: CMake, added PLATFORM option for Desktop SDL (#3809) by @mooff
|
||||
[build] REVIEWED: CMake, fix GRAPHICS_* check (#4359) by @Kacper Zybała
|
||||
[build] REVIEWED: CMake, examples projects (#4332) by @Ridge3Dproductions
|
||||
[build] REVIEWED: CMake, fix warnings in projects/CMake/CMakeLists.txt (#4278) by @Peter0x44
|
||||
[build] REVIEWED: CMake, delete BuildOptions.cmake (#4277) by @Peter0x44
|
||||
[build] REVIEWED: CMake, update version to 5.0 so libraries are correctly versioned (#3615) by @David Williams
|
||||
[build] REVIEWED: CMake, improved linkage flags to save 28KB on the final bundle (#4177) by @Lázaro Albuquerque
|
||||
[build] REVIEWED: CMake, support OpenGL ES3 in `LibraryConfigurations.cmake` (#4079) by @manuel5975p
|
||||
[build] REVIEWED: CMake, `config.h` fully available to users (#4044) by @Lázaro Albuquerque
|
||||
[build] REVIEWED: CMake, pass -sFULL_ES3 instead of -sFULL_ES3=1 (#4090) by @manuel5975p
|
||||
[build] REVIEWED: CMake, SDL build link the glfw dependency (#3860) by @Rob Loach
|
||||
[build] REVIEWED: CMake, infer CMAKE_MODULE_PATH in super-build (#4042) by @fruzitent
|
||||
[build] REVIEWED: CMake, remove USE_WAYLAND option (#3851) by @Alexandre Almeida
|
||||
[build] REVIEWED: CMake, disable SDL rlgl_standalone example (#3861) by @Rob Loach
|
||||
[build] REVIEWED: CMake, bump version required to avoid deprecated #3639 by @Ray
|
||||
[build] REVIEWED: CMake, fix examples linking -DPLATFORM=SDL (#3825) by @Peter0x44
|
||||
[build] REVIEWED: CMake, don't build for wayland by default (#4432) by @Peter0x44
|
||||
[build] REVIEWED: VS2022, misc improvements by @Ray
|
||||
[build] REVIEWED: VS2022, fix build warnings (#4095) by @Jeffery Myers
|
||||
[build] REVIEWED: VS2022, added new examples (#4492) by @Jeffery Myers
|
||||
[build] REVIEWED: Fix fix-build-paths (#3849) by @Caleb Barger
|
||||
[build] REVIEWED: Fix build paths (#3835) by @Steve Biedermann
|
||||
[build] REVIEWED: Fix VSCode sample project for macOS (#3666) by @Tim Romero
|
||||
[build] REVIEWED: Fix some warnings on web builds and remove some redundant flags (#4069) by @Lázaro Albuquerque
|
||||
[build] REVIEWED: Fix examples not building with gestures system disabled (#4020) by @Sprix
|
||||
[build] REVIEWED: Fix GLFW runtime platform detection (#3863) by @Alexandre Almeida
|
||||
[build] REVIEWED: Fix DRM cross-compile without sysroot (#3839) by @Christian W. Zuckschwerdt
|
||||
[build] REVIEWED: Fix cmake-built libraylib.a to properly include GLFW's object files (#3598) by @Peter0x44
|
||||
[build] REVIEWED: Hide unneeded internal symbols when building raylib as an so or dylib (#3573) by @Peter0x44
|
||||
[build] REVIEWED: Corrected the path of android ndk toolchains for OSX platforms (#3574) by @Emmanuel Méra
|
||||
[build][CI] ADDED: Automatic update for raylib_api.* (#3692) by @seiren
|
||||
[build][CI] REVIEWED: Update workflows to use latest actions/upload-artifact by @Ray
|
||||
[build][CI] REVIEWED: CodeQL minor tweaks to avoid some warnings by @Ray
|
||||
[build][CI] REVIEWED: Update linux_examples.yml by @Ray
|
||||
[build][CI] REVIEWED: Update linux.yml by @Ray
|
||||
[build][CI] REVIEWED: Update webassembly.yml by @Ray
|
||||
[build][CI] REVIEWED: Update cmake.yml by @Ray
|
||||
[build][CI] REVIEWED: Update codeql.yml, exclude src/external files by @Ray
|
||||
[bindings] ADDED: raylib-APL (#4253) by @Brian E
|
||||
[bindings] ADDED: raylib-bqn, moved rayed-bqn (#4331) by @Brian E
|
||||
[bindings] ADDED: brainfuck binding (#4169) by @_Tradam
|
||||
[bindings] ADDED: raylib-zig-bindings (#4004) by @Lionel Briand
|
||||
[bindings] ADDED: Raylib-CSharp wrapper (#3963) by @MrScautHD
|
||||
[bindings] ADDED: COBOL binding (#3661) by @glowiak
|
||||
[bindings] ADDED: raylib-beef binding (#3640) by @Braedon Lewis
|
||||
[bindings] ADDED: Raylib-CSharp-Vinculum (#3571) by @Danil
|
||||
[bindings] REVIEWED: Remove broken-link bindings #3899 by @Ray
|
||||
[bindings] REVIEWED: Updated some versions on BINDINGS.md by @Ray
|
||||
[bindings] REVIEWED: Removed umaintained repos (#3999) by @Antonis Geralis
|
||||
[bindings] REDESIGNED: Add binding link to name, instead of separate column (#3995) by @Carmine Pietroluongo
|
||||
[bindings] UPDATED: h-raylib (#4378) by @Anand Swaroop
|
||||
[bindings] UPDATED: Raylib.lean, to master version (#4337) by @Daniil Kisel
|
||||
[bindings] UPDATED: raybit, to latest master (#4311) by @Alex
|
||||
[bindings] UPDATED: dray binding (#4163) by @red thing
|
||||
[bindings] UPDATED: Julia (#4068) by @ShalokShalom
|
||||
[bindings] UPDATED: nim to latest master (#3999) by @Antonis Geralis
|
||||
[bindings] UPDATED: raylib-rs (#3991) by @IoIxD
|
||||
[bindings] UPDATED: raylib-zig version (#3902) by @Nikolas
|
||||
[bindings] UPDATED: raylib-odin (#3868) by @joyousblunder
|
||||
[bindings] UPDATED: Raylib VAPI (#3829) by @Alex Macafee
|
||||
[bindings] UPDATED: Raylib-cs (#3774) by @Brandon Baker
|
||||
[bindings] UPDATED: h-raylib (#3739) by @Anand Swaroop
|
||||
[bindings] UPDATED: OCaml bindings version (#3730) by @Tobias Mock
|
||||
[bindings] UPDATED: Raylib.c3 (#3689) by @Kenta
|
||||
[bindings] UPDATED: ray-cyber to 5.0 (#3654) by @fubark
|
||||
[bindings] UPDATED: raylib-freebasic binding (#3591) by @WIITD
|
||||
[bindings] UPDATED: SmallBASIC (#3562) by @Chris Warren-Smith
|
||||
[bindings] UPDATED: Python raylib-py v5.0.0beta1 (#3557) by @Jorge A. Gomes
|
||||
[bindings] UPDATED: raylib-d binding (#3561) by @Steven Schveighoffer
|
||||
[bindings] UPDATED: Janet (#3553) by @Dmitry Matveyev
|
||||
[bindings] UPDATED: Raylib.nelua (#3552) by @Auz
|
||||
[bindings] UPDATED: raylib-cpp to 5.0 (#3551) by @Rob Loach
|
||||
[bindings] UPDATED: Pascal binding (#3548) by @Gunko Vadim
|
||||
[external] UPDATED: stb_truetype.h to latest version by @Ray
|
||||
[external] UPDATED: stb_image_resize2.h to latest version by @Ray
|
||||
[external] UPDATED: stb_image.h to latest version by @Ray
|
||||
[external] UPDATED: qoa.h to latest version by @Ray
|
||||
[external] UPDATED: dr_wav.h to latest version by @Ray
|
||||
[external] UPDATED: dr_mp3.h to latest version by @Ray
|
||||
[external] UPDATED: cgltf.h to latest version by @Ray
|
||||
[external] REVIEWED: rl_gputex, correctly load mipmaps from DDS files (#4399) by @Nikolas
|
||||
[external] REVIEWED: stb_image_resize2, dix vld1q_f16 undeclared in arm (#4309) by @masnm
|
||||
[external] REVIEWED: miniaudio, fix library and Makefile for NetBSD (#4212) by @NishiOwO
|
||||
[external] REVIEWED: raygui, update to latest version 4.5-dev (#4238) by @Anthony Carbajal
|
||||
[external] REVIEWED: jar_xml, replace unicode characters by ascii characters to avoid warning in MSVC (#4196) by @Rico P
|
||||
[external] REVIEWED: vox_loader, normals and new voxels shader (#3843) by @johann nadalutti
|
||||
[parser] REVIEWED: README.md, to mirror fixed help text (#4336) by @Daniil Kisel
|
||||
[parser] REVIEWED: Fix seg fault with long comment lines (#4306) by @Chris Warren-Smith
|
||||
[parser] REVIEWED: Don't crash for files that don't end in newlines (#3981) by @Peter0x44
|
||||
[parser] REVIEWED: Issues in usage example help text (#4084) by @Peter0x44
|
||||
[parser] REVIEWED: Fix parsing of empty parentheses (#3974) by @Filyus
|
||||
[parser] REVIEWED: Address parsing issue when generating XML #3893 by @Ray
|
||||
[parser] REVIEWED: `MemoryCopy()`, prevent buffer overflow by replacing hard-coded arguments (#4011) by @avx0
|
||||
[misc] ADDED: Create logo/raylib.icns by @Ray
|
||||
[misc] ADDED: Create logo/raylib_1024x1024.png by @Ray
|
||||
[misc] ADDED: Default vertex/fragment shader for OpenGL ES 3.0 (#4178) by @Lázaro Albuquerque
|
||||
[misc] REVIEWED: README.md, fix Reddit badge (#4136) by @Ninad Sachania
|
||||
[misc] REVIEWED: .gitignore, ignore compiled dll binaries (#3628) by @2Bear
|
||||
[misc] REVIEWED: Fix undesired scrollbars on web shell files (#4104) by @jspast
|
||||
[misc] REVIEWED: Made comments on raylib.h match comments in rcamera.h (#3942) by @Tomas Fabrizio Orsi
|
||||
[misc] REVIEWED: Make raylib/raygui work better on touchscreen (#3728) by @Hongyu Ouyang
|
||||
[misc] REVIEWED: Update config.h by @Ray
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
Release: raylib 5.0 - 10th Anniversary Edition (18 November 2023)
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ cmake_dependent_option(USE_AUDIO "Build raylib with audio module" ON CUSTOMIZE_B
|
|||
enum_option(USE_EXTERNAL_GLFW "OFF;IF_POSSIBLE;ON" "Link raylib against system GLFW instead of embedded one")
|
||||
|
||||
# GLFW build options
|
||||
option(GLFW_BUILD_WAYLAND "Build the bundled GLFW with Wayland support" ON)
|
||||
option(GLFW_BUILD_WAYLAND "Build the bundled GLFW with Wayland support" OFF)
|
||||
option(GLFW_BUILD_X11 "Build the bundled GLFW with X11 support" ON)
|
||||
|
||||
option(INCLUDE_EVERYTHING "Include everything disabled by default (for CI usage" OFF)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ Hello contributors! Welcome to raylib!
|
|||
Do you enjoy raylib and want to contribute? Nice! You can help with the following points:
|
||||
|
||||
- `C programming` - Can you write/review/test/improve the code?
|
||||
- `Documentation/Tutorials/Example` - Can you write some tutorial/example?
|
||||
- `Documentation/Tutorials/Example` - Can you write some tutorials/examples?
|
||||
- `Porting to other platforms` - Can you port/adapt/compile raylib on other systems?
|
||||
- `Web Development` - Can you help [with the website](https://github.com/raysan5/raylib.com)?
|
||||
- `Testing` - Can you find some bugs in raylib?
|
||||
|
|
|
|||
51
HISTORY.md
|
|
@ -471,3 +471,54 @@ Make sure to check raylib [CHANGELOG]([CHANGELOG](https://github.com/raysan5/ray
|
|||
Undoubtedly, this is the **biggest raylib update in 10 years**. Many new features and improvements with a special focus on maintainability and long-term sustainability. **Undoubtedly, this is the raylib of the future**.
|
||||
|
||||
**Enjoy programming!** :)
|
||||
|
||||
notes on raylib 5.5
|
||||
-------------------
|
||||
|
||||
One year after raylib 5.0 release, arrives `raylib 5.5`, the next big revision of the library. It's been **11 years** since raylib 1.0 release and in all this time it has never stopped growing and improving. With an outstanding number of new contributors and improvements, it's, again, the biggest raylib release to date.
|
||||
|
||||
Some numbers for this release:
|
||||
|
||||
- **+270** closed issues (for a TOTAL of **+1810**!)
|
||||
- **+800** commits since previous RELEASE (for a TOTAL of **+7770**!)
|
||||
- **+30** functions ADDED to raylib API (for a TOTAL of **580**!)
|
||||
- **+110** functions REVIEWED with fixes and improvements
|
||||
- **+140** new contributors (for a TOTAL of **+640**!)
|
||||
|
||||
Highlights for `raylib 5.5`:
|
||||
|
||||
- **`NEW` raylib pre-configured Windows package**: The new raylib **portable and self-contained Windows package** for `raylib 5.5`, intended for nobel devs that start in programming world, comes with one big addition: support for **C code building for Web platform with one-single-mouse-click!** For the last 10 years, the pre-configured raylib Windows package allowed to edit simple C projects on Notepad++ and easely compile Windows executables with an automatic script; this new release adds the possibility to compile the same C projects for Web platform with a simple mouse click. This new addition **greatly simplifies C to WebAssembly project building for new users**. The `raylib Windows Installer` package can be downloaded for free from [raylib on itch.io](https://raysan5.itch.io/raylib).
|
||||
|
||||
- **`NEW` raylib project creator tool**: A brand new tool developed to help raylib users to **setup new projects in a professional way**. `raylib project creator` generates a complete project structure with **multiple build systems ready-to-use** and **GitHub CI/CD actions pre-configured**. It only requires providing some C files and basic project parameters! The tools is [free and open-source](https://raysan5.itch.io/raylib-project-creator), and [it can be used online](https://raysan5.itch.io/raylib-project-creator)!.
|
||||
|
||||
- **`NEW` Platform backend supported: RGFW**: Thanks to the `rcore` platform-split implemented in `raylib 5.0`, **adding new platforms backends has been greatly simplified**, new backends can be added using provided template, self-contained in a single C module, completely portable. A new platform backend has been added: [`RGFW`](https://github.com/raysan5/raylib/blob/master/src/platforms/rcore_desktop_rgfw.c). `RGFW` is a **new single-file header-only portable library** ([`RGFW.h`](https://github.com/ColleagueRiley/RGFW)) intended for platform-functionality management (windowing and inputs); in this case for **desktop platforms** (Windows, Linux, macOS) but also for **Web platform**. It adds a new alternative to the already existing `GLFW` and `SDL` platform backends.
|
||||
|
||||
- **`NEW` Platform backend version supported: SDL3**: Previous `raylib 5.0` added support for `SDL2` library, and `raylib 5.5` not only improves SDL2 functionality, with several issues reviewed, but also adds support for the recently released big SDL update in years: [`SDL3`](https://wiki.libsdl.org/SDL3/FrontPage). Now users can **select at compile time the desired SDL version to use**, increasing the number of potential platforms supported in the future!
|
||||
|
||||
- **`NEW` Retro-console platforms supported: Dreamcast, N64, PSP, PSVita, PS4**: Thanks to the platform-split on `raylib 5.0`, **supporting new platform backends is easier than ever!** Along the raylib `rlgl` module support for the `OpenGL 1.1` graphics API, it opened the door to [**multiple homebrew retro-consoles backend implementations!**](https://github.com/raylib4Consoles) It's amazing to see raylib running on +20 year old consoles like [Dreamcast](https://github.com/raylib4Consoles/raylib4Dreamcast), [PSP](https://github.com/raylib4Consoles/raylib4Psp) or [PSVita](https://github.com/psp2dev/raylib4Vita), considering the hardware constraints of those platforms and proves **raylib outstanding versability!** Those additional platforms can be found in separate repositories and have been created by the amazing programmer Antonio Jose Ramos Marquez (@psxdev).
|
||||
|
||||
- **`NEW` GPU Skinning support**: After lots of requests for this feature, it has been finally added to raylib thanks to the contributor Daniel Holden (@orangeduck), probably the developer that has further pushed models animations with raylib, developing two amazing tools to visualize and test animations: [GenoView](https://github.com/orangeduck/GenoView) and [BVHView](https://github.com/orangeduck/BVHView). Adding GPU skinning was a tricky feature, considering it had to be **available for all raylib supported platforms**, including limited ones like Raspberry Pi with OpenGL ES 2.0, where some advance OpenGL features are not available (UBO, SSBO, Transform Feedback) but a multi-platform solution was found to make it possible. A new example, [`models_gpu_skinning`](https://github.com/raysan5/raylib/blob/master/examples/models/models_gpu_skinning.c) has been added to illustrate this new functionality. As an extra, previous existing CPU animation system has been greatly improved, multiplying performance by a factor (simplifiying required maths).
|
||||
|
||||
- **`NEW` [`raymath`](https://github.com/raysan5/raylib/blob/master/src/raymath.h) C++ operators**: After several requested for this feature, C++ math operators for `Vector2`, `Vector3`, `Vector4`, `Quaternion` and `Matrix` has been added to `raymath` as an extension to current implementation. Despite being only available for C++ because C does not support it, these operators **simplify C++ code when doing math operations**.
|
||||
|
||||
Beside those new big features, `raylib 5.5` comes with MANY other improvements:
|
||||
|
||||
- Normals support on batching system
|
||||
- Clipboard images reading support
|
||||
- CRC32/MD5/SHA1 hash computation
|
||||
- Gamepad vibration support
|
||||
- Improved font loading (no GPU required) with BDF fonts support
|
||||
- Time-based camera movement
|
||||
- Improved GLTF animations loading
|
||||
|
||||
...and [much much more](https://github.com/raysan5/raylib/blob/master/CHANGELOG), including **many functions reviews and new functions added!**
|
||||
|
||||
Make sure to check raylib [CHANGELOG](https://github.com/raysan5/raylib/blob/master/CHANGELOG) for a detailed list of changes!
|
||||
|
||||
To end with, I want to **thank all the contributors (+640!**) that along the years have **greatly improved raylib** and pushed it further and better day after day. Thanks to all of them, raylib is the amazing library it is today.
|
||||
|
||||
Last but not least, I want to thank **raylib sponsors and all the raylib community** for their support and continuous engagement with the library, creating and sharing amazing raylib projects on a daily basis. **Thanks for making raylib a great platform to enjoy games/tools/graphic programming!**
|
||||
|
||||
**After 11 years of development, `raylib 5.5` is the best raylib ever.**
|
||||
|
||||
**Enjoy programming with raylib!** :)
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ Ready to learn? Jump to [code examples!](https://www.raylib.com/examples.html)
|
|||
|
||||
[](https://github.com/raysan5/raylib/releases)
|
||||
[](https://github.com/raysan5/raylib/stargazers)
|
||||
[](https://github.com/raysan5/raylib/commits/master)
|
||||
[](https://github.com/raysan5/raylib/commits/master)
|
||||
[](https://github.com/sponsors/raysan5)
|
||||
[](https://repology.org/project/raylib/versions)
|
||||
[](LICENSE)
|
||||
|
|
@ -40,7 +40,7 @@ features
|
|||
- Written in plain C code (C99) using PascalCase/camelCase notation
|
||||
- Hardware accelerated with OpenGL (**1.1, 2.1, 3.3, 4.3, ES 2.0, ES 3.0**)
|
||||
- **Unique OpenGL abstraction layer** (usable as standalone module): [rlgl](https://github.com/raysan5/raylib/blob/master/src/rlgl.h)
|
||||
- Multiple **Fonts** formats supported (TTF, OTF, Image fonts, AngelCode fonts)
|
||||
- Multiple **Fonts** formats supported (TTF, OTF, FNT, BDF, sprite fonts)
|
||||
- Multiple texture formats supported, including **compressed formats** (DXT, ETC, ASTC)
|
||||
- **Full 3D support**, including 3D Shapes, Models, Billboards, Heightmaps and more!
|
||||
- Flexible Materials system, supporting classic maps and **PBR maps**
|
||||
|
|
@ -82,7 +82,7 @@ build and installation
|
|||
|
||||
raylib binary releases for Windows, Linux, macOS, Android and HTML5 are available at the [Github Releases page](https://github.com/raysan5/raylib/releases).
|
||||
|
||||
raylib is also available via multiple [package managers](https://github.com/raysan5/raylib/issues/613) on multiple OS distributions.
|
||||
raylib is also available via multiple package managers on multiple OS distributions.
|
||||
|
||||
#### Installing and building raylib on multiple platforms
|
||||
|
||||
|
|
|
|||
187
build.zig
|
|
@ -2,7 +2,7 @@ const std = @import("std");
|
|||
const builtin = @import("builtin");
|
||||
|
||||
/// Minimum supported version of Zig
|
||||
const min_ver = "0.12.0";
|
||||
const min_ver = "0.13.0";
|
||||
|
||||
comptime {
|
||||
const order = std.SemanticVersion.order;
|
||||
|
|
@ -11,39 +11,7 @@ comptime {
|
|||
@compileError("Raylib requires zig version " ++ min_ver);
|
||||
}
|
||||
|
||||
// NOTE(freakmangd): I don't like using a global here, but it prevents having to
|
||||
// get the flags a second time when adding raygui
|
||||
var raylib_flags_arr: std.ArrayListUnmanaged([]const u8) = .{};
|
||||
|
||||
// This has been tested with zig version 0.12.0
|
||||
pub fn addRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.builtin.OptimizeMode, options: Options) !*std.Build.Step.Compile {
|
||||
const raylib_dep = b.dependencyFromBuildZig(@This(), .{
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
.raudio = options.raudio,
|
||||
.rmodels = options.rmodels,
|
||||
.rshapes = options.rshapes,
|
||||
.rtext = options.rtext,
|
||||
.rtextures = options.rtextures,
|
||||
.platform = options.platform,
|
||||
.shared = options.shared,
|
||||
.linux_display_backend = options.linux_display_backend,
|
||||
.opengl_version = options.opengl_version,
|
||||
.config = options.config,
|
||||
});
|
||||
const raylib = raylib_dep.artifact("raylib");
|
||||
|
||||
if (options.raygui) {
|
||||
const raygui_dep = b.dependency(options.raygui_dependency_name, .{});
|
||||
addRaygui(b, raylib, raygui_dep);
|
||||
}
|
||||
|
||||
return raylib;
|
||||
}
|
||||
|
||||
fn setDesktopPlatform(raylib: *std.Build.Step.Compile, platform: PlatformBackend) void {
|
||||
raylib.defineCMacro("PLATFORM_DESKTOP", null);
|
||||
|
||||
switch (platform) {
|
||||
.glfw => raylib.defineCMacro("PLATFORM_DESKTOP_GLFW", null),
|
||||
.rgfw => raylib.defineCMacro("PLATFORM_DESKTOP_RGFW", null),
|
||||
|
|
@ -52,6 +20,30 @@ fn setDesktopPlatform(raylib: *std.Build.Step.Compile, platform: PlatformBackend
|
|||
}
|
||||
}
|
||||
|
||||
fn createEmsdkStep(b: *std.Build, emsdk: *std.Build.Dependency) *std.Build.Step.Run {
|
||||
if (builtin.os.tag == .windows) {
|
||||
return b.addSystemCommand(&.{emsdk.path("emsdk.bat").getPath(b)});
|
||||
} else {
|
||||
return b.addSystemCommand(&.{emsdk.path("emsdk").getPath(b)});
|
||||
}
|
||||
}
|
||||
|
||||
fn emSdkSetupStep(b: *std.Build, emsdk: *std.Build.Dependency) !?*std.Build.Step.Run {
|
||||
const dot_emsc_path = emsdk.path(".emscripten").getPath(b);
|
||||
const dot_emsc_exists = !std.meta.isError(std.fs.accessAbsolute(dot_emsc_path, .{}));
|
||||
|
||||
if (!dot_emsc_exists) {
|
||||
const emsdk_install = createEmsdkStep(b, emsdk);
|
||||
emsdk_install.addArgs(&.{ "install", "latest" });
|
||||
const emsdk_activate = createEmsdkStep(b, emsdk);
|
||||
emsdk_activate.addArgs(&.{ "activate", "latest" });
|
||||
emsdk_activate.step.dependOn(&emsdk_install.step);
|
||||
return emsdk_activate;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// A list of all flags from `src/config.h` that one may override
|
||||
const config_h_flags = outer: {
|
||||
// Set this value higher if compile errors happen as `src/config.h` gets larger
|
||||
|
|
@ -64,6 +56,7 @@ const config_h_flags = outer: {
|
|||
var lines = std.mem.tokenizeScalar(u8, config_h, '\n');
|
||||
while (lines.next()) |line| {
|
||||
if (!std.mem.containsAtLeast(u8, line, 1, "SUPPORT")) continue;
|
||||
if (std.mem.containsAtLeast(u8, line, 1, "MODULE")) continue;
|
||||
if (std.mem.startsWith(u8, line, "//")) continue;
|
||||
if (std.mem.startsWith(u8, line, "#if")) continue;
|
||||
|
||||
|
|
@ -83,22 +76,26 @@ const config_h_flags = outer: {
|
|||
};
|
||||
|
||||
fn compileRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.builtin.OptimizeMode, options: Options) !*std.Build.Step.Compile {
|
||||
raylib_flags_arr.clearRetainingCapacity();
|
||||
var raylib_flags_arr = std.ArrayList([]const u8).init(b.allocator);
|
||||
defer raylib_flags_arr.deinit();
|
||||
|
||||
const shared_flags = &[_][]const u8{
|
||||
"-fPIC",
|
||||
"-DBUILD_LIBTYPE_SHARED",
|
||||
};
|
||||
try raylib_flags_arr.appendSlice(b.allocator, &[_][]const u8{
|
||||
try raylib_flags_arr.appendSlice(&[_][]const u8{
|
||||
"-std=gnu99",
|
||||
"-D_GNU_SOURCE",
|
||||
"-DGL_SILENCE_DEPRECATION=199309L",
|
||||
"-fno-sanitize=undefined", // https://github.com/raysan5/raylib/issues/3674
|
||||
});
|
||||
if (options.config.len > 0) {
|
||||
// Sets a flag indiciating the use of a custom `config.h`
|
||||
try raylib_flags_arr.append(b.allocator, "-DEXTERNAL_CONFIG_FLAGS");
|
||||
|
||||
if (options.shared) {
|
||||
try raylib_flags_arr.appendSlice(&[_][]const u8{
|
||||
"-fPIC",
|
||||
"-DBUILD_LIBTYPE_SHARED",
|
||||
});
|
||||
}
|
||||
|
||||
// Sets a flag indiciating the use of a custom `config.h`
|
||||
try raylib_flags_arr.append("-DEXTERNAL_CONFIG_FLAGS");
|
||||
if (options.config.len > 0) {
|
||||
// Splits a space-separated list of config flags into multiple flags
|
||||
//
|
||||
// Note: This means certain flags like `-x c++` won't be processed properly.
|
||||
|
|
@ -107,7 +104,7 @@ fn compileRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.
|
|||
|
||||
// Apply config flags supplied by the user
|
||||
while (config_iter.next()) |config_flag|
|
||||
try raylib_flags_arr.append(b.allocator, config_flag);
|
||||
try raylib_flags_arr.append(config_flag);
|
||||
|
||||
// Apply all relevant configs from `src/config.h` *except* the user-specified ones
|
||||
//
|
||||
|
|
@ -116,6 +113,7 @@ fn compileRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.
|
|||
// `n` corresponds to the number of user-specified flags
|
||||
outer: for (config_h_flags) |flag| {
|
||||
// If a user already specified the flag, skip it
|
||||
config_iter.reset();
|
||||
while (config_iter.next()) |config_flag| {
|
||||
// For a user-specified flag to match, it must share the same prefix and have the
|
||||
// same length or be followed by an equals sign
|
||||
|
|
@ -124,12 +122,11 @@ fn compileRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.
|
|||
}
|
||||
|
||||
// Otherwise, append default value from config.h to compile flags
|
||||
try raylib_flags_arr.append(b.allocator, flag);
|
||||
try raylib_flags_arr.append(flag);
|
||||
}
|
||||
}
|
||||
|
||||
if (options.shared) {
|
||||
try raylib_flags_arr.appendSlice(b.allocator, shared_flags);
|
||||
} else {
|
||||
// Set default config if no custome config got set
|
||||
try raylib_flags_arr.appendSlice(&config_h_flags);
|
||||
}
|
||||
|
||||
const raylib = if (options.shared)
|
||||
|
|
@ -154,26 +151,32 @@ fn compileRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.
|
|||
var c_source_files = try std.ArrayList([]const u8).initCapacity(b.allocator, 2);
|
||||
c_source_files.appendSliceAssumeCapacity(&.{ "src/rcore.c", "src/utils.c" });
|
||||
|
||||
if (options.raudio) {
|
||||
try c_source_files.append("src/raudio.c");
|
||||
}
|
||||
if (options.rmodels) {
|
||||
try c_source_files.append("src/rmodels.c");
|
||||
}
|
||||
if (options.rshapes) {
|
||||
try c_source_files.append("src/rshapes.c");
|
||||
}
|
||||
if (options.rtext) {
|
||||
try c_source_files.append("src/rtext.c");
|
||||
try raylib_flags_arr.append("-DSUPPORT_MODULE_RSHAPES");
|
||||
}
|
||||
if (options.rtextures) {
|
||||
try c_source_files.append("src/rtextures.c");
|
||||
try raylib_flags_arr.append("-DSUPPORT_MODULE_RTEXTURES");
|
||||
}
|
||||
if (options.rtext) {
|
||||
try c_source_files.append("src/rtext.c");
|
||||
try raylib_flags_arr.append("-DSUPPORT_MODULE_RTEXT");
|
||||
}
|
||||
if (options.rmodels) {
|
||||
try c_source_files.append("src/rmodels.c");
|
||||
try raylib_flags_arr.append("-DSUPPORT_MODULE_RMODELS");
|
||||
}
|
||||
if (options.raudio) {
|
||||
try c_source_files.append("src/raudio.c");
|
||||
try raylib_flags_arr.append("-DSUPPORT_MODULE_RAUDIO");
|
||||
}
|
||||
|
||||
if (options.opengl_version != .auto) {
|
||||
raylib.defineCMacro(options.opengl_version.toCMacroStr(), null);
|
||||
}
|
||||
|
||||
raylib.addIncludePath(b.path("src/platforms"));
|
||||
switch (target.result.os.tag) {
|
||||
.windows => {
|
||||
try c_source_files.append("src/rglfw.c");
|
||||
|
|
@ -186,16 +189,18 @@ fn compileRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.
|
|||
.linux => {
|
||||
if (options.platform != .drm) {
|
||||
try c_source_files.append("src/rglfw.c");
|
||||
raylib.linkSystemLibrary("GL");
|
||||
raylib.linkSystemLibrary("rt");
|
||||
raylib.linkSystemLibrary("dl");
|
||||
raylib.linkSystemLibrary("m");
|
||||
|
||||
raylib.addLibraryPath(.{ .cwd_relative = "/usr/lib" });
|
||||
raylib.addIncludePath(.{ .cwd_relative = "/usr/include" });
|
||||
if (options.linux_display_backend == .X11 or options.linux_display_backend == .Both) {
|
||||
raylib.defineCMacro("_GLFW_X11", null);
|
||||
raylib.linkSystemLibrary("GLX");
|
||||
raylib.linkSystemLibrary("X11");
|
||||
raylib.linkSystemLibrary("Xcursor");
|
||||
raylib.linkSystemLibrary("Xext");
|
||||
raylib.linkSystemLibrary("Xfixes");
|
||||
raylib.linkSystemLibrary("Xi");
|
||||
raylib.linkSystemLibrary("Xinerama");
|
||||
raylib.linkSystemLibrary("Xrandr");
|
||||
raylib.linkSystemLibrary("Xrender");
|
||||
}
|
||||
|
||||
if (options.linux_display_backend == .Wayland or options.linux_display_backend == .Both) {
|
||||
|
|
@ -207,9 +212,8 @@ fn compileRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.
|
|||
@panic("`wayland-scanner` not found");
|
||||
};
|
||||
raylib.defineCMacro("_GLFW_WAYLAND", null);
|
||||
raylib.linkSystemLibrary("EGL");
|
||||
raylib.linkSystemLibrary("wayland-client");
|
||||
raylib.linkSystemLibrary("wayland-cursor");
|
||||
raylib.linkSystemLibrary("wayland-egl");
|
||||
raylib.linkSystemLibrary("xkbcommon");
|
||||
waylandGenerate(b, raylib, "wayland.xml", "wayland-client-protocol");
|
||||
waylandGenerate(b, raylib, "xdg-shell.xml", "xdg-shell-client-protocol");
|
||||
|
|
@ -221,6 +225,7 @@ fn compileRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.
|
|||
waylandGenerate(b, raylib, "xdg-activation-v1.xml", "xdg-activation-v1-client-protocol");
|
||||
waylandGenerate(b, raylib, "idle-inhibit-unstable-v1.xml", "idle-inhibit-unstable-v1-client-protocol");
|
||||
}
|
||||
|
||||
setDesktopPlatform(raylib, options.platform);
|
||||
} else {
|
||||
if (options.opengl_version == .auto) {
|
||||
|
|
@ -229,13 +234,8 @@ fn compileRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.
|
|||
}
|
||||
|
||||
raylib.linkSystemLibrary("EGL");
|
||||
raylib.linkSystemLibrary("drm");
|
||||
raylib.linkSystemLibrary("gbm");
|
||||
raylib.linkSystemLibrary("pthread");
|
||||
raylib.linkSystemLibrary("rt");
|
||||
raylib.linkSystemLibrary("m");
|
||||
raylib.linkSystemLibrary("dl");
|
||||
raylib.addIncludePath(.{ .cwd_relative = "/usr/include/libdrm" });
|
||||
raylib.linkSystemLibrary2("libdrm", .{ .use_pkg_config = .force });
|
||||
|
||||
raylib.defineCMacro("PLATFORM_DRM", null);
|
||||
raylib.defineCMacro("EGL_NO_X11", null);
|
||||
|
|
@ -258,8 +258,15 @@ fn compileRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.
|
|||
setDesktopPlatform(raylib, options.platform);
|
||||
},
|
||||
.macos => {
|
||||
// Include xcode_frameworks for cross compilation
|
||||
if (b.lazyDependency("xcode_frameworks", .{})) |dep| {
|
||||
raylib.addSystemFrameworkPath(dep.path("Frameworks"));
|
||||
raylib.addSystemIncludePath(dep.path("include"));
|
||||
raylib.addLibraryPath(dep.path("lib"));
|
||||
}
|
||||
|
||||
// On macos rglfw.c include Objective-C files.
|
||||
try raylib_flags_arr.append(b.allocator, "-ObjC");
|
||||
try raylib_flags_arr.append("-ObjC");
|
||||
raylib.root_module.addCSourceFile(.{
|
||||
.file = b.path("src/rglfw.c"),
|
||||
.flags = raylib_flags_arr.items,
|
||||
|
|
@ -274,20 +281,19 @@ fn compileRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.
|
|||
setDesktopPlatform(raylib, options.platform);
|
||||
},
|
||||
.emscripten => {
|
||||
// Include emscripten for cross compilation
|
||||
if (b.lazyDependency("emsdk", .{})) |dep| {
|
||||
if (try emSdkSetupStep(b, dep)) |emSdkStep| {
|
||||
raylib.step.dependOn(&emSdkStep.step);
|
||||
}
|
||||
|
||||
raylib.addIncludePath(dep.path("upstream/emscripten/cache/sysroot/include"));
|
||||
}
|
||||
|
||||
raylib.defineCMacro("PLATFORM_WEB", null);
|
||||
if (options.opengl_version == .auto) {
|
||||
raylib.defineCMacro("GRAPHICS_API_OPENGL_ES2", null);
|
||||
}
|
||||
|
||||
if (b.sysroot == null) {
|
||||
@panic("Pass '--sysroot \"$EMSDK/upstream/emscripten\"'");
|
||||
}
|
||||
|
||||
const cache_include = b.pathJoin(&.{ b.sysroot.?, "cache", "sysroot", "include" });
|
||||
|
||||
var dir = std.fs.openDirAbsolute(cache_include, std.fs.Dir.OpenDirOptions{ .access_sub_paths = true, .no_follow = true }) catch @panic("No emscripten cache. Generate it!");
|
||||
dir.close();
|
||||
raylib.addIncludePath(.{ .cwd_relative = cache_include });
|
||||
},
|
||||
else => {
|
||||
@panic("Unsupported OS");
|
||||
|
|
@ -302,20 +308,15 @@ fn compileRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.
|
|||
return raylib;
|
||||
}
|
||||
|
||||
/// This function does not need to be called if you passed .raygui = true to addRaylib
|
||||
pub fn addRaygui(b: *std.Build, raylib: *std.Build.Step.Compile, raygui_dep: *std.Build.Dependency) void {
|
||||
if (raylib_flags_arr.items.len == 0) {
|
||||
@panic(
|
||||
\\argument 2 `raylib` in `addRaygui` must come from b.dependency("raylib", ...).artifact("raylib")
|
||||
);
|
||||
}
|
||||
|
||||
const raylib_dep = b.dependencyFromBuildZig(@This(), .{});
|
||||
var gen_step = b.addWriteFiles();
|
||||
raylib.step.dependOn(&gen_step.step);
|
||||
|
||||
const raygui_c_path = gen_step.add("raygui.c", "#define RAYGUI_IMPLEMENTATION\n#include \"raygui.h\"\n");
|
||||
raylib.addCSourceFile(.{ .file = raygui_c_path, .flags = raylib_flags_arr.items });
|
||||
raylib.addCSourceFile(.{ .file = raygui_c_path });
|
||||
raylib.addIncludePath(raygui_dep.path("src"));
|
||||
raylib.addIncludePath(raylib_dep.path("src"));
|
||||
|
||||
raylib.installHeader(raygui_dep.path("src/raygui.h"), "raygui.h");
|
||||
}
|
||||
|
|
@ -326,7 +327,6 @@ pub const Options = struct {
|
|||
rshapes: bool = true,
|
||||
rtext: bool = true,
|
||||
rtextures: bool = true,
|
||||
raygui: bool = false,
|
||||
platform: PlatformBackend = .glfw,
|
||||
shared: bool = false,
|
||||
linux_display_backend: LinuxDisplayBackend = .Both,
|
||||
|
|
@ -334,15 +334,12 @@ pub const Options = struct {
|
|||
/// config should be a list of space-separated cflags, eg, "-DSUPPORT_CUSTOM_FRAME_CONTROL"
|
||||
config: []const u8 = &.{},
|
||||
|
||||
raygui_dependency_name: []const u8 = "raygui",
|
||||
|
||||
const defaults = Options{};
|
||||
|
||||
fn getOptions(b: *std.Build) Options {
|
||||
pub fn getOptions(b: *std.Build) Options {
|
||||
return .{
|
||||
.platform = b.option(PlatformBackend, "platform", "Choose the platform backedn for desktop target") orelse defaults.platform,
|
||||
.raudio = b.option(bool, "raudio", "Compile with audio support") orelse defaults.raudio,
|
||||
.raygui = b.option(bool, "raygui", "Compile with raygui support") orelse defaults.raygui,
|
||||
.rmodels = b.option(bool, "rmodels", "Compile with models support") orelse defaults.rmodels,
|
||||
.rtext = b.option(bool, "rtext", "Compile with text support") orelse defaults.rtext,
|
||||
.rtextures = b.option(bool, "rtextures", "Compile with textures support") orelse defaults.rtextures,
|
||||
|
|
|
|||
24
build.zig.zon
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
.{
|
||||
.name = "raylib",
|
||||
.version = "5.5.0",
|
||||
.minimum_zig_version = "0.13.0",
|
||||
|
||||
.dependencies = .{
|
||||
.xcode_frameworks = .{
|
||||
.url = "git+https://github.com/hexops/xcode-frameworks#a6bf82e032d4d9923ad5c222d466710fcc05f249",
|
||||
.hash = "12208da4dfcd9b53fb367375fb612ec73f38e53015f1ce6ae6d6e8437a637078e170",
|
||||
.lazy = true,
|
||||
},
|
||||
.emsdk = .{
|
||||
.url = "git+https://github.com/emscripten-core/emsdk#3.1.50",
|
||||
.hash = "1220e8fe9509f0843e5e22326300ca415c27afbfbba3992f3c3184d71613540b5564",
|
||||
.lazy = true,
|
||||
},
|
||||
},
|
||||
|
||||
.paths = .{
|
||||
"build.zig",
|
||||
"build.zig.zon",
|
||||
"src",
|
||||
},
|
||||
}
|
||||
|
|
@ -12,6 +12,7 @@ endif()
|
|||
# Also adding only on desktop (web also uses glfw but it is more limited and is added using an emcc linker flag)
|
||||
if(NOT glfw3_FOUND AND NOT USE_EXTERNAL_GLFW STREQUAL "ON" AND "${PLATFORM}" MATCHES "Desktop")
|
||||
MESSAGE(STATUS "Using raylib's GLFW")
|
||||
set(INTERNAL_GLFW ON CACHE INTERNAL "" FORCE)
|
||||
set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE)
|
||||
set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE)
|
||||
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
|
||||
|
|
@ -19,6 +20,11 @@ if(NOT glfw3_FOUND AND NOT USE_EXTERNAL_GLFW STREQUAL "ON" AND "${PLATFORM}" MAT
|
|||
set(GLFW_LIBRARY_TYPE "OBJECT" CACHE STRING "" FORCE)
|
||||
|
||||
|
||||
if (NOT BUILD_SHARED_LIBS)
|
||||
message(STATUS "Enabling install of GLFW static libs because raylib will be built statically")
|
||||
set(GLFW_INSTALL ON CACHE BOOL "" FORCE)
|
||||
endif ()
|
||||
|
||||
add_subdirectory(external/glfw)
|
||||
|
||||
# Hide glfw's symbols when building a shared lib
|
||||
|
|
|
|||
|
|
@ -18,10 +18,8 @@ endif ()
|
|||
join_paths(libdir_for_pc_file "\${exec_prefix}" "${CMAKE_INSTALL_LIBDIR}")
|
||||
join_paths(includedir_for_pc_file "\${prefix}" "${CMAKE_INSTALL_INCLUDEDIR}")
|
||||
configure_file(../raylib.pc.in raylib.pc @ONLY)
|
||||
configure_file(../cmake/raylib-config-version.cmake raylib-config-version.cmake @ONLY)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/raylib.pc DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/raylib-config-version.cmake DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/raylib")
|
||||
install(FILES ${PROJECT_SOURCE_DIR}/../cmake/raylib-config.cmake DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/raylib")
|
||||
include(SetupCmakeConfig)
|
||||
|
||||
# populates raylib_{FOUND, INCLUDE_DIRS, LIBRARIES, LDFLAGS, DEFINITIONS}
|
||||
include(PopulateConfigVariablesLocally)
|
||||
|
|
|
|||
|
|
@ -125,7 +125,3 @@ if (NOT GRAPHICS)
|
|||
endif ()
|
||||
|
||||
set(LIBS_PRIVATE ${LIBS_PRIVATE} ${OPENAL_LIBRARY})
|
||||
|
||||
if (${PLATFORM} MATCHES "Desktop")
|
||||
set(LIBS_PRIVATE ${LIBS_PRIVATE} glfw)
|
||||
endif ()
|
||||
|
|
|
|||
23
cmake/SetupCmakeConfig.cmake
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
include(CMakePackageConfigHelpers)
|
||||
include(GNUInstallDirs)
|
||||
|
||||
# Setup install of exported targets
|
||||
install(EXPORT raylib-targets
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/raylib
|
||||
)
|
||||
|
||||
# Macro to write config
|
||||
write_basic_package_version_file(
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/raylib-config-version.cmake"
|
||||
VERSION ${raylib_VERSION}
|
||||
COMPATIBILITY SameMajorVersion
|
||||
)
|
||||
|
||||
# Setup install of version config
|
||||
install(
|
||||
FILES
|
||||
"../cmake/raylib-config.cmake"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/raylib-config-version.cmake"
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_LIBDIR}/cmake/raylib
|
||||
)
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
set(PACKAGE_VERSION "@PROJECT_VERSION@")
|
||||
|
||||
if(PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION)
|
||||
set(PACKAGE_VERSION_EXACT TRUE)
|
||||
endif()
|
||||
if(NOT PACKAGE_FIND_VERSION VERSION_GREATER PACKAGE_VERSION)
|
||||
set(PACKAGE_VERSION_COMPATIBLE TRUE)
|
||||
else(NOT PACKAGE_FIND_VERSION VERSION_GREATER PACKAGE_VERSION)
|
||||
set(PACKAGE_VERSION_UNSUITABLE TRUE)
|
||||
endif(NOT PACKAGE_FIND_VERSION VERSION_GREATER PACKAGE_VERSION)
|
||||
|
||||
# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:
|
||||
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "@CMAKE_SIZEOF_VOID_P@" STREQUAL "")
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "@CMAKE_SIZEOF_VOID_P@")
|
||||
math(EXPR installedBits "8 * 8")
|
||||
set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)")
|
||||
set(PACKAGE_VERSION_UNSUITABLE TRUE)
|
||||
endif()
|
||||
|
|
@ -1,79 +1 @@
|
|||
# - Try to find raylib
|
||||
# Options:
|
||||
# raylib_USE_STATIC_LIBS - OFF by default
|
||||
# raylib_VERBOSE - OFF by default
|
||||
# Once done, this defines a raylib target that can be passed to
|
||||
# target_link_libraries as well as following variables:
|
||||
#
|
||||
# raylib_FOUND - System has raylib installed
|
||||
# raylib_INCLUDE_DIRS - The include directories for the raylib header(s)
|
||||
# raylib_LIBRARIES - The libraries needed to use raylib
|
||||
# raylib_LDFLAGS - The linker flags needed with raylib
|
||||
# raylib_DEFINITIONS - Compiler switches required for using raylib
|
||||
|
||||
if (NOT TARGET raylib)
|
||||
set(XPREFIX PC_RAYLIB)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_check_modules(${XPREFIX} QUIET raylib)
|
||||
|
||||
if (raylib_USE_STATIC_LIBS)
|
||||
set(XPREFIX ${XPREFIX}_STATIC)
|
||||
endif()
|
||||
|
||||
set(raylib_DEFINITIONS ${${XPREFIX}_CFLAGS})
|
||||
|
||||
find_path(raylib_INCLUDE_DIR
|
||||
NAMES raylib.h
|
||||
HINTS ${${XPREFIX}_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
set(RAYLIB_NAMES raylib)
|
||||
|
||||
if (raylib_USE_STATIC_LIBS)
|
||||
set(RAYLIB_NAMES libraylib.a raylib.lib ${RAYLIB_NAMES})
|
||||
endif()
|
||||
|
||||
find_library(raylib_LIBRARY
|
||||
NAMES ${RAYLIB_NAMES}
|
||||
HINTS ${${XPREFIX}_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
set(raylib_LIBRARIES ${raylib_LIBRARY})
|
||||
set(raylib_LIBRARY_DIRS ${${XPREFIX}_LIBRARY_DIRS})
|
||||
set(raylib_LIBRARY_DIR ${raylib_LIBRARY_DIRS})
|
||||
set(raylib_INCLUDE_DIRS ${raylib_INCLUDE_DIR})
|
||||
set(raylib_LDFLAGS ${${XPREFIX}_LDFLAGS})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(raylib DEFAULT_MSG
|
||||
raylib_LIBRARY
|
||||
raylib_INCLUDE_DIR
|
||||
)
|
||||
|
||||
mark_as_advanced(raylib_LIBRARY raylib_INCLUDE_DIR)
|
||||
|
||||
if (raylib_USE_STATIC_LIBS)
|
||||
add_library(raylib STATIC IMPORTED GLOBAL)
|
||||
else()
|
||||
add_library(raylib SHARED IMPORTED GLOBAL)
|
||||
endif()
|
||||
string (REPLACE ";" " " raylib_LDFLAGS "${raylib_LDFLAGS}")
|
||||
|
||||
set_target_properties(raylib
|
||||
PROPERTIES
|
||||
IMPORTED_LOCATION "${raylib_LIBRARIES}"
|
||||
IMPORTED_IMPLIB "${raylib_LIBRARIES}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${raylib_INCLUDE_DIRS}"
|
||||
INTERFACE_LINK_LIBRARIES "${raylib_LDFLAGS}"
|
||||
INTERFACE_COMPILE_OPTIONS "${raylib_DEFINITIONS}"
|
||||
)
|
||||
|
||||
if (raylib_VERBOSE)
|
||||
message(STATUS "raylib_FOUND: ${raylib_FOUND}")
|
||||
message(STATUS "raylib_INCLUDE_DIRS: ${raylib_INCLUDE_DIRS}")
|
||||
message(STATUS "raylib_LIBRARIES: ${raylib_LIBRARIES}")
|
||||
message(STATUS "raylib_LDFLAGS: ${raylib_LDFLAGS}")
|
||||
message(STATUS "raylib_DEFINITIONS: ${raylib_DEFINITIONS}")
|
||||
endif()
|
||||
endif()
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/raylib-targets.cmake")
|
||||
|
|
|
|||
|
|
@ -87,6 +87,8 @@ USE_EXTERNAL_GLFW ?= FALSE
|
|||
# WARNING: Library is not included in raylib, it MUST be configured by users
|
||||
SDL_INCLUDE_PATH ?= $(RAYLIB_SRC_PATH)/external/SDL2/include
|
||||
SDL_LIBRARY_PATH ?= $(RAYLIB_SRC_PATH)/external/SDL2/lib
|
||||
SDL_LIBRARIES ?= -lSDL2 -lSDL2main
|
||||
|
||||
|
||||
# Use Wayland display server protocol on Linux desktop (by default it uses X11 windowing system)
|
||||
# NOTE: This variable is only used for PLATFORM_OS: LINUX
|
||||
|
|
@ -154,11 +156,11 @@ RAYLIB_RELEASE_PATH ?= $(RAYLIB_PATH)/src
|
|||
ifeq ($(TARGET_PLATFORM),PLATFORM_WEB)
|
||||
ifeq ($(PLATFORM_OS),WINDOWS)
|
||||
# Emscripten required variables
|
||||
EMSDK_PATH ?= C:/emsdk
|
||||
EMSDK_PATH ?= C:/raylib/emsdk
|
||||
EMSCRIPTEN_PATH ?= $(EMSDK_PATH)/upstream/emscripten
|
||||
CLANG_PATH = $(EMSDK_PATH)/upstream/bin
|
||||
PYTHON_PATH = $(EMSDK_PATH)/python/3.9.2-1_64bit
|
||||
NODE_PATH = $(EMSDK_PATH)/node/14.15.5_64bit/bin
|
||||
PYTHON_PATH = $(EMSDK_PATH)/python/3.9.2-nuget_64bit
|
||||
NODE_PATH = $(EMSDK_PATH)/node/20.18.0_64bit/bin
|
||||
export PATH = $(EMSDK_PATH);$(EMSCRIPTEN_PATH);$(CLANG_PATH);$(NODE_PATH);$(PYTHON_PATH):$$(PATH)
|
||||
endif
|
||||
endif
|
||||
|
|
@ -197,7 +199,16 @@ ifeq ($(TARGET_PLATFORM),PLATFORM_ANDROID)
|
|||
MAKE = mingw32-make
|
||||
endif
|
||||
ifeq ($(TARGET_PLATFORM),PLATFORM_WEB)
|
||||
ifeq ($(OS),Windows_NT)
|
||||
MAKE = mingw32-make
|
||||
else
|
||||
EMMAKE != type emmake
|
||||
ifneq (, $(EMMAKE))
|
||||
MAKE = emmake make
|
||||
else
|
||||
MAKE = mingw32-make
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# Define compiler flags: CFLAGS
|
||||
|
|
@ -254,12 +265,12 @@ endif
|
|||
# Define include paths for required headers: INCLUDE_PATHS
|
||||
# NOTE: Some external/extras libraries could be required (stb, easings...)
|
||||
#------------------------------------------------------------------------------------------------
|
||||
INCLUDE_PATHS = -I. -I$(RAYLIB_PATH)/src -I$(RAYLIB_PATH)/src/external
|
||||
|
||||
INCLUDE_PATHS = -I. -I$(RAYLIB_PATH)/src -I$(RAYLIB_PATH)/src/external $(EXTRA_INCLUDE_PATHS)
|
||||
# Define additional directories containing required header files
|
||||
|
||||
ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW)
|
||||
ifeq ($(PLATFORM_OS),BSD)
|
||||
INCLUDE_PATHS += -I$(RAYLIB_INCLUDE_PATH)
|
||||
INCLUDE_PATHS += -I$(RAYLIB_INCLUDE_PATH) -I/usr/pkg/include -I/usr/X11R7/include
|
||||
endif
|
||||
ifeq ($(PLATFORM_OS),LINUX)
|
||||
INCLUDE_PATHS += -I$(RAYLIB_INCLUDE_PATH)
|
||||
|
|
@ -392,7 +403,8 @@ ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW)
|
|||
ifeq ($(PLATFORM_OS),BSD)
|
||||
# Libraries for FreeBSD, OpenBSD, NetBSD, DragonFly desktop compiling
|
||||
# NOTE: Required packages: mesa-libs
|
||||
LDLIBS = -lraylib -lGL -lpthread -lm
|
||||
LDFLAGS += -L/usr/X11R7/lib -Wl,-R/usr/X11R7/lib
|
||||
LDLIBS = -lraylib -lGL -lm -lpthread
|
||||
|
||||
# On XWindow requires also below libraries
|
||||
LDLIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor
|
||||
|
|
@ -405,12 +417,12 @@ endif
|
|||
ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_SDL)
|
||||
ifeq ($(PLATFORM_OS),WINDOWS)
|
||||
# Libraries for Windows desktop compilation
|
||||
LDLIBS = -lraylib -lSDL2 -lSDL2main -lopengl32 -lgdi32
|
||||
LDLIBS = -lraylib $(SDL_LIBRARIES) -lopengl32 -lgdi32
|
||||
endif
|
||||
ifeq ($(PLATFORM_OS),LINUX)
|
||||
# Libraries for Debian GNU/Linux desktop compiling
|
||||
# NOTE: Required packages: libegl1-mesa-dev
|
||||
LDLIBS = -lraylib -lSDL2 -lSDL2main -lGL -lm -lpthread -ldl -lrt
|
||||
LDLIBS = -lraylib $(SDL_LIBRARIES) -lGL -lm -lpthread -ldl -lrt
|
||||
|
||||
# On X11 requires also below libraries
|
||||
LDLIBS += -lX11
|
||||
|
|
@ -433,12 +445,14 @@ endif
|
|||
ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_RGFW)
|
||||
ifeq ($(PLATFORM_OS),WINDOWS)
|
||||
# Libraries for Windows desktop compilation
|
||||
LDLIBS = ..\src\libraylib.a -lgdi32 -lwinmm -lopengl32
|
||||
LDFLAGS += -L..\src
|
||||
LDLIBS = -lraylib -lgdi32 -lwinmm -lopengl32
|
||||
endif
|
||||
ifeq ($(PLATFORM_OS),LINUX)
|
||||
# Libraries for Debian GNU/Linux desktop compipling
|
||||
# NOTE: Required packages: libegl1-mesa-dev
|
||||
LDLIBS = ../src/libraylib.a -lGL -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor -lm -lpthread -ldl -lrt
|
||||
LDFLAGS += -L../src
|
||||
LDLIBS = -lraylib -lGL -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor -lm -lpthread -ldl -lrt
|
||||
|
||||
# Explicit link to libc
|
||||
ifeq ($(RAYLIB_LIBTYPE),SHARED)
|
||||
|
|
@ -451,7 +465,8 @@ ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_RGFW)
|
|||
ifeq ($(PLATFORM_OS),OSX)
|
||||
# Libraries for Debian GNU/Linux desktop compiling
|
||||
# NOTE: Required packages: libegl1-mesa-dev
|
||||
LDLIBS = ../src/libraylib.a -lm
|
||||
LDFLAGS += -L../src
|
||||
LDLIBS = -lraylib -lm
|
||||
LDLIBS += -framework Foundation -framework AppKit -framework OpenGL -framework CoreVideo
|
||||
endif
|
||||
endif
|
||||
|
|
@ -522,7 +537,8 @@ SHAPES = \
|
|||
shapes/shapes_logo_raylib_anim \
|
||||
shapes/shapes_rectangle_scaling \
|
||||
shapes/shapes_splines_drawing \
|
||||
shapes/shapes_top_down_lights
|
||||
shapes/shapes_top_down_lights \
|
||||
shapes/shapes_rectangle_advanced
|
||||
|
||||
TEXTURES = \
|
||||
textures/textures_background_scrolling \
|
||||
|
|
@ -632,8 +648,12 @@ OTHERS = \
|
|||
others/embedded_files_loading \
|
||||
others/raylib_opengl_interop \
|
||||
others/raymath_vector_angle \
|
||||
others/rlgl_compute_shader \
|
||||
others/rlgl_standalone
|
||||
others/rlgl_compute_shader
|
||||
|
||||
ifeq ($(TARGET_PLATFORM), PLATFORM_DESKTOP_GFLW)
|
||||
OTHERS += others/rlgl_standalone
|
||||
endif
|
||||
|
||||
|
||||
CURRENT_MAKEFILE = $(lastword $(MAKEFILE_LIST))
|
||||
|
||||
|
|
@ -668,6 +688,10 @@ ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW)
|
|||
ifeq ($(PLATFORM_OS),WINDOWS)
|
||||
del *.o *.exe /s
|
||||
endif
|
||||
ifeq ($(PLATFORM_OS),BSD)
|
||||
find . -type f -perm -ugo+x -delete
|
||||
rm -fv *.o
|
||||
endif
|
||||
ifeq ($(PLATFORM_OS),LINUX)
|
||||
find . -type f -executable -delete
|
||||
rm -fv *.o
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#**************************************************************************************************
|
||||
#
|
||||
# raylib makefile for Desktop platforms, Raspberry Pi, Android and HTML5
|
||||
# raylib makefile for Web platform
|
||||
#
|
||||
# Copyright (c) 2013-2024 Ramon Santamaria (@raysan5)
|
||||
#
|
||||
|
|
@ -30,9 +30,12 @@ PLATFORM ?= PLATFORM_WEB
|
|||
|
||||
# Define required raylib variables
|
||||
PROJECT_NAME ?= raylib_examples
|
||||
RAYLIB_VERSION ?= 5.0.0
|
||||
RAYLIB_VERSION ?= 5.5.0
|
||||
RAYLIB_PATH ?= ..
|
||||
|
||||
# Define raylib source code path
|
||||
RAYLIB_SRC_PATH ?= ../src
|
||||
|
||||
# Locations of raylib.h and libraylib.a/libraylib.so
|
||||
# NOTE: Those variables are only used for PLATFORM_OS: LINUX, BSD
|
||||
DESTDIR ?= /usr/local
|
||||
|
|
@ -52,6 +55,15 @@ USE_EXTERNAL_GLFW ?= FALSE
|
|||
# NOTE: This variable is only used for PLATFORM_OS: LINUX
|
||||
USE_WAYLAND_DISPLAY ?= FALSE
|
||||
|
||||
# PLATFORM_WEB: Default properties
|
||||
BUILD_WEB_ASYNCIFY ?= TRUE
|
||||
BUILD_WEB_SHELL ?= $(RAYLIB_PATH)/src/shell.html
|
||||
BUILD_WEB_HEAP_SIZE ?= 134217728
|
||||
|
||||
# Use WebGL2 backend (OpenGL 3.0)
|
||||
# WARNING: Requires raylib compiled with GRAPHICS_API_OPENGL_ES3
|
||||
USE_WEBGL2 ?= FALSE
|
||||
|
||||
# Determine PLATFORM_OS in case PLATFORM_DESKTOP or PLATFORM_WEB selected
|
||||
ifeq ($(PLATFORM),$(filter $(PLATFORM),PLATFORM_DESKTOP PLATFORM_WEB))
|
||||
# No uname.exe on MinGW!, but OS=Windows_NT on Windows!
|
||||
|
|
@ -107,11 +119,11 @@ RAYLIB_RELEASE_PATH ?= $(RAYLIB_PATH)/src
|
|||
ifeq ($(PLATFORM),PLATFORM_WEB)
|
||||
ifeq ($(PLATFORM_OS),WINDOWS)
|
||||
# Emscripten required variables
|
||||
EMSDK_PATH ?= C:/emsdk
|
||||
EMSDK_PATH ?= C:/raylib/emsdk
|
||||
EMSCRIPTEN_PATH ?= $(EMSDK_PATH)/upstream/emscripten
|
||||
CLANG_PATH = $(EMSDK_PATH)/upstream/bin
|
||||
PYTHON_PATH = $(EMSDK_PATH)/python/3.9.2-1_64bit
|
||||
NODE_PATH = $(EMSDK_PATH)/node/14.15.5_64bit/bin
|
||||
PYTHON_PATH = $(EMSDK_PATH)/python/3.9.2-nuget_64bit
|
||||
NODE_PATH = $(EMSDK_PATH)/node/20.18.0_64bit/bin
|
||||
export PATH = $(EMSDK_PATH);$(EMSCRIPTEN_PATH);$(CLANG_PATH);$(NODE_PATH);$(PYTHON_PATH):$$(PATH)
|
||||
endif
|
||||
endif
|
||||
|
|
@ -139,7 +151,7 @@ endif
|
|||
|
||||
# Define default make program: MAKE
|
||||
#------------------------------------------------------------------------------------------------
|
||||
MAKE ?= emmake make
|
||||
MAKE ?= make
|
||||
|
||||
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||
ifeq ($(PLATFORM_OS),WINDOWS)
|
||||
|
|
@ -149,8 +161,17 @@ endif
|
|||
ifeq ($(PLATFORM),PLATFORM_ANDROID)
|
||||
MAKE = mingw32-make
|
||||
endif
|
||||
ifeq ($(PLATFORM),PLATFORM_WEB)
|
||||
ifeq ($(TARGET_PLATFORM),PLATFORM_WEB)
|
||||
ifeq ($(OS),Windows_NT)
|
||||
MAKE = mingw32-make
|
||||
else
|
||||
EMMAKE != type emmake
|
||||
ifneq (, $(EMMAKE))
|
||||
MAKE = emmake make
|
||||
else
|
||||
MAKE = mingw32-make
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# Define compiler flags: CFLAGS
|
||||
|
|
@ -253,25 +274,38 @@ ifeq ($(PLATFORM),PLATFORM_WEB)
|
|||
# -sASYNCIFY # lets synchronous C/C++ code interact with asynchronous JS
|
||||
# -sFORCE_FILESYSTEM=1 # force filesystem to load/save files data
|
||||
# -sASSERTIONS=1 # enable runtime checks for common memory allocation errors (-O1 and above turn it off)
|
||||
# -sEXPORTED_RUNTIME_METHODS=ccall # require exporting some LEGACY_RUNTIME functions, ccall() is required by miniaudio
|
||||
# -sGL_ENABLE_GET_PROC_ADDRESS # enable using the *glGetProcAddress() family of functions, required for extensions loading
|
||||
# --profiling # include information for code profiling
|
||||
# --memory-init-file 0 # to avoid an external memory initialization code file (.mem)
|
||||
# --preload-file resources # specify a resources folder for data compilation
|
||||
# --source-map-base # allow debugging in browser with source map
|
||||
LDFLAGS += -sUSE_GLFW=3 -sASYNCIFY -sEXPORTED_RUNTIME_METHODS=ccall
|
||||
LDFLAGS += -sUSE_GLFW=3 -sEXPORTED_RUNTIME_METHODS=ccall
|
||||
|
||||
# Build using asyncify
|
||||
ifeq ($(BUILD_WEB_ASYNCIFY),TRUE)
|
||||
LDFLAGS += -sASYNCIFY
|
||||
endif
|
||||
|
||||
# NOTE: Flags required for WebGL 2.0 (OpenGL ES 3.0)
|
||||
# WARNING: Requires raylib compiled with GRAPHICS_API_OPENGL_ES3
|
||||
ifeq ($(USE_WEBGL2),TRUE)
|
||||
LDFLAGS += -sMIN_WEBGL_VERSION=2 -sMAX_WEBGL_VERSION=2
|
||||
endif
|
||||
|
||||
# Add debug mode flags if required
|
||||
ifeq ($(BUILD_MODE),DEBUG)
|
||||
LDFLAGS += -sASSERTIONS=1 --profiling
|
||||
endif
|
||||
|
||||
# Define a custom shell .html and output extension
|
||||
LDFLAGS += --shell-file $(BUILD_WEB_SHELL)
|
||||
EXT = .html
|
||||
|
||||
# NOTE: Simple raylib examples are compiled to be interpreter with asyncify, that way,
|
||||
# we can compile same code for ALL platforms with no change required, but, working on bigger
|
||||
# projects, code needs to be refactored to avoid a blocking while() loop, moving Update and Draw
|
||||
# logic to a self contained function: UpdateDrawFrame(), check core_basic_window_web.c for reference.
|
||||
|
||||
# NOTE: Additional compilate flags for TOTAL_MEMORY, FORCE_FILESYSTEM and resources loading
|
||||
# are specified per-example for optimization
|
||||
|
||||
# Define a custom shell .html and output extension
|
||||
LDFLAGS += --shell-file $(RAYLIB_PATH)/src/shell.html
|
||||
EXT = .html
|
||||
endif
|
||||
|
||||
# Define libraries required on linking: LDLIBS
|
||||
|
|
@ -313,7 +347,8 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
|||
ifeq ($(PLATFORM_OS),BSD)
|
||||
# Libraries for FreeBSD, OpenBSD, NetBSD, DragonFly desktop compiling
|
||||
# NOTE: Required packages: mesa-libs
|
||||
LDLIBS = -lraylib -lGL -lpthread -lm
|
||||
LDFLAGS += -L/usr/X11R7/lib -Wl,-R/usr/X11R7/lib
|
||||
LDLIBS = -lraylib -lGL -lm -lpthread
|
||||
|
||||
# On XWindow requires also below libraries
|
||||
LDLIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor
|
||||
|
|
@ -348,6 +383,7 @@ CORE = \
|
|||
core/core_automation_events \
|
||||
core/core_basic_screen_manager \
|
||||
core/core_basic_window \
|
||||
core/core_basic_window_web \
|
||||
core/core_custom_frame_control \
|
||||
core/core_custom_logging \
|
||||
core/core_drop_files \
|
||||
|
|
@ -389,7 +425,8 @@ SHAPES = \
|
|||
shapes/shapes_logo_raylib_anim \
|
||||
shapes/shapes_rectangle_scaling \
|
||||
shapes/shapes_splines_drawing \
|
||||
shapes/shapes_top_down_lights
|
||||
shapes/shapes_top_down_lights \
|
||||
shapes/shapes_rectangle_advanced
|
||||
|
||||
TEXTURES = \
|
||||
textures/textures_background_scrolling \
|
||||
|
|
@ -398,6 +435,7 @@ TEXTURES = \
|
|||
textures/textures_draw_tiled \
|
||||
textures/textures_fog_of_war \
|
||||
textures/textures_gif_player \
|
||||
textures/textures_image_channel \
|
||||
textures/textures_image_drawing \
|
||||
textures/textures_image_generation \
|
||||
textures/textures_image_kernel \
|
||||
|
|
@ -434,7 +472,9 @@ TEXT = \
|
|||
|
||||
MODELS = \
|
||||
models/models_animation \
|
||||
models/models_gpu_skinning \
|
||||
models/models_billboard \
|
||||
models/models_bone_socket \
|
||||
models/models_box_collisions \
|
||||
models/models_cubicmap \
|
||||
models/models_draw_cube_texture \
|
||||
|
|
@ -456,6 +496,7 @@ MODELS = \
|
|||
|
||||
SHADERS = \
|
||||
shaders/shaders_basic_lighting \
|
||||
shaders/shaders_basic_pbr \
|
||||
shaders/shaders_custom_uniform \
|
||||
shaders/shaders_deferred_render \
|
||||
shaders/shaders_eratosthenes \
|
||||
|
|
@ -547,6 +588,9 @@ core/core_automation_events : core/core_automation_events.c
|
|||
core/core_basic_window: core/core_basic_window.c
|
||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
|
||||
|
||||
core/core_basic_window_web: core/core_basic_window_web.c
|
||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
|
||||
|
||||
core/core_basic_screen_manager: core/core_basic_screen_manager.c
|
||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
|
||||
|
||||
|
|
@ -585,6 +629,9 @@ core/core_input_mouse_wheel: core/core_input_mouse_wheel.c
|
|||
core/core_input_multitouch: core/core_input_multitouch.c
|
||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
|
||||
|
||||
core/core_input_virtual_controls: core/core_input_virtual_controls.c
|
||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
|
||||
|
||||
# NOTE: To use multi-threading raylib must be compiled with multi-theading support (-s USE_PTHREADS=1)
|
||||
# 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)
|
||||
|
|
@ -676,6 +723,9 @@ shapes/shapes_splines_drawing: shapes/shapes_splines_drawing.c
|
|||
shapes/shapes_top_down_lights: shapes/shapes_top_down_lights.c
|
||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
|
||||
|
||||
shapes/shapes_rectangle_advanced: shapes/shapes_rectangle_advanced.c
|
||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
|
||||
|
||||
|
||||
# Compile TEXTURES examples
|
||||
textures/textures_background_scrolling: textures/textures_background_scrolling.c
|
||||
|
|
@ -704,6 +754,10 @@ textures/textures_gif_player: textures/textures_gif_player.c
|
|||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
|
||||
--preload-file textures/resources/scarfy_run.gif@resources/scarfy_run.gif
|
||||
|
||||
textures/textures_image_channel: textures/textures_image_channel.c
|
||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
|
||||
--preload-file textures/resources/fudesumi.png@resources/fudesumi.png
|
||||
|
||||
textures/textures_image_drawing: textures/textures_image_drawing.c
|
||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
|
||||
--preload-file textures/resources/custom_jupiter_crash.png@resources/custom_jupiter_crash.png \
|
||||
|
|
@ -854,10 +908,23 @@ models/models_animation: models/models_animation.c
|
|||
--preload-file models/resources/models/iqm/guytex.png@resources/models/iqm/guytex.png \
|
||||
--preload-file models/resources/models/iqm/guyanim.iqm@resources/models/iqm/guyanim.iqm
|
||||
|
||||
models/models_gpu_skinning: models/models_gpu_skinning.c
|
||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) -sTOTAL_MEMORY=67108864 \
|
||||
--preload-file models/resources/models/gltf/greenman.glb@resources/models/gltf/greenman.glb \
|
||||
--preload-file models/resources/shaders/glsl100/skinning.vs@resources/shaders/glsl100/skinning.vs \
|
||||
--preload-file models/resources/shaders/glsl100/skinning.fs@resources/shaders/glsl100/skinning.fs
|
||||
|
||||
models/models_billboard: models/models_billboard.c
|
||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
|
||||
--preload-file models/resources/billboard.png@resources/billboard.png
|
||||
|
||||
models/models_bone_socket: models/models_bone_socket.c
|
||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
|
||||
--preload-file models/resources/models/gltf/greenman.glb@resources/models/gltf/greenman.glb \
|
||||
--preload-file models/resources/models/gltf/greenman_hat.glb@resources/models/gltf/greenman_hat.glb \
|
||||
--preload-file models/resources/models/gltf/greenman_sword.glb@resources/models/gltf/greenman_sword.glb \
|
||||
--preload-file models/resources/models/gltf/greenman_shield.glb@resources/models/gltf/greenman_shield.glb
|
||||
|
||||
models/models_box_collisions: models/models_box_collisions.c
|
||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
|
||||
|
||||
|
|
@ -912,6 +979,9 @@ models/models_mesh_picking: models/models_mesh_picking.c
|
|||
models/models_orthographic_projection: models/models_orthographic_projection.c
|
||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
|
||||
|
||||
models/models_point_rendering: models/models_point_rendering.c
|
||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
|
||||
|
||||
models/models_rlgl_solar_system: models/models_rlgl_solar_system.c
|
||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
|
||||
|
||||
|
|
@ -939,6 +1009,24 @@ shaders/shaders_basic_lighting: shaders/shaders_basic_lighting.c
|
|||
--preload-file shaders/resources/shaders/glsl100/lighting.fs@resources/shaders/glsl100/lighting.fs \
|
||||
--preload-file shaders/resources/shaders/glsl100/lighting.vs@resources/shaders/glsl100/lighting.vs
|
||||
|
||||
shaders/shaders_basic_pbr: shaders/shaders_basic_pbr.c
|
||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
|
||||
--preload-file shaders/resources/shaders/glsl100/pbr.vs@resources/shaders/glsl100/pbr.vs \
|
||||
--preload-file shaders/resources/shaders/glsl120/pbr.vs@resources/shaders/glsl120/pbr.vs \
|
||||
--preload-file shaders/resources/shaders/glsl330/pbr.vs@resources/shaders/glsl330/pbr.vs \
|
||||
--preload-file shaders/resources/shaders/glsl100/pbr.fs@resources/shaders/glsl100/pbr.fs \
|
||||
--preload-file shaders/resources/shaders/glsl120/pbr.fs@resources/shaders/glsl120/pbr.fs \
|
||||
--preload-file shaders/resources/shaders/glsl330/pbr.fs@resources/shaders/glsl330/pbr.fs \
|
||||
--preload-file shaders/resources/models/old_car_new.glb@resources/models/old_car_new.glb \
|
||||
--preload-file shaders/resources/old_car_d.png@resources/old_car_d.png \
|
||||
--preload-file shaders/resources/old_car_mra.png@resources/old_car_mra.png \
|
||||
--preload-file shaders/resources/old_car_n.png@resources/old_car_n.png \
|
||||
--preload-file shaders/resources/old_car_e.png@resources/old_car_e.png \
|
||||
--preload-file shaders/resources/models/plane.glb@resources/models/plane.glb \
|
||||
--preload-file shaders/resources/road_a.png@resources/road_a.png \
|
||||
--preload-file shaders/resources/road_mra.png@resources/road_mra.png \
|
||||
--preload-file shaders/resources/road_n.png@resources/road_n.png
|
||||
|
||||
shaders/shaders_custom_uniform: shaders/shaders_custom_uniform.c
|
||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) -sTOTAL_MEMORY=67108864 \
|
||||
--preload-file shaders/resources/models/barracks.obj@resources/models/barracks.obj \
|
||||
|
|
@ -1012,6 +1100,14 @@ shaders/shaders_raymarching: shaders/shaders_raymarching.c
|
|||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
|
||||
--preload-file shaders/resources/shaders/glsl100/raymarching.fs@resources/shaders/glsl100/raymarching.fs
|
||||
|
||||
shaders/shaders_shadowmap: shaders/shaders_shadowmap.c
|
||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
|
||||
--preload-file shaders/resources/shaders/glsl120/shadowmap.vs@resources/shaders/glsl120/shadowmap.vs \
|
||||
--preload-file shaders/resources/shaders/glsl330/shadowmap.vs@resources/shaders/glsl330/shadowmap.vs \
|
||||
--preload-file shaders/resources/shaders/glsl120/shadowmap.fs@resources/shaders/glsl120/shadowmap.fs \
|
||||
--preload-file shaders/resources/shaders/glsl330/shadowmap.fs@resources/shaders/glsl330/shadowmap.fs \
|
||||
--preload-file shaders/resources/models/robot.glb@resources/models/robot.glb
|
||||
|
||||
shaders/shaders_shapes_textures: shaders/shaders_shapes_textures.c
|
||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
|
||||
--preload-file shaders/resources/fudesumi.png@resources/fudesumi.png \
|
||||
|
|
@ -1052,6 +1148,13 @@ 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_vertex_displacement: shaders/shaders_vertex_displacement.c
|
||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
|
||||
--preload-file shaders/resources/shaders/glsl100/vertex_displacement.vs@resources/shaders/glsl100/vertex_displacement.vs \
|
||||
--preload-file shaders/resources/shaders/glsl330/vertex_displacement.vs@resources/shaders/glsl330/vertex_displacement.vs \
|
||||
--preload-file shaders/resources/shaders/glsl100/vertex_displacement.fs@resources/shaders/glsl100/vertex_displacement.fs \
|
||||
--preload-file shaders/resources/shaders/glsl330/vertex_displacement.fs@resources/shaders/glsl330/vertex_displacement.fs
|
||||
|
||||
|
||||
# Compile AUDIO examples
|
||||
audio/audio_mixed_processor: audio/audio_mixed_processor.c
|
||||
|
|
|
|||
|
|
@ -80,6 +80,7 @@ Examples using raylib shapes drawing functionality, provided by raylib [shapes](
|
|||
| 47 | [shapes_draw_circle_sector](shapes/shapes_draw_circle_sector.c) | <img src="shapes/shapes_draw_circle_sector.png" alt="shapes_draw_circle_sector" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 2.5 | [Vlad Adrian](https://github.com/demizdor) |
|
||||
| 48 | [shapes_draw_rectangle_rounded](shapes/shapes_draw_rectangle_rounded.c) | <img src="shapes/shapes_draw_rectangle_rounded.png" alt="shapes_draw_rectangle_rounded" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 2.5 | [Vlad Adrian](https://github.com/demizdor) |
|
||||
| 49 | [shapes_top_down_lights](shapes/shapes_top_down_lights.c) | <img src="shapes/shapes_top_down_lights.png" alt="shapes_top_down_lights" width="80"> | ⭐️⭐️⭐️⭐️ | **4.2** | **4.2** | [Jeffery Myers](https://github.com/JeffM2501) |
|
||||
| 50 | [shapes_rectangle_advanced](shapes/shapes_rectangle_advanced.c) | <img src="shapes/shapes_rectangle_advanced.png" alt="shapes_rectangle_advanced" width="80"> | ⭐️⭐️⭐️⭐️⭐️| **5.0** | **5.0** | [ExCyber](https://github.com/evertonse) |
|
||||
|
||||
### category: textures
|
||||
|
||||
|
|
@ -87,28 +88,28 @@ Examples using raylib textures functionality, including image/textures loading/g
|
|||
|
||||
| ## | example | image | difficulty<br>level | version<br>created | last version<br>updated | original<br>developer |
|
||||
|----|----------|--------|:-------------------:|:------------------:|:------------------:|:----------|
|
||||
| 50 | [textures_logo_raylib](textures/textures_logo_raylib.c) | <img src="textures/textures_logo_raylib.png" alt="textures_logo_raylib" width="80"> | ⭐️☆☆☆ | 1.0 | 1.0 | [Ray](https://github.com/raysan5) |
|
||||
| 51 | [textures_srcrec_dstrec](textures/textures_srcrec_dstrec.c) | <img src="textures/textures_srcrec_dstrec.png" alt="textures_srcrec_dstrec" width="80"> | ⭐️⭐️⭐️☆ | 1.3 | 1.3 | [Ray](https://github.com/raysan5) |
|
||||
| 52 | [textures_image_drawing](textures/textures_image_drawing.c) | <img src="textures/textures_image_drawing.png" alt="textures_image_drawing" width="80"> | ⭐️⭐️☆☆ | 1.4 | 1.4 | [Ray](https://github.com/raysan5) |
|
||||
| 53 | [textures_image_generation](textures/textures_image_generation.c) | <img src="textures/textures_image_generation.png" alt="textures_image_generation" width="80"> | ⭐️⭐️☆☆ | 1.8 | 1.8 | [Ray](https://github.com/raysan5) |
|
||||
| 54 | [textures_image_loading](textures/textures_image_loading.c) | <img src="textures/textures_image_loading.png" alt="textures_image_loading" width="80"> | ⭐️☆☆☆ | 1.3 | 1.3 | [Ray](https://github.com/raysan5) |
|
||||
| 55 | [textures_image_processing](textures/textures_image_processing.c) | <img src="textures/textures_image_processing.png" alt="textures_image_processing" width="80"> | ⭐️⭐️⭐️☆ | 1.4 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 56 | [textures_image_text](textures/textures_image_text.c) | <img src="textures/textures_image_text.png" alt="textures_image_text" width="80"> | ⭐️⭐️☆☆ | 1.8 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 57 | [textures_to_image](textures/textures_to_image.c) | <img src="textures/textures_to_image.png" alt="textures_to_image" width="80"> | ⭐️☆☆☆ | 1.3 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 58 | [textures_raw_data](textures/textures_raw_data.c) | <img src="textures/textures_raw_data.png" alt="textures_raw_data" width="80"> | ⭐️⭐️⭐️☆ | 1.3 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 59 | [textures_particles_blending](textures/textures_particles_blending.c) | <img src="textures/textures_particles_blending.png" alt="textures_particles_blending" width="80"> | ⭐️☆☆☆ | 1.7 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 60 | [textures_npatch_drawing](textures/textures_npatch_drawing.c) | <img src="textures/textures_npatch_drawing.png" alt="textures_npatch_drawing" width="80"> | ⭐️⭐️⭐️☆ | 2.0 | 2.5 | [Jorge A. Gomes](https://github.com/overdev) |
|
||||
| 61 | [textures_background_scrolling](textures/textures_background_scrolling.c) | <img src="textures/textures_background_scrolling.png" alt="textures_background_scrolling" width="80"> | ⭐️☆☆☆ | 2.0 | 2.5 | [Ray](https://github.com/raysan5) |
|
||||
| 62 | [textures_sprite_anim](textures/textures_sprite_anim.c) | <img src="textures/textures_sprite_anim.png" alt="textures_sprite_anim" width="80"> | ⭐️⭐️☆☆ | 1.3 | 1.3 | [Ray](https://github.com/raysan5) |
|
||||
| 63 | [textures_sprite_button](textures/textures_sprite_button.c) | <img src="textures/textures_sprite_button.png" alt="textures_sprite_button" width="80"> | ⭐️⭐️☆☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) |
|
||||
| 64 | [textures_sprite_explosion](textures/textures_sprite_explosion.c) | <img src="textures/textures_sprite_explosion.png" alt="textures_sprite_explosion" width="80"> | ⭐️⭐️☆☆ | 2.5 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 65 | [textures_bunnymark](textures/textures_bunnymark.c) | <img src="textures/textures_bunnymark.png" alt="textures_bunnymark" width="80"> | ⭐️⭐️⭐️☆ | 1.6 | 2.5 | [Ray](https://github.com/raysan5) |
|
||||
| 66 | [textures_mouse_painting](textures/textures_mouse_painting.c) | <img src="textures/textures_mouse_painting.png" alt="textures_mouse_painting" width="80"> | ⭐️⭐️⭐️☆ | 3.0 | 3.0 | [Chris Dill](https://github.com/MysteriousSpace) |
|
||||
| 67 | [textures_blend_modes](textures/textures_blend_modes.c) | <img src="textures/textures_blend_modes.png" alt="textures_blend_modes" width="80"> | ⭐️☆☆☆ | 3.5 | 3.5 | [Karlo Licudine](https://github.com/accidentalrebel) |
|
||||
| 68 | [textures_draw_tiled](textures/textures_draw_tiled.c) | <img src="textures/textures_draw_tiled.png" alt="textures_draw_tiled" width="80"> | ⭐️⭐️⭐️☆ | 3.0 | **4.2** | [Vlad Adrian](https://github.com/demizdor) |
|
||||
| 69 | [textures_polygon](textures/textures_polygon.c) | <img src="textures/textures_polygon.png" alt="textures_polygon" width="80"> | ⭐️☆☆☆ | 3.7 | 3.7 | [Chris Camacho](https://github.com/codifies) |
|
||||
| 70 | [textures_fog_of_war](textures/textures_fog_of_war.c) | <img src="textures/textures_fog_of_war.png" alt="textures_fog_of_war" width="80"> | ⭐️⭐️⭐️☆ | **4.2** | **4.2** | [Ray](https://github.com/raysan5) |
|
||||
| 71 | [textures_gif_player](textures/textures_gif_player.c) | <img src="textures/textures_gif_player.png" alt="textures_gif_player" width="80"> | ⭐️⭐️⭐️☆ | **4.2** | **4.2** | [Ray](https://github.com/raysan5) |
|
||||
| 51 | [textures_logo_raylib](textures/textures_logo_raylib.c) | <img src="textures/textures_logo_raylib.png" alt="textures_logo_raylib" width="80"> | ⭐️☆☆☆ | 1.0 | 1.0 | [Ray](https://github.com/raysan5) |
|
||||
| 52 | [textures_srcrec_dstrec](textures/textures_srcrec_dstrec.c) | <img src="textures/textures_srcrec_dstrec.png" alt="textures_srcrec_dstrec" width="80"> | ⭐️⭐️⭐️☆ | 1.3 | 1.3 | [Ray](https://github.com/raysan5) |
|
||||
| 53 | [textures_image_drawing](textures/textures_image_drawing.c) | <img src="textures/textures_image_drawing.png" alt="textures_image_drawing" width="80"> | ⭐️⭐️☆☆ | 1.4 | 1.4 | [Ray](https://github.com/raysan5) |
|
||||
| 54 | [textures_image_generation](textures/textures_image_generation.c) | <img src="textures/textures_image_generation.png" alt="textures_image_generation" width="80"> | ⭐️⭐️☆☆ | 1.8 | 1.8 | [Ray](https://github.com/raysan5) |
|
||||
| 55 | [textures_image_loading](textures/textures_image_loading.c) | <img src="textures/textures_image_loading.png" alt="textures_image_loading" width="80"> | ⭐️☆☆☆ | 1.3 | 1.3 | [Ray](https://github.com/raysan5) |
|
||||
| 56 | [textures_image_processing](textures/textures_image_processing.c) | <img src="textures/textures_image_processing.png" alt="textures_image_processing" width="80"> | ⭐️⭐️⭐️☆ | 1.4 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 57 | [textures_image_text](textures/textures_image_text.c) | <img src="textures/textures_image_text.png" alt="textures_image_text" width="80"> | ⭐️⭐️☆☆ | 1.8 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 58 | [textures_to_image](textures/textures_to_image.c) | <img src="textures/textures_to_image.png" alt="textures_to_image" width="80"> | ⭐️☆☆☆ | 1.3 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 59 | [textures_raw_data](textures/textures_raw_data.c) | <img src="textures/textures_raw_data.png" alt="textures_raw_data" width="80"> | ⭐️⭐️⭐️☆ | 1.3 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 60 | [textures_particles_blending](textures/textures_particles_blending.c) | <img src="textures/textures_particles_blending.png" alt="textures_particles_blending" width="80"> | ⭐️☆☆☆ | 1.7 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 61 | [textures_npatch_drawing](textures/textures_npatch_drawing.c) | <img src="textures/textures_npatch_drawing.png" alt="textures_npatch_drawing" width="80"> | ⭐️⭐️⭐️☆ | 2.0 | 2.5 | [Jorge A. Gomes](https://github.com/overdev) |
|
||||
| 62 | [textures_background_scrolling](textures/textures_background_scrolling.c) | <img src="textures/textures_background_scrolling.png" alt="textures_background_scrolling" width="80"> | ⭐️☆☆☆ | 2.0 | 2.5 | [Ray](https://github.com/raysan5) |
|
||||
| 63 | [textures_sprite_anim](textures/textures_sprite_anim.c) | <img src="textures/textures_sprite_anim.png" alt="textures_sprite_anim" width="80"> | ⭐️⭐️☆☆ | 1.3 | 1.3 | [Ray](https://github.com/raysan5) |
|
||||
| 64 | [textures_sprite_button](textures/textures_sprite_button.c) | <img src="textures/textures_sprite_button.png" alt="textures_sprite_button" width="80"> | ⭐️⭐️☆☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) |
|
||||
| 65 | [textures_sprite_explosion](textures/textures_sprite_explosion.c) | <img src="textures/textures_sprite_explosion.png" alt="textures_sprite_explosion" width="80"> | ⭐️⭐️☆☆ | 2.5 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 66 | [textures_bunnymark](textures/textures_bunnymark.c) | <img src="textures/textures_bunnymark.png" alt="textures_bunnymark" width="80"> | ⭐️⭐️⭐️☆ | 1.6 | 2.5 | [Ray](https://github.com/raysan5) |
|
||||
| 67 | [textures_mouse_painting](textures/textures_mouse_painting.c) | <img src="textures/textures_mouse_painting.png" alt="textures_mouse_painting" width="80"> | ⭐️⭐️⭐️☆ | 3.0 | 3.0 | [Chris Dill](https://github.com/MysteriousSpace) |
|
||||
| 68 | [textures_blend_modes](textures/textures_blend_modes.c) | <img src="textures/textures_blend_modes.png" alt="textures_blend_modes" width="80"> | ⭐️☆☆☆ | 3.5 | 3.5 | [Karlo Licudine](https://github.com/accidentalrebel) |
|
||||
| 69 | [textures_draw_tiled](textures/textures_draw_tiled.c) | <img src="textures/textures_draw_tiled.png" alt="textures_draw_tiled" width="80"> | ⭐️⭐️⭐️☆ | 3.0 | **4.2** | [Vlad Adrian](https://github.com/demizdor) |
|
||||
| 70 | [textures_polygon](textures/textures_polygon.c) | <img src="textures/textures_polygon.png" alt="textures_polygon" width="80"> | ⭐️☆☆☆ | 3.7 | 3.7 | [Chris Camacho](https://github.com/codifies) |
|
||||
| 71 | [textures_fog_of_war](textures/textures_fog_of_war.c) | <img src="textures/textures_fog_of_war.png" alt="textures_fog_of_war" width="80"> | ⭐️⭐️⭐️☆ | **4.2** | **4.2** | [Ray](https://github.com/raysan5) |
|
||||
| 72 | [textures_gif_player](textures/textures_gif_player.c) | <img src="textures/textures_gif_player.png" alt="textures_gif_player" width="80"> | ⭐️⭐️⭐️☆ | **4.2** | **4.2** | [Ray](https://github.com/raysan5) |
|
||||
|
||||
### category: text
|
||||
|
||||
|
|
@ -116,18 +117,18 @@ Examples using raylib text functionality, including sprite fonts loading/generat
|
|||
|
||||
| ## | example | image | difficulty<br>level | version<br>created | last version<br>updated | original<br>developer |
|
||||
|----|----------|--------|:-------------------:|:------------------:|:------------------:|:----------|
|
||||
| 72 | [text_raylib_fonts](text/text_raylib_fonts.c) | <img src="text/text_raylib_fonts.png" alt="text_raylib_fonts" width="80"> | ⭐️☆☆☆ | 1.7 | 3.7 | [Ray](https://github.com/raysan5) |
|
||||
| 73 | [text_font_spritefont](text/text_font_spritefont.c) | <img src="text/text_font_spritefont.png" alt="text_font_spritefont" width="80"> | ⭐️☆☆☆ | 1.0 | 1.0 | [Ray](https://github.com/raysan5) |
|
||||
| 74 | [text_font_filters](text/text_font_filters.c) | <img src="text/text_font_filters.png" alt="text_font_filters" width="80"> | ⭐️⭐️☆☆ | 1.3 | **4.2** | [Ray](https://github.com/raysan5) |
|
||||
| 75 | [text_font_loading](text/text_font_loading.c) | <img src="text/text_font_loading.png" alt="text_font_loading" width="80"> | ⭐️☆☆☆ | 1.4 | 3.0 | [Ray](https://github.com/raysan5) |
|
||||
| 76 | [text_font_sdf](text/text_font_sdf.c) | <img src="text/text_font_sdf.png" alt="text_font_sdf" width="80"> | ⭐️⭐️⭐️☆ | 1.3 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 77 | [text_format_text](text/text_format_text.c) | <img src="text/text_format_text.png" alt="text_format_text" width="80"> | ⭐️☆☆☆ | 1.1 | 3.0 | [Ray](https://github.com/raysan5) |
|
||||
| 78 | [text_input_box](text/text_input_box.c) | <img src="text/text_input_box.png" alt="text_input_box" width="80"> | ⭐️⭐️☆☆ | 1.7 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 79 | [text_writing_anim](text/text_writing_anim.c) | <img src="text/text_writing_anim.png" alt="text_writing_anim" width="80"> | ⭐️⭐️☆☆ | 1.4 | 1.4 | [Ray](https://github.com/raysan5) |
|
||||
| 80 | [text_rectangle_bounds](text/text_rectangle_bounds.c) | <img src="text/text_rectangle_bounds.png" alt="text_rectangle_bounds" width="80"> | ⭐️⭐️⭐️⭐️ | 2.5 | **4.0** | [Vlad Adrian](https://github.com/demizdor) |
|
||||
| 81 | [text_unicode](text/text_unicode.c) | <img src="text/text_unicode.png" alt="text_unicode" width="80"> | ⭐️⭐️⭐️⭐️ | 2.5 | **4.0** | [Vlad Adrian](https://github.com/demizdor) |
|
||||
| 82 | [text_draw_3d](text/text_draw_3d.c) | <img src="text/text_draw_3d.png" alt="text_draw_3d" width="80"> | ⭐️⭐️⭐️⭐️ | 3.5 | **4.0** | [Vlad Adrian](https://github.com/demizdor) |
|
||||
| 83 | [text_codepoints_loading](text/text_codepoints_loading.c) | <img src="text/text_codepoints_loading.png" alt="text_codepoints_loading" width="80"> | ⭐️⭐️⭐️☆ | **4.2** | **4.2** | [Ray](https://github.com/raysan5) |
|
||||
| 73 | [text_raylib_fonts](text/text_raylib_fonts.c) | <img src="text/text_raylib_fonts.png" alt="text_raylib_fonts" width="80"> | ⭐️☆☆☆ | 1.7 | 3.7 | [Ray](https://github.com/raysan5) |
|
||||
| 74 | [text_font_spritefont](text/text_font_spritefont.c) | <img src="text/text_font_spritefont.png" alt="text_font_spritefont" width="80"> | ⭐️☆☆☆ | 1.0 | 1.0 | [Ray](https://github.com/raysan5) |
|
||||
| 75 | [text_font_filters](text/text_font_filters.c) | <img src="text/text_font_filters.png" alt="text_font_filters" width="80"> | ⭐️⭐️☆☆ | 1.3 | **4.2** | [Ray](https://github.com/raysan5) |
|
||||
| 76 | [text_font_loading](text/text_font_loading.c) | <img src="text/text_font_loading.png" alt="text_font_loading" width="80"> | ⭐️☆☆☆ | 1.4 | 3.0 | [Ray](https://github.com/raysan5) |
|
||||
| 77 | [text_font_sdf](text/text_font_sdf.c) | <img src="text/text_font_sdf.png" alt="text_font_sdf" width="80"> | ⭐️⭐️⭐️☆ | 1.3 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 78 | [text_format_text](text/text_format_text.c) | <img src="text/text_format_text.png" alt="text_format_text" width="80"> | ⭐️☆☆☆ | 1.1 | 3.0 | [Ray](https://github.com/raysan5) |
|
||||
| 79 | [text_input_box](text/text_input_box.c) | <img src="text/text_input_box.png" alt="text_input_box" width="80"> | ⭐️⭐️☆☆ | 1.7 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 80 | [text_writing_anim](text/text_writing_anim.c) | <img src="text/text_writing_anim.png" alt="text_writing_anim" width="80"> | ⭐️⭐️☆☆ | 1.4 | 1.4 | [Ray](https://github.com/raysan5) |
|
||||
| 81 | [text_rectangle_bounds](text/text_rectangle_bounds.c) | <img src="text/text_rectangle_bounds.png" alt="text_rectangle_bounds" width="80"> | ⭐️⭐️⭐️⭐️ | 2.5 | **4.0** | [Vlad Adrian](https://github.com/demizdor) |
|
||||
| 82 | [text_unicode](text/text_unicode.c) | <img src="text/text_unicode.png" alt="text_unicode" width="80"> | ⭐️⭐️⭐️⭐️ | 2.5 | **4.0** | [Vlad Adrian](https://github.com/demizdor) |
|
||||
| 83 | [text_draw_3d](text/text_draw_3d.c) | <img src="text/text_draw_3d.png" alt="text_draw_3d" width="80"> | ⭐️⭐️⭐️⭐️ | 3.5 | **4.0** | [Vlad Adrian](https://github.com/demizdor) |
|
||||
| 84 | [text_codepoints_loading](text/text_codepoints_loading.c) | <img src="text/text_codepoints_loading.png" alt="text_codepoints_loading" width="80"> | ⭐️⭐️⭐️☆ | **4.2** | **4.2** | [Ray](https://github.com/raysan5) |
|
||||
|
||||
### category: models
|
||||
|
||||
|
|
@ -135,25 +136,25 @@ Examples using raylib models functionality, including models loading/generation
|
|||
|
||||
| ## | example | image | difficulty<br>level | version<br>created | last version<br>updated | original<br>developer |
|
||||
|----|----------|--------|:-------------------:|:------------------:|:------------------:|:----------|
|
||||
| 84 | [models_animation](models/models_animation.c) | <img src="models/models_animation.png" alt="models_animation" width="80"> | ⭐️⭐️☆☆ | 2.5 | 3.5 | [culacant](https://github.com/culacant) |
|
||||
| 85 | [models_billboard](models/models_billboard.c) | <img src="models/models_billboard.png" alt="models_billboard" width="80"> | ⭐️⭐️⭐️☆ | 1.3 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 86 | [models_box_collisions](models/models_box_collisions.c) | <img src="models/models_box_collisions.png" alt="models_box_collisions" width="80"> | ⭐️☆☆☆ | 1.3 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 87 | [models_cubicmap](models/models_cubicmap.c) | <img src="models/models_cubicmap.png" alt="models_cubicmap" width="80"> | ⭐️⭐️☆☆ | 1.8 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 88 | [models_first_person_maze](models/models_first_person_maze.c) | <img src="models/models_first_person_maze.png" alt="models_first_person_maze" width="80"> | ⭐️⭐️☆☆ | 2.5 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 89 | [models_geometric_shapes](models/models_geometric_shapes.c) | <img src="models/models_geometric_shapes.png" alt="models_geometric_shapes" width="80"> | ⭐️☆☆☆ | 1.0 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 90 | [models_mesh_generation](models/models_mesh_generation.c) | <img src="models/models_mesh_generation.png" alt="models_mesh_generation" width="80"> | ⭐️⭐️☆☆ | 1.8 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 91 | [models_mesh_picking](models/models_mesh_picking.c) | <img src="models/models_mesh_picking.png" alt="models_mesh_picking" width="80"> | ⭐️⭐️⭐️☆ | 1.7 | **4.0** | [Joel Davis](https://github.com/joeld42) |
|
||||
| 92 | [models_loading](models/models_loading.c) | <img src="models/models_loading.png" alt="models_loading" width="80"> | ⭐️☆☆☆ | 2.5 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 93 | [models_loading_gltf](models/models_loading_gltf.c) | <img src="models/models_loading_gltf.png" alt="models_loading_gltf" width="80"> | ⭐️☆☆☆ | 3.7 | **4.2** | [Ray](https://github.com/raysan5) |
|
||||
| 94 | [models_loading_vox](models/models_loading_vox.c) | <img src="models/models_loading_vox.png" alt="models_loading_vox" width="80"> | ⭐️☆☆☆ | **4.0** | **4.0** | [Johann Nadalutti](https://github.com/procfxgen) |
|
||||
| 95 | [models_loading_m3d](models/models_loading_m3d.c) | <img src="models/models_loading_m3d.png" alt="models_loading_m3d" width="80"> | ⭐️☆☆☆ | **4.2** | **4.2** | [bzt](https://bztsrc.gitlab.io/model3d) |
|
||||
| 96 | [models_orthographic_projection](models/models_orthographic_projection.c) | <img src="models/models_orthographic_projection.png" alt="models_orthographic_projection" width="80"> | ⭐️☆☆☆ | 2.0 | 3.7 | [Max Danielsson](https://github.com/autious) |
|
||||
| 97 | [models_point_rendering](models/models_point_rendering.c) | <img src="models/models_point_rendering.png" alt="models_point_rendering" width="80"> | ⭐️⭐️☆☆ | 5.0 | 5.0 | [Reese Gallagher](https://github.com/satchelfrost) |
|
||||
| 98 | [models_rlgl_solar_system](models/models_rlgl_solar_system.c) | <img src="models/models_rlgl_solar_system.png" alt="models_rlgl_solar_system" width="80"> | ⭐️⭐️⭐️⭐️ | 2.5 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 99 | [models_yaw_pitch_roll](models/models_yaw_pitch_roll.c) | <img src="models/models_yaw_pitch_roll.png" alt="models_yaw_pitch_roll" width="80"> | ⭐️⭐️☆☆ | 1.8 | **4.0** | [Berni](https://github.com/Berni8k) |
|
||||
| 100 | [models_waving_cubes](models/models_waving_cubes.c) | <img src="models/models_waving_cubes.png" alt="models_waving_cubes" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 3.7 | [codecat](https://github.com/codecat) |
|
||||
| 101 | [models_heightmap](models/models_heightmap.c) | <img src="models/models_heightmap.png" alt="models_heightmap" width="80"> | ⭐️☆☆☆ | 1.8 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 102 | [models_skybox](models/models_skybox.c) | <img src="models/models_skybox.png" alt="models_skybox" width="80"> | ⭐️⭐️☆☆ | 1.8 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 85 | [models_animation](models/models_animation.c) | <img src="models/models_animation.png" alt="models_animation" width="80"> | ⭐️⭐️☆☆ | 2.5 | 3.5 | [culacant](https://github.com/culacant) |
|
||||
| 86 | [models_billboard](models/models_billboard.c) | <img src="models/models_billboard.png" alt="models_billboard" width="80"> | ⭐️⭐️⭐️☆ | 1.3 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 87 | [models_box_collisions](models/models_box_collisions.c) | <img src="models/models_box_collisions.png" alt="models_box_collisions" width="80"> | ⭐️☆☆☆ | 1.3 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 88 | [models_cubicmap](models/models_cubicmap.c) | <img src="models/models_cubicmap.png" alt="models_cubicmap" width="80"> | ⭐️⭐️☆☆ | 1.8 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 89 | [models_first_person_maze](models/models_first_person_maze.c) | <img src="models/models_first_person_maze.png" alt="models_first_person_maze" width="80"> | ⭐️⭐️☆☆ | 2.5 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 90 | [models_geometric_shapes](models/models_geometric_shapes.c) | <img src="models/models_geometric_shapes.png" alt="models_geometric_shapes" width="80"> | ⭐️☆☆☆ | 1.0 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 91 | [models_mesh_generation](models/models_mesh_generation.c) | <img src="models/models_mesh_generation.png" alt="models_mesh_generation" width="80"> | ⭐️⭐️☆☆ | 1.8 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 92 | [models_mesh_picking](models/models_mesh_picking.c) | <img src="models/models_mesh_picking.png" alt="models_mesh_picking" width="80"> | ⭐️⭐️⭐️☆ | 1.7 | **4.0** | [Joel Davis](https://github.com/joeld42) |
|
||||
| 93 | [models_loading](models/models_loading.c) | <img src="models/models_loading.png" alt="models_loading" width="80"> | ⭐️☆☆☆ | 2.5 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 94 | [models_loading_gltf](models/models_loading_gltf.c) | <img src="models/models_loading_gltf.png" alt="models_loading_gltf" width="80"> | ⭐️☆☆☆ | 3.7 | **4.2** | [Ray](https://github.com/raysan5) |
|
||||
| 95 | [models_loading_vox](models/models_loading_vox.c) | <img src="models/models_loading_vox.png" alt="models_loading_vox" width="80"> | ⭐️☆☆☆ | **4.0** | **4.0** | [Johann Nadalutti](https://github.com/procfxgen) |
|
||||
| 96 | [models_loading_m3d](models/models_loading_m3d.c) | <img src="models/models_loading_m3d.png" alt="models_loading_m3d" width="80"> | ⭐️☆☆☆ | **4.2** | **4.2** | [bzt](https://bztsrc.gitlab.io/model3d) |
|
||||
| 97 | [models_orthographic_projection](models/models_orthographic_projection.c) | <img src="models/models_orthographic_projection.png" alt="models_orthographic_projection" width="80"> | ⭐️☆☆☆ | 2.0 | 3.7 | [Max Danielsson](https://github.com/autious) |
|
||||
| 98 | [models_point_rendering](models/models_point_rendering.c) | <img src="models/models_point_rendering.png" alt="models_point_rendering" width="80"> | ⭐️⭐️☆☆ | 5.0 | 5.0 | [Reese Gallagher](https://github.com/satchelfrost) |
|
||||
| 99 | [models_rlgl_solar_system](models/models_rlgl_solar_system.c) | <img src="models/models_rlgl_solar_system.png" alt="models_rlgl_solar_system" width="80"> | ⭐️⭐️⭐️⭐️ | 2.5 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 100 | [models_yaw_pitch_roll](models/models_yaw_pitch_roll.c) | <img src="models/models_yaw_pitch_roll.png" alt="models_yaw_pitch_roll" width="80"> | ⭐️⭐️☆☆ | 1.8 | **4.0** | [Berni](https://github.com/Berni8k) |
|
||||
| 101 | [models_waving_cubes](models/models_waving_cubes.c) | <img src="models/models_waving_cubes.png" alt="models_waving_cubes" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 3.7 | [codecat](https://github.com/codecat) |
|
||||
| 102 | [models_heightmap](models/models_heightmap.c) | <img src="models/models_heightmap.png" alt="models_heightmap" width="80"> | ⭐️☆☆☆ | 1.8 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 103 | [models_skybox](models/models_skybox.c) | <img src="models/models_skybox.png" alt="models_skybox" width="80"> | ⭐️⭐️☆☆ | 1.8 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
|
||||
### category: shaders
|
||||
|
||||
|
|
@ -161,25 +162,25 @@ Examples using raylib shaders functionality, including shaders loading, paramete
|
|||
|
||||
| ## | example | image | difficulty<br>level | version<br>created | last version<br>updated | original<br>developer |
|
||||
|----|----------|--------|:-------------------:|:------------------:|:------------------:|:----------|
|
||||
| 103 | [shaders_basic_lighting](shaders/shaders_basic_lighting.c) | <img src="shaders/shaders_basic_lighting.png" alt="shaders_basic_lighting" width="80"> | ⭐️⭐️⭐️⭐️ | 3.0 | **4.2** | [Chris Camacho](https://github.com/codifies) |
|
||||
| 104 | [shaders_model_shader](shaders/shaders_model_shader.c) | <img src="shaders/shaders_model_shader.png" alt="shaders_model_shader" width="80"> | ⭐️⭐️☆☆ | 1.3 | 3.7 | [Ray](https://github.com/raysan5) |
|
||||
| 105 | [shaders_shapes_textures](shaders/shaders_shapes_textures.c) | <img src="shaders/shaders_shapes_textures.png" alt="shaders_shapes_textures" width="80"> | ⭐️⭐️☆☆ | 1.7 | 3.7 | [Ray](https://github.com/raysan5) |
|
||||
| 106 | [shaders_custom_uniform](shaders/shaders_custom_uniform.c) | <img src="shaders/shaders_custom_uniform.png" alt="shaders_custom_uniform" width="80"> | ⭐️⭐️☆☆ | 1.3 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 107 | [shaders_postprocessing](shaders/shaders_postprocessing.c) | <img src="shaders/shaders_postprocessing.png" alt="shaders_postprocessing" width="80"> | ⭐️⭐️⭐️☆ | 1.3 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 108 | [shaders_palette_switch](shaders/shaders_palette_switch.c) | <img src="shaders/shaders_palette_switch.png" alt="shaders_palette_switch" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 3.7 | [Marco Lizza](https://github.com/MarcoLizza) |
|
||||
| 109 | [shaders_raymarching](shaders/shaders_raymarching.c) | <img src="shaders/shaders_raymarching.png" alt="shaders_raymarching" width="80"> | ⭐️⭐️⭐️⭐️ | 2.0 | **4.2** | [Ray](https://github.com/raysan5) |
|
||||
| 110 | [shaders_texture_drawing](shaders/shaders_texture_drawing.c) | <img src="shaders/shaders_texture_drawing.png" alt="shaders_texture_drawing" width="80"> | ⭐️⭐️☆☆ | 2.0 | 3.7 | [Michał Ciesielski](https://github.com/) |
|
||||
| 111 | [shaders_texture_outline](shaders/shaders_texture_outline.c) | <img src="shaders/shaders_texture_outline.png" alt="shaders_texture_outline" width="80"> | ⭐️⭐️⭐️☆ | **4.0** | **4.0** | [Samuel Skiff](https://github.com/GoldenThumbs) |
|
||||
| 112 | [shaders_texture_waves](shaders/shaders_texture_waves.c) | <img src="shaders/shaders_texture_waves.png" alt="shaders_texture_waves" width="80"> | ⭐️⭐️☆☆ | 2.5 | 3.7 | [Anata](https://github.com/anatagawa) |
|
||||
| 113 | [shaders_julia_set](shaders/shaders_julia_set.c) | <img src="shaders/shaders_julia_set.png" alt="shaders_julia_set" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | **4.0** | [eggmund](https://github.com/eggmund) |
|
||||
| 114 | [shaders_eratosthenes](shaders/shaders_eratosthenes.c) | <img src="shaders/shaders_eratosthenes.png" alt="shaders_eratosthenes" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | **4.0** | [ProfJski](https://github.com/ProfJski) |
|
||||
| 115 | [shaders_fog](shaders/shaders_fog.c) | <img src="shaders/shaders_fog.png" alt="shaders_fog" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 3.7 | [Chris Camacho](https://github.com/codifies) |
|
||||
| 116 | [shaders_simple_mask](shaders/shaders_simple_mask.c) | <img src="shaders/shaders_simple_mask.png" alt="shaders_simple_mask" width="80"> | ⭐️⭐️☆☆ | 2.5 | 3.7 | [Chris Camacho](https://github.com/codifies) |
|
||||
| 117 | [shaders_hot_reloading](shaders/shaders_hot_reloading.c) | <img src="shaders/shaders_hot_reloading.png" alt="shaders_hot_reloading" width="80"> | ⭐️⭐️⭐️☆ | 3.0 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 118 | [shaders_mesh_instancing](shaders/shaders_mesh_instancing.c) | <img src="shaders/shaders_mesh_instancing.png" alt="shaders_mesh_instancing" width="80"> | ⭐️⭐️⭐️⭐️ | 3.7 | **4.2** | [seanpringle](https://github.com/seanpringle) |
|
||||
| 119 | [shaders_multi_sample2d](shaders/shaders_multi_sample2d.c) | <img src="shaders/shaders_multi_sample2d.png" alt="shaders_multi_sample2d" width="80"> | ⭐️⭐️☆☆ | 3.5 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 120 | [shaders_spotlight](shaders/shaders_spotlight.c) | <img src="shaders/shaders_spotlight.png" alt="shaders_spotlight" width="80"> | ⭐️⭐️☆☆ | 2.5 | 3.7 | [Chris Camacho](https://github.com/codifies) |
|
||||
| 121 | [shaders_deferred_render](shaders/shaders_deferred_render.c) | <img src="shaders/shaders_deferred_render.png" alt="shaders_deferred_render" width="80"> | ⭐️⭐️⭐️⭐️ | 4.5 | 4.5 | [Justin Andreas Lacoste](https://github.com/27justin) |
|
||||
| 104 | [shaders_basic_lighting](shaders/shaders_basic_lighting.c) | <img src="shaders/shaders_basic_lighting.png" alt="shaders_basic_lighting" width="80"> | ⭐️⭐️⭐️⭐️ | 3.0 | **4.2** | [Chris Camacho](https://github.com/codifies) |
|
||||
| 105 | [shaders_model_shader](shaders/shaders_model_shader.c) | <img src="shaders/shaders_model_shader.png" alt="shaders_model_shader" width="80"> | ⭐️⭐️☆☆ | 1.3 | 3.7 | [Ray](https://github.com/raysan5) |
|
||||
| 106 | [shaders_shapes_textures](shaders/shaders_shapes_textures.c) | <img src="shaders/shaders_shapes_textures.png" alt="shaders_shapes_textures" width="80"> | ⭐️⭐️☆☆ | 1.7 | 3.7 | [Ray](https://github.com/raysan5) |
|
||||
| 107 | [shaders_custom_uniform](shaders/shaders_custom_uniform.c) | <img src="shaders/shaders_custom_uniform.png" alt="shaders_custom_uniform" width="80"> | ⭐️⭐️☆☆ | 1.3 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 108 | [shaders_postprocessing](shaders/shaders_postprocessing.c) | <img src="shaders/shaders_postprocessing.png" alt="shaders_postprocessing" width="80"> | ⭐️⭐️⭐️☆ | 1.3 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 109 | [shaders_palette_switch](shaders/shaders_palette_switch.c) | <img src="shaders/shaders_palette_switch.png" alt="shaders_palette_switch" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 3.7 | [Marco Lizza](https://github.com/MarcoLizza) |
|
||||
| 110 | [shaders_raymarching](shaders/shaders_raymarching.c) | <img src="shaders/shaders_raymarching.png" alt="shaders_raymarching" width="80"> | ⭐️⭐️⭐️⭐️ | 2.0 | **4.2** | [Ray](https://github.com/raysan5) |
|
||||
| 111 | [shaders_texture_drawing](shaders/shaders_texture_drawing.c) | <img src="shaders/shaders_texture_drawing.png" alt="shaders_texture_drawing" width="80"> | ⭐️⭐️☆☆ | 2.0 | 3.7 | [Michał Ciesielski](https://github.com/) |
|
||||
| 112 | [shaders_texture_outline](shaders/shaders_texture_outline.c) | <img src="shaders/shaders_texture_outline.png" alt="shaders_texture_outline" width="80"> | ⭐️⭐️⭐️☆ | **4.0** | **4.0** | [Samuel Skiff](https://github.com/GoldenThumbs) |
|
||||
| 113 | [shaders_texture_waves](shaders/shaders_texture_waves.c) | <img src="shaders/shaders_texture_waves.png" alt="shaders_texture_waves" width="80"> | ⭐️⭐️☆☆ | 2.5 | 3.7 | [Anata](https://github.com/anatagawa) |
|
||||
| 114 | [shaders_julia_set](shaders/shaders_julia_set.c) | <img src="shaders/shaders_julia_set.png" alt="shaders_julia_set" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | **4.0** | [eggmund](https://github.com/eggmund) |
|
||||
| 115 | [shaders_eratosthenes](shaders/shaders_eratosthenes.c) | <img src="shaders/shaders_eratosthenes.png" alt="shaders_eratosthenes" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | **4.0** | [ProfJski](https://github.com/ProfJski) |
|
||||
| 116 | [shaders_fog](shaders/shaders_fog.c) | <img src="shaders/shaders_fog.png" alt="shaders_fog" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 3.7 | [Chris Camacho](https://github.com/codifies) |
|
||||
| 117 | [shaders_simple_mask](shaders/shaders_simple_mask.c) | <img src="shaders/shaders_simple_mask.png" alt="shaders_simple_mask" width="80"> | ⭐️⭐️☆☆ | 2.5 | 3.7 | [Chris Camacho](https://github.com/codifies) |
|
||||
| 118 | [shaders_hot_reloading](shaders/shaders_hot_reloading.c) | <img src="shaders/shaders_hot_reloading.png" alt="shaders_hot_reloading" width="80"> | ⭐️⭐️⭐️☆ | 3.0 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 119 | [shaders_mesh_instancing](shaders/shaders_mesh_instancing.c) | <img src="shaders/shaders_mesh_instancing.png" alt="shaders_mesh_instancing" width="80"> | ⭐️⭐️⭐️⭐️ | 3.7 | **4.2** | [seanpringle](https://github.com/seanpringle) |
|
||||
| 120 | [shaders_multi_sample2d](shaders/shaders_multi_sample2d.c) | <img src="shaders/shaders_multi_sample2d.png" alt="shaders_multi_sample2d" width="80"> | ⭐️⭐️☆☆ | 3.5 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 121 | [shaders_spotlight](shaders/shaders_spotlight.c) | <img src="shaders/shaders_spotlight.png" alt="shaders_spotlight" width="80"> | ⭐️⭐️☆☆ | 2.5 | 3.7 | [Chris Camacho](https://github.com/codifies) |
|
||||
| 122 | [shaders_deferred_render](shaders/shaders_deferred_render.c) | <img src="shaders/shaders_deferred_render.png" alt="shaders_deferred_render" width="80"> | ⭐️⭐️⭐️⭐️ | 4.5 | 4.5 | [Justin Andreas Lacoste](https://github.com/27justin) |
|
||||
|
||||
### category: audio
|
||||
|
||||
|
|
@ -187,10 +188,10 @@ Examples using raylib audio functionality, including sound/music loading and pla
|
|||
|
||||
| ## | example | image | difficulty<br>level | version<br>created | last version<br>updated | original<br>developer |
|
||||
|----|----------|--------|:-------------------:|:------------------:|:------------------:|:----------|
|
||||
| 122 | [audio_module_playing](audio/audio_module_playing.c) | <img src="audio/audio_module_playing.png" alt="audio_module_playing" width="80"> | ⭐️☆☆☆ | 1.5 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 123 | [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) |
|
||||
| 124 | [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) |
|
||||
| 125 | [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) |
|
||||
| 123 | [audio_module_playing](audio/audio_module_playing.c) | <img src="audio/audio_module_playing.png" alt="audio_module_playing" width="80"> | ⭐️☆☆☆ | 1.5 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 124 | [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) |
|
||||
| 125 | [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) |
|
||||
| 126 | [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) |
|
||||
|
||||
### category: others
|
||||
|
||||
|
|
@ -198,11 +199,11 @@ Examples showing raylib misc functionality that does not fit in other categories
|
|||
|
||||
| ## | example | image | difficulty<br>level | version<br>created | last version<br>updated | original<br>developer |
|
||||
|----|----------|--------|:-------------------:|:------------------:|:------------------:|:----------|
|
||||
| 126 | [rlgl_standalone](others/rlgl_standalone.c) | <img src="others/rlgl_standalone.png" alt="rlgl_standalone" width="80"> | ⭐️⭐️⭐️⭐️ | 1.6 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 127 | [rlgl_compute_shader](others/rlgl_compute_shader.c) | <img src="others/rlgl_compute_shader.png" alt="rlgl_compute_shader" width="80"> | ⭐️⭐️⭐️⭐️ | **4.0** | **4.0** | [Teddy Astie](https://github.com/tsnake41) |
|
||||
| 128 | [easings_testbed](others/easings_testbed.c) | <img src="others/easings_testbed.png" alt="easings_testbed" width="80"> | ⭐️⭐️⭐️☆ | 3.0 | 3.0 | [Juan Miguel López](https://github.com/flashback-fx) |
|
||||
| 129 | [raylib_opengl_interop](others/raylib_opengl_interop.c) | <img src="others/raylib_opengl_interop.png" alt="raylib_opengl_interop" width="80"> | ⭐️⭐️⭐️⭐️ | **4.0** | **4.0** | [Stephan Soller](https://github.com/arkanis) |
|
||||
| 130 | [embedded_files_loading](others/embedded_files_loading.c) | <img src="others/embedded_files_loading.png" alt="embedded_files_loading" width="80"> | ⭐️⭐️☆☆ | 3.5 | 3.5 | [Kristian Holmgren](https://github.com/defutura) |
|
||||
| 127 | [rlgl_standalone](others/rlgl_standalone.c) | <img src="others/rlgl_standalone.png" alt="rlgl_standalone" width="80"> | ⭐️⭐️⭐️⭐️ | 1.6 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 128 | [rlgl_compute_shader](others/rlgl_compute_shader.c) | <img src="others/rlgl_compute_shader.png" alt="rlgl_compute_shader" width="80"> | ⭐️⭐️⭐️⭐️ | **4.0** | **4.0** | [Teddy Astie](https://github.com/tsnake41) |
|
||||
| 129 | [easings_testbed](others/easings_testbed.c) | <img src="others/easings_testbed.png" alt="easings_testbed" width="80"> | ⭐️⭐️⭐️☆ | 3.0 | 3.0 | [Juan Miguel López](https://github.com/flashback-fx) |
|
||||
| 130 | [raylib_opengl_interop](others/raylib_opengl_interop.c) | <img src="others/raylib_opengl_interop.png" alt="raylib_opengl_interop" width="80"> | ⭐️⭐️⭐️⭐️ | **4.0** | **4.0** | [Stephan Soller](https://github.com/arkanis) |
|
||||
| 131 | [embedded_files_loading](others/embedded_files_loading.c) | <img src="others/embedded_files_loading.png" alt="embedded_files_loading" width="80"> | ⭐️⭐️☆☆ | 3.5 | 3.5 | [Kristian Holmgren](https://github.com/defutura) |
|
||||
|
||||
As always contributions are welcome, feel free to send new examples! Here is an [examples template](examples_template.c) to start with!
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ int main ()
|
|||
else if (IsKeyPressed(KEY_TWO)) zoomMode = 1;
|
||||
|
||||
// Translate based on mouse right click
|
||||
if (IsMouseButtonDown(MOUSE_BUTTON_RIGHT))
|
||||
if (IsMouseButtonDown(MOUSE_BUTTON_LEFT))
|
||||
{
|
||||
Vector2 delta = GetMouseDelta();
|
||||
delta = Vector2Scale(delta, -1.0f/camera.zoom);
|
||||
|
|
@ -76,8 +76,8 @@ int main ()
|
|||
}
|
||||
else
|
||||
{
|
||||
// Zoom based on mouse left click
|
||||
if (IsMouseButtonPressed(MOUSE_BUTTON_LEFT))
|
||||
// Zoom based on mouse right click
|
||||
if (IsMouseButtonPressed(MOUSE_BUTTON_RIGHT))
|
||||
{
|
||||
// Get the world point that is under the mouse
|
||||
Vector2 mouseWorldPos = GetScreenToWorld2D(GetMousePosition(), camera);
|
||||
|
|
@ -89,7 +89,7 @@ int main ()
|
|||
// under the cursor to the screen space point under the cursor at any zoom
|
||||
camera.target = mouseWorldPos;
|
||||
}
|
||||
if (IsMouseButtonDown(MOUSE_BUTTON_LEFT))
|
||||
if (IsMouseButtonDown(MOUSE_BUTTON_RIGHT))
|
||||
{
|
||||
// Zoom increment
|
||||
float deltaX = GetMouseDelta().x;
|
||||
|
|
@ -120,9 +120,15 @@ int main ()
|
|||
|
||||
EndMode2D();
|
||||
|
||||
// Draw mouse reference
|
||||
//Vector2 mousePos = GetWorldToScreen2D(GetMousePosition(), camera)
|
||||
DrawCircleV(GetMousePosition(), 4, DARKGRAY);
|
||||
DrawTextEx(GetFontDefault(), TextFormat("[%i, %i]", GetMouseX(), GetMouseY()),
|
||||
Vector2Add(GetMousePosition(), (Vector2){ -44, -24 }), 20, 2, BLACK);
|
||||
|
||||
DrawText("[1][2] Select mouse zoom mode (Wheel or Move)", 20, 20, 20, DARKGRAY);
|
||||
if (zoomMode == 0) DrawText("Mouse right button drag to move, mouse wheel to zoom", 20, 50, 20, DARKGRAY);
|
||||
else DrawText("Mouse right button drag to move, mouse press and move to zoom", 20, 50, 20, DARKGRAY);
|
||||
if (zoomMode == 0) DrawText("Mouse left button drag to move, mouse wheel to zoom", 20, 50, 20, DARKGRAY);
|
||||
else DrawText("Mouse left button drag to move, mouse press and move to zoom", 20, 50, 20, DARKGRAY);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ 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
|
||||
// For advanced camera controls, it's recommended to compute camera movement manually
|
||||
UpdateCamera(&camera, cameraMode); // Update camera
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -4,9 +4,12 @@
|
|||
*
|
||||
* Welcome to raylib!
|
||||
*
|
||||
* To test examples, just press F6 and execute raylib_compile_execute script
|
||||
* To test examples, just press F6 and execute 'raylib_compile_execute' script
|
||||
* Note that compiled executable is placed in the same folder as .c file
|
||||
*
|
||||
* To test the examples on Web, press F6 and execute 'raylib_compile_execute_web' script
|
||||
* Web version of the program is generated in the same folder as .c file
|
||||
*
|
||||
* You can find all basic examples on C:\raylib\raylib\examples folder or
|
||||
* raylib official webpage: www.raylib.com
|
||||
*
|
||||
|
|
|
|||
|
|
@ -20,9 +20,9 @@
|
|||
#include "raylib.h"
|
||||
|
||||
// NOTE: Gamepad name ID depends on drivers and OS
|
||||
#define XBOX360_LEGACY_NAME_ID "Xbox Controller"
|
||||
#define XBOX360_NAME_ID "Xbox 360 Controller"
|
||||
#define PS3_NAME_ID "Sony PLAYSTATION(R)3 Controller"
|
||||
#define XBOX_ALIAS_1 "xbox"
|
||||
#define XBOX_ALIAS_2 "x-box"
|
||||
#define PS_ALIAS "playstation"
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
|
|
@ -41,6 +41,14 @@ int main(void)
|
|||
Texture2D texPs3Pad = LoadTexture("resources/ps3.png");
|
||||
Texture2D texXboxPad = LoadTexture("resources/xbox.png");
|
||||
|
||||
// Set axis deadzones
|
||||
const float leftStickDeadzoneX = 0.1f;
|
||||
const float leftStickDeadzoneY = 0.1f;
|
||||
const float rightStickDeadzoneX = 0.1f;
|
||||
const float rightStickDeadzoneY = 0.1f;
|
||||
const float leftTriggerDeadzone = -0.9f;
|
||||
const float rightTriggerDeadzone = -0.9f;
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
|
|
@ -67,7 +75,23 @@ int main(void)
|
|||
{
|
||||
DrawText(TextFormat("GP%d: %s", gamepad, GetGamepadName(gamepad)), 10, 10, 10, BLACK);
|
||||
|
||||
if (TextIsEqual(GetGamepadName(gamepad), XBOX360_LEGACY_NAME_ID) || TextIsEqual(GetGamepadName(gamepad), XBOX360_NAME_ID))
|
||||
// Get axis values
|
||||
float leftStickX = GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_LEFT_X);
|
||||
float leftStickY = GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_LEFT_Y);
|
||||
float rightStickX = GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_RIGHT_X);
|
||||
float rightStickY = GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_RIGHT_Y);
|
||||
float leftTrigger = GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_LEFT_TRIGGER);
|
||||
float rightTrigger = GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_RIGHT_TRIGGER);
|
||||
|
||||
// Calculate deadzones
|
||||
if (leftStickX > -leftStickDeadzoneX && leftStickX < leftStickDeadzoneX) leftStickX = 0.0f;
|
||||
if (leftStickY > -leftStickDeadzoneY && leftStickY < leftStickDeadzoneY) leftStickY = 0.0f;
|
||||
if (rightStickX > -rightStickDeadzoneX && rightStickX < rightStickDeadzoneX) rightStickX = 0.0f;
|
||||
if (rightStickY > -rightStickDeadzoneY && rightStickY < rightStickDeadzoneY) rightStickY = 0.0f;
|
||||
if (leftTrigger < leftTriggerDeadzone) leftTrigger = -1.0f;
|
||||
if (rightTrigger < rightTriggerDeadzone) rightTrigger = -1.0f;
|
||||
|
||||
if (TextFindIndex(TextToLower(GetGamepadName(gamepad)), XBOX_ALIAS_1) > -1 || TextFindIndex(TextToLower(GetGamepadName(gamepad)), XBOX_ALIAS_2) > -1)
|
||||
{
|
||||
DrawTexture(texXboxPad, 0, 0, DARKGRAY);
|
||||
|
||||
|
|
@ -95,32 +119,31 @@ int main(void)
|
|||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_RIGHT_TRIGGER_1)) DrawCircle(536, 61, 20, RED);
|
||||
|
||||
// Draw axis: left joystick
|
||||
|
||||
Color leftGamepadColor = BLACK;
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_THUMB)) leftGamepadColor = RED;
|
||||
DrawCircle(259, 152, 39, BLACK);
|
||||
DrawCircle(259, 152, 34, LIGHTGRAY);
|
||||
DrawCircle(259 + (int)(GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_LEFT_X)*20),
|
||||
152 + (int)(GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_LEFT_Y)*20), 25, leftGamepadColor);
|
||||
DrawCircle(259 + (int)(leftStickX*20),
|
||||
152 + (int)(leftStickY*20), 25, leftGamepadColor);
|
||||
|
||||
// Draw axis: right joystick
|
||||
Color rightGamepadColor = BLACK;
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_RIGHT_THUMB)) rightGamepadColor = RED;
|
||||
DrawCircle(461, 237, 38, BLACK);
|
||||
DrawCircle(461, 237, 33, LIGHTGRAY);
|
||||
DrawCircle(461 + (int)(GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_RIGHT_X)*20),
|
||||
237 + (int)(GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_RIGHT_Y)*20), 25, rightGamepadColor);
|
||||
DrawCircle(461 + (int)(rightStickX*20),
|
||||
237 + (int)(rightStickY*20), 25, rightGamepadColor);
|
||||
|
||||
// Draw axis: left-right triggers
|
||||
DrawRectangle(170, 30, 15, 70, GRAY);
|
||||
DrawRectangle(604, 30, 15, 70, GRAY);
|
||||
DrawRectangle(170, 30, 15, (int)(((1 + GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_LEFT_TRIGGER))/2)*70), RED);
|
||||
DrawRectangle(604, 30, 15, (int)(((1 + GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_RIGHT_TRIGGER))/2)*70), RED);
|
||||
DrawRectangle(170, 30, 15, (int)(((1 + leftTrigger)/2)*70), RED);
|
||||
DrawRectangle(604, 30, 15, (int)(((1 + rightTrigger)/2)*70), RED);
|
||||
|
||||
//DrawText(TextFormat("Xbox axis LT: %02.02f", GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_LEFT_TRIGGER)), 10, 40, 10, BLACK);
|
||||
//DrawText(TextFormat("Xbox axis RT: %02.02f", GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_RIGHT_TRIGGER)), 10, 60, 10, BLACK);
|
||||
}
|
||||
else if (TextIsEqual(GetGamepadName(gamepad), PS3_NAME_ID))
|
||||
else if (TextFindIndex(TextToLower(GetGamepadName(gamepad)), PS_ALIAS) > -1)
|
||||
{
|
||||
DrawTexture(texPs3Pad, 0, 0, DARKGRAY);
|
||||
|
||||
|
|
@ -150,30 +173,85 @@ int main(void)
|
|||
// Draw axis: left joystick
|
||||
Color leftGamepadColor = BLACK;
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_THUMB)) leftGamepadColor = RED;
|
||||
DrawCircle(319, 255, 35, leftGamepadColor);
|
||||
DrawCircle(319, 255, 35, BLACK);
|
||||
DrawCircle(319, 255, 31, LIGHTGRAY);
|
||||
DrawCircle(319 + (int)(GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_LEFT_X) * 20),
|
||||
255 + (int)(GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_LEFT_Y) * 20), 25, leftGamepadColor);
|
||||
DrawCircle(319 + (int)(leftStickX*20),
|
||||
255 + (int)(leftStickY*20), 25, leftGamepadColor);
|
||||
|
||||
// Draw axis: right joystick
|
||||
Color rightGamepadColor = BLACK;
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_RIGHT_THUMB)) rightGamepadColor = RED;
|
||||
DrawCircle(475, 255, 35, BLACK);
|
||||
DrawCircle(475, 255, 31, LIGHTGRAY);
|
||||
DrawCircle(475 + (int)(GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_RIGHT_X) * 20),
|
||||
255 + (int)(GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_RIGHT_Y) * 20), 25, rightGamepadColor);
|
||||
DrawCircle(475 + (int)(rightStickX*20),
|
||||
255 + (int)(rightStickY*20), 25, rightGamepadColor);
|
||||
|
||||
// Draw axis: left-right triggers
|
||||
DrawRectangle(169, 48, 15, 70, GRAY);
|
||||
DrawRectangle(611, 48, 15, 70, GRAY);
|
||||
DrawRectangle(169, 48, 15, (int)(((1 - GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_LEFT_TRIGGER)) / 2) * 70), RED);
|
||||
DrawRectangle(611, 48, 15, (int)(((1 - GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_RIGHT_TRIGGER)) / 2) * 70), RED);
|
||||
DrawRectangle(169, 48, 15, (int)(((1 + leftTrigger)/2)*70), RED);
|
||||
DrawRectangle(611, 48, 15, (int)(((1 + rightTrigger)/2)*70), RED);
|
||||
}
|
||||
else
|
||||
{
|
||||
DrawText("- GENERIC GAMEPAD -", 280, 180, 20, GRAY);
|
||||
|
||||
// TODO: Draw generic gamepad
|
||||
// Draw background: generic
|
||||
DrawRectangleRounded((Rectangle){ 175, 110, 460, 220}, 0.3f, 16, DARKGRAY);
|
||||
|
||||
// Draw buttons: basic
|
||||
DrawCircle(365, 170, 12, RAYWHITE);
|
||||
DrawCircle(405, 170, 12, RAYWHITE);
|
||||
DrawCircle(445, 170, 12, RAYWHITE);
|
||||
DrawCircle(516, 191, 17, RAYWHITE);
|
||||
DrawCircle(551, 227, 17, RAYWHITE);
|
||||
DrawCircle(587, 191, 17, RAYWHITE);
|
||||
DrawCircle(551, 155, 17, RAYWHITE);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_MIDDLE_LEFT)) DrawCircle(365, 170, 10, RED);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_MIDDLE)) DrawCircle(405, 170, 10, GREEN);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_MIDDLE_RIGHT)) DrawCircle(445, 170, 10, BLUE);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_RIGHT_FACE_LEFT)) DrawCircle(516, 191, 15, GOLD);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_RIGHT_FACE_DOWN)) DrawCircle(551, 227, 15, BLUE);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_RIGHT_FACE_RIGHT)) DrawCircle(587, 191, 15, GREEN);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_RIGHT_FACE_UP)) DrawCircle(551, 155, 15, RED);
|
||||
|
||||
// Draw buttons: d-pad
|
||||
DrawRectangle(245, 145, 28, 88, RAYWHITE);
|
||||
DrawRectangle(215, 174, 88, 29, RAYWHITE);
|
||||
DrawRectangle(247, 147, 24, 84, BLACK);
|
||||
DrawRectangle(217, 176, 84, 25, BLACK);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_UP)) DrawRectangle(247, 147, 24, 29, RED);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_DOWN)) DrawRectangle(247, 147 + 54, 24, 30, RED);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_LEFT)) DrawRectangle(217, 176, 30, 25, RED);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_RIGHT)) DrawRectangle(217 + 54, 176, 30, 25, RED);
|
||||
|
||||
// Draw buttons: left-right back
|
||||
DrawRectangleRounded((Rectangle){ 215, 98, 100, 10}, 0.5f, 16, DARKGRAY);
|
||||
DrawRectangleRounded((Rectangle){ 495, 98, 100, 10}, 0.5f, 16, DARKGRAY);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_TRIGGER_1)) DrawRectangleRounded((Rectangle){ 215, 98, 100, 10}, 0.5f, 16, RED);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_RIGHT_TRIGGER_1)) DrawRectangleRounded((Rectangle){ 495, 98, 100, 10}, 0.5f, 16, RED);
|
||||
|
||||
// Draw axis: left joystick
|
||||
Color leftGamepadColor = BLACK;
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_THUMB)) leftGamepadColor = RED;
|
||||
DrawCircle(345, 260, 40, BLACK);
|
||||
DrawCircle(345, 260, 35, LIGHTGRAY);
|
||||
DrawCircle(345 + (int)(leftStickX*20),
|
||||
260 + (int)(leftStickY*20), 25, leftGamepadColor);
|
||||
|
||||
// Draw axis: right joystick
|
||||
Color rightGamepadColor = BLACK;
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_RIGHT_THUMB)) rightGamepadColor = RED;
|
||||
DrawCircle(465, 260, 40, BLACK);
|
||||
DrawCircle(465, 260, 35, LIGHTGRAY);
|
||||
DrawCircle(465 + (int)(rightStickX*20),
|
||||
260 + (int)(rightStickY*20), 25, rightGamepadColor);
|
||||
|
||||
// Draw axis: left-right triggers
|
||||
DrawRectangle(151, 110, 15, 70, GRAY);
|
||||
DrawRectangle(644, 110, 15, 70, GRAY);
|
||||
DrawRectangle(151, 110, 15, (int)(((1 + leftTrigger)/2)*70), RED);
|
||||
DrawRectangle(644, 110, 15, (int)(((1 + rightTrigger)/2)*70), RED);
|
||||
|
||||
}
|
||||
|
||||
DrawText(TextFormat("DETECTED AXIS [%i]:", GetGamepadAxisCount(0)), 10, 50, 10, MAROON);
|
||||
|
|
|
|||
|
|
@ -29,19 +29,19 @@ int main(void)
|
|||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [core] example - input virtual controls");
|
||||
|
||||
const int dpadX = 90;
|
||||
const int dpadY = 300;
|
||||
const int dpadRad = 25;//radius of each pad
|
||||
const float dpadX = 90;
|
||||
const float dpadY = 300;
|
||||
const float dpadRad = 25.0f;//radius of each pad
|
||||
Color dpadColor = BLUE;
|
||||
int dpadKeydown = -1;//-1 if not down, else 0,1,2,3
|
||||
|
||||
|
||||
const float dpadCollider[4][2]= // collider array with x,y position
|
||||
{
|
||||
{dpadX,dpadY-dpadRad*1.5},//up
|
||||
{dpadX-dpadRad*1.5,dpadY},//left
|
||||
{dpadX+dpadRad*1.5,dpadY},//right
|
||||
{dpadX,dpadY+dpadRad*1.5}//down
|
||||
{dpadX,dpadY-dpadRad*1.5f},//up
|
||||
{dpadX-dpadRad*1.5f,dpadY},//left
|
||||
{dpadX+dpadRad*1.5f,dpadY},//right
|
||||
{dpadX,dpadY+dpadRad*1.5f}//down
|
||||
};
|
||||
const char dpadLabel[4]="XYBA";//label of Dpad
|
||||
|
||||
|
|
@ -57,8 +57,8 @@ int main(void)
|
|||
// Update
|
||||
//--------------------------------------------------------------------------
|
||||
dpadKeydown = -1; //reset
|
||||
float inputX=0;
|
||||
float inputY=0;
|
||||
int inputX = 0;
|
||||
int inputY = 0;
|
||||
if(GetTouchPointCount()>0)
|
||||
{//use touch pos
|
||||
inputX = GetTouchX();
|
||||
|
|
@ -90,7 +90,6 @@ int main(void)
|
|||
default:;
|
||||
};
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
//--------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
|
@ -98,17 +97,18 @@ int main(void)
|
|||
for(int i=0;i<4;i++)
|
||||
{
|
||||
//draw all pad
|
||||
DrawCircle(dpadCollider[i][0],dpadCollider[i][1],dpadRad,dpadColor);
|
||||
DrawCircleV((Vector2) { dpadCollider[i][0], dpadCollider[i][1] }, dpadRad, dpadColor);
|
||||
if(i!=dpadKeydown)
|
||||
{
|
||||
//draw label
|
||||
DrawText(TextSubtext(dpadLabel,i,1),
|
||||
dpadCollider[i][0]-5,
|
||||
dpadCollider[i][1]-5,16,BLACK);
|
||||
(int)dpadCollider[i][0]-7,
|
||||
(int)dpadCollider[i][1]-8,20,BLACK);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
DrawText("Player",playerX,playerY,16,BLACK);
|
||||
DrawRectangleRec((Rectangle) { playerX - 4, playerY - 4, 75, 28 }, RED);
|
||||
DrawText("Player", (int)playerX, (int)playerY, 20, WHITE);
|
||||
EndDrawing();
|
||||
//--------------------------------------------------------------------------
|
||||
}
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 8.9 KiB |
|
|
@ -81,6 +81,8 @@ int main(void)
|
|||
// Update model animation
|
||||
ModelAnimation anim = modelAnimations[animIndex];
|
||||
animCurrentFrame = (animCurrentFrame + 1)%anim.frameCount;
|
||||
characterModel.transform = MatrixTranslate(position.x, position.y, position.z);
|
||||
UpdateModelAnimationBones(characterModel, anim, animCurrentFrame);
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
|
|
@ -91,12 +93,11 @@ int main(void)
|
|||
|
||||
BeginMode3D(camera);
|
||||
|
||||
// Draw character
|
||||
characterModel.transform = MatrixTranslate(position.x, position.y, position.z);
|
||||
UpdateModelAnimationBoneMatrices(characterModel, anim, animCurrentFrame);
|
||||
// Draw character mesh, pose calculation is done in shader (GPU skinning)
|
||||
DrawMesh(characterModel.meshes[0], characterModel.materials[1], characterModel.transform);
|
||||
|
||||
DrawGrid(10, 1.0f);
|
||||
|
||||
EndMode3D();
|
||||
|
||||
DrawText("Use the T/G to switch animation", 10, 10, 20, GRAY);
|
||||
|
|
@ -107,9 +108,9 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
UnloadModelAnimations(modelAnimations, animsCount);
|
||||
UnloadModel(characterModel); // Unload character model and meshes/material
|
||||
UnloadShader(skinningShader);
|
||||
UnloadModelAnimations(modelAnimations, animsCount); // Unload model animation
|
||||
UnloadModel(characterModel); // Unload model and meshes/material
|
||||
UnloadShader(skinningShader); // Unload GPU skinning shader
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@ static TextureCubemap GenTextureCubemap(Shader shader, Texture2D panorama, int s
|
|||
// STEP 1: Setup framebuffer
|
||||
//------------------------------------------------------------------------------------------
|
||||
unsigned int rbo = rlLoadTextureDepth(size, size, true);
|
||||
cubemap.id = rlLoadTextureCubemap(0, size, format);
|
||||
cubemap.id = rlLoadTextureCubemap(0, size, format, 1);
|
||||
|
||||
unsigned int fbo = rlLoadFramebuffer();
|
||||
rlFramebufferAttach(fbo, rbo, RL_ATTACHMENT_DEPTH, RL_ATTACHMENT_RENDERBUFFER, 0);
|
||||
|
|
|
|||
|
|
@ -1,17 +1,20 @@
|
|||
#version 100
|
||||
|
||||
precision mediump float;
|
||||
|
||||
// Input vertex attributes (from vertex shader)
|
||||
in vec2 fragTexCoord;
|
||||
in vec4 fragColor;
|
||||
|
||||
// Output fragment color
|
||||
out vec4 finalColor;
|
||||
varying vec2 fragTexCoord;
|
||||
varying vec4 fragColor;
|
||||
|
||||
// Input uniform values
|
||||
uniform sampler2D texture0;
|
||||
uniform vec4 colDiffuse;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 texelColor = texture(texture0, fragTexCoord);
|
||||
finalColor = texelColor*colDiffuse*fragColor;
|
||||
// Fetch color from texture sampler
|
||||
vec4 texelColor = texture2D(texture0, fragTexCoord);
|
||||
|
||||
// Calculate final fragment color
|
||||
gl_FragColor = texelColor*colDiffuse*fragColor;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,18 +1,21 @@
|
|||
#version 100
|
||||
|
||||
in vec3 vertexPosition;
|
||||
in vec2 vertexTexCoord;
|
||||
in vec4 vertexColor;
|
||||
in vec4 vertexBoneIds;
|
||||
in vec4 vertexBoneWeights;
|
||||
#define MAX_BONE_NUM 64
|
||||
|
||||
#define MAX_BONE_NUM 128
|
||||
// Input vertex attributes
|
||||
attribute vec3 vertexPosition;
|
||||
attribute vec2 vertexTexCoord;
|
||||
attribute vec4 vertexColor;
|
||||
attribute vec4 vertexBoneIds;
|
||||
attribute vec4 vertexBoneWeights;
|
||||
|
||||
// Input uniform values
|
||||
uniform mat4 mvp;
|
||||
uniform mat4 boneMatrices[MAX_BONE_NUM];
|
||||
|
||||
uniform mat4 mvp;
|
||||
|
||||
out vec2 fragTexCoord;
|
||||
out vec4 fragColor;
|
||||
// Output vertex attributes (to fragment shader)
|
||||
varying vec2 fragTexCoord;
|
||||
varying vec4 fragColor;
|
||||
|
||||
void main()
|
||||
{
|
||||
|
|
@ -21,14 +24,36 @@ void main()
|
|||
int boneIndex2 = int(vertexBoneIds.z);
|
||||
int boneIndex3 = int(vertexBoneIds.w);
|
||||
|
||||
// WARNING: OpenGL ES 2.0 does not support automatic matrix transposing, neither transpose() function
|
||||
mat4 boneMatrixTransposed0 = mat4(
|
||||
vec4(boneMatrices[boneIndex0][0].x, boneMatrices[boneIndex0][1].x, boneMatrices[boneIndex0][2].x, boneMatrices[boneIndex0][3].x),
|
||||
vec4(boneMatrices[boneIndex0][0].y, boneMatrices[boneIndex0][1].y, boneMatrices[boneIndex0][2].y, boneMatrices[boneIndex0][3].y),
|
||||
vec4(boneMatrices[boneIndex0][0].z, boneMatrices[boneIndex0][1].z, boneMatrices[boneIndex0][2].z, boneMatrices[boneIndex0][3].z),
|
||||
vec4(boneMatrices[boneIndex0][0].w, boneMatrices[boneIndex0][1].w, boneMatrices[boneIndex0][2].w, boneMatrices[boneIndex0][3].w));
|
||||
mat4 boneMatrixTransposed1 = mat4(
|
||||
vec4(boneMatrices[boneIndex1][0].x, boneMatrices[boneIndex1][1].x, boneMatrices[boneIndex1][2].x, boneMatrices[boneIndex1][3].x),
|
||||
vec4(boneMatrices[boneIndex1][0].y, boneMatrices[boneIndex1][1].y, boneMatrices[boneIndex1][2].y, boneMatrices[boneIndex1][3].y),
|
||||
vec4(boneMatrices[boneIndex1][0].z, boneMatrices[boneIndex1][1].z, boneMatrices[boneIndex1][2].z, boneMatrices[boneIndex1][3].z),
|
||||
vec4(boneMatrices[boneIndex1][0].w, boneMatrices[boneIndex1][1].w, boneMatrices[boneIndex1][2].w, boneMatrices[boneIndex1][3].w));
|
||||
mat4 boneMatrixTransposed2 = mat4(
|
||||
vec4(boneMatrices[boneIndex2][0].x, boneMatrices[boneIndex2][1].x, boneMatrices[boneIndex2][2].x, boneMatrices[boneIndex2][3].x),
|
||||
vec4(boneMatrices[boneIndex2][0].y, boneMatrices[boneIndex2][1].y, boneMatrices[boneIndex2][2].y, boneMatrices[boneIndex2][3].y),
|
||||
vec4(boneMatrices[boneIndex2][0].z, boneMatrices[boneIndex2][1].z, boneMatrices[boneIndex2][2].z, boneMatrices[boneIndex2][3].z),
|
||||
vec4(boneMatrices[boneIndex2][0].w, boneMatrices[boneIndex2][1].w, boneMatrices[boneIndex2][2].w, boneMatrices[boneIndex2][3].w));
|
||||
mat4 boneMatrixTransposed3 = mat4(
|
||||
vec4(boneMatrices[boneIndex3][0].x, boneMatrices[boneIndex3][1].x, boneMatrices[boneIndex3][2].x, boneMatrices[boneIndex3][3].x),
|
||||
vec4(boneMatrices[boneIndex3][0].y, boneMatrices[boneIndex3][1].y, boneMatrices[boneIndex3][2].y, boneMatrices[boneIndex3][3].y),
|
||||
vec4(boneMatrices[boneIndex3][0].z, boneMatrices[boneIndex3][1].z, boneMatrices[boneIndex3][2].z, boneMatrices[boneIndex3][3].z),
|
||||
vec4(boneMatrices[boneIndex3][0].w, boneMatrices[boneIndex3][1].w, boneMatrices[boneIndex3][2].w, boneMatrices[boneIndex3][3].w));
|
||||
|
||||
vec4 skinnedPosition =
|
||||
vertexBoneWeights.x * (boneMatrices[boneIndex0] * vec4(vertexPosition, 1.0f)) +
|
||||
vertexBoneWeights.y * (boneMatrices[boneIndex1] * vec4(vertexPosition, 1.0f)) +
|
||||
vertexBoneWeights.z * (boneMatrices[boneIndex2] * vec4(vertexPosition, 1.0f)) +
|
||||
vertexBoneWeights.w * (boneMatrices[boneIndex3] * vec4(vertexPosition, 1.0f));
|
||||
vertexBoneWeights.x*(boneMatrixTransposed0*vec4(vertexPosition, 1.0)) +
|
||||
vertexBoneWeights.y*(boneMatrixTransposed1*vec4(vertexPosition, 1.0)) +
|
||||
vertexBoneWeights.z*(boneMatrixTransposed2*vec4(vertexPosition, 1.0)) +
|
||||
vertexBoneWeights.w*(boneMatrixTransposed3*vec4(vertexPosition, 1.0));
|
||||
|
||||
fragTexCoord = vertexTexCoord;
|
||||
fragColor = vertexColor;
|
||||
|
||||
gl_Position = mvp * skinnedPosition;
|
||||
gl_Position = mvp*skinnedPosition;
|
||||
}
|
||||
|
|
@ -1,16 +1,19 @@
|
|||
#version 330
|
||||
|
||||
#define MAX_BONE_NUM 128
|
||||
|
||||
// Input vertex attributes
|
||||
in vec3 vertexPosition;
|
||||
in vec2 vertexTexCoord;
|
||||
in vec4 vertexColor;
|
||||
in vec4 vertexBoneIds;
|
||||
in vec4 vertexBoneWeights;
|
||||
|
||||
#define MAX_BONE_NUM 128
|
||||
// Input uniform values
|
||||
uniform mat4 mvp;
|
||||
uniform mat4 boneMatrices[MAX_BONE_NUM];
|
||||
|
||||
uniform mat4 mvp;
|
||||
|
||||
// Output vertex attributes (to fragment shader)
|
||||
out vec2 fragTexCoord;
|
||||
out vec4 fragColor;
|
||||
|
||||
|
|
@ -22,13 +25,13 @@ void main()
|
|||
int boneIndex3 = int(vertexBoneIds.w);
|
||||
|
||||
vec4 skinnedPosition =
|
||||
vertexBoneWeights.x * (boneMatrices[boneIndex0] * vec4(vertexPosition, 1.0f)) +
|
||||
vertexBoneWeights.y * (boneMatrices[boneIndex1] * vec4(vertexPosition, 1.0f)) +
|
||||
vertexBoneWeights.z * (boneMatrices[boneIndex2] * vec4(vertexPosition, 1.0f)) +
|
||||
vertexBoneWeights.w * (boneMatrices[boneIndex3] * vec4(vertexPosition, 1.0f));
|
||||
vertexBoneWeights.x*(boneMatrices[boneIndex0]*vec4(vertexPosition, 1.0)) +
|
||||
vertexBoneWeights.y*(boneMatrices[boneIndex1]*vec4(vertexPosition, 1.0)) +
|
||||
vertexBoneWeights.z*(boneMatrices[boneIndex2]*vec4(vertexPosition, 1.0)) +
|
||||
vertexBoneWeights.w*(boneMatrices[boneIndex3]*vec4(vertexPosition, 1.0));
|
||||
|
||||
fragTexCoord = vertexTexCoord;
|
||||
fragColor = vertexColor;
|
||||
|
||||
gl_Position = mvp * skinnedPosition;
|
||||
gl_Position = mvp*skinnedPosition;
|
||||
}
|
||||
|
|
@ -40,6 +40,8 @@ void main()
|
|||
vec3 viewD = normalize(viewPos - fragPosition);
|
||||
vec3 specular = vec3(0.0);
|
||||
|
||||
vec4 tint = colDiffuse * fragColor;
|
||||
|
||||
// NOTE: Implement here your fragment shader code
|
||||
|
||||
for (int i = 0; i < MAX_LIGHTS; i++)
|
||||
|
|
@ -67,7 +69,7 @@ void main()
|
|||
}
|
||||
}
|
||||
|
||||
vec4 finalColor = (texelColor*((colDiffuse + vec4(specular, 1.0))*vec4(lightDot, 1.0)));
|
||||
vec4 finalColor = (texelColor*((tint + vec4(specular, 1.0))*vec4(lightDot, 1.0)));
|
||||
finalColor += texelColor*(ambient/10.0);
|
||||
|
||||
// Gamma correction
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#version 100
|
||||
|
||||
precision mediump float;
|
||||
precision highp float;
|
||||
|
||||
#define MAX_LIGHTS 4
|
||||
#define LIGHT_DIRECTIONAL 0
|
||||
|
|
@ -17,12 +17,12 @@ struct Light {
|
|||
};
|
||||
|
||||
// Input vertex attributes (from vertex shader)
|
||||
varying in vec3 fragPosition;
|
||||
varying in vec2 fragTexCoord;
|
||||
varying in vec4 fragColor;
|
||||
varying in vec3 fragNormal;
|
||||
varying in vec4 shadowPos;
|
||||
varying in mat3 TBN;
|
||||
varying vec3 fragPosition;
|
||||
varying vec2 fragTexCoord;
|
||||
varying vec4 fragColor;
|
||||
varying vec3 fragNormal;
|
||||
varying vec4 shadowPos;
|
||||
varying mat3 TBN;
|
||||
|
||||
|
||||
// Input uniform values
|
||||
|
|
@ -113,7 +113,7 @@ vec3 pbr(){
|
|||
vec3 baseRefl = mix(vec3(0.04),albedo.rgb,metallic);
|
||||
vec3 Lo = vec3(0.0); // acumulate lighting lum
|
||||
|
||||
for(int i=0;i<numOfLights;++i){
|
||||
for(int i=0;i<4;++i){
|
||||
|
||||
vec3 L = normalize(lights[i].position - fragPosition); // calc light vector
|
||||
vec3 H = normalize(V + L); // calc halfway bisecting vector
|
||||
|
|
|
|||
|
|
@ -38,6 +38,8 @@ void main()
|
|||
vec3 viewD = normalize(viewPos - fragPosition);
|
||||
vec3 specular = vec3(0.0);
|
||||
|
||||
vec4 tint = colDiffuse * fragColor;
|
||||
|
||||
// NOTE: Implement here your fragment shader code
|
||||
|
||||
for (int i = 0; i < MAX_LIGHTS; i++)
|
||||
|
|
@ -65,7 +67,7 @@ void main()
|
|||
}
|
||||
}
|
||||
|
||||
vec4 finalColor = (texelColor*((colDiffuse + vec4(specular, 1.0))*vec4(lightDot, 1.0)));
|
||||
vec4 finalColor = (texelColor*((tint + vec4(specular, 1.0))*vec4(lightDot, 1.0)));
|
||||
finalColor += texelColor*(ambient/10.0);
|
||||
|
||||
// Gamma correction
|
||||
|
|
|
|||
|
|
@ -20,6 +20,9 @@ void main()
|
|||
|
||||
// NOTE: Implement here your fragment shader code
|
||||
|
||||
finalColor = texelColor*colDiffuse;
|
||||
// final color is the color from the texture
|
||||
// times the tint color (colDiffuse)
|
||||
// times the fragment color (interpolated vertex color)
|
||||
finalColor = texelColor*colDiffuse*fragColor;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,14 +1,22 @@
|
|||
#version 330
|
||||
|
||||
// Input vertex attributes (from vertex shader)
|
||||
in vec2 fragTexCoord;
|
||||
in vec4 fragColor;
|
||||
|
||||
// Input uniform values
|
||||
uniform sampler2D texture0;
|
||||
uniform vec4 colDiffuse;
|
||||
|
||||
// Output fragment color
|
||||
//out vec4 finalColor;
|
||||
|
||||
// NOTE: Add here your custom variables
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 texelColor = texture2D(texture0, fragTexCoord);
|
||||
vec4 texelColor = texture(texture0, fragTexCoord);
|
||||
|
||||
gl_FragColor = texelColor*colDiffuse*fragColor;
|
||||
gl_FragDepth = gl_FragCoord.z;
|
||||
}
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
// Input vertex attributes (from vertex shader)
|
||||
in vec3 fragPosition;
|
||||
in vec2 fragTexCoord;
|
||||
//in vec4 fragColor;
|
||||
in vec4 fragColor;
|
||||
in vec3 fragNormal;
|
||||
|
||||
// Input uniform values
|
||||
|
|
@ -41,6 +41,8 @@ void main()
|
|||
vec3 viewD = normalize(viewPos - fragPosition);
|
||||
vec3 specular = vec3(0.0);
|
||||
|
||||
vec4 tint = colDiffuse * fragColor;
|
||||
|
||||
// NOTE: Implement here your fragment shader code
|
||||
|
||||
for (int i = 0; i < MAX_LIGHTS; i++)
|
||||
|
|
@ -68,8 +70,8 @@ void main()
|
|||
}
|
||||
}
|
||||
|
||||
finalColor = (texelColor*((colDiffuse + vec4(specular, 1.0))*vec4(lightDot, 1.0)));
|
||||
finalColor += texelColor*(ambient/10.0)*colDiffuse;
|
||||
finalColor = (texelColor*((tint + vec4(specular, 1.0))*vec4(lightDot, 1.0)));
|
||||
finalColor += texelColor*(ambient/10.0)*tint;
|
||||
|
||||
// Gamma correction
|
||||
finalColor = pow(finalColor, vec4(1.0/2.2));
|
||||
|
|
|
|||
|
|
@ -20,22 +20,22 @@ void main()
|
|||
float y = 1.0/resolution.y;
|
||||
|
||||
vec4 horizEdge = vec4(0.0);
|
||||
horizEdge -= texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y - y))*1.0;
|
||||
horizEdge -= texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y ))*2.0;
|
||||
horizEdge -= texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y + y))*1.0;
|
||||
horizEdge += texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y - y))*1.0;
|
||||
horizEdge += texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y ))*2.0;
|
||||
horizEdge += texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y + y))*1.0;
|
||||
horizEdge -= texture(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y - y))*1.0;
|
||||
horizEdge -= texture(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y ))*2.0;
|
||||
horizEdge -= texture(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y + y))*1.0;
|
||||
horizEdge += texture(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y - y))*1.0;
|
||||
horizEdge += texture(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y ))*2.0;
|
||||
horizEdge += texture(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y + y))*1.0;
|
||||
|
||||
vec4 vertEdge = vec4(0.0);
|
||||
vertEdge -= texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y - y))*1.0;
|
||||
vertEdge -= texture2D(texture0, vec2(fragTexCoord.x , fragTexCoord.y - y))*2.0;
|
||||
vertEdge -= texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y - y))*1.0;
|
||||
vertEdge += texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y + y))*1.0;
|
||||
vertEdge += texture2D(texture0, vec2(fragTexCoord.x , fragTexCoord.y + y))*2.0;
|
||||
vertEdge += texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y + y))*1.0;
|
||||
vertEdge -= texture(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y - y))*1.0;
|
||||
vertEdge -= texture(texture0, vec2(fragTexCoord.x , fragTexCoord.y - y))*2.0;
|
||||
vertEdge -= texture(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y - y))*1.0;
|
||||
vertEdge += texture(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y + y))*1.0;
|
||||
vertEdge += texture(texture0, vec2(fragTexCoord.x , fragTexCoord.y + y))*2.0;
|
||||
vertEdge += texture(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y + y))*1.0;
|
||||
|
||||
vec3 edge = sqrt((horizEdge.rgb*horizEdge.rgb) + (vertEdge.rgb*vertEdge.rgb));
|
||||
|
||||
finalColor = vec4(edge, texture2D(texture0, fragTexCoord).a);
|
||||
finalColor = vec4(edge, texture(texture0, fragTexCoord).a);
|
||||
}
|
||||
|
|
@ -41,7 +41,7 @@ void main()
|
|||
}
|
||||
|
||||
tc += center;
|
||||
vec4 color = texture2D(texture0, tc/texSize)*colDiffuse*fragColor;;
|
||||
vec4 color = texture(texture0, tc/texSize)*colDiffuse*fragColor;;
|
||||
|
||||
finalColor = vec4(color.rgb, 1.0);;
|
||||
}
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
#if defined(PLATFORM_DESKTOP)
|
||||
#define GLSL_VERSION 330
|
||||
#else // PLATFORM_ANDROID, PLATFORM_WEB
|
||||
#define GLSL_VERSION 120
|
||||
#define GLSL_VERSION 100
|
||||
#endif
|
||||
|
||||
#include <stdlib.h> // Required for: NULL
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ int main(void)
|
|||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
UpdateCamera(&camera, CAMERA_FIRST_PERSON);
|
||||
UpdateCamera(&camera, CAMERA_FREE);
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
|
|
|
|||
|
|
@ -998,7 +998,7 @@ typedef enum {
|
|||
ICON_LAYERS2 = 225,
|
||||
ICON_MLAYERS = 226,
|
||||
ICON_MAPS = 227,
|
||||
ICON_228 = 228,
|
||||
ICON_HOT = 228,
|
||||
ICON_229 = 229,
|
||||
ICON_230 = 230,
|
||||
ICON_231 = 231,
|
||||
|
|
@ -1045,6 +1045,7 @@ typedef enum {
|
|||
|
||||
#if defined(RAYGUI_IMPLEMENTATION)
|
||||
|
||||
#include <ctype.h> // required for: isspace() [GuiTextBox()]
|
||||
#include <stdio.h> // Required for: FILE, fopen(), fclose(), fprintf(), feof(), fscanf(), vsprintf() [GuiLoadStyle(), GuiLoadIcons()]
|
||||
#include <stdlib.h> // Required for: malloc(), calloc(), free() [GuiLoadStyle(), GuiLoadIcons()]
|
||||
#include <string.h> // Required for: strlen() [GuiTextBox(), GuiValueBox()], memset(), memcpy()
|
||||
|
|
@ -1316,7 +1317,7 @@ static unsigned int guiIcons[RAYGUI_ICON_MAX_ICONS*RAYGUI_ICON_DATA_ELEMENTS] =
|
|||
0x07fe0000, 0x1c020402, 0x74021402, 0x54025402, 0x54025402, 0x500857fe, 0x40205ff8, 0x00007fe0, // ICON_LAYERS2
|
||||
0x0ffe0000, 0x3ffa0802, 0x7fea200a, 0x402a402a, 0x422a422a, 0x422e422a, 0x40384e28, 0x00007fe0, // ICON_MLAYERS
|
||||
0x0ffe0000, 0x3ffa0802, 0x7fea200a, 0x402a402a, 0x5b2a512a, 0x512e552a, 0x40385128, 0x00007fe0, // ICON_MAPS
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_228
|
||||
0x04200000, 0x1cf00c60, 0x11f019f0, 0x0f3807b8, 0x1e3c0f3c, 0x1c1c1e1c, 0x1e3c1c1c, 0x00000f70, // ICON_HOT
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_229
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_230
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_231
|
||||
|
|
@ -1639,9 +1640,9 @@ int GuiGroupBox(Rectangle bounds, const char *text)
|
|||
|
||||
// Draw control
|
||||
//--------------------------------------------------------------------
|
||||
GuiDrawRectangle(RAYGUI_CLITERAL(Rectangle){ bounds.x, bounds.y, RAYGUI_GROUPBOX_LINE_THICK, bounds.height }, 0, BLANK, GetColor(GuiGetStyle(DEFAULT, (state == STATE_DISABLED)? BORDER_COLOR_DISABLED : LINE_COLOR)));
|
||||
GuiDrawRectangle(RAYGUI_CLITERAL(Rectangle){ bounds.x, bounds.y + bounds.height - 1, bounds.width, RAYGUI_GROUPBOX_LINE_THICK }, 0, BLANK, GetColor(GuiGetStyle(DEFAULT, (state == STATE_DISABLED)? BORDER_COLOR_DISABLED : LINE_COLOR)));
|
||||
GuiDrawRectangle(RAYGUI_CLITERAL(Rectangle){ bounds.x + bounds.width - 1, bounds.y, RAYGUI_GROUPBOX_LINE_THICK, bounds.height }, 0, BLANK, GetColor(GuiGetStyle(DEFAULT, (state == STATE_DISABLED)? BORDER_COLOR_DISABLED : LINE_COLOR)));
|
||||
GuiDrawRectangle(RAYGUI_CLITERAL(Rectangle){ bounds.x, bounds.y, RAYGUI_GROUPBOX_LINE_THICK, bounds.height }, 0, BLANK, GetColor(GuiGetStyle(DEFAULT, (state == STATE_DISABLED)? (int)BORDER_COLOR_DISABLED : (int)LINE_COLOR)));
|
||||
GuiDrawRectangle(RAYGUI_CLITERAL(Rectangle){ bounds.x, bounds.y + bounds.height - 1, bounds.width, RAYGUI_GROUPBOX_LINE_THICK }, 0, BLANK, GetColor(GuiGetStyle(DEFAULT, (state == STATE_DISABLED)? (int)BORDER_COLOR_DISABLED : (int)LINE_COLOR)));
|
||||
GuiDrawRectangle(RAYGUI_CLITERAL(Rectangle){ bounds.x + bounds.width - 1, bounds.y, RAYGUI_GROUPBOX_LINE_THICK, bounds.height }, 0, BLANK, GetColor(GuiGetStyle(DEFAULT, (state == STATE_DISABLED)? (int)BORDER_COLOR_DISABLED : (int)LINE_COLOR)));
|
||||
|
||||
GuiLine(RAYGUI_CLITERAL(Rectangle){ bounds.x, bounds.y - GuiGetStyle(DEFAULT, TEXT_SIZE)/2, bounds.width, (float)GuiGetStyle(DEFAULT, TEXT_SIZE) }, text);
|
||||
//--------------------------------------------------------------------
|
||||
|
|
@ -1662,7 +1663,7 @@ int GuiLine(Rectangle bounds, const char *text)
|
|||
int result = 0;
|
||||
GuiState state = guiState;
|
||||
|
||||
Color color = GetColor(GuiGetStyle(DEFAULT, (state == STATE_DISABLED)? BORDER_COLOR_DISABLED : LINE_COLOR));
|
||||
Color color = GetColor(GuiGetStyle(DEFAULT, (state == STATE_DISABLED)? (int)BORDER_COLOR_DISABLED : (int)LINE_COLOR));
|
||||
|
||||
// Draw control
|
||||
//--------------------------------------------------------------------
|
||||
|
|
@ -1710,7 +1711,7 @@ int GuiPanel(Rectangle bounds, const char *text)
|
|||
//--------------------------------------------------------------------
|
||||
if (text != NULL) GuiStatusBar(statusBar, text); // Draw panel header as status bar
|
||||
|
||||
GuiDrawRectangle(bounds, RAYGUI_PANEL_BORDER_WIDTH, GetColor(GuiGetStyle(DEFAULT, (state == STATE_DISABLED)? BORDER_COLOR_DISABLED: LINE_COLOR)),
|
||||
GuiDrawRectangle(bounds, RAYGUI_PANEL_BORDER_WIDTH, GetColor(GuiGetStyle(DEFAULT, (state == STATE_DISABLED)? (int)BORDER_COLOR_DISABLED: (int)LINE_COLOR)),
|
||||
GetColor(GuiGetStyle(DEFAULT, (state == STATE_DISABLED)? BASE_COLOR_DISABLED : BACKGROUND_COLOR)));
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
|
|
@ -2603,24 +2604,59 @@ int GuiTextBox(Rectangle bounds, char *text, int textSize, bool editMode)
|
|||
}
|
||||
}
|
||||
|
||||
// Delete codepoint from text, before current cursor position
|
||||
if ((textLength > 0) && (IsKeyPressed(KEY_BACKSPACE) || (IsKeyDown(KEY_BACKSPACE) && (autoCursorCooldownCounter >= RAYGUI_TEXTBOX_AUTO_CURSOR_COOLDOWN))))
|
||||
// Delete related codepoints from text, before current cursor position
|
||||
if ((textLength > 0) && IsKeyPressed(KEY_BACKSPACE) && (IsKeyDown(KEY_LEFT_CONTROL) || IsKeyDown(KEY_RIGHT_CONTROL)))
|
||||
{
|
||||
int i = textBoxCursorIndex - 1;
|
||||
int accCodepointSize = 0;
|
||||
|
||||
// Move cursor to the end of word if on space already
|
||||
while ((i > 0) && isspace(text[i]))
|
||||
{
|
||||
int prevCodepointSize = 0;
|
||||
GetCodepointPrevious(text + i, &prevCodepointSize);
|
||||
i -= prevCodepointSize;
|
||||
accCodepointSize += prevCodepointSize;
|
||||
}
|
||||
|
||||
// Move cursor to the start of the word
|
||||
while ((i > 0) && !isspace(text[i]))
|
||||
{
|
||||
int prevCodepointSize = 0;
|
||||
GetCodepointPrevious(text + i, &prevCodepointSize);
|
||||
i -= prevCodepointSize;
|
||||
accCodepointSize += prevCodepointSize;
|
||||
}
|
||||
|
||||
// Move forward text from cursor position
|
||||
for (int j = (textBoxCursorIndex - accCodepointSize); j < textLength; j++) text[j] = text[j + accCodepointSize];
|
||||
|
||||
// Prevent cursor index from decrementing past 0
|
||||
if (textBoxCursorIndex > 0)
|
||||
{
|
||||
textBoxCursorIndex -= accCodepointSize;
|
||||
textLength -= accCodepointSize;
|
||||
}
|
||||
|
||||
// Make sure text last character is EOL
|
||||
text[textLength] = '\0';
|
||||
}
|
||||
else if ((textLength > 0) && (IsKeyPressed(KEY_BACKSPACE) || (IsKeyDown(KEY_BACKSPACE) && (autoCursorCooldownCounter >= RAYGUI_TEXTBOX_AUTO_CURSOR_COOLDOWN))))
|
||||
{
|
||||
autoCursorDelayCounter++;
|
||||
|
||||
if (IsKeyPressed(KEY_BACKSPACE) || (autoCursorDelayCounter%RAYGUI_TEXTBOX_AUTO_CURSOR_DELAY) == 0) // Delay every movement some frames
|
||||
{
|
||||
int prevCodepointSize = 0;
|
||||
|
||||
// Prevent cursor index from decrementing past 0
|
||||
if (textBoxCursorIndex > 0)
|
||||
{
|
||||
GetCodepointPrevious(text + textBoxCursorIndex, &prevCodepointSize);
|
||||
|
||||
// Move backward text from cursor position
|
||||
for (int i = (textBoxCursorIndex - prevCodepointSize); i < textLength; i++) text[i] = text[i + prevCodepointSize];
|
||||
|
||||
// TODO Check: >= cursor+codepointsize and <= length-codepointsize
|
||||
|
||||
// Prevent cursor index from decrementing past 0
|
||||
if (textBoxCursorIndex > 0)
|
||||
{
|
||||
textBoxCursorIndex -= codepointSize;
|
||||
textLength -= codepointSize;
|
||||
}
|
||||
|
|
@ -2638,7 +2674,7 @@ int GuiTextBox(Rectangle bounds, char *text, int textSize, bool editMode)
|
|||
if (IsKeyPressed(KEY_LEFT) || (autoCursorDelayCounter%RAYGUI_TEXTBOX_AUTO_CURSOR_DELAY) == 0) // Delay every movement some frames
|
||||
{
|
||||
int prevCodepointSize = 0;
|
||||
GetCodepointPrevious(text + textBoxCursorIndex, &prevCodepointSize);
|
||||
if (textBoxCursorIndex > 0) GetCodepointPrevious(text + textBoxCursorIndex, &prevCodepointSize);
|
||||
|
||||
if (textBoxCursorIndex >= prevCodepointSize) textBoxCursorIndex -= prevCodepointSize;
|
||||
}
|
||||
|
|
@ -3426,7 +3462,7 @@ int GuiListViewEx(Rectangle bounds, const char **text, int count, int *scrollInd
|
|||
|
||||
// Draw control
|
||||
//--------------------------------------------------------------------
|
||||
GuiDrawRectangle(bounds, GuiGetStyle(DEFAULT, BORDER_WIDTH), GetColor(GuiGetStyle(LISTVIEW, BORDER + state*3)), GetColor(GuiGetStyle(DEFAULT, BACKGROUND_COLOR))); // Draw background
|
||||
GuiDrawRectangle(bounds, GuiGetStyle(LISTVIEW, BORDER_WIDTH), GetColor(GuiGetStyle(LISTVIEW, BORDER + state*3)), GetColor(GuiGetStyle(DEFAULT, BACKGROUND_COLOR))); // Draw background
|
||||
|
||||
// Draw visible items
|
||||
for (int i = 0; ((i < visibleItems) && (text != NULL)); i++)
|
||||
|
|
@ -3881,7 +3917,7 @@ int GuiMessageBox(Rectangle bounds, const char *title, const char *message, cons
|
|||
buttonBounds.width = (bounds.width - RAYGUI_MESSAGEBOX_BUTTON_PADDING*(buttonCount + 1))/buttonCount;
|
||||
buttonBounds.height = RAYGUI_MESSAGEBOX_BUTTON_HEIGHT;
|
||||
|
||||
int textWidth = GetTextWidth(message) + 2;
|
||||
//int textWidth = GetTextWidth(message) + 2;
|
||||
|
||||
Rectangle textBounds = { 0 };
|
||||
textBounds.x = bounds.x + RAYGUI_MESSAGEBOX_BUTTON_PADDING;
|
||||
|
|
@ -4485,7 +4521,7 @@ static void GuiLoadStyleFromMemory(const unsigned char *fileData, int dataSize)
|
|||
// NOTE: All DEFAULT properties should be defined first in the file
|
||||
GuiSetStyle(0, (int)propertyId, propertyValue);
|
||||
|
||||
if (propertyId < RAYGUI_MAX_PROPS_BASE) for (int i = 1; i < RAYGUI_MAX_CONTROLS; i++) GuiSetStyle(i, (int)propertyId, propertyValue);
|
||||
if (propertyId < RAYGUI_MAX_PROPS_BASE) for (int j = 1; j < RAYGUI_MAX_CONTROLS; j++) GuiSetStyle(j, (int)propertyId, propertyValue);
|
||||
}
|
||||
else GuiSetStyle((int)controlId, (int)propertyId, propertyValue);
|
||||
}
|
||||
|
|
|
|||
330
examples/shapes/shapes_rectangle_advanced.c
Normal file
|
|
@ -0,0 +1,330 @@
|
|||
#include "raylib.h"
|
||||
#include "rlgl.h"
|
||||
#include <math.h>
|
||||
|
||||
// Draw rectangle with rounded edges and horizontal gradient, with options to choose side of roundness
|
||||
// Adapted from both `DrawRectangleRounded` and `DrawRectangleGradientH`
|
||||
void DrawRectangleRoundedGradientH(Rectangle rec, float roundnessLeft, float roundnessRight, int segments, Color left, Color right)
|
||||
{
|
||||
// Neither side is rounded
|
||||
if ((roundnessLeft <= 0.0f && roundnessRight <= 0.0f) || (rec.width < 1) || (rec.height < 1 ))
|
||||
{
|
||||
DrawRectangleGradientEx(rec, left, left, right, right);
|
||||
return;
|
||||
}
|
||||
|
||||
if (roundnessLeft >= 1.0f) roundnessLeft = 1.0f;
|
||||
if (roundnessRight >= 1.0f) roundnessRight = 1.0f;
|
||||
|
||||
// Calculate corner radius both from right and left
|
||||
float recSize = rec.width > rec.height ? rec.height : rec.width;
|
||||
float radiusLeft = (recSize*roundnessLeft)/2;
|
||||
float radiusRight = (recSize*roundnessRight)/2;
|
||||
|
||||
if (radiusLeft <= 0.0f) radiusLeft = 0.0f;
|
||||
if (radiusRight <= 0.0f) radiusRight = 0.0f;
|
||||
|
||||
if (radiusRight <= 0.0f && radiusLeft <= 0.0f) return;
|
||||
|
||||
float stepLength = 90.0f/(float)segments;
|
||||
|
||||
/*
|
||||
Diagram Copied here for reference, original at `DrawRectangleRounded` source code
|
||||
|
||||
P0____________________P1
|
||||
/| |\
|
||||
/1| 2 |3\
|
||||
P7 /__|____________________|__\ P2
|
||||
| |P8 P9| |
|
||||
| 8 | 9 | 4 |
|
||||
| __|____________________|__ |
|
||||
P6 \ |P11 P10| / P3
|
||||
\7| 6 |5/
|
||||
\|____________________|/
|
||||
P5 P4
|
||||
*/
|
||||
|
||||
// Coordinates of the 12 points also apdated from `DrawRectangleRounded`
|
||||
const Vector2 point[12] = {
|
||||
// PO, P1, P2
|
||||
{(float)rec.x + radiusLeft, rec.y}, {(float)(rec.x + rec.width) - radiusRight, rec.y}, { rec.x + rec.width, (float)rec.y + radiusRight },
|
||||
// P3, P4
|
||||
{rec.x + rec.width, (float)(rec.y + rec.height) - radiusRight}, {(float)(rec.x + rec.width) - radiusRight, rec.y + rec.height},
|
||||
// P5, P6, P7
|
||||
{(float)rec.x + radiusLeft, rec.y + rec.height}, { rec.x, (float)(rec.y + rec.height) - radiusLeft}, {rec.x, (float)rec.y + radiusLeft},
|
||||
// P8, P9
|
||||
{(float)rec.x + radiusLeft, (float)rec.y + radiusLeft}, {(float)(rec.x + rec.width) - radiusRight, (float)rec.y + radiusRight},
|
||||
// P10, P11
|
||||
{(float)(rec.x + rec.width) - radiusRight, (float)(rec.y + rec.height) - radiusRight}, {(float)rec.x + radiusLeft, (float)(rec.y + rec.height) - radiusLeft}
|
||||
};
|
||||
|
||||
const Vector2 centers[4] = { point[8], point[9], point[10], point[11] };
|
||||
const float angles[4] = { 180.0f, 270.0f, 0.0f, 90.0f };
|
||||
|
||||
#if defined(SUPPORT_QUADS_DRAW_MODE)
|
||||
rlSetTexture(GetShapesTexture().id);
|
||||
Rectangle shapeRect = GetShapesTextureRectangle();
|
||||
|
||||
rlBegin(RL_QUADS);
|
||||
// Draw all the 4 corners: [1] Upper Left Corner, [3] Upper Right Corner, [5] Lower Right Corner, [7] Lower Left Corner
|
||||
for (int k = 0; k < 4; ++k)
|
||||
{
|
||||
Color color;
|
||||
float radius;
|
||||
if (k == 0) color = left, radius = radiusLeft; // [1] Upper Left Corner
|
||||
if (k == 1) color = right, radius = radiusRight; // [3] Upper Right Corner
|
||||
if (k == 2) color = right, radius = radiusRight; // [5] Lower Right Corner
|
||||
if (k == 3) color = left, radius = radiusLeft; // [7] Lower Left Corner
|
||||
float angle = angles[k];
|
||||
const Vector2 center = centers[k];
|
||||
|
||||
for (int i = 0; i < segments/2; i++)
|
||||
{
|
||||
rlColor4ub(color.r, color.g, color.b, color.a);
|
||||
rlTexCoord2f(shapeRect.x/texShapes.width, shapeRect.y/texShapes.height);
|
||||
rlVertex2f(center.x, center.y);
|
||||
|
||||
rlTexCoord2f((shapeRect.x + shapeRect.width)/texShapes.width, shapeRect.y/texShapes.height);
|
||||
rlVertex2f(center.x + cosf(DEG2RAD*(angle + stepLength*2))*radius, center.y + sinf(DEG2RAD*(angle + stepLength*2))*radius);
|
||||
|
||||
rlTexCoord2f((shapeRect.x + shapeRect.width)/texShapes.width, (shapeRect.y + shapeRect.height)/texShapes.height);
|
||||
rlVertex2f(center.x + cosf(DEG2RAD*(angle + stepLength))*radius, center.y + sinf(DEG2RAD*(angle + stepLength))*radius);
|
||||
|
||||
rlTexCoord2f(shapeRect.x/texShapes.width, (shapeRect.y + shapeRect.height)/texShapes.height);
|
||||
rlVertex2f(center.x + cosf(DEG2RAD*angle)*radius, center.y + sinf(DEG2RAD*angle)*radius);
|
||||
|
||||
angle += (stepLength*2);
|
||||
}
|
||||
|
||||
// End one even segments
|
||||
if ( segments % 2)
|
||||
{
|
||||
rlTexCoord2f(shapeRect.x/texShapes.width, shapeRect.y/texShapes.height);
|
||||
rlVertex2f(center.x, center.y);
|
||||
|
||||
rlTexCoord2f((shapeRect.x + shapeRect.width)/texShapes.width, (shapeRect.y + shapeRect.height)/texShapes.height);
|
||||
rlVertex2f(center.x + cosf(DEG2RAD*(angle + stepLength))*radius, center.y + sinf(DEG2RAD*(angle + stepLength))*radius);
|
||||
|
||||
rlTexCoord2f(shapeRect.x/texShapes.width, (shapeRect.y + shapeRect.height)/texShapes.height);
|
||||
rlVertex2f(center.x + cosf(DEG2RAD*angle)*radius, center.y + sinf(DEG2RAD*angle)*radius);
|
||||
|
||||
rlTexCoord2f((shapeRect.x + shapeRect.width)/texShapes.width, shapeRect.y/texShapes.height);
|
||||
rlVertex2f(center.x, center.y);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Here we use the `Diagram` to guide ourselves to which point receives what color.
|
||||
//
|
||||
// By choosing the color correctly associated with a pointe the gradient effect
|
||||
// will naturally come from OpenGL interpolation.
|
||||
//
|
||||
|
||||
// [2] Upper Rectangle
|
||||
rlColor4ub(left.r, left.g, left.b, left.a);
|
||||
rlTexCoord2f(shapeRect.x/texShapes.width, shapeRect.y/texShapes.height);
|
||||
rlVertex2f(point[0].x, point[0].y);
|
||||
rlTexCoord2f(shapeRect.x/texShapes.width, (shapeRect.y + shapeRect.height)/texShapes.height);
|
||||
rlVertex2f(point[8].x, point[8].y);
|
||||
|
||||
rlColor4ub(right.r, right.g, right.b, right.a);
|
||||
rlTexCoord2f((shapeRect.x + shapeRect.width)/texShapes.width, (shapeRect.y + shapeRect.height)/texShapes.height);
|
||||
rlVertex2f(point[9].x, point[9].y);
|
||||
|
||||
rlColor4ub(right.r, right.g, right.b, right.a);
|
||||
rlTexCoord2f((shapeRect.x + shapeRect.width)/texShapes.width, shapeRect.y/texShapes.height);
|
||||
rlVertex2f(point[1].x, point[1].y);
|
||||
|
||||
// [4] Left Rectangle
|
||||
rlColor4ub(right.r, right.g, right.b, right.a);
|
||||
rlTexCoord2f(shapeRect.x/texShapes.width, shapeRect.y/texShapes.height);
|
||||
rlVertex2f(point[2].x, point[2].y);
|
||||
rlTexCoord2f(shapeRect.x/texShapes.width, (shapeRect.y + shapeRect.height)/texShapes.height);
|
||||
rlVertex2f(point[9].x, point[9].y);
|
||||
rlTexCoord2f((shapeRect.x + shapeRect.width)/texShapes.width, (shapeRect.y + shapeRect.height)/texShapes.height);
|
||||
rlVertex2f(point[10].x, point[10].y);
|
||||
rlTexCoord2f((shapeRect.x + shapeRect.width)/texShapes.width, shapeRect.y/texShapes.height);
|
||||
rlVertex2f(point[3].x, point[3].y);
|
||||
|
||||
// [6] Bottom Rectangle
|
||||
rlColor4ub(left.r, left.g, left.b, left.a);
|
||||
rlTexCoord2f(shapeRect.x/texShapes.width, shapeRect.y/texShapes.height);
|
||||
rlVertex2f(point[11].x, point[11].y);
|
||||
rlTexCoord2f(shapeRect.x/texShapes.width, (shapeRect.y + shapeRect.height)/texShapes.height);
|
||||
rlVertex2f(point[5].x, point[5].y);
|
||||
|
||||
rlColor4ub(right.r, right.g, right.b, right.a);
|
||||
rlTexCoord2f((shapeRect.x + shapeRect.width)/texShapes.width, (shapeRect.y + shapeRect.height)/texShapes.height);
|
||||
rlVertex2f(point[4].x, point[4].y);
|
||||
rlTexCoord2f((shapeRect.x + shapeRect.width)/texShapes.width, shapeRect.y/texShapes.height);
|
||||
rlVertex2f(point[10].x, point[10].y);
|
||||
|
||||
// [8] left Rectangle
|
||||
rlColor4ub(left.r, left.g, left.b, left.a);
|
||||
rlTexCoord2f(shapeRect.x/texShapes.width, shapeRect.y/texShapes.height);
|
||||
rlVertex2f(point[7].x, point[7].y);
|
||||
rlTexCoord2f(shapeRect.x/texShapes.width, (shapeRect.y + shapeRect.height)/texShapes.height);
|
||||
rlVertex2f(point[6].x, point[6].y);
|
||||
rlTexCoord2f((shapeRect.x + shapeRect.width)/texShapes.width, (shapeRect.y + shapeRect.height)/texShapes.height);
|
||||
rlVertex2f(point[11].x, point[11].y);
|
||||
rlTexCoord2f((shapeRect.x + shapeRect.width)/texShapes.width, shapeRect.y/texShapes.height);
|
||||
rlVertex2f(point[8].x, point[8].y);
|
||||
|
||||
// [9] Middle Rectangle
|
||||
rlColor4ub(left.r, left.g, left.b, left.a);
|
||||
rlTexCoord2f(shapeRect.x/texShapes.width, shapeRect.y/texShapes.height);
|
||||
rlVertex2f(point[8].x, point[8].y);
|
||||
rlTexCoord2f(shapeRect.x/texShapes.width, (shapeRect.y + shapeRect.height)/texShapes.height);
|
||||
rlVertex2f(point[11].x, point[11].y);
|
||||
|
||||
rlColor4ub(right.r, right.g, right.b, right.a);
|
||||
rlTexCoord2f((shapeRect.x + shapeRect.width)/texShapes.width, (shapeRect.y + shapeRect.height)/texShapes.height);
|
||||
rlVertex2f(point[10].x, point[10].y);
|
||||
rlTexCoord2f((shapeRect.x + shapeRect.width)/texShapes.width, shapeRect.y/texShapes.height);
|
||||
rlVertex2f(point[9].x, point[9].y);
|
||||
|
||||
rlEnd();
|
||||
rlSetTexture(0);
|
||||
#else
|
||||
|
||||
//
|
||||
// Here we use the `Diagram` to guide ourselves to which point receives what color.
|
||||
//
|
||||
// By choosing the color correctly associated with a pointe the gradient effect
|
||||
// will naturally come from OpenGL interpolation.
|
||||
// But this time instead of Quad, we think in triangles.
|
||||
//
|
||||
|
||||
rlBegin(RL_TRIANGLES);
|
||||
|
||||
// Draw all of the 4 corners: [1] Upper Left Corner, [3] Upper Right Corner, [5] Lower Right Corner, [7] Lower Left Corner
|
||||
for (int k = 0; k < 4; ++k)
|
||||
{
|
||||
Color color;
|
||||
float radius;
|
||||
if (k == 0) color = left, radius = radiusLeft; // [1] Upper Left Corner
|
||||
if (k == 1) color = right, radius = radiusRight; // [3] Upper Right Corner
|
||||
if (k == 2) color = right, radius = radiusRight; // [5] Lower Right Corner
|
||||
if (k == 3) color = left, radius = radiusLeft; // [7] Lower Left Corner
|
||||
float angle = angles[k];
|
||||
const Vector2 center = centers[k];
|
||||
for (int i = 0; i < segments; i++)
|
||||
{
|
||||
rlColor4ub(color.r, color.g, color.b, color.a);
|
||||
rlVertex2f(center.x, center.y);
|
||||
rlVertex2f(center.x + cosf(DEG2RAD*(angle + stepLength))*radius, center.y + sinf(DEG2RAD*(angle + stepLength))*radius);
|
||||
rlVertex2f(center.x + cosf(DEG2RAD*angle)*radius, center.y + sinf(DEG2RAD*angle)*radius);
|
||||
angle += stepLength;
|
||||
}
|
||||
}
|
||||
|
||||
// [2] Upper Rectangle
|
||||
rlColor4ub(left.r, left.g, left.b, left.a);
|
||||
rlVertex2f(point[0].x, point[0].y);
|
||||
rlVertex2f(point[8].x, point[8].y);
|
||||
rlColor4ub(right.r, right.g, right.b, right.a);
|
||||
rlVertex2f(point[9].x, point[9].y);
|
||||
rlVertex2f(point[1].x, point[1].y);
|
||||
rlColor4ub(left.r, left.g, left.b, left.a);
|
||||
rlVertex2f(point[0].x, point[0].y);
|
||||
rlColor4ub(right.r, right.g, right.b, right.a);
|
||||
rlVertex2f(point[9].x, point[9].y);
|
||||
|
||||
// [4] Right Rectangle
|
||||
rlColor4ub(right.r, right.g, right.b, right.a);
|
||||
rlVertex2f(point[9].x, point[9].y);
|
||||
rlVertex2f(point[10].x, point[10].y);
|
||||
rlVertex2f(point[3].x, point[3].y);
|
||||
rlVertex2f(point[2].x, point[2].y);
|
||||
rlVertex2f(point[9].x, point[9].y);
|
||||
rlVertex2f(point[3].x, point[3].y);
|
||||
|
||||
// [6] Bottom Rectangle
|
||||
rlColor4ub(left.r, left.g, left.b, left.a);
|
||||
rlVertex2f(point[11].x, point[11].y);
|
||||
rlVertex2f(point[5].x, point[5].y);
|
||||
rlColor4ub(right.r, right.g, right.b, right.a);
|
||||
rlVertex2f(point[4].x, point[4].y);
|
||||
rlVertex2f(point[10].x, point[10].y);
|
||||
rlColor4ub(left.r, left.g, left.b, left.a);
|
||||
rlVertex2f(point[11].x, point[11].y);
|
||||
rlColor4ub(right.r, right.g, right.b, right.a);
|
||||
rlVertex2f(point[4].x, point[4].y);
|
||||
|
||||
// [8] Left Rectangle
|
||||
rlColor4ub(left.r, left.g, left.b, left.a);
|
||||
rlVertex2f(point[7].x, point[7].y);
|
||||
rlVertex2f(point[6].x, point[6].y);
|
||||
rlVertex2f(point[11].x, point[11].y);
|
||||
rlVertex2f(point[8].x, point[8].y);
|
||||
rlVertex2f(point[7].x, point[7].y);
|
||||
rlVertex2f(point[11].x, point[11].y);
|
||||
|
||||
// [9] Middle Rectangle
|
||||
rlColor4ub(left.r, left.g, left.b, left.a);
|
||||
rlVertex2f(point[8].x, point[8].y);
|
||||
rlVertex2f(point[11].x, point[11].y);
|
||||
rlColor4ub(right.r, right.g, right.b, right.a);
|
||||
rlVertex2f(point[10].x, point[10].y);
|
||||
rlVertex2f(point[9].x, point[9].y);
|
||||
rlColor4ub(left.r, left.g, left.b, left.a);
|
||||
rlVertex2f(point[8].x, point[8].y);
|
||||
rlColor4ub(right.r, right.g, right.b, right.a);
|
||||
rlVertex2f(point[10].x, point[10].y);
|
||||
rlEnd();
|
||||
#endif
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
InitWindow(screenWidth, screenHeight, "raylib [shapes] example - rectangle avanced");
|
||||
SetTargetFPS(60);
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||
{
|
||||
// Update rectangle bounds
|
||||
//----------------------------------------------------------------------------------
|
||||
float width = GetScreenWidth()/2.0f, height = GetScreenHeight()/6.0f;
|
||||
Rectangle rec = {
|
||||
GetScreenWidth() / 2.0f - width/2,
|
||||
GetScreenHeight() / 2.0f - (5)*(height/2),
|
||||
width, height
|
||||
};
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
// Draw All Rectangles with different roundess for each side and different gradients
|
||||
DrawRectangleRoundedGradientH(rec, 0.8f, 0.8f, 36, BLUE, RED);
|
||||
|
||||
rec.y += rec.height + 1;
|
||||
DrawRectangleRoundedGradientH(rec, 0.5f, 1.0f, 36, RED, PINK);
|
||||
|
||||
rec.y += rec.height + 1;
|
||||
DrawRectangleRoundedGradientH(rec, 1.0f, 0.5f, 36, RED, BLUE);
|
||||
|
||||
rec.y += rec.height + 1;
|
||||
DrawRectangleRoundedGradientH(rec, 0.0f, 1.0f, 36, BLUE, BLACK);
|
||||
|
||||
rec.y += rec.height + 1;
|
||||
DrawRectangleRoundedGradientH(rec, 1.0f, 0.0f, 36, BLUE, PINK);
|
||||
EndDrawing();
|
||||
//--------------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
return 0;
|
||||
}
|
||||
|
||||
BIN
examples/shapes/shapes_rectangle_advanced.png
Normal file
|
After Width: | Height: | Size: 6.7 KiB |
BIN
logo/raylib.ico
|
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 422 B After Width: | Height: | Size: 475 B |
|
|
@ -15,7 +15,7 @@
|
|||
{
|
||||
"name": "RAYLIB_VERSION_MINOR",
|
||||
"type": "INT",
|
||||
"value": 5,
|
||||
"value": 6,
|
||||
"description": ""
|
||||
},
|
||||
{
|
||||
|
|
@ -27,7 +27,7 @@
|
|||
{
|
||||
"name": "RAYLIB_VERSION",
|
||||
"type": "STRING",
|
||||
"value": "5.5-dev",
|
||||
"value": "5.6-dev",
|
||||
"description": ""
|
||||
},
|
||||
{
|
||||
|
|
@ -2839,11 +2839,6 @@
|
|||
"name": "CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE",
|
||||
"value": 4,
|
||||
"description": "Layout is defined by a 4x3 cross with cubemap faces"
|
||||
},
|
||||
{
|
||||
"name": "CUBEMAP_LAYOUT_PANORAMA",
|
||||
"value": 5,
|
||||
"description": "Layout is defined by a panorama image (equirrectangular map)"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
@ -3182,22 +3177,22 @@
|
|||
},
|
||||
{
|
||||
"name": "IsWindowHidden",
|
||||
"description": "Check if window is currently hidden (only PLATFORM_DESKTOP)",
|
||||
"description": "Check if window is currently hidden",
|
||||
"returnType": "bool"
|
||||
},
|
||||
{
|
||||
"name": "IsWindowMinimized",
|
||||
"description": "Check if window is currently minimized (only PLATFORM_DESKTOP)",
|
||||
"description": "Check if window is currently minimized",
|
||||
"returnType": "bool"
|
||||
},
|
||||
{
|
||||
"name": "IsWindowMaximized",
|
||||
"description": "Check if window is currently maximized (only PLATFORM_DESKTOP)",
|
||||
"description": "Check if window is currently maximized",
|
||||
"returnType": "bool"
|
||||
},
|
||||
{
|
||||
"name": "IsWindowFocused",
|
||||
"description": "Check if window is currently focused (only PLATFORM_DESKTOP)",
|
||||
"description": "Check if window is currently focused",
|
||||
"returnType": "bool"
|
||||
},
|
||||
{
|
||||
|
|
@ -3218,7 +3213,7 @@
|
|||
},
|
||||
{
|
||||
"name": "SetWindowState",
|
||||
"description": "Set window configuration state using flags (only PLATFORM_DESKTOP)",
|
||||
"description": "Set window configuration state using flags",
|
||||
"returnType": "void",
|
||||
"params": [
|
||||
{
|
||||
|
|
@ -3240,32 +3235,32 @@
|
|||
},
|
||||
{
|
||||
"name": "ToggleFullscreen",
|
||||
"description": "Toggle window state: fullscreen/windowed [resizes monitor to match window resolution] (only PLATFORM_DESKTOP)",
|
||||
"description": "Toggle window state: fullscreen/windowed, resizes monitor to match window resolution",
|
||||
"returnType": "void"
|
||||
},
|
||||
{
|
||||
"name": "ToggleBorderlessWindowed",
|
||||
"description": "Toggle window state: borderless windowed [resizes window to match monitor resolution] (only PLATFORM_DESKTOP)",
|
||||
"description": "Toggle window state: borderless windowed, resizes window to match monitor resolution",
|
||||
"returnType": "void"
|
||||
},
|
||||
{
|
||||
"name": "MaximizeWindow",
|
||||
"description": "Set window state: maximized, if resizable (only PLATFORM_DESKTOP)",
|
||||
"description": "Set window state: maximized, if resizable",
|
||||
"returnType": "void"
|
||||
},
|
||||
{
|
||||
"name": "MinimizeWindow",
|
||||
"description": "Set window state: minimized, if resizable (only PLATFORM_DESKTOP)",
|
||||
"description": "Set window state: minimized, if resizable",
|
||||
"returnType": "void"
|
||||
},
|
||||
{
|
||||
"name": "RestoreWindow",
|
||||
"description": "Set window state: not minimized/maximized (only PLATFORM_DESKTOP)",
|
||||
"description": "Set window state: not minimized/maximized",
|
||||
"returnType": "void"
|
||||
},
|
||||
{
|
||||
"name": "SetWindowIcon",
|
||||
"description": "Set icon for window (single image, RGBA 32bit, only PLATFORM_DESKTOP)",
|
||||
"description": "Set icon for window (single image, RGBA 32bit)",
|
||||
"returnType": "void",
|
||||
"params": [
|
||||
{
|
||||
|
|
@ -3276,7 +3271,7 @@
|
|||
},
|
||||
{
|
||||
"name": "SetWindowIcons",
|
||||
"description": "Set icon for window (multiple images, RGBA 32bit, only PLATFORM_DESKTOP)",
|
||||
"description": "Set icon for window (multiple images, RGBA 32bit)",
|
||||
"returnType": "void",
|
||||
"params": [
|
||||
{
|
||||
|
|
@ -3291,7 +3286,7 @@
|
|||
},
|
||||
{
|
||||
"name": "SetWindowTitle",
|
||||
"description": "Set title for window (only PLATFORM_DESKTOP and PLATFORM_WEB)",
|
||||
"description": "Set title for window",
|
||||
"returnType": "void",
|
||||
"params": [
|
||||
{
|
||||
|
|
@ -3302,7 +3297,7 @@
|
|||
},
|
||||
{
|
||||
"name": "SetWindowPosition",
|
||||
"description": "Set window position on screen (only PLATFORM_DESKTOP)",
|
||||
"description": "Set window position on screen",
|
||||
"returnType": "void",
|
||||
"params": [
|
||||
{
|
||||
|
|
@ -3373,7 +3368,7 @@
|
|||
},
|
||||
{
|
||||
"name": "SetWindowOpacity",
|
||||
"description": "Set window opacity [0.0f..1.0f] (only PLATFORM_DESKTOP)",
|
||||
"description": "Set window opacity [0.0f..1.0f]",
|
||||
"returnType": "void",
|
||||
"params": [
|
||||
{
|
||||
|
|
@ -3384,7 +3379,7 @@
|
|||
},
|
||||
{
|
||||
"name": "SetWindowFocused",
|
||||
"description": "Set window focused (only PLATFORM_DESKTOP)",
|
||||
"description": "Set window focused",
|
||||
"returnType": "void"
|
||||
},
|
||||
{
|
||||
|
|
@ -3419,7 +3414,7 @@
|
|||
},
|
||||
{
|
||||
"name": "GetCurrentMonitor",
|
||||
"description": "Get current connected monitor",
|
||||
"description": "Get current monitor where window is placed",
|
||||
"returnType": "int"
|
||||
},
|
||||
{
|
||||
|
|
@ -3525,6 +3520,11 @@
|
|||
"description": "Get clipboard text content",
|
||||
"returnType": "const char *"
|
||||
},
|
||||
{
|
||||
"name": "GetClipboardImage",
|
||||
"description": "Get clipboard image content",
|
||||
"returnType": "Image"
|
||||
},
|
||||
{
|
||||
"name": "EnableEventWaiting",
|
||||
"description": "Enable waiting for events on EndDrawing(), no automatic event polling",
|
||||
|
|
@ -4829,7 +4829,7 @@
|
|||
},
|
||||
{
|
||||
"name": "IsKeyPressedRepeat",
|
||||
"description": "Check if a key has been pressed again (Only PLATFORM_DESKTOP)",
|
||||
"description": "Check if a key has been pressed again",
|
||||
"returnType": "bool",
|
||||
"params": [
|
||||
{
|
||||
|
|
@ -5018,7 +5018,7 @@
|
|||
},
|
||||
{
|
||||
"name": "SetGamepadVibration",
|
||||
"description": "Set gamepad vibration for both motors",
|
||||
"description": "Set gamepad vibration for both motors (duration in seconds)",
|
||||
"returnType": "void",
|
||||
"params": [
|
||||
{
|
||||
|
|
@ -5032,6 +5032,10 @@
|
|||
{
|
||||
"type": "float",
|
||||
"name": "rightMotor"
|
||||
},
|
||||
{
|
||||
"type": "float",
|
||||
"name": "duration"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
@ -6658,6 +6662,29 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "CheckCollisionCircleLine",
|
||||
"description": "Check if circle collides with a line created betweeen two points [p1] and [p2]",
|
||||
"returnType": "bool",
|
||||
"params": [
|
||||
{
|
||||
"type": "Vector2",
|
||||
"name": "center"
|
||||
},
|
||||
{
|
||||
"type": "float",
|
||||
"name": "radius"
|
||||
},
|
||||
{
|
||||
"type": "Vector2",
|
||||
"name": "p1"
|
||||
},
|
||||
{
|
||||
"type": "Vector2",
|
||||
"name": "p2"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "CheckCollisionPointRec",
|
||||
"description": "Check if point is inside rectangle",
|
||||
|
|
@ -6715,6 +6742,29 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "CheckCollisionPointLine",
|
||||
"description": "Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold]",
|
||||
"returnType": "bool",
|
||||
"params": [
|
||||
{
|
||||
"type": "Vector2",
|
||||
"name": "point"
|
||||
},
|
||||
{
|
||||
"type": "Vector2",
|
||||
"name": "p1"
|
||||
},
|
||||
{
|
||||
"type": "Vector2",
|
||||
"name": "p2"
|
||||
},
|
||||
{
|
||||
"type": "int",
|
||||
"name": "threshold"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "CheckCollisionPointPoly",
|
||||
"description": "Check if point is within a polygon described by array of vertices",
|
||||
|
|
@ -6761,52 +6811,6 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "CheckCollisionPointLine",
|
||||
"description": "Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold]",
|
||||
"returnType": "bool",
|
||||
"params": [
|
||||
{
|
||||
"type": "Vector2",
|
||||
"name": "point"
|
||||
},
|
||||
{
|
||||
"type": "Vector2",
|
||||
"name": "p1"
|
||||
},
|
||||
{
|
||||
"type": "Vector2",
|
||||
"name": "p2"
|
||||
},
|
||||
{
|
||||
"type": "int",
|
||||
"name": "threshold"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "CheckCollisionCircleLine",
|
||||
"description": "Check if circle collides with a line created betweeen two points [p1] and [p2]",
|
||||
"returnType": "bool",
|
||||
"params": [
|
||||
{
|
||||
"type": "Vector2",
|
||||
"name": "center"
|
||||
},
|
||||
{
|
||||
"type": "float",
|
||||
"name": "radius"
|
||||
},
|
||||
{
|
||||
"type": "Vector2",
|
||||
"name": "p1"
|
||||
},
|
||||
{
|
||||
"type": "Vector2",
|
||||
"name": "p2"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "GetCollisionRec",
|
||||
"description": "Get collision rectangle for two rectangles collision",
|
||||
|
|
@ -11070,7 +11074,26 @@
|
|||
},
|
||||
{
|
||||
"name": "UpdateModelAnimation",
|
||||
"description": "Update model animation pose",
|
||||
"description": "Update model animation pose (CPU)",
|
||||
"returnType": "void",
|
||||
"params": [
|
||||
{
|
||||
"type": "Model",
|
||||
"name": "model"
|
||||
},
|
||||
{
|
||||
"type": "ModelAnimation",
|
||||
"name": "anim"
|
||||
},
|
||||
{
|
||||
"type": "int",
|
||||
"name": "frame"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "UpdateModelAnimationBones",
|
||||
"description": "Update model animation mesh bone matrices (GPU skinning)",
|
||||
"returnType": "void",
|
||||
"params": [
|
||||
{
|
||||
|
|
@ -11128,25 +11151,6 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "UpdateModelAnimationBoneMatrices",
|
||||
"description": "Update model animation mesh bone matrices (Note GPU skinning does not work on Mac)",
|
||||
"returnType": "void",
|
||||
"params": [
|
||||
{
|
||||
"type": "Model",
|
||||
"name": "model"
|
||||
},
|
||||
{
|
||||
"type": "ModelAnimation",
|
||||
"name": "anim"
|
||||
},
|
||||
{
|
||||
"type": "int",
|
||||
"name": "frame"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "CheckCollisionSpheres",
|
||||
"description": "Check collision between two spheres",
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ return {
|
|||
{
|
||||
name = "RAYLIB_VERSION_MINOR",
|
||||
type = "INT",
|
||||
value = 5,
|
||||
value = 6,
|
||||
description = ""
|
||||
},
|
||||
{
|
||||
|
|
@ -27,7 +27,7 @@ return {
|
|||
{
|
||||
name = "RAYLIB_VERSION",
|
||||
type = "STRING",
|
||||
value = "5.5-dev",
|
||||
value = "5.6-dev",
|
||||
description = ""
|
||||
},
|
||||
{
|
||||
|
|
@ -2839,11 +2839,6 @@ return {
|
|||
name = "CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE",
|
||||
value = 4,
|
||||
description = "Layout is defined by a 4x3 cross with cubemap faces"
|
||||
},
|
||||
{
|
||||
name = "CUBEMAP_LAYOUT_PANORAMA",
|
||||
value = 5,
|
||||
description = "Layout is defined by a panorama image (equirrectangular map)"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -3134,22 +3129,22 @@ return {
|
|||
},
|
||||
{
|
||||
name = "IsWindowHidden",
|
||||
description = "Check if window is currently hidden (only PLATFORM_DESKTOP)",
|
||||
description = "Check if window is currently hidden",
|
||||
returnType = "bool"
|
||||
},
|
||||
{
|
||||
name = "IsWindowMinimized",
|
||||
description = "Check if window is currently minimized (only PLATFORM_DESKTOP)",
|
||||
description = "Check if window is currently minimized",
|
||||
returnType = "bool"
|
||||
},
|
||||
{
|
||||
name = "IsWindowMaximized",
|
||||
description = "Check if window is currently maximized (only PLATFORM_DESKTOP)",
|
||||
description = "Check if window is currently maximized",
|
||||
returnType = "bool"
|
||||
},
|
||||
{
|
||||
name = "IsWindowFocused",
|
||||
description = "Check if window is currently focused (only PLATFORM_DESKTOP)",
|
||||
description = "Check if window is currently focused",
|
||||
returnType = "bool"
|
||||
},
|
||||
{
|
||||
|
|
@ -3167,7 +3162,7 @@ return {
|
|||
},
|
||||
{
|
||||
name = "SetWindowState",
|
||||
description = "Set window configuration state using flags (only PLATFORM_DESKTOP)",
|
||||
description = "Set window configuration state using flags",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "unsigned int", name = "flags"}
|
||||
|
|
@ -3183,32 +3178,32 @@ return {
|
|||
},
|
||||
{
|
||||
name = "ToggleFullscreen",
|
||||
description = "Toggle window state: fullscreen/windowed [resizes monitor to match window resolution] (only PLATFORM_DESKTOP)",
|
||||
description = "Toggle window state: fullscreen/windowed, resizes monitor to match window resolution",
|
||||
returnType = "void"
|
||||
},
|
||||
{
|
||||
name = "ToggleBorderlessWindowed",
|
||||
description = "Toggle window state: borderless windowed [resizes window to match monitor resolution] (only PLATFORM_DESKTOP)",
|
||||
description = "Toggle window state: borderless windowed, resizes window to match monitor resolution",
|
||||
returnType = "void"
|
||||
},
|
||||
{
|
||||
name = "MaximizeWindow",
|
||||
description = "Set window state: maximized, if resizable (only PLATFORM_DESKTOP)",
|
||||
description = "Set window state: maximized, if resizable",
|
||||
returnType = "void"
|
||||
},
|
||||
{
|
||||
name = "MinimizeWindow",
|
||||
description = "Set window state: minimized, if resizable (only PLATFORM_DESKTOP)",
|
||||
description = "Set window state: minimized, if resizable",
|
||||
returnType = "void"
|
||||
},
|
||||
{
|
||||
name = "RestoreWindow",
|
||||
description = "Set window state: not minimized/maximized (only PLATFORM_DESKTOP)",
|
||||
description = "Set window state: not minimized/maximized",
|
||||
returnType = "void"
|
||||
},
|
||||
{
|
||||
name = "SetWindowIcon",
|
||||
description = "Set icon for window (single image, RGBA 32bit, only PLATFORM_DESKTOP)",
|
||||
description = "Set icon for window (single image, RGBA 32bit)",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Image", name = "image"}
|
||||
|
|
@ -3216,7 +3211,7 @@ return {
|
|||
},
|
||||
{
|
||||
name = "SetWindowIcons",
|
||||
description = "Set icon for window (multiple images, RGBA 32bit, only PLATFORM_DESKTOP)",
|
||||
description = "Set icon for window (multiple images, RGBA 32bit)",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Image *", name = "images"},
|
||||
|
|
@ -3225,7 +3220,7 @@ return {
|
|||
},
|
||||
{
|
||||
name = "SetWindowTitle",
|
||||
description = "Set title for window (only PLATFORM_DESKTOP and PLATFORM_WEB)",
|
||||
description = "Set title for window",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "const char *", name = "title"}
|
||||
|
|
@ -3233,7 +3228,7 @@ return {
|
|||
},
|
||||
{
|
||||
name = "SetWindowPosition",
|
||||
description = "Set window position on screen (only PLATFORM_DESKTOP)",
|
||||
description = "Set window position on screen",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "int", name = "x"},
|
||||
|
|
@ -3277,7 +3272,7 @@ return {
|
|||
},
|
||||
{
|
||||
name = "SetWindowOpacity",
|
||||
description = "Set window opacity [0.0f..1.0f] (only PLATFORM_DESKTOP)",
|
||||
description = "Set window opacity [0.0f..1.0f]",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "float", name = "opacity"}
|
||||
|
|
@ -3285,7 +3280,7 @@ return {
|
|||
},
|
||||
{
|
||||
name = "SetWindowFocused",
|
||||
description = "Set window focused (only PLATFORM_DESKTOP)",
|
||||
description = "Set window focused",
|
||||
returnType = "void"
|
||||
},
|
||||
{
|
||||
|
|
@ -3320,7 +3315,7 @@ return {
|
|||
},
|
||||
{
|
||||
name = "GetCurrentMonitor",
|
||||
description = "Get current connected monitor",
|
||||
description = "Get current monitor where window is placed",
|
||||
returnType = "int"
|
||||
},
|
||||
{
|
||||
|
|
@ -3402,6 +3397,11 @@ return {
|
|||
description = "Get clipboard text content",
|
||||
returnType = "const char *"
|
||||
},
|
||||
{
|
||||
name = "GetClipboardImage",
|
||||
description = "Get clipboard image content",
|
||||
returnType = "Image"
|
||||
},
|
||||
{
|
||||
name = "EnableEventWaiting",
|
||||
description = "Enable waiting for events on EndDrawing(), no automatic event polling",
|
||||
|
|
@ -4286,7 +4286,7 @@ return {
|
|||
},
|
||||
{
|
||||
name = "IsKeyPressedRepeat",
|
||||
description = "Check if a key has been pressed again (Only PLATFORM_DESKTOP)",
|
||||
description = "Check if a key has been pressed again",
|
||||
returnType = "bool",
|
||||
params = {
|
||||
{type = "int", name = "key"}
|
||||
|
|
@ -4418,12 +4418,13 @@ return {
|
|||
},
|
||||
{
|
||||
name = "SetGamepadVibration",
|
||||
description = "Set gamepad vibration for both motors",
|
||||
description = "Set gamepad vibration for both motors (duration in seconds)",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "int", name = "gamepad"},
|
||||
{type = "float", name = "leftMotor"},
|
||||
{type = "float", name = "rightMotor"}
|
||||
{type = "float", name = "rightMotor"},
|
||||
{type = "float", name = "duration"}
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -5263,6 +5264,17 @@ return {
|
|||
{type = "Rectangle", name = "rec"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "CheckCollisionCircleLine",
|
||||
description = "Check if circle collides with a line created betweeen two points [p1] and [p2]",
|
||||
returnType = "bool",
|
||||
params = {
|
||||
{type = "Vector2", name = "center"},
|
||||
{type = "float", name = "radius"},
|
||||
{type = "Vector2", name = "p1"},
|
||||
{type = "Vector2", name = "p2"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "CheckCollisionPointRec",
|
||||
description = "Check if point is inside rectangle",
|
||||
|
|
@ -5293,6 +5305,17 @@ return {
|
|||
{type = "Vector2", name = "p3"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "CheckCollisionPointLine",
|
||||
description = "Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold]",
|
||||
returnType = "bool",
|
||||
params = {
|
||||
{type = "Vector2", name = "point"},
|
||||
{type = "Vector2", name = "p1"},
|
||||
{type = "Vector2", name = "p2"},
|
||||
{type = "int", name = "threshold"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "CheckCollisionPointPoly",
|
||||
description = "Check if point is within a polygon described by array of vertices",
|
||||
|
|
@ -5315,28 +5338,6 @@ return {
|
|||
{type = "Vector2 *", name = "collisionPoint"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "CheckCollisionPointLine",
|
||||
description = "Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold]",
|
||||
returnType = "bool",
|
||||
params = {
|
||||
{type = "Vector2", name = "point"},
|
||||
{type = "Vector2", name = "p1"},
|
||||
{type = "Vector2", name = "p2"},
|
||||
{type = "int", name = "threshold"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "CheckCollisionCircleLine",
|
||||
description = "Check if circle collides with a line created betweeen two points [p1] and [p2]",
|
||||
returnType = "bool",
|
||||
params = {
|
||||
{type = "Vector2", name = "center"},
|
||||
{type = "float", name = "radius"},
|
||||
{type = "Vector2", name = "p1"},
|
||||
{type = "Vector2", name = "p2"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "GetCollisionRec",
|
||||
description = "Get collision rectangle for two rectangles collision",
|
||||
|
|
@ -7602,7 +7603,17 @@ return {
|
|||
},
|
||||
{
|
||||
name = "UpdateModelAnimation",
|
||||
description = "Update model animation pose",
|
||||
description = "Update model animation pose (CPU)",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Model", name = "model"},
|
||||
{type = "ModelAnimation", name = "anim"},
|
||||
{type = "int", name = "frame"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "UpdateModelAnimationBones",
|
||||
description = "Update model animation mesh bone matrices (GPU skinning)",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Model", name = "model"},
|
||||
|
|
@ -7636,16 +7647,6 @@ return {
|
|||
{type = "ModelAnimation", name = "anim"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "UpdateModelAnimationBoneMatrices",
|
||||
description = "Update model animation mesh bone matrices (Note GPU skinning does not work on Mac)",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Model", name = "model"},
|
||||
{type = "ModelAnimation", name = "anim"},
|
||||
{type = "int", name = "frame"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "CheckCollisionSpheres",
|
||||
description = "Check collision between two spheres",
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
<Defines count="57">
|
||||
<Define name="RAYLIB_H" type="GUARD" value="" desc="" />
|
||||
<Define name="RAYLIB_VERSION_MAJOR" type="INT" value="5" desc="" />
|
||||
<Define name="RAYLIB_VERSION_MINOR" type="INT" value="5" desc="" />
|
||||
<Define name="RAYLIB_VERSION_MINOR" type="INT" value="6" desc="" />
|
||||
<Define name="RAYLIB_VERSION_PATCH" type="INT" value="0" desc="" />
|
||||
<Define name="RAYLIB_VERSION" type="STRING" value="5.5-dev" desc="" />
|
||||
<Define name="RAYLIB_VERSION" type="STRING" value="5.6-dev" 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="PI" type="FLOAT" value="3.14159265358979323846" desc="" />
|
||||
|
|
@ -595,13 +595,12 @@
|
|||
<Value name="TEXTURE_WRAP_MIRROR_REPEAT" integer="2" desc="Mirrors and repeats the texture in tiled mode" />
|
||||
<Value name="TEXTURE_WRAP_MIRROR_CLAMP" integer="3" desc="Mirrors and clamps to border the texture in tiled mode" />
|
||||
</Enum>
|
||||
<Enum name="CubemapLayout" valueCount="6" desc="Cubemap layouts">
|
||||
<Enum name="CubemapLayout" valueCount="5" desc="Cubemap layouts">
|
||||
<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_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_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 (equirrectangular map)" />
|
||||
</Enum>
|
||||
<Enum name="FontType" valueCount="3" desc="Font type, defines generation method">
|
||||
<Value name="FONT_DEFAULT" integer="0" desc="Default font generation, anti-aliased" />
|
||||
|
|
@ -675,7 +674,7 @@
|
|||
<Param type="unsigned int" name="frames" desc="" />
|
||||
</Callback>
|
||||
</Callbacks>
|
||||
<Functions count="580">
|
||||
<Functions count="581">
|
||||
<Function name="InitWindow" retType="void" paramCount="3" desc="Initialize window and OpenGL context">
|
||||
<Param type="int" name="width" desc="" />
|
||||
<Param type="int" name="height" desc="" />
|
||||
|
|
@ -689,46 +688,46 @@
|
|||
</Function>
|
||||
<Function name="IsWindowFullscreen" retType="bool" paramCount="0" desc="Check if window is currently fullscreen">
|
||||
</Function>
|
||||
<Function name="IsWindowHidden" retType="bool" paramCount="0" desc="Check if window is currently hidden (only PLATFORM_DESKTOP)">
|
||||
<Function name="IsWindowHidden" retType="bool" paramCount="0" desc="Check if window is currently hidden">
|
||||
</Function>
|
||||
<Function name="IsWindowMinimized" retType="bool" paramCount="0" desc="Check if window is currently minimized (only PLATFORM_DESKTOP)">
|
||||
<Function name="IsWindowMinimized" retType="bool" paramCount="0" desc="Check if window is currently minimized">
|
||||
</Function>
|
||||
<Function name="IsWindowMaximized" retType="bool" paramCount="0" desc="Check if window is currently maximized (only PLATFORM_DESKTOP)">
|
||||
<Function name="IsWindowMaximized" retType="bool" paramCount="0" desc="Check if window is currently maximized">
|
||||
</Function>
|
||||
<Function name="IsWindowFocused" retType="bool" paramCount="0" desc="Check if window is currently focused (only PLATFORM_DESKTOP)">
|
||||
<Function name="IsWindowFocused" retType="bool" paramCount="0" desc="Check if window is currently focused">
|
||||
</Function>
|
||||
<Function name="IsWindowResized" retType="bool" paramCount="0" desc="Check if window has been resized last frame">
|
||||
</Function>
|
||||
<Function name="IsWindowState" retType="bool" paramCount="1" desc="Check if one specific window flag is enabled">
|
||||
<Param type="unsigned int" name="flag" desc="" />
|
||||
</Function>
|
||||
<Function name="SetWindowState" retType="void" paramCount="1" desc="Set window configuration state using flags (only PLATFORM_DESKTOP)">
|
||||
<Function name="SetWindowState" retType="void" paramCount="1" desc="Set window configuration state using flags">
|
||||
<Param type="unsigned int" name="flags" desc="" />
|
||||
</Function>
|
||||
<Function name="ClearWindowState" retType="void" paramCount="1" desc="Clear window configuration state flags">
|
||||
<Param type="unsigned int" name="flags" desc="" />
|
||||
</Function>
|
||||
<Function name="ToggleFullscreen" retType="void" paramCount="0" desc="Toggle window state: fullscreen/windowed [resizes monitor to match window resolution] (only PLATFORM_DESKTOP)">
|
||||
<Function name="ToggleFullscreen" retType="void" paramCount="0" desc="Toggle window state: fullscreen/windowed, resizes monitor to match window resolution">
|
||||
</Function>
|
||||
<Function name="ToggleBorderlessWindowed" retType="void" paramCount="0" desc="Toggle window state: borderless windowed [resizes window to match monitor resolution] (only PLATFORM_DESKTOP)">
|
||||
<Function name="ToggleBorderlessWindowed" retType="void" paramCount="0" desc="Toggle window state: borderless windowed, resizes window to match monitor resolution">
|
||||
</Function>
|
||||
<Function name="MaximizeWindow" retType="void" paramCount="0" desc="Set window state: maximized, if resizable (only PLATFORM_DESKTOP)">
|
||||
<Function name="MaximizeWindow" retType="void" paramCount="0" desc="Set window state: maximized, if resizable">
|
||||
</Function>
|
||||
<Function name="MinimizeWindow" retType="void" paramCount="0" desc="Set window state: minimized, if resizable (only PLATFORM_DESKTOP)">
|
||||
<Function name="MinimizeWindow" retType="void" paramCount="0" desc="Set window state: minimized, if resizable">
|
||||
</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">
|
||||
</Function>
|
||||
<Function name="SetWindowIcon" retType="void" paramCount="1" desc="Set icon for window (single image, RGBA 32bit, only PLATFORM_DESKTOP)">
|
||||
<Function name="SetWindowIcon" retType="void" paramCount="1" desc="Set icon for window (single image, RGBA 32bit)">
|
||||
<Param type="Image" name="image" desc="" />
|
||||
</Function>
|
||||
<Function name="SetWindowIcons" retType="void" paramCount="2" desc="Set icon for window (multiple images, RGBA 32bit, only PLATFORM_DESKTOP)">
|
||||
<Function name="SetWindowIcons" retType="void" paramCount="2" desc="Set icon for window (multiple images, RGBA 32bit)">
|
||||
<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 and PLATFORM_WEB)">
|
||||
<Function name="SetWindowTitle" retType="void" paramCount="1" desc="Set title for window">
|
||||
<Param type="const char *" name="title" desc="" />
|
||||
</Function>
|
||||
<Function name="SetWindowPosition" retType="void" paramCount="2" desc="Set window position on screen (only PLATFORM_DESKTOP)">
|
||||
<Function name="SetWindowPosition" retType="void" paramCount="2" desc="Set window position on screen">
|
||||
<Param type="int" name="x" desc="" />
|
||||
<Param type="int" name="y" desc="" />
|
||||
</Function>
|
||||
|
|
@ -747,10 +746,10 @@
|
|||
<Param type="int" name="width" desc="" />
|
||||
<Param type="int" name="height" desc="" />
|
||||
</Function>
|
||||
<Function name="SetWindowOpacity" retType="void" paramCount="1" desc="Set window opacity [0.0f..1.0f] (only PLATFORM_DESKTOP)">
|
||||
<Function name="SetWindowOpacity" retType="void" paramCount="1" desc="Set window opacity [0.0f..1.0f]">
|
||||
<Param type="float" name="opacity" desc="" />
|
||||
</Function>
|
||||
<Function name="SetWindowFocused" retType="void" paramCount="0" desc="Set window focused (only PLATFORM_DESKTOP)">
|
||||
<Function name="SetWindowFocused" retType="void" paramCount="0" desc="Set window focused">
|
||||
</Function>
|
||||
<Function name="GetWindowHandle" retType="void *" paramCount="0" desc="Get native window handle">
|
||||
</Function>
|
||||
|
|
@ -764,7 +763,7 @@
|
|||
</Function>
|
||||
<Function name="GetMonitorCount" retType="int" paramCount="0" desc="Get number of connected monitors">
|
||||
</Function>
|
||||
<Function name="GetCurrentMonitor" retType="int" paramCount="0" desc="Get current connected monitor">
|
||||
<Function name="GetCurrentMonitor" retType="int" paramCount="0" desc="Get current monitor where window is placed">
|
||||
</Function>
|
||||
<Function name="GetMonitorPosition" retType="Vector2" paramCount="1" desc="Get specified monitor position">
|
||||
<Param type="int" name="monitor" desc="" />
|
||||
|
|
@ -796,6 +795,8 @@
|
|||
</Function>
|
||||
<Function name="GetClipboardText" retType="const char *" paramCount="0" desc="Get clipboard text content">
|
||||
</Function>
|
||||
<Function name="GetClipboardImage" retType="Image" paramCount="0" desc="Get clipboard image content">
|
||||
</Function>
|
||||
<Function name="EnableEventWaiting" retType="void" paramCount="0" desc="Enable waiting for events on EndDrawing(), no automatic event polling">
|
||||
</Function>
|
||||
<Function name="DisableEventWaiting" retType="void" paramCount="0" desc="Disable waiting for events on EndDrawing(), automatic events polling">
|
||||
|
|
@ -1164,7 +1165,7 @@
|
|||
<Function name="IsKeyPressed" retType="bool" paramCount="1" desc="Check if a key has been pressed once">
|
||||
<Param type="int" name="key" desc="" />
|
||||
</Function>
|
||||
<Function name="IsKeyPressedRepeat" retType="bool" paramCount="1" desc="Check if a key has been pressed again (Only PLATFORM_DESKTOP)">
|
||||
<Function name="IsKeyPressedRepeat" retType="bool" paramCount="1" desc="Check if a key has been pressed again">
|
||||
<Param type="int" name="key" desc="" />
|
||||
</Function>
|
||||
<Function name="IsKeyDown" retType="bool" paramCount="1" desc="Check if a key is being pressed">
|
||||
|
|
@ -1217,10 +1218,11 @@
|
|||
<Function name="SetGamepadMappings" retType="int" paramCount="1" desc="Set internal gamepad mappings (SDL_GameControllerDB)">
|
||||
<Param type="const char *" name="mappings" desc="" />
|
||||
</Function>
|
||||
<Function name="SetGamepadVibration" retType="void" paramCount="3" desc="Set gamepad vibration for both motors">
|
||||
<Function name="SetGamepadVibration" retType="void" paramCount="4" desc="Set gamepad vibration for both motors (duration in seconds)">
|
||||
<Param type="int" name="gamepad" desc="" />
|
||||
<Param type="float" name="leftMotor" desc="" />
|
||||
<Param type="float" name="rightMotor" desc="" />
|
||||
<Param type="float" name="duration" desc="" />
|
||||
</Function>
|
||||
<Function name="IsMouseButtonPressed" retType="bool" paramCount="1" desc="Check if a mouse button has been pressed once">
|
||||
<Param type="int" name="button" desc="" />
|
||||
|
|
@ -1658,6 +1660,12 @@
|
|||
<Param type="float" name="radius" desc="" />
|
||||
<Param type="Rectangle" name="rec" desc="" />
|
||||
</Function>
|
||||
<Function name="CheckCollisionCircleLine" retType="bool" paramCount="4" desc="Check if circle collides with a line created betweeen two points [p1] and [p2]">
|
||||
<Param type="Vector2" name="center" desc="" />
|
||||
<Param type="float" name="radius" desc="" />
|
||||
<Param type="Vector2" name="p1" desc="" />
|
||||
<Param type="Vector2" name="p2" desc="" />
|
||||
</Function>
|
||||
<Function name="CheckCollisionPointRec" retType="bool" paramCount="2" desc="Check if point is inside rectangle">
|
||||
<Param type="Vector2" name="point" desc="" />
|
||||
<Param type="Rectangle" name="rec" desc="" />
|
||||
|
|
@ -1673,6 +1681,12 @@
|
|||
<Param type="Vector2" name="p2" desc="" />
|
||||
<Param type="Vector2" name="p3" desc="" />
|
||||
</Function>
|
||||
<Function name="CheckCollisionPointLine" retType="bool" paramCount="4" desc="Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold]">
|
||||
<Param type="Vector2" name="point" desc="" />
|
||||
<Param type="Vector2" name="p1" desc="" />
|
||||
<Param type="Vector2" name="p2" desc="" />
|
||||
<Param type="int" name="threshold" desc="" />
|
||||
</Function>
|
||||
<Function name="CheckCollisionPointPoly" retType="bool" paramCount="3" desc="Check if point is within a polygon described by array of vertices">
|
||||
<Param type="Vector2" name="point" desc="" />
|
||||
<Param type="const Vector2 *" name="points" desc="" />
|
||||
|
|
@ -1685,18 +1699,6 @@
|
|||
<Param type="Vector2" name="endPos2" desc="" />
|
||||
<Param type="Vector2 *" name="collisionPoint" desc="" />
|
||||
</Function>
|
||||
<Function name="CheckCollisionPointLine" retType="bool" paramCount="4" desc="Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold]">
|
||||
<Param type="Vector2" name="point" desc="" />
|
||||
<Param type="Vector2" name="p1" desc="" />
|
||||
<Param type="Vector2" name="p2" desc="" />
|
||||
<Param type="int" name="threshold" desc="" />
|
||||
</Function>
|
||||
<Function name="CheckCollisionCircleLine" retType="bool" paramCount="4" desc="Check if circle collides with a line created betweeen two points [p1] and [p2]">
|
||||
<Param type="Vector2" name="center" desc="" />
|
||||
<Param type="float" name="radius" desc="" />
|
||||
<Param type="Vector2" name="p1" desc="" />
|
||||
<Param type="Vector2" name="p2" desc="" />
|
||||
</Function>
|
||||
<Function name="GetCollisionRec" retType="Rectangle" paramCount="2" desc="Get collision rectangle for two rectangles collision">
|
||||
<Param type="Rectangle" name="rec1" desc="" />
|
||||
<Param type="Rectangle" name="rec2" desc="" />
|
||||
|
|
@ -2821,7 +2823,12 @@
|
|||
<Param type="const char *" name="fileName" desc="" />
|
||||
<Param type="int *" name="animCount" desc="" />
|
||||
</Function>
|
||||
<Function name="UpdateModelAnimation" retType="void" paramCount="3" desc="Update model animation pose">
|
||||
<Function name="UpdateModelAnimation" retType="void" paramCount="3" desc="Update model animation pose (CPU)">
|
||||
<Param type="Model" name="model" desc="" />
|
||||
<Param type="ModelAnimation" name="anim" desc="" />
|
||||
<Param type="int" name="frame" desc="" />
|
||||
</Function>
|
||||
<Function name="UpdateModelAnimationBones" retType="void" paramCount="3" desc="Update model animation mesh bone matrices (GPU skinning)">
|
||||
<Param type="Model" name="model" desc="" />
|
||||
<Param type="ModelAnimation" name="anim" desc="" />
|
||||
<Param type="int" name="frame" desc="" />
|
||||
|
|
@ -2837,11 +2844,6 @@
|
|||
<Param type="Model" name="model" desc="" />
|
||||
<Param type="ModelAnimation" name="anim" desc="" />
|
||||
</Function>
|
||||
<Function name="UpdateModelAnimationBoneMatrices" retType="void" paramCount="3" desc="Update model animation mesh bone matrices (Note GPU skinning does not work on Mac)">
|
||||
<Param type="Model" name="model" desc="" />
|
||||
<Param type="ModelAnimation" name="anim" desc="" />
|
||||
<Param type="int" name="frame" desc="" />
|
||||
</Function>
|
||||
<Function name="CheckCollisionSpheres" retType="bool" paramCount="4" desc="Check collision between two spheres">
|
||||
<Param type="Vector3" name="center1" desc="" />
|
||||
<Param type="float" name="radius1" desc="" />
|
||||
|
|
|
|||
|
|
@ -114,11 +114,11 @@ endif
|
|||
|
||||
ifeq ($(PLATFORM),PLATFORM_WEB)
|
||||
# Emscripten required variables
|
||||
EMSDK_PATH ?= C:/emsdk
|
||||
EMSDK_PATH ?= C:/raylib/emsdk
|
||||
EMSCRIPTEN_PATH ?= $(EMSDK_PATH)/upstream/emscripten
|
||||
CLANG_PATH = $(EMSDK_PATH)/upstream/bin
|
||||
PYTHON_PATH = $(EMSDK_PATH)/python/3.9.2-1_64bit
|
||||
NODE_PATH = $(EMSDK_PATH)/node/14.15.5_64bit/bin
|
||||
PYTHON_PATH = $(EMSDK_PATH)/python/3.9.2-nuget_64bit
|
||||
NODE_PATH = $(EMSDK_PATH)/node/20.18.0_64bit/bin
|
||||
export PATH = $(EMSDK_PATH);$(EMSCRIPTEN_PATH);$(CLANG_PATH);$(NODE_PATH);$(PYTHON_PATH);C:\raylib\MinGW\bin:$$(PATH)
|
||||
endif
|
||||
|
||||
|
|
|
|||
|
|
@ -23,16 +23,16 @@
|
|||
<Overload retVal="bool" descr="Check if window is currently fullscreen"></Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="IsWindowHidden" func="yes">
|
||||
<Overload retVal="bool" descr="Check if window is currently hidden (only PLATFORM_DESKTOP)"></Overload>
|
||||
<Overload retVal="bool" descr="Check if window is currently hidden"></Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="IsWindowMinimized" func="yes">
|
||||
<Overload retVal="bool" descr="Check if window is currently minimized (only PLATFORM_DESKTOP)"></Overload>
|
||||
<Overload retVal="bool" descr="Check if window is currently minimized"></Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="IsWindowMaximized" func="yes">
|
||||
<Overload retVal="bool" descr="Check if window is currently maximized (only PLATFORM_DESKTOP)"></Overload>
|
||||
<Overload retVal="bool" descr="Check if window is currently maximized"></Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="IsWindowFocused" func="yes">
|
||||
<Overload retVal="bool" descr="Check if window is currently focused (only PLATFORM_DESKTOP)"></Overload>
|
||||
<Overload retVal="bool" descr="Check if window is currently focused"></Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="IsWindowResized" func="yes">
|
||||
<Overload retVal="bool" descr="Check if window has been resized last frame"></Overload>
|
||||
|
|
@ -43,7 +43,7 @@
|
|||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="SetWindowState" func="yes">
|
||||
<Overload retVal="void" descr="Set window configuration state using flags (only PLATFORM_DESKTOP)">
|
||||
<Overload retVal="void" descr="Set window configuration state using flags">
|
||||
<Param name="unsigned int flags" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
|
|
@ -53,38 +53,38 @@
|
|||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="ToggleFullscreen" func="yes">
|
||||
<Overload retVal="void" descr="Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP)"></Overload>
|
||||
<Overload retVal="void" descr="Toggle window state: fullscreen/windowed, resizes monitor to match window resolution"></Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="ToggleBorderlessWindowed" func="yes">
|
||||
<Overload retVal="void" descr="Toggle window state: borderless windowed (only PLATFORM_DESKTOP)"></Overload>
|
||||
<Overload retVal="void" descr="Toggle window state: borderless windowed, resizes window to match monitor resolution"></Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="MaximizeWindow" func="yes">
|
||||
<Overload retVal="void" descr="Set window state: maximized, if resizable (only PLATFORM_DESKTOP)"></Overload>
|
||||
<Overload retVal="void" descr="Set window state: maximized, if resizable"></Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="MinimizeWindow" func="yes">
|
||||
<Overload retVal="void" descr="Set window state: minimized, if resizable (only PLATFORM_DESKTOP)"></Overload>
|
||||
<Overload retVal="void" descr="Set window state: minimized, if resizable"></Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="RestoreWindow" func="yes">
|
||||
<Overload retVal="void" descr="Set window state: not minimized/maximized (only PLATFORM_DESKTOP)"></Overload>
|
||||
<Overload retVal="void" descr="Set window state: not minimized/maximized"></Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="SetWindowIcon" func="yes">
|
||||
<Overload retVal="void" descr="Set icon for window (single image, RGBA 32bit, only PLATFORM_DESKTOP)">
|
||||
<Overload retVal="void" descr="Set icon for window (single image, RGBA 32bit)">
|
||||
<Param name="Image image" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="SetWindowIcons" func="yes">
|
||||
<Overload retVal="void" descr="Set icon for window (multiple images, RGBA 32bit, only PLATFORM_DESKTOP)">
|
||||
<Overload retVal="void" descr="Set icon for window (multiple images, RGBA 32bit)">
|
||||
<Param name="Image *images" />
|
||||
<Param name="int count" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="SetWindowTitle" func="yes">
|
||||
<Overload retVal="void" descr="Set title for window (only PLATFORM_DESKTOP and PLATFORM_WEB)">
|
||||
<Overload retVal="void" descr="Set title for window">
|
||||
<Param name="const char *title" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="SetWindowPosition" func="yes">
|
||||
<Overload retVal="void" descr="Set window position on screen (only PLATFORM_DESKTOP)">
|
||||
<Overload retVal="void" descr="Set window position on screen">
|
||||
<Param name="int x" />
|
||||
<Param name="int y" />
|
||||
</Overload>
|
||||
|
|
@ -113,12 +113,12 @@
|
|||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="SetWindowOpacity" func="yes">
|
||||
<Overload retVal="void" descr="Set window opacity [0.0f..1.0f] (only PLATFORM_DESKTOP)">
|
||||
<Overload retVal="void" descr="Set window opacity [0.0f..1.0f]">
|
||||
<Param name="float opacity" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="SetWindowFocused" func="yes">
|
||||
<Overload retVal="void" descr="Set window focused (only PLATFORM_DESKTOP)"></Overload>
|
||||
<Overload retVal="void" descr="Set window focused"></Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="GetWindowHandle" func="yes">
|
||||
<Overload retVal="void" descr="Get native window handle"></Overload>
|
||||
|
|
@ -139,7 +139,7 @@
|
|||
<Overload retVal="int" descr="Get number of connected monitors"></Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="GetCurrentMonitor" func="yes">
|
||||
<Overload retVal="int" descr="Get current connected monitor"></Overload>
|
||||
<Overload retVal="int" descr="Get current monitor where window is placed"></Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="GetMonitorPosition" func="yes">
|
||||
<Overload retVal="Vector2" descr="Get specified monitor position">
|
||||
|
|
@ -190,6 +190,9 @@
|
|||
<KeyWord name="GetClipboardText" func="yes">
|
||||
<Overload retVal="const char" descr="Get clipboard text content"></Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="GetClipboardImage" func="yes">
|
||||
<Overload retVal="Image" descr="Get clipboard image"></Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="EnableEventWaiting" func="yes">
|
||||
<Overload retVal="void" descr="Enable waiting for events on EndDrawing(), no automatic event polling"></Overload>
|
||||
</KeyWord>
|
||||
|
|
@ -315,8 +318,8 @@
|
|||
<Param name="const char *fsCode" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="IsShaderReady" func="yes">
|
||||
<Overload retVal="bool" descr="Check if a shader is ready">
|
||||
<KeyWord name="IsShaderValid" func="yes">
|
||||
<Overload retVal="bool" descr="Check if a shader is valid (loaded on GPU)">
|
||||
<Param name="Shader shader" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
|
|
@ -370,20 +373,18 @@
|
|||
</KeyWord>
|
||||
|
||||
<!-- Screen-space-related functions -->
|
||||
<KeyWord name="GetMouseRay" func="yes">
|
||||
<Overload retVal="Ray" descr="Get a ray trace from mouse position">
|
||||
<Param name="Vector2 mousePosition" />
|
||||
<KeyWord name="GetScreenToWorldRay" func="yes">
|
||||
<Overload retVal="Ray" descr="Get a ray trace from screen position (i.e mouse)">
|
||||
<Param name="Vector2 position" />
|
||||
<Param name="Camera camera" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="GetCameraMatrix" func="yes">
|
||||
<Overload retVal="Matrix" descr="Get camera transform matrix (view matrix)">
|
||||
<KeyWord name="GetScreenToWorldRayEx" func="yes">
|
||||
<Overload retVal="Ray" descr="Get a ray trace from screen position (i.e mouse) in a viewport">
|
||||
<Param name="Vector2 position" />
|
||||
<Param name="Camera camera" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="GetCameraMatrix2D" func="yes">
|
||||
<Overload retVal="Matrix" descr="Get camera 2d transform matrix">
|
||||
<Param name="Camera2D camera" />
|
||||
<Param name="int width" />
|
||||
<Param name="int height" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="GetWorldToScreen" func="yes">
|
||||
|
|
@ -392,12 +393,6 @@
|
|||
<Param name="Camera camera" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="GetScreenToWorld2D" func="yes">
|
||||
<Overload retVal="Vector2" descr="Get the world space position for a 2d camera screen space position">
|
||||
<Param name="Vector2 position" />
|
||||
<Param name="Camera2D camera" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="GetWorldToScreenEx" func="yes">
|
||||
<Overload retVal="Vector2" descr="Get size position for a 3d world space position">
|
||||
<Param name="Vector3 position" />
|
||||
|
|
@ -412,6 +407,22 @@
|
|||
<Param name="Camera2D camera" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="GetScreenToWorld2D" func="yes">
|
||||
<Overload retVal="Vector2" descr="Get the world space position for a 2d camera screen space position">
|
||||
<Param name="Vector2 position" />
|
||||
<Param name="Camera2D camera" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="GetCameraMatrix" func="yes">
|
||||
<Overload retVal="Matrix" descr="Get camera transform matrix (view matrix)">
|
||||
<Param name="Camera camera" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="GetCameraMatrix2D" func="yes">
|
||||
<Overload retVal="Matrix" descr="Get camera 2d transform matrix">
|
||||
<Param name="Camera2D camera" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
|
||||
<!-- Timing-related functions -->
|
||||
<KeyWord name="SetTargetFPS" func="yes">
|
||||
|
|
@ -430,6 +441,9 @@
|
|||
</KeyWord>
|
||||
|
||||
<!-- Custom frame control functions -->
|
||||
<!-- NOTE: Those functions are intended for advanced users that want full control over the frame processing -->
|
||||
<!-- By default EndDrawing() does this job: draws everything + SwapScreenBuffer() + manage frame timing + PollInputEvents() -->
|
||||
<!-- To avoid that behaviour and control frame processes manually, enable in config.h: SUPPORT_CUSTOM_FRAME_CONTROL -->
|
||||
<KeyWord name="SwapScreenBuffer" func="yes">
|
||||
<Overload retVal="void" descr="Swap back buffer with front buffer (screen drawing)"></Overload>
|
||||
</KeyWord>
|
||||
|
|
@ -484,6 +498,8 @@
|
|||
</Overload>
|
||||
</KeyWord>
|
||||
|
||||
<!-- NOTE: Following functions implemented in module [utils] -->
|
||||
<!-------------------------------------------------------------------- -->
|
||||
<KeyWord name="TraceLog" func="yes">
|
||||
<Overload retVal="void" descr="Show trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR...)">
|
||||
<Param name="int logLevel" />
|
||||
|
|
@ -575,6 +591,7 @@
|
|||
<Param name="char *text" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<!-------------------------------------------------------------------- -->
|
||||
|
||||
<!-- File system functions -->
|
||||
<KeyWord name="FileExists" func="yes">
|
||||
|
|
@ -629,6 +646,11 @@
|
|||
<KeyWord name="GetApplicationDirectory" func="yes">
|
||||
<Overload retVal="const char" descr="Get the directory of the running application (uses static string)"></Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="MakeDirectory" func="yes">
|
||||
<Overload retVal="int" descr="Create directories (including full path requested), returns 0 on success">
|
||||
<Param name="const char *dirPath" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="ChangeDirectory" func="yes">
|
||||
<Overload retVal="bool" descr="Change working directory, return true on success">
|
||||
<Param name="const char *dir" />
|
||||
|
|
@ -639,13 +661,18 @@
|
|||
<Param name="const char *path" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="IsFileNameValid" func="yes">
|
||||
<Overload retVal="bool" descr="Check if fileName is valid for the platform/OS">
|
||||
<Param name="const char *fileName" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="LoadDirectoryFiles" func="yes">
|
||||
<Overload retVal="FilePathList" descr="Load directory filepaths">
|
||||
<Param name="const char *dirPath" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="LoadDirectoryFilesEx" func="yes">
|
||||
<Overload retVal="FilePathList" descr="Load directory filepaths with extension filtering and recursive directory scan">
|
||||
<Overload retVal="FilePathList" descr="Load directory filepaths with extension filtering and recursive directory scan. Use 'DIR' in the filter string to include directories in the result">
|
||||
<Param name="const char *basePath" />
|
||||
<Param name="const char *filter" />
|
||||
<Param name="bool scanSubdirs" />
|
||||
|
|
@ -701,6 +728,25 @@
|
|||
<Param name="int *outputSize" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="int ComputeCRC32" func="yes">
|
||||
<Overload retVal="unsigned" descr="Compute CRC32 hash code">
|
||||
<Param name="unsigned char *data" />
|
||||
<Param name="int dataSize" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="int *ComputeMD5" func="yes">
|
||||
<Overload retVal="unsigned" descr="Compute MD5 hash code, returns static int[4] (16 bytes)">
|
||||
<Param name="unsigned char *data" />
|
||||
<Param name="int dataSize" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="int *ComputeSHA1" func="yes">
|
||||
<Overload retVal="unsigned" descr="Compute SHA1 hash code, returns static int[5] (20 bytes)">
|
||||
<Param name="unsigned char *data" />
|
||||
<Param name="int dataSize" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
|
||||
|
||||
<!-- Automation events functionality -->
|
||||
<KeyWord name="LoadAutomationEventList" func="yes">
|
||||
|
|
@ -710,7 +756,7 @@
|
|||
</KeyWord>
|
||||
<KeyWord name="UnloadAutomationEventList" func="yes">
|
||||
<Overload retVal="void" descr="Unload automation events list from file">
|
||||
<Param name="AutomationEventList *list" />
|
||||
<Param name="AutomationEventList list" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="ExportAutomationEventList" func="yes">
|
||||
|
|
@ -752,7 +798,7 @@
|
|||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="IsKeyPressedRepeat" func="yes">
|
||||
<Overload retVal="bool" descr="Check if a key has been pressed again (Only PLATFORM_DESKTOP)">
|
||||
<Overload retVal="bool" descr="Check if a key has been pressed again">
|
||||
<Param name="int key" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
|
|
@ -837,6 +883,14 @@
|
|||
<Param name="const char *mappings" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="SetGamepadVibration" func="yes">
|
||||
<Overload retVal="void" descr="Set gamepad vibration for both motors (duration in seconds)">
|
||||
<Param name="int gamepad" />
|
||||
<Param name="float leftMotor" />
|
||||
<Param name="float rightMotor" />
|
||||
<Param name="float duration" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
|
||||
<!-- Input-related functions: mouse -->
|
||||
<KeyWord name="IsMouseButtonPressed" func="yes">
|
||||
|
|
@ -939,7 +993,7 @@
|
|||
<Overload retVal="int" descr="Get latest detected gesture"></Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="GetGestureHoldDuration" func="yes">
|
||||
<Overload retVal="float" descr="Get gesture hold time in milliseconds"></Overload>
|
||||
<Overload retVal="float" descr="Get gesture hold time in seconds"></Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="GetGestureDragVector" func="yes">
|
||||
<Overload retVal="Vector2" descr="Get gesture drag vector"></Overload>
|
||||
|
|
@ -984,17 +1038,23 @@
|
|||
<Param name="Rectangle source" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="GetShapesTexture" func="yes">
|
||||
<Overload retVal="Texture2D" descr="Get texture that is used for shapes drawing"></Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="GetShapesTextureRectangle" func="yes">
|
||||
<Overload retVal="Rectangle" descr="Get texture source rectangle that is used for shapes drawing"></Overload>
|
||||
</KeyWord>
|
||||
|
||||
<!-- Basic shapes drawing functions -->
|
||||
<KeyWord name="DrawPixel" func="yes">
|
||||
<Overload retVal="void" descr="Draw a pixel">
|
||||
<Overload retVal="void" descr="Draw a pixel using geometry [Can be slow, use with care]">
|
||||
<Param name="int posX" />
|
||||
<Param name="int posY" />
|
||||
<Param name="Color color" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="DrawPixelV" func="yes">
|
||||
<Overload retVal="void" descr="Draw a pixel (Vector version)">
|
||||
<Overload retVal="void" descr="Draw a pixel using geometry (Vector version) [Can be slow, use with care]">
|
||||
<Param name="Vector2 position" />
|
||||
<Param name="Color color" />
|
||||
</Overload>
|
||||
|
|
@ -1025,7 +1085,7 @@
|
|||
</KeyWord>
|
||||
<KeyWord name="DrawLineStrip" func="yes">
|
||||
<Overload retVal="void" descr="Draw lines sequence (using gl lines)">
|
||||
<Param name="Vector2 *points" />
|
||||
<Param name="const Vector2 *points" />
|
||||
<Param name="int pointCount" />
|
||||
<Param name="Color color" />
|
||||
</Overload>
|
||||
|
|
@ -1071,8 +1131,8 @@
|
|||
<Param name="int centerX" />
|
||||
<Param name="int centerY" />
|
||||
<Param name="float radius" />
|
||||
<Param name="Color color1" />
|
||||
<Param name="Color color2" />
|
||||
<Param name="Color inner" />
|
||||
<Param name="Color outer" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="DrawCircleV" func="yes">
|
||||
|
|
@ -1173,8 +1233,8 @@
|
|||
<Param name="int posY" />
|
||||
<Param name="int width" />
|
||||
<Param name="int height" />
|
||||
<Param name="Color color1" />
|
||||
<Param name="Color color2" />
|
||||
<Param name="Color top" />
|
||||
<Param name="Color bottom" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="DrawRectangleGradientH" func="yes">
|
||||
|
|
@ -1183,17 +1243,17 @@
|
|||
<Param name="int posY" />
|
||||
<Param name="int width" />
|
||||
<Param name="int height" />
|
||||
<Param name="Color color1" />
|
||||
<Param name="Color color2" />
|
||||
<Param name="Color left" />
|
||||
<Param name="Color right" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="DrawRectangleGradientEx" func="yes">
|
||||
<Overload retVal="void" descr="Draw a gradient-filled rectangle with custom vertex colors">
|
||||
<Param name="Rectangle rec" />
|
||||
<Param name="Color col1" />
|
||||
<Param name="Color col2" />
|
||||
<Param name="Color col3" />
|
||||
<Param name="Color col4" />
|
||||
<Param name="Color topLeft" />
|
||||
<Param name="Color bottomLeft" />
|
||||
<Param name="Color topRight" />
|
||||
<Param name="Color bottomRight" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="DrawRectangleLines" func="yes">
|
||||
|
|
@ -1221,6 +1281,14 @@
|
|||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="DrawRectangleRoundedLines" func="yes">
|
||||
<Overload retVal="void" descr="Draw rectangle lines with rounded edges">
|
||||
<Param name="Rectangle rec" />
|
||||
<Param name="float roundness" />
|
||||
<Param name="int segments" />
|
||||
<Param name="Color color" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="DrawRectangleRoundedLinesEx" func="yes">
|
||||
<Overload retVal="void" descr="Draw rectangle with rounded edges outline">
|
||||
<Param name="Rectangle rec" />
|
||||
<Param name="float roundness" />
|
||||
|
|
@ -1247,14 +1315,14 @@
|
|||
</KeyWord>
|
||||
<KeyWord name="DrawTriangleFan" func="yes">
|
||||
<Overload retVal="void" descr="Draw a triangle fan defined by points (first vertex is the center)">
|
||||
<Param name="Vector2 *points" />
|
||||
<Param name="const Vector2 *points" />
|
||||
<Param name="int pointCount" />
|
||||
<Param name="Color color" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="DrawTriangleStrip" func="yes">
|
||||
<Overload retVal="void" descr="Draw a triangle strip defined by points">
|
||||
<Param name="Vector2 *points" />
|
||||
<Param name="const Vector2 *points" />
|
||||
<Param name="int pointCount" />
|
||||
<Param name="Color color" />
|
||||
</Overload>
|
||||
|
|
@ -1291,7 +1359,7 @@
|
|||
<!-- Splines drawing functions -->
|
||||
<KeyWord name="DrawSplineLinear" func="yes">
|
||||
<Overload retVal="void" descr="Draw spline: Linear, minimum 2 points">
|
||||
<Param name="Vector2 *points" />
|
||||
<Param name="const Vector2 *points" />
|
||||
<Param name="int pointCount" />
|
||||
<Param name="float thick" />
|
||||
<Param name="Color color" />
|
||||
|
|
@ -1299,7 +1367,7 @@
|
|||
</KeyWord>
|
||||
<KeyWord name="DrawSplineBasis" func="yes">
|
||||
<Overload retVal="void" descr="Draw spline: B-Spline, minimum 4 points">
|
||||
<Param name="Vector2 *points" />
|
||||
<Param name="const Vector2 *points" />
|
||||
<Param name="int pointCount" />
|
||||
<Param name="float thick" />
|
||||
<Param name="Color color" />
|
||||
|
|
@ -1307,7 +1375,7 @@
|
|||
</KeyWord>
|
||||
<KeyWord name="DrawSplineCatmullRom" func="yes">
|
||||
<Overload retVal="void" descr="Draw spline: Catmull-Rom, minimum 4 points">
|
||||
<Param name="Vector2 *points" />
|
||||
<Param name="const Vector2 *points" />
|
||||
<Param name="int pointCount" />
|
||||
<Param name="float thick" />
|
||||
<Param name="Color color" />
|
||||
|
|
@ -1315,7 +1383,7 @@
|
|||
</KeyWord>
|
||||
<KeyWord name="DrawSplineBezierQuadratic" func="yes">
|
||||
<Overload retVal="void" descr="Draw spline: Quadratic Bezier, minimum 3 points (1 control point): [p1, c2, p3, c4...]">
|
||||
<Param name="Vector2 *points" />
|
||||
<Param name="const Vector2 *points" />
|
||||
<Param name="int pointCount" />
|
||||
<Param name="float thick" />
|
||||
<Param name="Color color" />
|
||||
|
|
@ -1323,7 +1391,7 @@
|
|||
</KeyWord>
|
||||
<KeyWord name="DrawSplineBezierCubic" func="yes">
|
||||
<Overload retVal="void" descr="Draw spline: Cubic Bezier, minimum 4 points (2 control points): [p1, c2, c3, p4, c5, c6...]">
|
||||
<Param name="Vector2 *points" />
|
||||
<Param name="const Vector2 *points" />
|
||||
<Param name="int pointCount" />
|
||||
<Param name="float thick" />
|
||||
<Param name="Color color" />
|
||||
|
|
@ -1443,6 +1511,14 @@
|
|||
<Param name="Rectangle rec" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="CheckCollisionCircleLine" func="yes">
|
||||
<Overload retVal="bool" descr="Check if circle collides with a line created betweeen two points [p1] and [p2]">
|
||||
<Param name="Vector2 center" />
|
||||
<Param name="float radius" />
|
||||
<Param name="Vector2 p1" />
|
||||
<Param name="Vector2 p2" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="CheckCollisionPointRec" func="yes">
|
||||
<Overload retVal="bool" descr="Check if point is inside rectangle">
|
||||
<Param name="Vector2 point" />
|
||||
|
|
@ -1464,10 +1540,18 @@
|
|||
<Param name="Vector2 p3" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="CheckCollisionPointLine" func="yes">
|
||||
<Overload retVal="bool" descr="Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold]">
|
||||
<Param name="Vector2 point" />
|
||||
<Param name="Vector2 p1" />
|
||||
<Param name="Vector2 p2" />
|
||||
<Param name="int threshold" />
|
||||
</Overload>
|
||||
</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="const Vector2 *points" />
|
||||
<Param name="int pointCount" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
|
|
@ -1480,14 +1564,6 @@
|
|||
<Param name="Vector2 *collisionPoint" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="CheckCollisionPointLine" func="yes">
|
||||
<Overload retVal="bool" descr="Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold]">
|
||||
<Param name="Vector2 point" />
|
||||
<Param name="Vector2 p1" />
|
||||
<Param name="Vector2 p2" />
|
||||
<Param name="int threshold" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="GetCollisionRec" func="yes">
|
||||
<Overload retVal="Rectangle" descr="Get collision rectangle for two rectangles collision">
|
||||
<Param name="Rectangle rec1" />
|
||||
|
|
@ -1515,19 +1591,20 @@
|
|||
<Param name="int headerSize" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="LoadImageSvg" func="yes">
|
||||
<Overload retVal="Image" descr="Load image from SVG file data or string with specified size">
|
||||
<Param name="const char *fileNameOrString" />
|
||||
<Param name="int width" />
|
||||
<Param name="int height" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="LoadImageAnim" func="yes">
|
||||
<Overload retVal="Image" descr="Load image sequence from file (frames appended to image.data)">
|
||||
<Param name="const char *fileName" />
|
||||
<Param name="int *frames" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="LoadImageAnimFromMemory" func="yes">
|
||||
<Overload retVal="Image" descr="Load image sequence from memory buffer">
|
||||
<Param name="const char *fileType" />
|
||||
<Param name="const unsigned char" />
|
||||
<Param name="int dataSize" />
|
||||
<Param name="int *frames" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="LoadImageFromMemory" func="yes">
|
||||
<Overload retVal="Image" descr="Load image from memory buffer, fileType refers to extension: i.e. '.png'">
|
||||
<Param name="const char *fileType" />
|
||||
|
|
@ -1543,8 +1620,8 @@
|
|||
<KeyWord name="LoadImageFromScreen" func="yes">
|
||||
<Overload retVal="Image" descr="Load image from screen buffer and (screenshot)"></Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="IsImageReady" func="yes">
|
||||
<Overload retVal="bool" descr="Check if an image is ready">
|
||||
<KeyWord name="IsImageValid" func="yes">
|
||||
<Overload retVal="bool" descr="Check if an image is valid (data and parameters)">
|
||||
<Param name="Image image" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
|
|
@ -1661,6 +1738,12 @@
|
|||
<Param name="Rectangle rec" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="ImageFromChannel" func="yes">
|
||||
<Overload retVal="Image" descr="Create an image from a selected channel of another image (GRAYSCALE)">
|
||||
<Param name="Image image" />
|
||||
<Param name="int selectedChannel" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="ImageText" func="yes">
|
||||
<Overload retVal="Image" descr="Create an image from text (default font)">
|
||||
<Param name="const char *text" />
|
||||
|
|
@ -1725,6 +1808,13 @@
|
|||
<Param name="int blurSize" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="ImageKernelConvolution" func="yes">
|
||||
<Overload retVal="void" descr="Apply custom square convolution kernel to image">
|
||||
<Param name="Image *image" />
|
||||
<Param name="const float *kernel" />
|
||||
<Param name="int kernelSize" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="ImageResize" func="yes">
|
||||
<Overload retVal="void" descr="Resize image (Bicubic scaling algorithm)">
|
||||
<Param name="Image *image" />
|
||||
|
|
@ -1901,6 +1991,15 @@
|
|||
<Param name="Color color" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="ImageDrawLineEx" func="yes">
|
||||
<Overload retVal="void" descr="Draw a line defining thickness within an image">
|
||||
<Param name="Image *dst" />
|
||||
<Param name="Vector2 start" />
|
||||
<Param name="Vector2 end" />
|
||||
<Param name="int thick" />
|
||||
<Param name="Color color" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="ImageDrawCircle" func="yes">
|
||||
<Overload retVal="void" descr="Draw a filled circle within an image">
|
||||
<Param name="Image *dst" />
|
||||
|
|
@ -1968,6 +2067,51 @@
|
|||
<Param name="Color color" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="ImageDrawTriangle" func="yes">
|
||||
<Overload retVal="void" descr="Draw triangle within an image">
|
||||
<Param name="Image *dst" />
|
||||
<Param name="Vector2 v1" />
|
||||
<Param name="Vector2 v2" />
|
||||
<Param name="Vector2 v3" />
|
||||
<Param name="Color color" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="ImageDrawTriangleEx" func="yes">
|
||||
<Overload retVal="void" descr="Draw triangle with interpolated colors within an image">
|
||||
<Param name="Image *dst" />
|
||||
<Param name="Vector2 v1" />
|
||||
<Param name="Vector2 v2" />
|
||||
<Param name="Vector2 v3" />
|
||||
<Param name="Color c1" />
|
||||
<Param name="Color c2" />
|
||||
<Param name="Color c3" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="ImageDrawTriangleLines" func="yes">
|
||||
<Overload retVal="void" descr="Draw triangle outline within an image">
|
||||
<Param name="Image *dst" />
|
||||
<Param name="Vector2 v1" />
|
||||
<Param name="Vector2 v2" />
|
||||
<Param name="Vector2 v3" />
|
||||
<Param name="Color color" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="ImageDrawTriangleFan" func="yes">
|
||||
<Overload retVal="void" descr="Draw a triangle fan defined by points within an image (first vertex is the center)">
|
||||
<Param name="Image *dst" />
|
||||
<Param name="Vector2 *points" />
|
||||
<Param name="int pointCount" />
|
||||
<Param name="Color color" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="ImageDrawTriangleStrip" func="yes">
|
||||
<Overload retVal="void" descr="Draw a triangle strip defined by points within an image">
|
||||
<Param name="Image *dst" />
|
||||
<Param name="Vector2 *points" />
|
||||
<Param name="int pointCount" />
|
||||
<Param name="Color color" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="ImageDraw" func="yes">
|
||||
<Overload retVal="void" descr="Draw a source image within a destination image (tint applied to source)">
|
||||
<Param name="Image *dst" />
|
||||
|
|
@ -2023,8 +2167,8 @@
|
|||
<Param name="int height" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="IsTextureReady" func="yes">
|
||||
<Overload retVal="bool" descr="Check if a texture is ready">
|
||||
<KeyWord name="IsTextureValid" func="yes">
|
||||
<Overload retVal="bool" descr="Check if a texture is valid (loaded in GPU)">
|
||||
<Param name="Texture2D texture" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
|
|
@ -2033,8 +2177,8 @@
|
|||
<Param name="Texture2D texture" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="IsRenderTextureReady" func="yes">
|
||||
<Overload retVal="bool" descr="Check if a render texture is ready">
|
||||
<KeyWord name="IsRenderTextureValid" func="yes">
|
||||
<Overload retVal="bool" descr="Check if a render texture is valid (loaded in GPU)">
|
||||
<Param name="RenderTexture2D target" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
|
|
@ -2131,6 +2275,12 @@
|
|||
</KeyWord>
|
||||
|
||||
<!-- Color/pixel related functions -->
|
||||
<KeyWord name="ColorIsEqual" func="yes">
|
||||
<Overload retVal="bool" descr="Check if two colors are equal">
|
||||
<Param name="Color col1" />
|
||||
<Param name="Color col2" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="Fade" func="yes">
|
||||
<Overload retVal="Color" descr="Get color with alpha applied, alpha goes from 0.0f to 1.0f">
|
||||
<Param name="Color color" />
|
||||
|
|
@ -2138,7 +2288,7 @@
|
|||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="ColorToInt" func="yes">
|
||||
<Overload retVal="int" descr="Get hexadecimal value for a Color">
|
||||
<Overload retVal="int" descr="Get hexadecimal value for a Color (0xRRGGBBAA)">
|
||||
<Param name="Color color" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
|
|
@ -2195,6 +2345,13 @@
|
|||
<Param name="Color tint" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="ColorLerp" func="yes">
|
||||
<Overload retVal="Color" descr="Get color lerp interpolation between two colors, factor [0.0f..1.0f]">
|
||||
<Param name="Color color1" />
|
||||
<Param name="Color color2" />
|
||||
<Param name="float factor" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="GetColor" func="yes">
|
||||
<Overload retVal="Color" descr="Get Color structure from hexadecimal value">
|
||||
<Param name="unsigned int hexValue" />
|
||||
|
|
@ -2228,7 +2385,7 @@
|
|||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="LoadFontEx" func="yes">
|
||||
<Overload retVal="Font" descr="Load font from file with extended parameters, use NULL for codepoints and 0 for codepointCount to load the default character set">
|
||||
<Overload retVal="Font" descr="Load font from file with extended parameters, use NULL for codepoints and 0 for codepointCount to load the default character set, font size is provided in pixels height">
|
||||
<Param name="const char *fileName" />
|
||||
<Param name="int fontSize" />
|
||||
<Param name="int *codepoints" />
|
||||
|
|
@ -2252,8 +2409,8 @@
|
|||
<Param name="int codepointCount" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="IsFontReady" func="yes">
|
||||
<Overload retVal="bool" descr="Check if a font is ready">
|
||||
<KeyWord name="IsFontValid" func="yes">
|
||||
<Overload retVal="bool" descr="Check if a font is valid (font data loaded, WARNING: GPU texture not checked)">
|
||||
<Param name="Font font" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
|
|
@ -2480,7 +2637,7 @@
|
|||
</KeyWord>
|
||||
<KeyWord name="TextReplace" func="yes">
|
||||
<Overload retVal="char" descr="Replace text string (WARNING: memory must be freed!)">
|
||||
<Param name="char *text" />
|
||||
<Param name="const char *text" />
|
||||
<Param name="const char *replace" />
|
||||
<Param name="const char *by" />
|
||||
</Overload>
|
||||
|
|
@ -2534,11 +2691,27 @@
|
|||
<Param name="const char *text" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="TextToSnake" func="yes">
|
||||
<Overload retVal="const char" descr="Get Snake case notation version of provided string">
|
||||
<Param name="const char *text" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="TextToCamel" func="yes">
|
||||
<Overload retVal="const char" descr="Get Camel case notation version of provided string">
|
||||
<Param name="const char *text" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
|
||||
<KeyWord name="TextToInteger" func="yes">
|
||||
<Overload retVal="int" descr="Get integer value from text (negative values not supported)">
|
||||
<Param name="const char *text" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="TextToFloat" func="yes">
|
||||
<Overload retVal="float" descr="Get float value from text (negative values not supported)">
|
||||
<Param name="const char *text" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
|
||||
<!-------------------------------------------------------------------------------------- -->
|
||||
<!-- Basic 3d Shapes Drawing Functions (Module: models) -->
|
||||
|
|
@ -2577,7 +2750,7 @@
|
|||
</KeyWord>
|
||||
<KeyWord name="DrawTriangleStrip3D" func="yes">
|
||||
<Overload retVal="void" descr="Draw a triangle strip defined by points">
|
||||
<Param name="Vector3 *points" />
|
||||
<Param name="const Vector3 *points" />
|
||||
<Param name="int pointCount" />
|
||||
<Param name="Color color" />
|
||||
</Overload>
|
||||
|
|
@ -2734,8 +2907,8 @@
|
|||
<Param name="Mesh mesh" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="IsModelReady" func="yes">
|
||||
<Overload retVal="bool" descr="Check if a model is ready">
|
||||
<KeyWord name="IsModelValid" func="yes">
|
||||
<Overload retVal="bool" descr="Check if a model is valid (loaded in GPU, VAO/VBOs)">
|
||||
<Param name="Model model" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
|
|
@ -2787,6 +2960,24 @@
|
|||
<Param name="Color tint" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="DrawModelPoints" func="yes">
|
||||
<Overload retVal="void" descr="Draw a model as points">
|
||||
<Param name="Model model" />
|
||||
<Param name="Vector3 position" />
|
||||
<Param name="float scale" />
|
||||
<Param name="Color tint" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="DrawModelPointsEx" func="yes">
|
||||
<Overload retVal="void" descr="Draw a model as points with extended parameters">
|
||||
<Param name="Model model" />
|
||||
<Param name="Vector3 position" />
|
||||
<Param name="Vector3 rotationAxis" />
|
||||
<Param name="float rotationAngle" />
|
||||
<Param name="Vector3 scale" />
|
||||
<Param name="Color tint" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="DrawBoundingBox" func="yes">
|
||||
<Overload retVal="void" descr="Draw bounding box (wires)">
|
||||
<Param name="BoundingBox box" />
|
||||
|
|
@ -2798,7 +2989,7 @@
|
|||
<Param name="Camera camera" />
|
||||
<Param name="Texture2D texture" />
|
||||
<Param name="Vector3 position" />
|
||||
<Param name="float size" />
|
||||
<Param name="float scale" />
|
||||
<Param name="Color tint" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
|
|
@ -2822,7 +3013,7 @@
|
|||
<Param name="Vector2 size" />
|
||||
<Param name="Vector2 origin" />
|
||||
<Param name="float rotation" />
|
||||
<Param name="0<EFBFBD>8<EFBFBD> " />
|
||||
<Param name="°ñ_)% " />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
|
||||
|
|
@ -2862,12 +3053,6 @@
|
|||
<Param name="int instances" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="ExportMesh" func="yes">
|
||||
<Overload retVal="bool" descr="Export mesh data to file, returns true on success">
|
||||
<Param name="Mesh mesh" />
|
||||
<Param name="const char *fileName" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="GetMeshBoundingBox" func="yes">
|
||||
<Overload retVal="BoundingBox" descr="Compute mesh bounding box limits">
|
||||
<Param name="Mesh mesh" />
|
||||
|
|
@ -2878,6 +3063,18 @@
|
|||
<Param name="Mesh *mesh" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="ExportMesh" func="yes">
|
||||
<Overload retVal="bool" descr="Export mesh data to file, returns true on success">
|
||||
<Param name="Mesh mesh" />
|
||||
<Param name="const char *fileName" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="ExportMeshAsCode" func="yes">
|
||||
<Overload retVal="bool" descr="Export mesh as code file (.h) defining multiple arrays of vertex attributes">
|
||||
<Param name="Mesh mesh" />
|
||||
<Param name="const char *fileName" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
|
||||
<!-- Mesh generation functions -->
|
||||
<KeyWord name="GenMeshPoly" func="yes">
|
||||
|
|
@ -2968,8 +3165,8 @@
|
|||
<KeyWord name="LoadMaterialDefault" func="yes">
|
||||
<Overload retVal="Material" descr="Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps)"></Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="IsMaterialReady" func="yes">
|
||||
<Overload retVal="bool" descr="Check if a material is ready">
|
||||
<KeyWord name="IsMaterialValid" func="yes">
|
||||
<Overload retVal="bool" descr="Check if a material is valid (shader assigned, map textures loaded in GPU)">
|
||||
<Param name="Material material" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
|
|
@ -3001,7 +3198,14 @@
|
|||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="UpdateModelAnimation" func="yes">
|
||||
<Overload retVal="void" descr="Update model animation pose">
|
||||
<Overload retVal="void" descr="Update model animation pose (CPU)">
|
||||
<Param name="Model model" />
|
||||
<Param name="ModelAnimation anim" />
|
||||
<Param name="int frame" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="UpdateModelAnimationBones" func="yes">
|
||||
<Overload retVal="void" descr="Update model animation mesh bone matrices (GPU skinning)">
|
||||
<Param name="Model model" />
|
||||
<Param name="ModelAnimation anim" />
|
||||
<Param name="int frame" />
|
||||
|
|
@ -3121,8 +3325,8 @@
|
|||
<Param name="int dataSize" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="IsWaveReady" func="yes">
|
||||
<Overload retVal="bool" descr="Checks if wave data is ready">
|
||||
<KeyWord name="IsWaveValid" func="yes">
|
||||
<Overload retVal="bool" descr="Checks if wave data is valid (data loaded and parameters)">
|
||||
<Param name="Wave wave" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
|
|
@ -3141,8 +3345,8 @@
|
|||
<Param name="Sound source" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="IsSoundReady" func="yes">
|
||||
<Overload retVal="bool" descr="Checks if a sound is ready">
|
||||
<KeyWord name="IsSoundValid" func="yes">
|
||||
<Overload retVal="bool" descr="Checks if a sound is valid (data loaded and buffers initialized)">
|
||||
<Param name="Sound sound" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
|
|
@ -3231,10 +3435,10 @@
|
|||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="WaveCrop" func="yes">
|
||||
<Overload retVal="void" descr="Crop a wave to defined samples range">
|
||||
<Overload retVal="void" descr="Crop a wave to defined frames range">
|
||||
<Param name="Wave *wave" />
|
||||
<Param name="int initSample" />
|
||||
<Param name="int finalSample" />
|
||||
<Param name="int initFrame" />
|
||||
<Param name="int finalFrame" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="WaveFormat" func="yes">
|
||||
|
|
@ -3269,8 +3473,8 @@
|
|||
<Param name="int dataSize" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="IsMusicReady" func="yes">
|
||||
<Overload retVal="bool" descr="Checks if a music stream is ready">
|
||||
<KeyWord name="IsMusicValid" func="yes">
|
||||
<Overload retVal="bool" descr="Checks if a music stream is valid (context and buffers initialized)">
|
||||
<Param name="Music music" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
|
|
@ -3352,8 +3556,8 @@
|
|||
<Param name="unsigned int channels" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="IsAudioStreamReady" func="yes">
|
||||
<Overload retVal="bool" descr="Checks if an audio stream is ready">
|
||||
<KeyWord name="IsAudioStreamValid" func="yes">
|
||||
<Overload retVal="bool" descr="Checks if an audio stream is valid (buffers initialized)">
|
||||
<Param name="AudioStream stream" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
|
|
@ -3430,7 +3634,7 @@
|
|||
</KeyWord>
|
||||
|
||||
<KeyWord name="AttachAudioStreamProcessor" func="yes">
|
||||
<Overload retVal="void" descr="Attach audio stream processor to stream, receives the samples as <float>s">
|
||||
<Overload retVal="void" descr="Attach audio stream processor to stream, receives the samples as 'float'">
|
||||
<Param name="AudioStream stream" />
|
||||
<Param name="AudioCallback processor" />
|
||||
</Overload>
|
||||
|
|
@ -3443,7 +3647,7 @@
|
|||
</KeyWord>
|
||||
|
||||
<KeyWord name="AttachAudioMixedProcessor" func="yes">
|
||||
<Overload retVal="void" descr="Attach audio stream processor to the entire audio pipeline, receives the samples as <float>s">
|
||||
<Overload retVal="void" descr="Attach audio stream processor to the entire audio pipeline, receives the samples as 'float'">
|
||||
<Param name="AudioCallback processor" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
|
|
|
|||
|
|
@ -8,36 +8,36 @@ RLAPI void CloseWindow(void); // Close windo
|
|||
RLAPI bool WindowShouldClose(void); // Check if application should close (KEY_ESCAPE pressed or windows close icon clicked)
|
||||
RLAPI bool IsWindowReady(void); // Check if window has been initialized successfully
|
||||
RLAPI bool IsWindowFullscreen(void); // Check if window is currently fullscreen
|
||||
RLAPI bool IsWindowHidden(void); // Check if window is currently hidden (only PLATFORM_DESKTOP)
|
||||
RLAPI bool IsWindowMinimized(void); // Check if window is currently minimized (only PLATFORM_DESKTOP)
|
||||
RLAPI bool IsWindowMaximized(void); // Check if window is currently maximized (only PLATFORM_DESKTOP)
|
||||
RLAPI bool IsWindowFocused(void); // Check if window is currently focused (only PLATFORM_DESKTOP)
|
||||
RLAPI bool IsWindowHidden(void); // Check if window is currently hidden
|
||||
RLAPI bool IsWindowMinimized(void); // Check if window is currently minimized
|
||||
RLAPI bool IsWindowMaximized(void); // Check if window is currently maximized
|
||||
RLAPI bool IsWindowFocused(void); // Check if window is currently focused
|
||||
RLAPI bool IsWindowResized(void); // Check if window has been resized last frame
|
||||
RLAPI bool IsWindowState(unsigned int flag); // Check if one specific window flag is enabled
|
||||
RLAPI void SetWindowState(unsigned int flags); // Set window configuration state using flags (only PLATFORM_DESKTOP)
|
||||
RLAPI void SetWindowState(unsigned int flags); // Set window configuration state using flags
|
||||
RLAPI void ClearWindowState(unsigned int flags); // Clear window configuration state flags
|
||||
RLAPI void ToggleFullscreen(void); // Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP)
|
||||
RLAPI void ToggleBorderlessWindowed(void); // Toggle window state: borderless windowed (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 RestoreWindow(void); // Set window state: not minimized/maximized (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 and PLATFORM_WEB)
|
||||
RLAPI void SetWindowPosition(int x, int y); // Set window position on screen (only PLATFORM_DESKTOP)
|
||||
RLAPI void ToggleFullscreen(void); // Toggle window state: fullscreen/windowed, resizes monitor to match window resolution
|
||||
RLAPI void ToggleBorderlessWindowed(void); // Toggle window state: borderless windowed, resizes window to match monitor resolution
|
||||
RLAPI void MaximizeWindow(void); // Set window state: maximized, if resizable
|
||||
RLAPI void MinimizeWindow(void); // Set window state: minimized, if resizable
|
||||
RLAPI void RestoreWindow(void); // Set window state: not minimized/maximized
|
||||
RLAPI void SetWindowIcon(Image image); // Set icon for window (single image, RGBA 32bit)
|
||||
RLAPI void SetWindowIcons(Image *images, int count); // Set icon for window (multiple images, RGBA 32bit)
|
||||
RLAPI void SetWindowTitle(const char *title); // Set title for window
|
||||
RLAPI void SetWindowPosition(int x, int y); // Set window position on screen
|
||||
RLAPI void SetWindowMonitor(int monitor); // Set monitor for the current window
|
||||
RLAPI void SetWindowMinSize(int width, int height); // Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE)
|
||||
RLAPI void SetWindowMaxSize(int width, int height); // Set window maximum dimensions (for FLAG_WINDOW_RESIZABLE)
|
||||
RLAPI void SetWindowSize(int width, int height); // Set window dimensions
|
||||
RLAPI void SetWindowOpacity(float opacity); // Set window opacity [0.0f..1.0f] (only PLATFORM_DESKTOP)
|
||||
RLAPI void SetWindowFocused(void); // Set window focused (only PLATFORM_DESKTOP)
|
||||
RLAPI void SetWindowOpacity(float opacity); // Set window opacity [0.0f..1.0f]
|
||||
RLAPI void SetWindowFocused(void); // Set window focused
|
||||
RLAPI void *GetWindowHandle(void); // Get native window handle
|
||||
RLAPI int GetScreenWidth(void); // Get current screen width
|
||||
RLAPI int GetScreenHeight(void); // Get current screen height
|
||||
RLAPI int GetRenderWidth(void); // Get current render width (it considers HiDPI)
|
||||
RLAPI int GetRenderHeight(void); // Get current render height (it considers HiDPI)
|
||||
RLAPI int GetMonitorCount(void); // Get number of connected monitors
|
||||
RLAPI int GetCurrentMonitor(void); // Get current connected monitor
|
||||
RLAPI int GetCurrentMonitor(void); // Get current monitor where window is placed
|
||||
RLAPI Vector2 GetMonitorPosition(int monitor); // Get specified monitor position
|
||||
RLAPI int GetMonitorWidth(int monitor); // Get specified monitor width (current video mode used by monitor)
|
||||
RLAPI int GetMonitorHeight(int monitor); // Get specified monitor height (current video mode used by monitor)
|
||||
|
|
@ -49,6 +49,7 @@ RLAPI Vector2 GetWindowScaleDPI(void); // Get window
|
|||
RLAPI const char *GetMonitorName(int monitor); // Get the human-readable, UTF-8 encoded name of the specified monitor
|
||||
RLAPI void SetClipboardText(const char *text); // Set clipboard text content
|
||||
RLAPI const char *GetClipboardText(void); // Get clipboard text content
|
||||
RLAPI Image GetClipboardImage(void); // Get clipboard image
|
||||
RLAPI void EnableEventWaiting(void); // Enable waiting for events on EndDrawing(), no automatic event polling
|
||||
RLAPI void DisableEventWaiting(void); // Disable waiting for events on EndDrawing(), automatic events polling
|
||||
|
||||
|
|
@ -87,7 +88,7 @@ RLAPI void UnloadVrStereoConfig(VrStereoConfig config); // Unload VR s
|
|||
// 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 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 bool IsShaderValid(Shader shader); // Check if a shader is valid (loaded on GPU)
|
||||
RLAPI int GetShaderLocation(Shader shader, const char *uniformName); // Get shader uniform location
|
||||
RLAPI int 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
|
||||
|
|
@ -97,13 +98,15 @@ RLAPI void SetShaderValueTexture(Shader shader, int locIndex, Texture2D texture)
|
|||
RLAPI void UnloadShader(Shader shader); // Unload shader from GPU memory (VRAM)
|
||||
|
||||
// Screen-space-related functions
|
||||
RLAPI Ray GetMouseRay(Vector2 mousePosition, Camera camera); // Get a ray trace from mouse position
|
||||
RLAPI Matrix GetCameraMatrix(Camera camera); // Get camera transform matrix (view matrix)
|
||||
RLAPI Matrix GetCameraMatrix2D(Camera2D camera); // Get camera 2d transform matrix
|
||||
#define GetMouseRay GetScreenToWorldRay // Compatibility hack for previous raylib versions
|
||||
RLAPI Ray GetScreenToWorldRay(Vector2 position, Camera camera); // Get a ray trace from screen position (i.e mouse)
|
||||
RLAPI Ray GetScreenToWorldRayEx(Vector2 position, Camera camera, int width, int height); // Get a ray trace from screen position (i.e mouse) in a viewport
|
||||
RLAPI Vector2 GetWorldToScreen(Vector3 position, Camera camera); // Get the screen space position for a 3d world space position
|
||||
RLAPI Vector2 GetScreenToWorld2D(Vector2 position, Camera2D camera); // Get the world space position for a 2d camera screen space position
|
||||
RLAPI Vector2 GetWorldToScreenEx(Vector3 position, Camera camera, int width, int height); // Get size position for a 3d world space position
|
||||
RLAPI Vector2 GetWorldToScreen2D(Vector2 position, Camera2D camera); // Get the screen space position for a 2d camera world space position
|
||||
RLAPI Vector2 GetScreenToWorld2D(Vector2 position, Camera2D camera); // Get the world space position for a 2d camera screen space position
|
||||
RLAPI Matrix GetCameraMatrix(Camera camera); // Get camera transform matrix (view matrix)
|
||||
RLAPI Matrix GetCameraMatrix2D(Camera2D camera); // Get camera 2d transform matrix
|
||||
|
||||
// Timing-related functions
|
||||
RLAPI void SetTargetFPS(int fps); // Set target FPS (maximum)
|
||||
|
|
@ -112,6 +115,9 @@ RLAPI double GetTime(void); // Get elapsed
|
|||
RLAPI int GetFPS(void); // Get current FPS
|
||||
|
||||
// Custom frame control functions
|
||||
// NOTE: Those functions are intended for advanced users that want full control over the frame processing
|
||||
// By default EndDrawing() does this job: draws everything + SwapScreenBuffer() + manage frame timing + PollInputEvents()
|
||||
// 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 PollInputEvents(void); // Register all input events
|
||||
RLAPI void WaitTime(double seconds); // Wait for some time (halt program execution)
|
||||
|
|
@ -127,6 +133,8 @@ RLAPI void TakeScreenshot(const char *fileName); // Takes a scr
|
|||
RLAPI void SetConfigFlags(unsigned int flags); // Setup init configuration flags (view FLAGS)
|
||||
RLAPI void OpenURL(const char *url); // Open URL with default system browser (if available)
|
||||
|
||||
// NOTE: Following functions implemented in module [utils]
|
||||
//------------------------------------------------------------------
|
||||
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 *MemAlloc(unsigned int size); // Internal memory allocator
|
||||
|
|
@ -149,6 +157,7 @@ RLAPI bool ExportDataAsCode(const unsigned char *data, int dataSize, const char
|
|||
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 bool SaveFileText(const char *fileName, char *text); // Save text data to file (write), string must be '\0' terminated, returns true on success
|
||||
//------------------------------------------------------------------
|
||||
|
||||
// File system functions
|
||||
RLAPI bool FileExists(const char *fileName); // Check if file exists
|
||||
|
|
@ -162,10 +171,12 @@ RLAPI const char *GetDirectoryPath(const char *filePath); // Get full pa
|
|||
RLAPI const char *GetPrevDirectoryPath(const char *dirPath); // Get previous directory path for a given path (uses static string)
|
||||
RLAPI const char *GetWorkingDirectory(void); // Get current working directory (uses static string)
|
||||
RLAPI const char *GetApplicationDirectory(void); // Get the directory of the running application (uses static string)
|
||||
RLAPI int MakeDirectory(const char *dirPath); // Create directories (including full path requested), returns 0 on success
|
||||
RLAPI bool ChangeDirectory(const char *dir); // Change working directory, return true on success
|
||||
RLAPI bool IsPathFile(const char *path); // Check if a given path is a file or a directory
|
||||
RLAPI bool IsFileNameValid(const char *fileName); // Check if fileName is valid for the platform/OS
|
||||
RLAPI FilePathList LoadDirectoryFiles(const char *dirPath); // Load directory filepaths
|
||||
RLAPI FilePathList LoadDirectoryFilesEx(const char *basePath, const char *filter, bool scanSubdirs); // Load directory filepaths with extension filtering and recursive directory scan
|
||||
RLAPI FilePathList LoadDirectoryFilesEx(const char *basePath, const char *filter, bool scanSubdirs); // Load directory filepaths with extension filtering and recursive directory scan. Use 'DIR' in the filter string to include directories in the result
|
||||
RLAPI void UnloadDirectoryFiles(FilePathList files); // Unload filepaths
|
||||
RLAPI bool IsFileDropped(void); // Check if a file has been dropped into window
|
||||
RLAPI FilePathList LoadDroppedFiles(void); // Load dropped filepaths
|
||||
|
|
@ -177,10 +188,14 @@ RLAPI unsigned char *CompressData(const unsigned char *data, int dataSize, int *
|
|||
RLAPI unsigned char *DecompressData(const unsigned char *compData, int compDataSize, int *dataSize); // Decompress data (DEFLATE algorithm), memory must be MemFree()
|
||||
RLAPI char *EncodeDataBase64(const unsigned char *data, int dataSize, int *outputSize); // Encode data to Base64 string, memory must be MemFree()
|
||||
RLAPI unsigned char *DecodeDataBase64(const unsigned char *data, int *outputSize); // Decode Base64 string data, memory must be MemFree()
|
||||
RLAPI unsigned int ComputeCRC32(unsigned char *data, int dataSize); // Compute CRC32 hash code
|
||||
RLAPI unsigned int *ComputeMD5(unsigned char *data, int dataSize); // Compute MD5 hash code, returns static int[4] (16 bytes)
|
||||
RLAPI unsigned int *ComputeSHA1(unsigned char *data, int dataSize); // Compute SHA1 hash code, returns static int[5] (20 bytes)
|
||||
|
||||
|
||||
// Automation events functionality
|
||||
RLAPI AutomationEventList LoadAutomationEventList(const char *fileName); // Load automation events list from file, NULL for empty list, capacity = MAX_AUTOMATION_EVENTS
|
||||
RLAPI void UnloadAutomationEventList(AutomationEventList *list); // Unload automation events list from file
|
||||
RLAPI void UnloadAutomationEventList(AutomationEventList list); // Unload automation events list from file
|
||||
RLAPI bool ExportAutomationEventList(AutomationEventList list, const char *fileName); // Export automation events list as text file
|
||||
RLAPI void SetAutomationEventList(AutomationEventList *list); // Set automation event list to record to
|
||||
RLAPI void SetAutomationEventBaseFrame(int frame); // Set automation event internal base frame to start recording
|
||||
|
|
@ -194,7 +209,7 @@ RLAPI void PlayAutomationEvent(AutomationEvent event);
|
|||
|
||||
// Input-related functions: keyboard
|
||||
RLAPI bool IsKeyPressed(int key); // Check if a key has been pressed once
|
||||
RLAPI bool IsKeyPressedRepeat(int key); // Check if a key has been pressed again (Only PLATFORM_DESKTOP)
|
||||
RLAPI bool IsKeyPressedRepeat(int key); // Check if a key has been pressed again
|
||||
RLAPI bool IsKeyDown(int key); // Check if a key is being pressed
|
||||
RLAPI bool IsKeyReleased(int key); // Check if a key has been released once
|
||||
RLAPI bool IsKeyUp(int key); // Check if a key is NOT being pressed
|
||||
|
|
@ -213,6 +228,7 @@ RLAPI int GetGamepadButtonPressed(void); // Get the last ga
|
|||
RLAPI int GetGamepadAxisCount(int gamepad); // Get gamepad axis count for a gamepad
|
||||
RLAPI float GetGamepadAxisMovement(int gamepad, int axis); // Get axis movement value for a gamepad axis
|
||||
RLAPI int SetGamepadMappings(const char *mappings); // Set internal gamepad mappings (SDL_GameControllerDB)
|
||||
RLAPI void SetGamepadVibration(int gamepad, float leftMotor, float rightMotor, float duration); // Set gamepad vibration for both motors (duration in seconds)
|
||||
|
||||
// Input-related functions: mouse
|
||||
RLAPI bool IsMouseButtonPressed(int button); // Check if a mouse button has been pressed once
|
||||
|
|
@ -243,7 +259,7 @@ RLAPI int GetTouchPointCount(void); // Get number of t
|
|||
RLAPI void SetGesturesEnabled(unsigned int flags); // Enable a set of gestures using flags
|
||||
RLAPI bool IsGestureDetected(unsigned int gesture); // Check if a gesture have been detected
|
||||
RLAPI int GetGestureDetected(void); // Get latest detected gesture
|
||||
RLAPI float GetGestureHoldDuration(void); // Get gesture hold time in milliseconds
|
||||
RLAPI float GetGestureHoldDuration(void); // Get gesture hold time in seconds
|
||||
RLAPI Vector2 GetGestureDragVector(void); // Get gesture drag vector
|
||||
RLAPI float GetGestureDragAngle(void); // Get gesture drag angle
|
||||
RLAPI Vector2 GetGesturePinchVector(void); // Get gesture pinch delta
|
||||
|
|
@ -262,19 +278,21 @@ RLAPI void UpdateCameraPro(Camera *camera, Vector3 movement, Vector3 rotation, f
|
|||
// NOTE: It can be useful when using basic shapes and one single font,
|
||||
// defining a font char white rectangle would allow drawing everything in a single draw call
|
||||
RLAPI void SetShapesTexture(Texture2D texture, Rectangle source); // Set texture and rectangle to be used on shapes drawing
|
||||
RLAPI Texture2D GetShapesTexture(void); // Get texture that is used for shapes drawing
|
||||
RLAPI Rectangle GetShapesTextureRectangle(void); // Get texture source rectangle that is used for shapes drawing
|
||||
|
||||
// Basic shapes drawing functions
|
||||
RLAPI void DrawPixel(int posX, int posY, Color color); // Draw a pixel
|
||||
RLAPI void DrawPixelV(Vector2 position, Color color); // Draw a pixel (Vector version)
|
||||
RLAPI void DrawPixel(int posX, int posY, Color color); // Draw a pixel using geometry [Can be slow, use with care]
|
||||
RLAPI void DrawPixelV(Vector2 position, Color color); // Draw a pixel using geometry (Vector version) [Can be slow, use with care]
|
||||
RLAPI void DrawLine(int startPosX, int startPosY, int endPosX, int endPosY, Color color); // Draw a line
|
||||
RLAPI void DrawLineV(Vector2 startPos, Vector2 endPos, Color color); // Draw a line (using gl lines)
|
||||
RLAPI void DrawLineEx(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw a line (using triangles/quads)
|
||||
RLAPI void DrawLineStrip(Vector2 *points, int pointCount, Color color); // Draw lines sequence (using gl lines)
|
||||
RLAPI void DrawLineStrip(const Vector2 *points, int pointCount, Color color); // Draw lines sequence (using gl lines)
|
||||
RLAPI void DrawLineBezier(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw line segment cubic-bezier in-out interpolation
|
||||
RLAPI void DrawCircle(int centerX, int centerY, float radius, Color color); // Draw a color-filled circle
|
||||
RLAPI void DrawCircleSector(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color); // Draw a piece of a circle
|
||||
RLAPI void DrawCircleSectorLines(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color); // Draw circle sector outline
|
||||
RLAPI void DrawCircleGradient(int centerX, int centerY, float radius, Color color1, Color color2); // Draw a gradient-filled circle
|
||||
RLAPI void DrawCircleGradient(int centerX, int centerY, float radius, Color inner, Color outer); // Draw a gradient-filled circle
|
||||
RLAPI void DrawCircleV(Vector2 center, float radius, Color color); // Draw a color-filled circle (Vector version)
|
||||
RLAPI void DrawCircleLines(int centerX, int centerY, float radius, Color color); // Draw circle outline
|
||||
RLAPI void DrawCircleLinesV(Vector2 center, float radius, Color color); // Draw circle outline (Vector version)
|
||||
|
|
@ -286,27 +304,28 @@ RLAPI void DrawRectangle(int posX, int posY, int width, int height, Color color)
|
|||
RLAPI void DrawRectangleV(Vector2 position, Vector2 size, Color color); // Draw a color-filled rectangle (Vector version)
|
||||
RLAPI void DrawRectangleRec(Rectangle rec, Color color); // Draw a color-filled rectangle
|
||||
RLAPI void DrawRectanglePro(Rectangle rec, Vector2 origin, float rotation, Color color); // Draw a color-filled rectangle with pro parameters
|
||||
RLAPI void DrawRectangleGradientV(int posX, int posY, int width, int height, Color color1, Color color2);// Draw a vertical-gradient-filled rectangle
|
||||
RLAPI void DrawRectangleGradientH(int posX, int posY, int width, int height, Color color1, Color color2);// Draw a horizontal-gradient-filled rectangle
|
||||
RLAPI void DrawRectangleGradientEx(Rectangle rec, Color col1, Color col2, Color col3, Color col4); // Draw a gradient-filled rectangle with custom vertex colors
|
||||
RLAPI void DrawRectangleGradientV(int posX, int posY, int width, int height, Color top, Color bottom); // Draw a vertical-gradient-filled rectangle
|
||||
RLAPI void DrawRectangleGradientH(int posX, int posY, int width, int height, Color left, Color right); // Draw a horizontal-gradient-filled rectangle
|
||||
RLAPI void DrawRectangleGradientEx(Rectangle rec, Color topLeft, Color bottomLeft, Color topRight, Color bottomRight); // Draw a gradient-filled rectangle with custom vertex colors
|
||||
RLAPI void DrawRectangleLines(int posX, int posY, int width, int height, Color color); // Draw rectangle outline
|
||||
RLAPI void DrawRectangleLinesEx(Rectangle rec, float lineThick, Color color); // Draw rectangle outline with extended parameters
|
||||
RLAPI void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color color); // Draw rectangle with rounded edges
|
||||
RLAPI void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments, float lineThick, Color color); // Draw rectangle with rounded edges outline
|
||||
RLAPI void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments, Color color); // Draw rectangle lines with rounded edges
|
||||
RLAPI void DrawRectangleRoundedLinesEx(Rectangle rec, float roundness, int segments, float lineThick, Color color); // Draw rectangle with rounded edges outline
|
||||
RLAPI void DrawTriangle(Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw a color-filled triangle (vertex in counter-clockwise order!)
|
||||
RLAPI void DrawTriangleLines(Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle outline (vertex in counter-clockwise order!)
|
||||
RLAPI void DrawTriangleFan(Vector2 *points, int pointCount, Color color); // Draw a triangle fan defined by points (first vertex is the center)
|
||||
RLAPI void DrawTriangleStrip(Vector2 *points, int pointCount, Color color); // Draw a triangle strip defined by points
|
||||
RLAPI void DrawTriangleFan(const Vector2 *points, int pointCount, Color color); // Draw a triangle fan defined by points (first vertex is the center)
|
||||
RLAPI void DrawTriangleStrip(const Vector2 *points, int pointCount, Color color); // Draw a triangle strip defined by points
|
||||
RLAPI void DrawPoly(Vector2 center, int sides, float radius, float rotation, Color color); // Draw a regular polygon (Vector version)
|
||||
RLAPI void DrawPolyLines(Vector2 center, int sides, float radius, float rotation, Color color); // Draw a polygon outline of n sides
|
||||
RLAPI void DrawPolyLinesEx(Vector2 center, int sides, float radius, float rotation, float lineThick, Color color); // Draw a polygon outline of n sides with extended parameters
|
||||
|
||||
// Splines drawing functions
|
||||
RLAPI void DrawSplineLinear(Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Linear, minimum 2 points
|
||||
RLAPI void DrawSplineBasis(Vector2 *points, int pointCount, float thick, Color color); // Draw spline: B-Spline, minimum 4 points
|
||||
RLAPI void DrawSplineCatmullRom(Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Catmull-Rom, minimum 4 points
|
||||
RLAPI void DrawSplineBezierQuadratic(Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Quadratic Bezier, minimum 3 points (1 control point): [p1, c2, p3, c4...]
|
||||
RLAPI void DrawSplineBezierCubic(Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Cubic Bezier, minimum 4 points (2 control points): [p1, c2, c3, p4, c5, c6...]
|
||||
RLAPI void DrawSplineLinear(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Linear, minimum 2 points
|
||||
RLAPI void DrawSplineBasis(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: B-Spline, minimum 4 points
|
||||
RLAPI void DrawSplineCatmullRom(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Catmull-Rom, minimum 4 points
|
||||
RLAPI void DrawSplineBezierQuadratic(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Quadratic Bezier, minimum 3 points (1 control point): [p1, c2, p3, c4...]
|
||||
RLAPI void DrawSplineBezierCubic(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Cubic Bezier, minimum 4 points (2 control points): [p1, c2, c3, p4, c5, c6...]
|
||||
RLAPI void DrawSplineSegmentLinear(Vector2 p1, Vector2 p2, float thick, Color color); // Draw spline segment: Linear, 2 points
|
||||
RLAPI void DrawSplineSegmentBasis(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float thick, Color color); // Draw spline segment: B-Spline, 4 points
|
||||
RLAPI void DrawSplineSegmentCatmullRom(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float thick, Color color); // Draw spline segment: Catmull-Rom, 4 points
|
||||
|
|
@ -324,12 +343,13 @@ RLAPI Vector2 GetSplinePointBezierCubic(Vector2 p1, Vector2 c2, Vector2 c3, Vect
|
|||
RLAPI bool CheckCollisionRecs(Rectangle rec1, Rectangle rec2); // Check collision between two rectangles
|
||||
RLAPI bool CheckCollisionCircles(Vector2 center1, float radius1, Vector2 center2, float radius2); // Check collision between two circles
|
||||
RLAPI bool CheckCollisionCircleRec(Vector2 center, float radius, Rectangle rec); // Check collision between circle and rectangle
|
||||
RLAPI bool CheckCollisionCircleLine(Vector2 center, float radius, Vector2 p1, Vector2 p2); // Check if circle collides with a line created betweeen two points [p1] and [p2]
|
||||
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 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 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 CheckCollisionPointPoly(Vector2 point, const 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 Rectangle GetCollisionRec(Rectangle rec1, Rectangle rec2); // Get collision rectangle for two rectangles collision
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
|
|
@ -340,12 +360,12 @@ RLAPI Rectangle GetCollisionRec(Rectangle rec1, Rectangle rec2);
|
|||
// NOTE: These functions do not require GPU access
|
||||
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 LoadImageSvg(const char *fileNameOrString, int width, int height); // Load image from SVG file data or string with specified size
|
||||
RLAPI Image LoadImageAnim(const char *fileName, int *frames); // Load image sequence from file (frames appended to image.data)
|
||||
RLAPI Image LoadImageAnimFromMemory(const char *fileType, const unsigned char *fileData, int dataSize, int *frames); // Load image sequence from memory buffer
|
||||
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 LoadImageFromScreen(void); // Load image from screen buffer and (screenshot)
|
||||
RLAPI bool IsImageReady(Image image); // Check if an image is ready
|
||||
RLAPI bool IsImageValid(Image image); // Check if an image is valid (data and parameters)
|
||||
RLAPI void UnloadImage(Image image); // Unload image from CPU memory (RAM)
|
||||
RLAPI bool ExportImage(Image image, const char *fileName); // Export image data to file, returns true on success
|
||||
RLAPI unsigned char *ExportImageToMemory(Image image, const char *fileType, int *fileSize); // Export image to memory buffer
|
||||
|
|
@ -365,6 +385,7 @@ RLAPI Image GenImageText(int width, int height, const char *text);
|
|||
// Image manipulation functions
|
||||
RLAPI Image ImageCopy(Image image); // Create an image duplicate (useful for transformations)
|
||||
RLAPI Image ImageFromImage(Image image, Rectangle rec); // Create an image from another image piece
|
||||
RLAPI Image ImageFromChannel(Image image, int selectedChannel); // Create an image from a selected channel of another image (GRAYSCALE)
|
||||
RLAPI Image ImageText(const char *text, int fontSize, Color color); // Create an image from text (default font)
|
||||
RLAPI Image ImageTextEx(Font font, const char *text, float fontSize, float spacing, Color tint); // Create an image from text (custom sprite font)
|
||||
RLAPI void ImageFormat(Image *image, int newFormat); // Convert image data to desired format
|
||||
|
|
@ -375,7 +396,7 @@ RLAPI void ImageAlphaClear(Image *image, Color color, float threshold);
|
|||
RLAPI void ImageAlphaMask(Image *image, Image alphaMask); // Apply alpha mask to image
|
||||
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 ImageKernelConvolution(Image *image, float* kernel, int kernelSize); // Apply Custom Square image convolution kernel
|
||||
RLAPI void ImageKernelConvolution(Image *image, const float *kernel, int kernelSize); // Apply custom square convolution kernel to image
|
||||
RLAPI void ImageResize(Image *image, int newWidth, int newHeight); // Resize image (Bicubic scaling algorithm)
|
||||
RLAPI void 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
|
||||
|
|
@ -406,6 +427,7 @@ 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 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 ImageDrawLineEx(Image *dst, Vector2 start, Vector2 end, int thick, Color color); // Draw a line defining thickness 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 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
|
||||
|
|
@ -414,6 +436,11 @@ RLAPI void ImageDrawRectangle(Image *dst, int posX, int posY, int width, int hei
|
|||
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 ImageDrawRectangleLines(Image *dst, Rectangle rec, int thick, Color color); // Draw rectangle lines within an image
|
||||
RLAPI void ImageDrawTriangle(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle within an image
|
||||
RLAPI void ImageDrawTriangleEx(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color c1, Color c2, Color c3); // Draw triangle with interpolated colors within an image
|
||||
RLAPI void ImageDrawTriangleLines(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle outline within an image
|
||||
RLAPI void ImageDrawTriangleFan(Image *dst, Vector2 *points, int pointCount, Color color); // Draw a triangle fan defined by points within an image (first vertex is the center)
|
||||
RLAPI void ImageDrawTriangleStrip(Image *dst, Vector2 *points, int pointCount, Color color); // Draw a triangle strip defined by points within an image
|
||||
RLAPI void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec, Color tint); // Draw a source image within a destination image (tint applied to source)
|
||||
RLAPI void ImageDrawText(Image *dst, const char *text, int posX, int posY, int fontSize, Color color); // Draw text (using default font) within an image (destination)
|
||||
RLAPI void ImageDrawTextEx(Image *dst, Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint); // Draw text (custom sprite font) within an image (destination)
|
||||
|
|
@ -424,9 +451,9 @@ RLAPI Texture2D LoadTexture(const char *fileName);
|
|||
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 RenderTexture2D LoadRenderTexture(int width, int height); // Load texture for rendering (framebuffer)
|
||||
RLAPI bool IsTextureReady(Texture2D texture); // Check if a texture is ready
|
||||
RLAPI bool IsTextureValid(Texture2D texture); // Check if a texture is valid (loaded in GPU)
|
||||
RLAPI void UnloadTexture(Texture2D texture); // Unload texture from GPU memory (VRAM)
|
||||
RLAPI bool IsRenderTextureReady(RenderTexture2D target); // Check if a render texture is ready
|
||||
RLAPI bool IsRenderTextureValid(RenderTexture2D target); // Check if a render texture is valid (loaded in GPU)
|
||||
RLAPI void UnloadRenderTexture(RenderTexture2D target); // Unload render texture from GPU memory (VRAM)
|
||||
RLAPI void 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
|
||||
|
|
@ -445,8 +472,9 @@ RLAPI void DrawTexturePro(Texture2D texture, Rectangle source, Rectangle dest, V
|
|||
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
|
||||
|
||||
// Color/pixel related functions
|
||||
RLAPI bool ColorIsEqual(Color col1, Color col2); // Check if two colors are equal
|
||||
RLAPI Color Fade(Color color, float alpha); // Get color with alpha applied, alpha goes from 0.0f to 1.0f
|
||||
RLAPI int ColorToInt(Color color); // Get hexadecimal value for a Color
|
||||
RLAPI int ColorToInt(Color color); // Get hexadecimal value for a Color (0xRRGGBBAA)
|
||||
RLAPI Vector4 ColorNormalize(Color color); // Get Color normalized as float [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]
|
||||
|
|
@ -456,6 +484,7 @@ RLAPI Color ColorBrightness(Color color, float factor); // G
|
|||
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 ColorAlphaBlend(Color dst, Color src, Color tint); // Get src alpha-blended into dst color with tint
|
||||
RLAPI Color ColorLerp(Color color1, Color color2, float factor); // Get color lerp interpolation between two colors, factor [0.0f..1.0f]
|
||||
RLAPI Color GetColor(unsigned int hexValue); // Get Color structure from hexadecimal value
|
||||
RLAPI Color GetPixelColor(void *srcPtr, int format); // Get Color from a source pixel pointer of certain format
|
||||
RLAPI void SetPixelColor(void *dstPtr, Color color, int format); // Set color formatted into destination pixel pointer
|
||||
|
|
@ -468,10 +497,10 @@ RLAPI int GetPixelDataSize(int width, int height, int format); // G
|
|||
// Font loading/unloading functions
|
||||
RLAPI Font GetFontDefault(void); // Get the default Font
|
||||
RLAPI Font LoadFont(const char *fileName); // Load font from file into GPU memory (VRAM)
|
||||
RLAPI Font LoadFontEx(const char *fileName, int fontSize, int *codepoints, int codepointCount); // Load font from file with extended parameters, use NULL for codepoints and 0 for codepointCount to load the default character set
|
||||
RLAPI Font LoadFontEx(const char *fileName, int fontSize, int *codepoints, int codepointCount); // Load font from file with extended parameters, use NULL for codepoints and 0 for codepointCount to load the default character set, font size is provided in pixels height
|
||||
RLAPI Font LoadFontFromImage(Image image, Color key, int firstChar); // Load font from Image (XNA style)
|
||||
RLAPI Font LoadFontFromMemory(const char *fileType, const unsigned char *fileData, int dataSize, int fontSize, int *codepoints, int codepointCount); // Load font from memory buffer, fileType refers to extension: i.e. '.ttf'
|
||||
RLAPI bool IsFontReady(Font font); // Check if a font is ready
|
||||
RLAPI bool IsFontValid(Font font); // Check if a font is valid (font data loaded, WARNING: GPU texture not checked)
|
||||
RLAPI GlyphInfo *LoadFontData(const unsigned char *fileData, int dataSize, int fontSize, int *codepoints, int codepointCount, int type); // Load font data for further use
|
||||
RLAPI Image GenImageFontAtlas(const GlyphInfo *glyphs, Rectangle **glyphRecs, int glyphCount, int fontSize, int padding, int packMethod); // Generate image font atlas using chars info
|
||||
RLAPI void UnloadFontData(GlyphInfo *glyphs, int glyphCount); // Unload font chars info data (RAM)
|
||||
|
|
@ -512,7 +541,7 @@ RLAPI bool TextIsEqual(const char *text1, const char *text2);
|
|||
RLAPI unsigned int TextLength(const char *text); // Get text length, checks for '\0' ending
|
||||
RLAPI const char *TextFormat(const char *text, ...); // Text formatting with variables (sprintf() style)
|
||||
RLAPI const char *TextSubtext(const char *text, int position, int length); // Get a piece of a text string
|
||||
RLAPI char *TextReplace(char *text, const char *replace, const char *by); // Replace text string (WARNING: memory must be freed!)
|
||||
RLAPI char *TextReplace(const char *text, const char *replace, const char *by); // Replace text string (WARNING: memory must be freed!)
|
||||
RLAPI char *TextInsert(const char *text, const char *insert, int position); // Insert text in a position (WARNING: memory must be freed!)
|
||||
RLAPI const char *TextJoin(const char **textList, int count, const char *delimiter); // Join text strings with delimiter
|
||||
RLAPI const char **TextSplit(const char *text, char delimiter, int *count); // Split text into multiple strings
|
||||
|
|
@ -521,7 +550,11 @@ RLAPI int TextFindIndex(const char *text, const char *find);
|
|||
RLAPI const char *TextToUpper(const char *text); // Get upper case version of provided string
|
||||
RLAPI const char *TextToLower(const char *text); // Get lower case version of provided string
|
||||
RLAPI const char *TextToPascal(const char *text); // Get Pascal case notation version of provided string
|
||||
RLAPI const char *TextToSnake(const char *text); // Get Snake case notation version of provided string
|
||||
RLAPI const char *TextToCamel(const char *text); // Get Camel case notation version of provided string
|
||||
|
||||
RLAPI int TextToInteger(const char *text); // Get integer value from text (negative values not supported)
|
||||
RLAPI float TextToFloat(const char *text); // Get float value from text (negative values not supported)
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Basic 3d Shapes Drawing Functions (Module: models)
|
||||
|
|
@ -532,7 +565,7 @@ RLAPI void DrawLine3D(Vector3 startPos, Vector3 endPos, Color color);
|
|||
RLAPI void DrawPoint3D(Vector3 position, Color color); // Draw a point in 3D space, actually a small line
|
||||
RLAPI void DrawCircle3D(Vector3 center, float radius, Vector3 rotationAxis, float rotationAngle, Color color); // Draw a circle in 3D world space
|
||||
RLAPI void DrawTriangle3D(Vector3 v1, Vector3 v2, Vector3 v3, Color color); // Draw a color-filled triangle (vertex in counter-clockwise order!)
|
||||
RLAPI void DrawTriangleStrip3D(Vector3 *points, int pointCount, Color color); // Draw a triangle strip defined by points
|
||||
RLAPI void DrawTriangleStrip3D(const Vector3 *points, int pointCount, Color color); // Draw a triangle strip defined by points
|
||||
RLAPI void DrawCube(Vector3 position, float width, float height, float length, Color color); // Draw cube
|
||||
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
|
||||
|
|
@ -557,7 +590,7 @@ RLAPI void DrawGrid(int slices, float spacing);
|
|||
// Model management functions
|
||||
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 bool IsModelReady(Model model); // Check if a model is ready
|
||||
RLAPI bool IsModelValid(Model model); // Check if a model is valid (loaded in GPU, VAO/VBOs)
|
||||
RLAPI void UnloadModel(Model model); // Unload model (including meshes) from memory (RAM and/or VRAM)
|
||||
RLAPI BoundingBox GetModelBoundingBox(Model model); // Compute model bounding box limits (considers all meshes)
|
||||
|
||||
|
|
@ -566,8 +599,10 @@ RLAPI void DrawModel(Model model, Vector3 position, float scale, Color tint);
|
|||
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 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 DrawModelPoints(Model model, Vector3 position, float scale, Color tint); // Draw a model as points
|
||||
RLAPI void DrawModelPointsEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model as points with extended parameters
|
||||
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 scale, Color tint); // Draw a billboard texture
|
||||
RLAPI void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector2 size, Color tint); // Draw a billboard texture defined by source
|
||||
RLAPI void 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
|
||||
|
||||
|
|
@ -577,9 +612,10 @@ RLAPI void UpdateMeshBuffer(Mesh mesh, int index, const void *data, int dataSize
|
|||
RLAPI void UnloadMesh(Mesh mesh); // Unload mesh data from CPU and GPU
|
||||
RLAPI void DrawMesh(Mesh mesh, Material material, Matrix transform); // Draw a 3d mesh with material and transform
|
||||
RLAPI void DrawMeshInstanced(Mesh mesh, Material material, const Matrix *transforms, int instances); // Draw multiple mesh instances with material and different transforms
|
||||
RLAPI bool ExportMesh(Mesh mesh, const char *fileName); // Export mesh data to file, returns true on success
|
||||
RLAPI BoundingBox GetMeshBoundingBox(Mesh mesh); // Compute mesh bounding box limits
|
||||
RLAPI void GenMeshTangents(Mesh *mesh); // Compute mesh tangents
|
||||
RLAPI bool ExportMesh(Mesh mesh, const char *fileName); // Export mesh data to file, returns true on success
|
||||
RLAPI bool ExportMeshAsCode(Mesh mesh, const char *fileName); // Export mesh as code file (.h) defining multiple arrays of vertex attributes
|
||||
|
||||
// Mesh generation functions
|
||||
RLAPI Mesh GenMeshPoly(int sides, float radius); // Generate polygonal mesh
|
||||
|
|
@ -597,14 +633,15 @@ RLAPI Mesh GenMeshCubicmap(Image cubicmap, Vector3 cubeSize);
|
|||
// Material loading/unloading functions
|
||||
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 bool IsMaterialReady(Material material); // Check if a material is ready
|
||||
RLAPI bool IsMaterialValid(Material material); // Check if a material is valid (shader assigned, map textures loaded in GPU)
|
||||
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 SetModelMeshMaterial(Model *model, int meshId, int materialId); // Set material for a mesh
|
||||
|
||||
// Model animations loading/unloading functions
|
||||
RLAPI ModelAnimation *LoadModelAnimations(const char *fileName, int *animCount); // Load model animations from file
|
||||
RLAPI void UpdateModelAnimation(Model model, ModelAnimation anim, int frame); // Update model animation pose
|
||||
RLAPI void UpdateModelAnimation(Model model, ModelAnimation anim, int frame); // Update model animation pose (CPU)
|
||||
RLAPI void UpdateModelAnimationBones(Model model, ModelAnimation anim, int frame); // Update model animation mesh bone matrices (GPU skinning)
|
||||
RLAPI void UnloadModelAnimation(ModelAnimation anim); // Unload animation data
|
||||
RLAPI void UnloadModelAnimations(ModelAnimation *animations, int animCount); // Unload animation array data
|
||||
RLAPI bool IsModelAnimationValid(Model model, ModelAnimation anim); // Check model animation skeleton match
|
||||
|
|
@ -634,11 +671,11 @@ RLAPI float GetMasterVolume(void); // Get mas
|
|||
// Wave/Sound loading/unloading functions
|
||||
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 bool IsWaveReady(Wave wave); // Checks if wave data is ready
|
||||
RLAPI bool IsWaveValid(Wave wave); // Checks if wave data is valid (data loaded and parameters)
|
||||
RLAPI Sound LoadSound(const char *fileName); // Load sound from file
|
||||
RLAPI Sound LoadSoundFromWave(Wave wave); // Load sound from wave data
|
||||
RLAPI Sound LoadSoundAlias(Sound source); // Create a new sound that shares the same sample data as the source sound, does not own the sound data
|
||||
RLAPI bool IsSoundReady(Sound sound); // Checks if a sound is ready
|
||||
RLAPI bool IsSoundValid(Sound sound); // Checks if a sound is valid (data loaded and buffers initialized)
|
||||
RLAPI void UpdateSound(Sound sound, const void *data, int sampleCount); // Update sound buffer with new data
|
||||
RLAPI void UnloadWave(Wave wave); // Unload wave data
|
||||
RLAPI void UnloadSound(Sound sound); // Unload sound
|
||||
|
|
@ -656,7 +693,7 @@ RLAPI void SetSoundVolume(Sound sound, float volume); // Set vol
|
|||
RLAPI void SetSoundPitch(Sound sound, float pitch); // Set pitch for a sound (1.0 is base level)
|
||||
RLAPI void SetSoundPan(Sound sound, float pan); // Set pan for a sound (0.5 is center)
|
||||
RLAPI Wave WaveCopy(Wave wave); // Copy a wave to a new wave
|
||||
RLAPI void WaveCrop(Wave *wave, int initSample, int finalSample); // Crop a wave to defined samples range
|
||||
RLAPI void WaveCrop(Wave *wave, int initFrame, int finalFrame); // Crop a wave to defined frames range
|
||||
RLAPI void WaveFormat(Wave *wave, int sampleRate, int sampleSize, int channels); // Convert wave data to desired format
|
||||
RLAPI float *LoadWaveSamples(Wave wave); // Load samples data from wave as a 32bit float data array
|
||||
RLAPI void UnloadWaveSamples(float *samples); // Unload samples data loaded with LoadWaveSamples()
|
||||
|
|
@ -664,7 +701,7 @@ RLAPI void UnloadWaveSamples(float *samples); // Unload
|
|||
// Music management functions
|
||||
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 bool IsMusicReady(Music music); // Checks if a music stream is ready
|
||||
RLAPI bool IsMusicValid(Music music); // Checks if a music stream is valid (context and buffers initialized)
|
||||
RLAPI void UnloadMusicStream(Music music); // Unload music stream
|
||||
RLAPI void PlayMusicStream(Music music); // Start music playing
|
||||
RLAPI bool IsMusicStreamPlaying(Music music); // Check if music is playing
|
||||
|
|
@ -681,7 +718,7 @@ RLAPI float GetMusicTimePlayed(Music music); // Get cur
|
|||
|
||||
// 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 bool IsAudioStreamReady(AudioStream stream); // Checks if an audio stream is ready
|
||||
RLAPI bool IsAudioStreamValid(AudioStream stream); // Checks if an audio stream is valid (buffers initialized)
|
||||
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 bool IsAudioStreamProcessed(AudioStream stream); // Check if any audio stream buffers requires refill
|
||||
|
|
@ -696,9 +733,9 @@ RLAPI void SetAudioStreamPan(AudioStream stream, float pan); // Set pan
|
|||
RLAPI void SetAudioStreamBufferSizeDefault(int size); // Default size for new audio streams
|
||||
RLAPI void SetAudioStreamCallback(AudioStream stream, AudioCallback callback); // Audio thread callback to request new data
|
||||
|
||||
RLAPI void AttachAudioStreamProcessor(AudioStream stream, AudioCallback processor); // Attach audio stream processor to stream, receives the samples as <float>s
|
||||
RLAPI void AttachAudioStreamProcessor(AudioStream stream, AudioCallback processor); // Attach audio stream processor to stream, receives the samples as 'float'
|
||||
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, receives the samples as <float>s
|
||||
RLAPI void AttachAudioMixedProcessor(AudioCallback processor); // Attach audio stream processor to the entire audio pipeline, receives the samples as 'float'
|
||||
RLAPI void DetachAudioMixedProcessor(AudioCallback processor); // Detach audio stream processor from the entire audio pipeline
|
||||
|
||||
|
|
|
|||
390
projects/VS2022/examples/core_input_virtual_controls.vcxproj
Normal file
|
|
@ -0,0 +1,390 @@
|
|||
<?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>{0981CA28-E4A5-4DF1-987F-A41D09131EFC}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>core_input_virtual_controls</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
<ProjectName>core_input_virtual_controls</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\core</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug.DLL|x64'">
|
||||
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\core</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\core</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\core</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release.DLL|Win32'">
|
||||
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\core</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\core</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\core</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release.DLL|x64'">
|
||||
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\core</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\core\core_input_virtual_controls.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>
|
||||
387
projects/VS2022/examples/models_bone_socket.vcxproj
Normal file
|
|
@ -0,0 +1,387 @@
|
|||
<?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>{3A7FE53D-35F7-49DC-9C9A-A5204A53523F}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>models_bone_socket</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
<ProjectName>models_bone_socket</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\models</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug.DLL|x64'">
|
||||
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\models</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\models</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\models</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release.DLL|Win32'">
|
||||
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\models</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\models</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\models</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release.DLL|x64'">
|
||||
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\models</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<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\models\models_bone_socket.c" />
|
||||
</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>
|
||||
387
projects/VS2022/examples/shaders_shadowmap.vcxproj
Normal file
|
|
@ -0,0 +1,387 @@
|
|||
<?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>{41BBCC10-6FDE-48A1-B2E0-A0EC6A668629}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>shaders_shadowmap</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
<ProjectName>shaders_shadowmap</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\shaders</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug.DLL|x64'">
|
||||
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\shaders</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\shaders</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\shaders</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release.DLL|Win32'">
|
||||
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\shaders</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\shaders</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\shaders</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release.DLL|x64'">
|
||||
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\shaders</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\shaders\shaders_shadowmap.c" />
|
||||
</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>
|
||||
387
projects/VS2022/examples/shaders_vertex_displacement.vcxproj
Normal file
|
|
@ -0,0 +1,387 @@
|
|||
<?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>{CCA63A76-D9FC-4130-9F67-4D97F9770D53}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>shaders_vertex_displacement</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
<ProjectName>shaders_vertex_displacement</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\shaders</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug.DLL|x64'">
|
||||
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\shaders</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\shaders</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\shaders</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release.DLL|Win32'">
|
||||
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\shaders</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\shaders</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\shaders</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release.DLL|x64'">
|
||||
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\shaders</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\shaders\shaders_vertex_displacement.c" />
|
||||
</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>
|
||||
390
projects/VS2022/examples/shapes_rectangle_advanced.vcxproj
Normal file
|
|
@ -0,0 +1,390 @@
|
|||
<?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>{FAFEE2F9-24B0-4AF1-B512-433E9590033F}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>shapes_rectangle_advanced</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
<ProjectName>shapes_rectangle_advanced</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\shapes</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug.DLL|x64'">
|
||||
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\shapes</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\shapes</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\shapes</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release.DLL|Win32'">
|
||||
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\shapes</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\shapes</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\shapes</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release.DLL|x64'">
|
||||
<LocalDebuggerWorkingDirectory>$(SolutionDir)..\..\examples\shapes</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\shapes\shapes_rectangle_advanced.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>
|
||||
|
|
@ -297,8 +297,18 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shapes_splines_drawing", "e
|
|||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shapes_top_down_lights", "examples\shapes_top_down_lights.vcxproj", "{703BE7BA-5B99-4F70-806D-3A259F6A991E}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shapes_rectangle_advanced", "examples\shapes_rectangle_advanced.vcxproj", "{FAFEE2F9-24B0-4AF1-B512-433E9590033F}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "models_gpu_skinning", "examples\models_gpu_skinning.vcxproj", "{8245DAD9-D402-4D5C-8F45-32229CD3B263}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shaders_shadowmap", "examples\shaders_shadowmap.vcxproj", "{41BBCC10-6FDE-48A1-B2E0-A0EC6A668629}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core_input_virtual_controls", "examples\core_input_virtual_controls.vcxproj", "{0981CA28-E4A5-4DF1-987F-A41D09131EFC}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "models_bone_socket", "examples\models_bone_socket.vcxproj", "{3A7FE53D-35F7-49DC-9C9A-A5204A53523F}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shaders_vertex_displacement", "examples\shaders_vertex_displacement.vcxproj", "{CCA63A76-D9FC-4130-9F67-4D97F9770D53}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug.DLL|x64 = Debug.DLL|x64
|
||||
|
|
@ -2483,22 +2493,6 @@ Global
|
|||
{EFA150D4-F93B-4D7D-A69C-9E8B4663BECD}.Release|x64.Build.0 = Release|x64
|
||||
{EFA150D4-F93B-4D7D-A69C-9E8B4663BECD}.Release|x86.ActiveCfg = Release|Win32
|
||||
{EFA150D4-F93B-4D7D-A69C-9E8B4663BECD}.Release|x86.Build.0 = Release|Win32
|
||||
{D8026C60-CCBC-45DF-9085-BF21569EB414}.Debug.DLL|x64.ActiveCfg = Debug.DLL|x64
|
||||
{D8026C60-CCBC-45DF-9085-BF21569EB414}.Debug.DLL|x64.Build.0 = Debug.DLL|x64
|
||||
{D8026C60-CCBC-45DF-9085-BF21569EB414}.Debug.DLL|x86.ActiveCfg = Debug.DLL|Win32
|
||||
{D8026C60-CCBC-45DF-9085-BF21569EB414}.Debug.DLL|x86.Build.0 = Debug.DLL|Win32
|
||||
{D8026C60-CCBC-45DF-9085-BF21569EB414}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{D8026C60-CCBC-45DF-9085-BF21569EB414}.Debug|x64.Build.0 = Debug|x64
|
||||
{D8026C60-CCBC-45DF-9085-BF21569EB414}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{D8026C60-CCBC-45DF-9085-BF21569EB414}.Debug|x86.Build.0 = Debug|Win32
|
||||
{D8026C60-CCBC-45DF-9085-BF21569EB414}.Release.DLL|x64.ActiveCfg = Release.DLL|x64
|
||||
{D8026C60-CCBC-45DF-9085-BF21569EB414}.Release.DLL|x64.Build.0 = Release.DLL|x64
|
||||
{D8026C60-CCBC-45DF-9085-BF21569EB414}.Release.DLL|x86.ActiveCfg = Release.DLL|Win32
|
||||
{D8026C60-CCBC-45DF-9085-BF21569EB414}.Release.DLL|x86.Build.0 = Release.DLL|Win32
|
||||
{D8026C60-CCBC-45DF-9085-BF21569EB414}.Release|x64.ActiveCfg = Release|x64
|
||||
{D8026C60-CCBC-45DF-9085-BF21569EB414}.Release|x64.Build.0 = Release|x64
|
||||
{D8026C60-CCBC-45DF-9085-BF21569EB414}.Release|x86.ActiveCfg = Release|Win32
|
||||
{D8026C60-CCBC-45DF-9085-BF21569EB414}.Release|x86.Build.0 = Release|Win32
|
||||
{DF25E545-00FF-4E64-844C-7DF98991F901}.Debug.DLL|x64.ActiveCfg = Debug.DLL|x64
|
||||
{DF25E545-00FF-4E64-844C-7DF98991F901}.Debug.DLL|x64.Build.0 = Debug.DLL|x64
|
||||
{DF25E545-00FF-4E64-844C-7DF98991F901}.Debug.DLL|x86.ActiveCfg = Debug.DLL|Win32
|
||||
|
|
@ -2531,6 +2525,22 @@ Global
|
|||
{703BE7BA-5B99-4F70-806D-3A259F6A991E}.Release|x64.Build.0 = Release|x64
|
||||
{703BE7BA-5B99-4F70-806D-3A259F6A991E}.Release|x86.ActiveCfg = Release|Win32
|
||||
{703BE7BA-5B99-4F70-806D-3A259F6A991E}.Release|x86.Build.0 = Release|Win32
|
||||
{FAFEE2F9-24B0-4AF1-B512-433E9590033F}.Debug.DLL|x64.ActiveCfg = Debug.DLL|x64
|
||||
{FAFEE2F9-24B0-4AF1-B512-433E9590033F}.Debug.DLL|x64.Build.0 = Debug.DLL|x64
|
||||
{FAFEE2F9-24B0-4AF1-B512-433E9590033F}.Debug.DLL|x86.ActiveCfg = Debug.DLL|Win32
|
||||
{FAFEE2F9-24B0-4AF1-B512-433E9590033F}.Debug.DLL|x86.Build.0 = Debug.DLL|Win32
|
||||
{FAFEE2F9-24B0-4AF1-B512-433E9590033F}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{FAFEE2F9-24B0-4AF1-B512-433E9590033F}.Debug|x64.Build.0 = Debug|x64
|
||||
{FAFEE2F9-24B0-4AF1-B512-433E9590033F}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{FAFEE2F9-24B0-4AF1-B512-433E9590033F}.Debug|x86.Build.0 = Debug|Win32
|
||||
{FAFEE2F9-24B0-4AF1-B512-433E9590033F}.Release.DLL|x64.ActiveCfg = Release.DLL|x64
|
||||
{FAFEE2F9-24B0-4AF1-B512-433E9590033F}.Release.DLL|x64.Build.0 = Release.DLL|x64
|
||||
{FAFEE2F9-24B0-4AF1-B512-433E9590033F}.Release.DLL|x86.ActiveCfg = Release.DLL|Win32
|
||||
{FAFEE2F9-24B0-4AF1-B512-433E9590033F}.Release.DLL|x86.Build.0 = Release.DLL|Win32
|
||||
{FAFEE2F9-24B0-4AF1-B512-433E9590033F}.Release|x64.ActiveCfg = Release|x64
|
||||
{FAFEE2F9-24B0-4AF1-B512-433E9590033F}.Release|x64.Build.0 = Release|x64
|
||||
{FAFEE2F9-24B0-4AF1-B512-433E9590033F}.Release|x86.ActiveCfg = Release|Win32
|
||||
{FAFEE2F9-24B0-4AF1-B512-433E9590033F}.Release|x86.Build.0 = Release|Win32
|
||||
{8245DAD9-D402-4D5C-8F45-32229CD3B263}.Debug.DLL|x64.ActiveCfg = Debug.DLL|x64
|
||||
{8245DAD9-D402-4D5C-8F45-32229CD3B263}.Debug.DLL|x64.Build.0 = Debug.DLL|x64
|
||||
{8245DAD9-D402-4D5C-8F45-32229CD3B263}.Debug.DLL|x86.ActiveCfg = Debug.DLL|Win32
|
||||
|
|
@ -2547,6 +2557,70 @@ Global
|
|||
{8245DAD9-D402-4D5C-8F45-32229CD3B263}.Release|x64.Build.0 = Release|x64
|
||||
{8245DAD9-D402-4D5C-8F45-32229CD3B263}.Release|x86.ActiveCfg = Release|Win32
|
||||
{8245DAD9-D402-4D5C-8F45-32229CD3B263}.Release|x86.Build.0 = Release|Win32
|
||||
{41BBCC10-6FDE-48A1-B2E0-A0EC6A668629}.Debug.DLL|x64.ActiveCfg = Debug.DLL|x64
|
||||
{41BBCC10-6FDE-48A1-B2E0-A0EC6A668629}.Debug.DLL|x64.Build.0 = Debug.DLL|x64
|
||||
{41BBCC10-6FDE-48A1-B2E0-A0EC6A668629}.Debug.DLL|x86.ActiveCfg = Debug.DLL|Win32
|
||||
{41BBCC10-6FDE-48A1-B2E0-A0EC6A668629}.Debug.DLL|x86.Build.0 = Debug.DLL|Win32
|
||||
{41BBCC10-6FDE-48A1-B2E0-A0EC6A668629}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{41BBCC10-6FDE-48A1-B2E0-A0EC6A668629}.Debug|x64.Build.0 = Debug|x64
|
||||
{41BBCC10-6FDE-48A1-B2E0-A0EC6A668629}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{41BBCC10-6FDE-48A1-B2E0-A0EC6A668629}.Debug|x86.Build.0 = Debug|Win32
|
||||
{41BBCC10-6FDE-48A1-B2E0-A0EC6A668629}.Release.DLL|x64.ActiveCfg = Release.DLL|x64
|
||||
{41BBCC10-6FDE-48A1-B2E0-A0EC6A668629}.Release.DLL|x64.Build.0 = Release.DLL|x64
|
||||
{41BBCC10-6FDE-48A1-B2E0-A0EC6A668629}.Release.DLL|x86.ActiveCfg = Release.DLL|Win32
|
||||
{41BBCC10-6FDE-48A1-B2E0-A0EC6A668629}.Release.DLL|x86.Build.0 = Release.DLL|Win32
|
||||
{41BBCC10-6FDE-48A1-B2E0-A0EC6A668629}.Release|x64.ActiveCfg = Release|x64
|
||||
{41BBCC10-6FDE-48A1-B2E0-A0EC6A668629}.Release|x64.Build.0 = Release|x64
|
||||
{41BBCC10-6FDE-48A1-B2E0-A0EC6A668629}.Release|x86.ActiveCfg = Release|Win32
|
||||
{41BBCC10-6FDE-48A1-B2E0-A0EC6A668629}.Release|x86.Build.0 = Release|Win32
|
||||
{0981CA28-E4A5-4DF1-987F-A41D09131EFC}.Debug.DLL|x64.ActiveCfg = Debug.DLL|x64
|
||||
{0981CA28-E4A5-4DF1-987F-A41D09131EFC}.Debug.DLL|x64.Build.0 = Debug.DLL|x64
|
||||
{0981CA28-E4A5-4DF1-987F-A41D09131EFC}.Debug.DLL|x86.ActiveCfg = Debug.DLL|Win32
|
||||
{0981CA28-E4A5-4DF1-987F-A41D09131EFC}.Debug.DLL|x86.Build.0 = Debug.DLL|Win32
|
||||
{0981CA28-E4A5-4DF1-987F-A41D09131EFC}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{0981CA28-E4A5-4DF1-987F-A41D09131EFC}.Debug|x64.Build.0 = Debug|x64
|
||||
{0981CA28-E4A5-4DF1-987F-A41D09131EFC}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{0981CA28-E4A5-4DF1-987F-A41D09131EFC}.Debug|x86.Build.0 = Debug|Win32
|
||||
{0981CA28-E4A5-4DF1-987F-A41D09131EFC}.Release.DLL|x64.ActiveCfg = Release.DLL|x64
|
||||
{0981CA28-E4A5-4DF1-987F-A41D09131EFC}.Release.DLL|x64.Build.0 = Release.DLL|x64
|
||||
{0981CA28-E4A5-4DF1-987F-A41D09131EFC}.Release.DLL|x86.ActiveCfg = Release.DLL|Win32
|
||||
{0981CA28-E4A5-4DF1-987F-A41D09131EFC}.Release.DLL|x86.Build.0 = Release.DLL|Win32
|
||||
{0981CA28-E4A5-4DF1-987F-A41D09131EFC}.Release|x64.ActiveCfg = Release|x64
|
||||
{0981CA28-E4A5-4DF1-987F-A41D09131EFC}.Release|x64.Build.0 = Release|x64
|
||||
{0981CA28-E4A5-4DF1-987F-A41D09131EFC}.Release|x86.ActiveCfg = Release|Win32
|
||||
{0981CA28-E4A5-4DF1-987F-A41D09131EFC}.Release|x86.Build.0 = Release|Win32
|
||||
{3A7FE53D-35F7-49DC-9C9A-A5204A53523F}.Debug.DLL|x64.ActiveCfg = Debug.DLL|x64
|
||||
{3A7FE53D-35F7-49DC-9C9A-A5204A53523F}.Debug.DLL|x64.Build.0 = Debug.DLL|x64
|
||||
{3A7FE53D-35F7-49DC-9C9A-A5204A53523F}.Debug.DLL|x86.ActiveCfg = Debug.DLL|Win32
|
||||
{3A7FE53D-35F7-49DC-9C9A-A5204A53523F}.Debug.DLL|x86.Build.0 = Debug.DLL|Win32
|
||||
{3A7FE53D-35F7-49DC-9C9A-A5204A53523F}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{3A7FE53D-35F7-49DC-9C9A-A5204A53523F}.Debug|x64.Build.0 = Debug|x64
|
||||
{3A7FE53D-35F7-49DC-9C9A-A5204A53523F}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{3A7FE53D-35F7-49DC-9C9A-A5204A53523F}.Debug|x86.Build.0 = Debug|Win32
|
||||
{3A7FE53D-35F7-49DC-9C9A-A5204A53523F}.Release.DLL|x64.ActiveCfg = Release.DLL|x64
|
||||
{3A7FE53D-35F7-49DC-9C9A-A5204A53523F}.Release.DLL|x64.Build.0 = Release.DLL|x64
|
||||
{3A7FE53D-35F7-49DC-9C9A-A5204A53523F}.Release.DLL|x86.ActiveCfg = Release.DLL|Win32
|
||||
{3A7FE53D-35F7-49DC-9C9A-A5204A53523F}.Release.DLL|x86.Build.0 = Release.DLL|Win32
|
||||
{3A7FE53D-35F7-49DC-9C9A-A5204A53523F}.Release|x64.ActiveCfg = Release|x64
|
||||
{3A7FE53D-35F7-49DC-9C9A-A5204A53523F}.Release|x64.Build.0 = Release|x64
|
||||
{3A7FE53D-35F7-49DC-9C9A-A5204A53523F}.Release|x86.ActiveCfg = Release|Win32
|
||||
{3A7FE53D-35F7-49DC-9C9A-A5204A53523F}.Release|x86.Build.0 = Release|Win32
|
||||
{CCA63A76-D9FC-4130-9F67-4D97F9770D53}.Debug.DLL|x64.ActiveCfg = Debug.DLL|x64
|
||||
{CCA63A76-D9FC-4130-9F67-4D97F9770D53}.Debug.DLL|x64.Build.0 = Debug.DLL|x64
|
||||
{CCA63A76-D9FC-4130-9F67-4D97F9770D53}.Debug.DLL|x86.ActiveCfg = Debug.DLL|Win32
|
||||
{CCA63A76-D9FC-4130-9F67-4D97F9770D53}.Debug.DLL|x86.Build.0 = Debug.DLL|Win32
|
||||
{CCA63A76-D9FC-4130-9F67-4D97F9770D53}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{CCA63A76-D9FC-4130-9F67-4D97F9770D53}.Debug|x64.Build.0 = Debug|x64
|
||||
{CCA63A76-D9FC-4130-9F67-4D97F9770D53}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{CCA63A76-D9FC-4130-9F67-4D97F9770D53}.Debug|x86.Build.0 = Debug|Win32
|
||||
{CCA63A76-D9FC-4130-9F67-4D97F9770D53}.Release.DLL|x64.ActiveCfg = Release.DLL|x64
|
||||
{CCA63A76-D9FC-4130-9F67-4D97F9770D53}.Release.DLL|x64.Build.0 = Release.DLL|x64
|
||||
{CCA63A76-D9FC-4130-9F67-4D97F9770D53}.Release.DLL|x86.ActiveCfg = Release.DLL|Win32
|
||||
{CCA63A76-D9FC-4130-9F67-4D97F9770D53}.Release.DLL|x86.Build.0 = Release.DLL|Win32
|
||||
{CCA63A76-D9FC-4130-9F67-4D97F9770D53}.Release|x64.ActiveCfg = Release|x64
|
||||
{CCA63A76-D9FC-4130-9F67-4D97F9770D53}.Release|x64.Build.0 = Release|x64
|
||||
{CCA63A76-D9FC-4130-9F67-4D97F9770D53}.Release|x86.ActiveCfg = Release|Win32
|
||||
{CCA63A76-D9FC-4130-9F67-4D97F9770D53}.Release|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
@ -2695,10 +2769,14 @@ Global
|
|||
{88DE5AD6-0074-4A5A-BE22-C840153E35D5} = {5317807F-61D4-4E0F-B6DC-2D9F12621ED9}
|
||||
{A546E75A-5242-46E6-9A9E-6C91554EAB84} = {5317807F-61D4-4E0F-B6DC-2D9F12621ED9}
|
||||
{EFA150D4-F93B-4D7D-A69C-9E8B4663BECD} = {5317807F-61D4-4E0F-B6DC-2D9F12621ED9}
|
||||
{D8026C60-CCBC-45DF-9085-BF21569EB414} = {DA049009-21FF-4AC0-84E4-830DD1BCD0CE}
|
||||
{DF25E545-00FF-4E64-844C-7DF98991F901} = {278D8859-20B1-428F-8448-064F46E1F021}
|
||||
{703BE7BA-5B99-4F70-806D-3A259F6A991E} = {278D8859-20B1-428F-8448-064F46E1F021}
|
||||
{FAFEE2F9-24B0-4AF1-B512-433E9590033F} = {278D8859-20B1-428F-8448-064F46E1F021}
|
||||
{8245DAD9-D402-4D5C-8F45-32229CD3B263} = {AF5BEC5C-1F2B-4DA8-B12D-D09FE569237C}
|
||||
{41BBCC10-6FDE-48A1-B2E0-A0EC6A668629} = {5317807F-61D4-4E0F-B6DC-2D9F12621ED9}
|
||||
{0981CA28-E4A5-4DF1-987F-A41D09131EFC} = {6C82BAAE-BDDF-457D-8FA8-7E2490B07035}
|
||||
{3A7FE53D-35F7-49DC-9C9A-A5204A53523F} = {AF5BEC5C-1F2B-4DA8-B12D-D09FE569237C}
|
||||
{CCA63A76-D9FC-4130-9F67-4D97F9770D53} = {5317807F-61D4-4E0F-B6DC-2D9F12621ED9}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {E926C768-6307-4423-A1EC-57E95B1FAB29}
|
||||
|
|
|
|||
|
|
@ -117,11 +117,11 @@ endif
|
|||
|
||||
ifeq ($(PLATFORM),PLATFORM_WEB)
|
||||
# Emscripten required variables
|
||||
EMSDK_PATH ?= C:/emsdk
|
||||
EMSDK_PATH ?= C:/raylib/emsdk
|
||||
EMSCRIPTEN_PATH ?= $(EMSDK_PATH)/upstream/emscripten
|
||||
CLANG_PATH = $(EMSDK_PATH)/upstream/bin
|
||||
PYTHON_PATH = $(EMSDK_PATH)/python/3.9.2-1_64bit
|
||||
NODE_PATH = $(EMSDK_PATH)/node/14.18.2_64bit/bin
|
||||
PYTHON_PATH = $(EMSDK_PATH)/python/3.9.2-nuget_64bit
|
||||
NODE_PATH = $(EMSDK_PATH)/node/20.18.0_64bit/bin
|
||||
export PATH = $(EMSDK_PATH);$(EMSCRIPTEN_PATH);$(CLANG_PATH);$(NODE_PATH);$(PYTHON_PATH):$$(PATH)
|
||||
endif
|
||||
|
||||
|
|
|
|||
|
|
@ -90,7 +90,16 @@ if (BUILD_SHARED_LIBS)
|
|||
set_property(TARGET raylib PROPERTY C_VISIBILITY_PRESET hidden)
|
||||
endif ()
|
||||
|
||||
target_link_libraries(raylib "${LIBS_PRIVATE}")
|
||||
|
||||
# If building as a static lib *AND* using internal GLFW we
|
||||
# need to set it up as a PRIVATE import so cmake doesn't complain
|
||||
# it isn't declared on an install rule
|
||||
if (INTERNAL_GLFW AND BUILD_SHARED_LIBS)
|
||||
target_link_libraries(raylib PRIVATE glfw)
|
||||
endif()
|
||||
|
||||
target_link_libraries(raylib PUBLIC "${LIBS_PRIVATE}")
|
||||
|
||||
|
||||
# Sets some compile time definitions for the pre-processor
|
||||
# If CUSTOMIZE_BUILD option is on you will not use config.h by default
|
||||
|
|
|
|||
18
src/Makefile
|
|
@ -118,6 +118,8 @@ GLFW_LINUX_ENABLE_X11 ?= TRUE
|
|||
# WARNING: Library is not included in raylib, it MUST be configured by users
|
||||
SDL_INCLUDE_PATH ?= $(RAYLIB_SRC_PATH)/external/SDL2/include
|
||||
SDL_LIBRARY_PATH ?= $(RAYLIB_SRC_PATH)/external/SDL2/lib
|
||||
SDL_LIBRARIES ?= -lSDL2 -lSDL2main
|
||||
|
||||
|
||||
# Determine if the file has root access (only required to install raylib)
|
||||
# "whoami" prints the name of the user that calls him (so, if it is the root user, "whoami" prints "root")
|
||||
|
|
@ -181,11 +183,11 @@ endif
|
|||
ifeq ($(TARGET_PLATFORM),PLATFORM_WEB)
|
||||
ifeq ($(PLATFORM_OS), WINDOWS)
|
||||
# Emscripten required variables
|
||||
EMSDK_PATH ?= C:/emsdk
|
||||
EMSDK_PATH ?= C:/raylib/emsdk
|
||||
EMSCRIPTEN_PATH ?= $(EMSDK_PATH)/upstream/emscripten
|
||||
CLANG_PATH := $(EMSDK_PATH)/upstream/bin
|
||||
PYTHON_PATH := $(EMSDK_PATH)/python/3.9.2-1_64bit
|
||||
NODE_PATH := $(EMSDK_PATH)/node/14.15.5_64bit/bin
|
||||
PYTHON_PATH := $(EMSDK_PATH)/python/3.9.2-nuget_64bit
|
||||
NODE_PATH := $(EMSDK_PATH)/node/20.18.0_64bit/bin
|
||||
export PATH := $(EMSDK_PATH);$(EMSCRIPTEN_PATH);$(CLANG_PATH);$(NODE_PATH);$(PYTHON_PATH);C:/raylib/MinGW/bin;$(PATH)
|
||||
endif
|
||||
endif
|
||||
|
|
@ -230,8 +232,8 @@ ifeq ($(TARGET_PLATFORM),PLATFORM_ANDROID)
|
|||
endif
|
||||
|
||||
# Define raylib graphics api depending on selected platform
|
||||
# NOTE: By default use OpenGL 3.3 on desktop platforms
|
||||
ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW)
|
||||
# By default use OpenGL 3.3 on desktop platforms
|
||||
GRAPHICS ?= GRAPHICS_API_OPENGL_33
|
||||
#GRAPHICS = GRAPHICS_API_OPENGL_11 # Uncomment to use OpenGL 1.1
|
||||
#GRAPHICS = GRAPHICS_API_OPENGL_21 # Uncomment to use OpenGL 2.1
|
||||
|
|
@ -239,11 +241,9 @@ ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW)
|
|||
#GRAPHICS = GRAPHICS_API_OPENGL_ES2 # Uncomment to use OpenGL ES 2.0 (ANGLE)
|
||||
endif
|
||||
ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_SDL)
|
||||
# By default use OpenGL 3.3 on desktop platform with SDL backend
|
||||
GRAPHICS ?= GRAPHICS_API_OPENGL_33
|
||||
endif
|
||||
ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_RGFW)
|
||||
# By default use OpenGL 3.3 on desktop platforms
|
||||
GRAPHICS ?= GRAPHICS_API_OPENGL_33
|
||||
#GRAPHICS = GRAPHICS_API_OPENGL_11 # Uncomment to use OpenGL 1.1
|
||||
#GRAPHICS = GRAPHICS_API_OPENGL_21 # Uncomment to use OpenGL 2.1
|
||||
|
|
@ -257,7 +257,7 @@ endif
|
|||
ifeq ($(TARGET_PLATFORM),PLATFORM_WEB)
|
||||
# On HTML5 OpenGL ES 2.0 is used, emscripten translates it to WebGL 1.0
|
||||
GRAPHICS = GRAPHICS_API_OPENGL_ES2
|
||||
#GRAPHICS = GRAPHICS_API_OPENGL_ES3 # Uncomment to use ES3/WebGL2 (preliminary support).
|
||||
#GRAPHICS = GRAPHICS_API_OPENGL_ES3
|
||||
endif
|
||||
ifeq ($(TARGET_PLATFORM),PLATFORM_ANDROID)
|
||||
# By default use OpenGL ES 2.0 on Android
|
||||
|
|
@ -462,7 +462,7 @@ CFLAGS += $(CUSTOM_CFLAGS)
|
|||
# Define include paths for required headers: INCLUDE_PATHS
|
||||
# NOTE: Several external required libraries (stb and others)
|
||||
#------------------------------------------------------------------------------------------------
|
||||
INCLUDE_PATHS = -I.
|
||||
INCLUDE_PATHS = -I. $(EXTRA_INCLUDE_PATHS)
|
||||
|
||||
# Define additional directories containing required header files
|
||||
ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW)
|
||||
|
|
@ -588,7 +588,7 @@ ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_SDL)
|
|||
LDLIBS += -lX11
|
||||
endif
|
||||
endif
|
||||
LDLIBS += -lSDL2 -lSDL2main
|
||||
LDLIBS += $(SDL_LIBRARIES)
|
||||
endif
|
||||
ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_RGFW)
|
||||
ifeq ($(PLATFORM_OS),WINDOWS)
|
||||
|
|
|
|||
38
src/config.h
|
|
@ -71,6 +71,31 @@
|
|||
// Enabling this flag allows manual control of the frame processes, use at your own risk
|
||||
//#define SUPPORT_CUSTOM_FRAME_CONTROL 1
|
||||
|
||||
// Support for clipboard image loading
|
||||
// NOTE: Only working on SDL3, GLFW (Windows) and RGFW (Windows)
|
||||
#define SUPPORT_CLIPBOARD_IMAGE 1
|
||||
|
||||
// NOTE: Clipboard image loading requires support for some image file formats
|
||||
// TODO: Those defines should probably be removed from here, I prefer to let the user manage them
|
||||
#if defined(SUPPORT_CLIPBOARD_IMAGE)
|
||||
#ifndef SUPPORT_MODULE_RTEXTURES
|
||||
#define SUPPORT_MODULE_RTEXTURES 1
|
||||
#endif
|
||||
#ifndef STBI_REQUIRED
|
||||
#define STBI_REQUIRED
|
||||
#endif
|
||||
#ifndef SUPPORT_FILEFORMAT_BMP // For clipboard image on Windows
|
||||
#define SUPPORT_FILEFORMAT_BMP 1
|
||||
#endif
|
||||
#ifndef SUPPORT_FILEFORMAT_PNG // Wayland uses png for prints, at least it was on 22 LTS ubuntu
|
||||
#define SUPPORT_FILEFORMAT_PNG 1
|
||||
#endif
|
||||
#ifndef SUPPORT_FILEFORMAT_JPG
|
||||
#define SUPPORT_FILEFORMAT_JPG 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
// rcore: Configuration values
|
||||
//------------------------------------------------------------------------------------
|
||||
#define MAX_FILEPATH_CAPACITY 8192 // Maximum file paths capacity
|
||||
|
|
@ -100,6 +125,8 @@
|
|||
// Show OpenGL extensions and capabilities detailed logs on init
|
||||
//#define RLGL_SHOW_GL_DETAILS_INFO 1
|
||||
|
||||
#define RL_SUPPORT_MESH_GPU_SKINNING 1 // GPU skinning, comment if your GPU does not support more than 8 VBOs
|
||||
|
||||
//#define RL_DEFAULT_BATCH_BUFFER_ELEMENTS 4096 // Default internal render batch elements limits
|
||||
#define RL_DEFAULT_BATCH_BUFFERS 1 // Default number of batch buffers (multi-buffering)
|
||||
#define RL_DEFAULT_BATCH_DRAWCALLS 256 // Default number of batch draw calls (by state changes: mode, texture)
|
||||
|
|
@ -120,16 +147,11 @@
|
|||
#define RL_DEFAULT_SHADER_ATTRIB_LOCATION_TANGENT 4
|
||||
#define RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD2 5
|
||||
#define RL_DEFAULT_SHADER_ATTRIB_LOCATION_INDICES 6
|
||||
|
||||
|
||||
#define RL_SUPPORT_MESH_GPU_SKINNING // Remove this if your GPU does not support more than 8 VBOs
|
||||
|
||||
#ifdef RL_SUPPORT_MESH_GPU_SKINNING
|
||||
#define RL_DEFAULT_SHADER_ATTRIB_LOCATION_BONEIDS 7
|
||||
#define RL_DEFAULT_SHADER_ATTRIB_LOCATION_BONEWEIGHTS 8
|
||||
#if defined(RL_SUPPORT_MESH_GPU_SKINNING)
|
||||
#define RL_DEFAULT_SHADER_ATTRIB_LOCATION_BONEIDS 7
|
||||
#define RL_DEFAULT_SHADER_ATTRIB_LOCATION_BONEWEIGHTS 8
|
||||
#endif
|
||||
|
||||
|
||||
// Default shader vertex attribute names to set location points
|
||||
// NOTE: When a new shader is loaded, the following locations are tried to be set for convenience
|
||||
#define RL_DEFAULT_SHADER_ATTRIB_NAME_POSITION "vertexPosition" // Bound by default to shader location: RL_DEFAULT_SHADER_ATTRIB_LOCATION_POSITION
|
||||
|
|
|
|||
44
src/external/RGFW.h
vendored
|
|
@ -38,6 +38,7 @@
|
|||
#define RGFW_OPENGL_ES2 - (optional) use OpenGL ES (version 2)
|
||||
#define RGFW_OPENGL_ES3 - (optional) use OpenGL ES (version 3)
|
||||
#define RGFW_DIRECTX - (optional) use directX for the rendering backend (rather than opengl) (windows only, defaults to opengl for unix)
|
||||
#define RGFW_WEBGPU - (optional) use webGPU for rendering (Web ONLY)
|
||||
#define RGFW_NO_API - (optional) don't use any rendering API (no opengl, no vulkan, no directX)
|
||||
|
||||
#define RGFW_LINK_EGL (optional) (windows only) if EGL is being used, if EGL functions should be defined dymanically (using GetProcAddress)
|
||||
|
|
@ -84,6 +85,9 @@
|
|||
Rob Rohan -> X11 bugs and missing features, MacOS/Cocoa fixing memory issues/bugs
|
||||
AICDG (@THISISAGOODNAME) -> vulkan support (example)
|
||||
@Easymode -> support, testing/debugging, bug fixes and reviews
|
||||
Joshua Rowe (omnisci3nce) - bug fix, review (macOS)
|
||||
@lesleyrs -> bug fix, review (OpenGL)
|
||||
Nick Porcino (meshula) - testing, organization, review (MacOS, examples)
|
||||
*/
|
||||
|
||||
#if _MSC_VER
|
||||
|
|
@ -201,7 +205,7 @@
|
|||
#ifdef __EMSCRIPTEN__
|
||||
#define RGFW_WEBASM
|
||||
|
||||
#ifndef RGFW_NO_API
|
||||
#if !defined(RGFW_NO_API) && !defined(RGFW_WEBGPU)
|
||||
#define RGFW_OPENGL
|
||||
#endif
|
||||
|
||||
|
|
@ -211,6 +215,10 @@
|
|||
|
||||
#include <emscripten/html5.h>
|
||||
#include <emscripten/key_codes.h>
|
||||
|
||||
#ifdef RGFW_WEBGPU
|
||||
#include <emscripten/html5_webgpu.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(RGFW_X11) && defined(__APPLE__)
|
||||
|
|
@ -573,7 +581,13 @@ typedef struct RGFW_window_src {
|
|||
void* image;
|
||||
#endif
|
||||
#elif defined(RGFW_WEBASM)
|
||||
#ifdef RGFW_WEBGPU
|
||||
WGPUInstance ctx;
|
||||
WGPUDevice device;
|
||||
WGPUQueue queue;
|
||||
#else
|
||||
EMSCRIPTEN_WEBGL_CONTEXT_HANDLE ctx;
|
||||
#endif
|
||||
#endif
|
||||
} RGFW_window_src;
|
||||
|
||||
|
|
@ -1180,9 +1194,9 @@ int main() {
|
|||
static : ar rcs RGFW.a RGFW.o
|
||||
shared :
|
||||
windows:
|
||||
gcc -shared RGFW.o -lopengl32 -lshell32 -lgdi32 -o RGFW.dll
|
||||
gcc -shared RGFW.o -lwinmm -lopengl32 -lshell32 -lgdi32 -o RGFW.dll
|
||||
linux:
|
||||
gcc -shared RGFW.o -lX11 -lXcursor -lGL -o RGFW.so
|
||||
gcc -shared RGFW.o -lX11 -lXcursor -lGL -lXrandr -o RGFW.so
|
||||
macos:
|
||||
gcc -shared RGFW.o -framework Foundation -framework AppKit -framework OpenGL -framework CoreVideo
|
||||
*/
|
||||
|
|
@ -1406,7 +1420,7 @@ char RGFW_keyCodeToChar(u32 keycode, b8 shift) {
|
|||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '`', '0', '1', '2', '3', '4', '5', '6', '7', '8',
|
||||
'9', '-', '=', 0, '\t', 0, 0, 0, 0, 0, 0, 0, 0, 0, ' ', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
|
||||
'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '.', ',', '/', '[', ']', ';', '\n', '\'', '\\',
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '/', '*', '-', '1', '2', '3', '3', '5', '6', '7', '8', '9', '0', '\n'
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '/', '*', '-', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '\n'
|
||||
};
|
||||
|
||||
static const char mapCaps[] = {
|
||||
|
|
@ -1969,7 +1983,7 @@ void RGFW_updateLockState(RGFW_window* win, b8 capital, b8 numlock) {
|
|||
|
||||
size_t index = (sizeof(attribs) / sizeof(attribs[0])) - 13;
|
||||
|
||||
#define RGFW_GL_ADD_ATTRIB(attrib, attVal) \
|
||||
#define RGFW_GL_ADD_ATTRIB(attrib, attVal) \
|
||||
if (attVal) { \
|
||||
attribs[index] = attrib;\
|
||||
attribs[index + 1] = attVal;\
|
||||
|
|
@ -2522,7 +2536,8 @@ Start of Linux / Unix defines
|
|||
glXGetFBConfigAttrib((Display*) win->src.display, fbc[i], GLX_SAMPLE_BUFFERS, &samp_buf);
|
||||
glXGetFBConfigAttrib((Display*) win->src.display, fbc[i], GLX_SAMPLES, &samples);
|
||||
|
||||
if ((best_fbc < 0 || samp_buf) && (samples == RGFW_SAMPLES || best_fbc == -1)) {
|
||||
if ((!(args & RGFW_TRANSPARENT_WINDOW) || vi->depth == 32) &&
|
||||
(best_fbc < 0 || samp_buf) && (samples == RGFW_SAMPLES || best_fbc == -1)) {
|
||||
best_fbc = i;
|
||||
}
|
||||
}
|
||||
|
|
@ -2538,11 +2553,6 @@ Start of Linux / Unix defines
|
|||
XVisualInfo* vi = glXGetVisualFromFBConfig((Display*) win->src.display, bestFbc);
|
||||
|
||||
XFree(fbc);
|
||||
|
||||
if (args & RGFW_TRANSPARENT_WINDOW) {
|
||||
XMatchVisualInfo((Display*) win->src.display, DefaultScreen((Display*) win->src.display), 32, TrueColor, vi); /*!< for RGBA backgrounds*/
|
||||
}
|
||||
|
||||
#else
|
||||
XVisualInfo viNorm;
|
||||
|
||||
|
|
@ -8548,6 +8558,7 @@ RGFW_window* RGFW_createWindow(const char* name, RGFW_rect rect, u16 args) {
|
|||
|
||||
RGFW_window* win = RGFW_window_basic_init(rect, args);
|
||||
|
||||
#ifndef RGFW_WEBGPU
|
||||
EmscriptenWebGLContextAttributes attrs;
|
||||
attrs.alpha = EM_TRUE;
|
||||
attrs.depth = EM_TRUE;
|
||||
|
|
@ -8576,6 +8587,11 @@ RGFW_window* RGFW_createWindow(const char* name, RGFW_rect rect, u16 args) {
|
|||
#ifdef LEGACY_GL_EMULATION
|
||||
EM_ASM("Module.useWebGL = true; GLImmediate.init();");
|
||||
#endif
|
||||
#else
|
||||
win->src.ctx = wgpuCreateInstance(NULL);
|
||||
win->src.device = emscripten_webgpu_get_device();
|
||||
win->src.queue = wgpuDeviceGetQueue(win->src.device);
|
||||
#endif
|
||||
|
||||
emscripten_set_canvas_element_size("#canvas", rect.w, rect.h);
|
||||
emscripten_set_window_title(name);
|
||||
|
|
@ -8871,16 +8887,20 @@ void RGFW_window_swapBuffers(RGFW_window* win) {
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifndef RGFW_WEBGPU
|
||||
emscripten_webgl_commit_frame();
|
||||
#endif
|
||||
emscripten_sleep(0);
|
||||
}
|
||||
|
||||
|
||||
void RGFW_window_makeCurrent_OpenGL(RGFW_window* win) {
|
||||
#ifndef RGFW_WEBGPU
|
||||
if (win == NULL)
|
||||
emscripten_webgl_make_context_current(0);
|
||||
else
|
||||
emscripten_webgl_make_context_current(win->src.ctx);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef RGFW_EGL
|
||||
|
|
@ -8888,7 +8908,9 @@ void RGFW_window_swapInterval(RGFW_window* win, i32 swapInterval) { RGFW_UNUSED(
|
|||
#endif
|
||||
|
||||
void RGFW_window_close(RGFW_window* win) {
|
||||
#ifndef RGFW_WEBGPU
|
||||
emscripten_webgl_destroy_context(win->src.ctx);
|
||||
#endif
|
||||
|
||||
free(win);
|
||||
}
|
||||
|
|
|
|||
48
src/external/cgltf.h
vendored
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* cgltf - a single-file glTF 2.0 parser written in C99.
|
||||
*
|
||||
* Version: 1.13
|
||||
* Version: 1.14
|
||||
*
|
||||
* Website: https://github.com/jkuhlmann/cgltf
|
||||
*
|
||||
|
|
@ -395,6 +395,8 @@ typedef struct cgltf_texture
|
|||
cgltf_sampler* sampler;
|
||||
cgltf_bool has_basisu;
|
||||
cgltf_image* basisu_image;
|
||||
cgltf_bool has_webp;
|
||||
cgltf_image* webp_image;
|
||||
cgltf_extras extras;
|
||||
cgltf_size extensions_count;
|
||||
cgltf_extension* extensions;
|
||||
|
|
@ -1697,7 +1699,20 @@ cgltf_result cgltf_validate(cgltf_data* data)
|
|||
{
|
||||
if (data->nodes[i].weights && data->nodes[i].mesh)
|
||||
{
|
||||
CGLTF_ASSERT_IF (data->nodes[i].mesh->primitives_count && data->nodes[i].mesh->primitives[0].targets_count != data->nodes[i].weights_count, cgltf_result_invalid_gltf);
|
||||
CGLTF_ASSERT_IF(data->nodes[i].mesh->primitives_count && data->nodes[i].mesh->primitives[0].targets_count != data->nodes[i].weights_count, cgltf_result_invalid_gltf);
|
||||
}
|
||||
|
||||
if (data->nodes[i].has_mesh_gpu_instancing)
|
||||
{
|
||||
CGLTF_ASSERT_IF(data->nodes[i].mesh == NULL, cgltf_result_invalid_gltf);
|
||||
CGLTF_ASSERT_IF(data->nodes[i].mesh_gpu_instancing.attributes_count == 0, cgltf_result_invalid_gltf);
|
||||
|
||||
cgltf_accessor* first = data->nodes[i].mesh_gpu_instancing.attributes[0].data;
|
||||
|
||||
for (cgltf_size k = 0; k < data->nodes[i].mesh_gpu_instancing.attributes_count; ++k)
|
||||
{
|
||||
CGLTF_ASSERT_IF(data->nodes[i].mesh_gpu_instancing.attributes[k].data->count != first->count, cgltf_result_invalid_gltf);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -4538,6 +4553,34 @@ static int cgltf_parse_json_texture(cgltf_options* options, jsmntok_t const* tok
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (cgltf_json_strcmp(tokens + i, json_chunk, "EXT_texture_webp") == 0)
|
||||
{
|
||||
out_texture->has_webp = 1;
|
||||
++i;
|
||||
CGLTF_CHECK_TOKTYPE(tokens[i], JSMN_OBJECT);
|
||||
int num_properties = tokens[i].size;
|
||||
++i;
|
||||
|
||||
for (int t = 0; t < num_properties; ++t)
|
||||
{
|
||||
CGLTF_CHECK_KEY(tokens[i]);
|
||||
|
||||
if (cgltf_json_strcmp(tokens + i, json_chunk, "source") == 0)
|
||||
{
|
||||
++i;
|
||||
out_texture->webp_image = CGLTF_PTRINDEX(cgltf_image, cgltf_json_to_int(tokens + i, json_chunk));
|
||||
++i;
|
||||
}
|
||||
else
|
||||
{
|
||||
i = cgltf_skip_json(tokens, i + 1);
|
||||
}
|
||||
if (i < 0)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
i = cgltf_parse_json_unprocessed_extension(options, tokens, i, json_chunk, &(out_texture->extensions[out_texture->extensions_count++]));
|
||||
|
|
@ -6548,6 +6591,7 @@ static int cgltf_fixup_pointers(cgltf_data* data)
|
|||
{
|
||||
CGLTF_PTRFIXUP(data->textures[i].image, data->images, data->images_count);
|
||||
CGLTF_PTRFIXUP(data->textures[i].basisu_image, data->images, data->images_count);
|
||||
CGLTF_PTRFIXUP(data->textures[i].webp_image, data->images, data->images_count);
|
||||
CGLTF_PTRFIXUP(data->textures[i].sampler, data->samplers, data->samplers_count);
|
||||
}
|
||||
|
||||
|
|
|
|||
15
src/external/dr_mp3.h
vendored
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
MP3 audio decoder. Choice of public domain or MIT-0. See license statements at the end of this file.
|
||||
dr_mp3 - v0.6.38 - 2023-11-02
|
||||
dr_mp3 - v0.6.39 - 2024-02-27
|
||||
|
||||
David Reid - mackron@gmail.com
|
||||
|
||||
|
|
@ -95,7 +95,7 @@ extern "C" {
|
|||
|
||||
#define DRMP3_VERSION_MAJOR 0
|
||||
#define DRMP3_VERSION_MINOR 6
|
||||
#define DRMP3_VERSION_REVISION 38
|
||||
#define DRMP3_VERSION_REVISION 39
|
||||
#define DRMP3_VERSION_STRING DRMP3_XSTRINGIFY(DRMP3_VERSION_MAJOR) "." DRMP3_XSTRINGIFY(DRMP3_VERSION_MINOR) "." DRMP3_XSTRINGIFY(DRMP3_VERSION_REVISION)
|
||||
|
||||
#include <stddef.h> /* For size_t. */
|
||||
|
|
@ -1985,8 +1985,8 @@ static drmp3_int16 drmp3d_scale_pcm(float sample)
|
|||
s32 -= (s32 < 0);
|
||||
s = (drmp3_int16)drmp3_clip_int16_arm(s32);
|
||||
#else
|
||||
if (sample >= 32766.5) return (drmp3_int16) 32767;
|
||||
if (sample <= -32767.5) return (drmp3_int16)-32768;
|
||||
if (sample >= 32766.5f) return (drmp3_int16) 32767;
|
||||
if (sample <= -32767.5f) return (drmp3_int16)-32768;
|
||||
s = (drmp3_int16)(sample + .5f);
|
||||
s -= (s < 0); /* away from zero, to be compliant */
|
||||
#endif
|
||||
|
|
@ -2404,9 +2404,9 @@ DRMP3_API void drmp3dec_f32_to_s16(const float *in, drmp3_int16 *out, size_t num
|
|||
for(; i < num_samples; i++)
|
||||
{
|
||||
float sample = in[i] * 32768.0f;
|
||||
if (sample >= 32766.5)
|
||||
if (sample >= 32766.5f)
|
||||
out[i] = (drmp3_int16) 32767;
|
||||
else if (sample <= -32767.5)
|
||||
else if (sample <= -32767.5f)
|
||||
out[i] = (drmp3_int16)-32768;
|
||||
else
|
||||
{
|
||||
|
|
@ -4495,6 +4495,9 @@ counts rather than sample counts.
|
|||
/*
|
||||
REVISION HISTORY
|
||||
================
|
||||
v0.6.39 - 2024-02-27
|
||||
- Fix a Wdouble-promotion warning.
|
||||
|
||||
v0.6.38 - 2023-11-02
|
||||
- Fix build for ARMv6-M.
|
||||
|
||||
|
|
|
|||
28
src/external/dr_wav.h
vendored
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
WAV audio loader and writer. Choice of public domain or MIT-0. See license statements at the end of this file.
|
||||
dr_wav - v0.13.13 - 2023-11-02
|
||||
dr_wav - v0.13.16 - 2024-02-27
|
||||
|
||||
David Reid - mackron@gmail.com
|
||||
|
||||
|
|
@ -147,7 +147,7 @@ extern "C" {
|
|||
|
||||
#define DRWAV_VERSION_MAJOR 0
|
||||
#define DRWAV_VERSION_MINOR 13
|
||||
#define DRWAV_VERSION_REVISION 13
|
||||
#define DRWAV_VERSION_REVISION 16
|
||||
#define DRWAV_VERSION_STRING DRWAV_XSTRINGIFY(DRWAV_VERSION_MAJOR) "." DRWAV_XSTRINGIFY(DRWAV_VERSION_MINOR) "." DRWAV_XSTRINGIFY(DRWAV_VERSION_REVISION)
|
||||
|
||||
#include <stddef.h> /* For size_t. */
|
||||
|
|
@ -3075,7 +3075,13 @@ DRWAV_PRIVATE drwav_bool32 drwav_init__internal(drwav* pWav, drwav_chunk_proc on
|
|||
|
||||
if (pWav->container == drwav_container_riff || pWav->container == drwav_container_rifx) {
|
||||
if (drwav_bytes_to_u32_ex(chunkSizeBytes, pWav->container) < 36) {
|
||||
return DRWAV_FALSE; /* Chunk size should always be at least 36 bytes. */
|
||||
/*
|
||||
I've had a report of a WAV file failing to load when the size of the WAVE chunk is not encoded
|
||||
and is instead just set to 0. I'm going to relax the validation here to allow these files to
|
||||
load. Considering the chunk size isn't actually used this should be safe. With this change my
|
||||
test suite still passes.
|
||||
*/
|
||||
/*return DRWAV_FALSE;*/ /* Chunk size should always be at least 36 bytes. */
|
||||
}
|
||||
} else if (pWav->container == drwav_container_rf64) {
|
||||
if (drwav_bytes_to_u32_le(chunkSizeBytes) != 0xFFFFFFFF) {
|
||||
|
|
@ -3554,10 +3560,7 @@ DRWAV_PRIVATE drwav_bool32 drwav_init__internal(drwav* pWav, drwav_chunk_proc on
|
|||
|
||||
/* Getting here means it's not a chunk that we care about internally, but might need to be handled as metadata by the caller. */
|
||||
if (isProcessingMetadata) {
|
||||
drwav_uint64 metadataBytesRead;
|
||||
|
||||
metadataBytesRead = drwav__metadata_process_chunk(&metadataParser, &header, drwav_metadata_type_all_including_unknown);
|
||||
DRWAV_ASSERT(metadataBytesRead <= header.sizeInBytes);
|
||||
drwav__metadata_process_chunk(&metadataParser, &header, drwav_metadata_type_all_including_unknown);
|
||||
|
||||
/* Go back to the start of the chunk so we can normalize the position of the cursor. */
|
||||
if (drwav__seek_from_start(pWav->onSeek, cursor, pWav->pUserData) == DRWAV_FALSE) {
|
||||
|
|
@ -7830,7 +7833,7 @@ DRWAV_API void drwav_f32_to_s32(drwav_int32* pOut, const float* pIn, size_t samp
|
|||
}
|
||||
|
||||
for (i = 0; i < sampleCount; ++i) {
|
||||
*pOut++ = (drwav_int32)(2147483648.0 * pIn[i]);
|
||||
*pOut++ = (drwav_int32)(2147483648.0f * pIn[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -8347,6 +8350,15 @@ DRWAV_API drwav_bool32 drwav_fourcc_equal(const drwav_uint8* a, const char* b)
|
|||
/*
|
||||
REVISION HISTORY
|
||||
================
|
||||
v0.13.16 - 2024-02-27
|
||||
- Fix a Wdouble-promotion warning.
|
||||
|
||||
v0.13.15 - 2024-01-23
|
||||
- Relax some unnecessary validation that prevented some files from loading.
|
||||
|
||||
v0.13.14 - 2023-12-02
|
||||
- Fix a warning about an unused variable.
|
||||
|
||||
v0.13.13 - 2023-11-02
|
||||
- Fix a warning when compiling with Clang.
|
||||
|
||||
|
|
|
|||
86
src/external/qoa.h
vendored
|
|
@ -366,22 +366,7 @@ unsigned int qoa_encode_frame(const short *sample_data, qoa_desc *qoa, unsigned
|
|||
), bytes, &p);
|
||||
|
||||
|
||||
for (int c = 0; c < channels; c++) {
|
||||
/* If the weights have grown too large, reset them to 0. This may happen
|
||||
with certain high-frequency sounds. This is a last resort and will
|
||||
introduce quite a bit of noise, but should at least prevent pops/clicks */
|
||||
int weights_sum =
|
||||
qoa->lms[c].weights[0] * qoa->lms[c].weights[0] +
|
||||
qoa->lms[c].weights[1] * qoa->lms[c].weights[1] +
|
||||
qoa->lms[c].weights[2] * qoa->lms[c].weights[2] +
|
||||
qoa->lms[c].weights[3] * qoa->lms[c].weights[3];
|
||||
if (weights_sum > 0x2fffffff) {
|
||||
qoa->lms[c].weights[0] = 0;
|
||||
qoa->lms[c].weights[1] = 0;
|
||||
qoa->lms[c].weights[2] = 0;
|
||||
qoa->lms[c].weights[3] = 0;
|
||||
}
|
||||
|
||||
for (unsigned int c = 0; c < channels; c++) {
|
||||
/* Write the current LMS state */
|
||||
qoa_uint64_t weights = 0;
|
||||
qoa_uint64_t history = 0;
|
||||
|
|
@ -395,9 +380,9 @@ unsigned int qoa_encode_frame(const short *sample_data, qoa_desc *qoa, unsigned
|
|||
|
||||
/* We encode all samples with the channels interleaved on a slice level.
|
||||
E.g. for stereo: (ch-0, slice 0), (ch 1, slice 0), (ch 0, slice 1), ...*/
|
||||
for (int sample_index = 0; sample_index < frame_len; sample_index += QOA_SLICE_LEN) {
|
||||
for (unsigned int sample_index = 0; sample_index < frame_len; sample_index += QOA_SLICE_LEN) {
|
||||
|
||||
for (int c = 0; c < channels; c++) {
|
||||
for (unsigned int c = 0; c < channels; c++) {
|
||||
int slice_len = qoa_clamp(QOA_SLICE_LEN, 0, frame_len - sample_index);
|
||||
int slice_start = sample_index * channels + c;
|
||||
int slice_end = (sample_index + slice_len) * channels + c;
|
||||
|
|
@ -405,10 +390,13 @@ unsigned int qoa_encode_frame(const short *sample_data, qoa_desc *qoa, unsigned
|
|||
/* Brute for search for the best scalefactor. Just go through all
|
||||
16 scalefactors, encode all samples for the current slice and
|
||||
meassure the total squared error. */
|
||||
qoa_uint64_t best_rank = -1;
|
||||
#ifdef QOA_RECORD_TOTAL_ERROR
|
||||
qoa_uint64_t best_error = -1;
|
||||
qoa_uint64_t best_slice;
|
||||
#endif
|
||||
qoa_uint64_t best_slice = 0;
|
||||
qoa_lms_t best_lms;
|
||||
int best_scalefactor;
|
||||
int best_scalefactor = 0;
|
||||
|
||||
for (int sfi = 0; sfi < 16; sfi++) {
|
||||
/* There is a strong correlation between the scalefactors of
|
||||
|
|
@ -421,7 +409,10 @@ unsigned int qoa_encode_frame(const short *sample_data, qoa_desc *qoa, unsigned
|
|||
state when encoding. */
|
||||
qoa_lms_t lms = qoa->lms[c];
|
||||
qoa_uint64_t slice = scalefactor;
|
||||
qoa_uint64_t current_rank = 0;
|
||||
#ifdef QOA_RECORD_TOTAL_ERROR
|
||||
qoa_uint64_t current_error = 0;
|
||||
#endif
|
||||
|
||||
for (int si = slice_start; si < slice_end; si += channels) {
|
||||
int sample = sample_data[si];
|
||||
|
|
@ -434,9 +425,27 @@ unsigned int qoa_encode_frame(const short *sample_data, qoa_desc *qoa, unsigned
|
|||
int dequantized = qoa_dequant_tab[scalefactor][quantized];
|
||||
int reconstructed = qoa_clamp_s16(predicted + dequantized);
|
||||
|
||||
|
||||
/* If the weights have grown too large, we introduce a penalty
|
||||
here. This prevents pops/clicks in certain problem cases */
|
||||
int weights_penalty = ((
|
||||
lms.weights[0] * lms.weights[0] +
|
||||
lms.weights[1] * lms.weights[1] +
|
||||
lms.weights[2] * lms.weights[2] +
|
||||
lms.weights[3] * lms.weights[3]
|
||||
) >> 18) - 0x8ff;
|
||||
if (weights_penalty < 0) {
|
||||
weights_penalty = 0;
|
||||
}
|
||||
|
||||
long long error = (sample - reconstructed);
|
||||
current_error += error * error;
|
||||
if (current_error > best_error) {
|
||||
qoa_uint64_t error_sq = error * error;
|
||||
|
||||
current_rank += error_sq + weights_penalty * weights_penalty;
|
||||
#ifdef QOA_RECORD_TOTAL_ERROR
|
||||
current_error += error_sq;
|
||||
#endif
|
||||
if (current_rank > best_rank) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -444,8 +453,11 @@ unsigned int qoa_encode_frame(const short *sample_data, qoa_desc *qoa, unsigned
|
|||
slice = (slice << 3) | quantized;
|
||||
}
|
||||
|
||||
if (current_error < best_error) {
|
||||
if (current_rank < best_rank) {
|
||||
best_rank = current_rank;
|
||||
#ifdef QOA_RECORD_TOTAL_ERROR
|
||||
best_error = current_error;
|
||||
#endif
|
||||
best_slice = slice;
|
||||
best_lms = lms;
|
||||
best_scalefactor = scalefactor;
|
||||
|
|
@ -490,7 +502,7 @@ void *qoa_encode(const short *sample_data, qoa_desc *qoa, unsigned int *out_len)
|
|||
|
||||
unsigned char *bytes = QOA_MALLOC(encoded_size);
|
||||
|
||||
for (int c = 0; c < qoa->channels; c++) {
|
||||
for (unsigned int c = 0; c < qoa->channels; c++) {
|
||||
/* Set the initial LMS weights to {0, 0, -1, 2}. This helps with the
|
||||
prediction of the first few ms of a file. */
|
||||
qoa->lms[c].weights[0] = 0;
|
||||
|
|
@ -513,7 +525,7 @@ void *qoa_encode(const short *sample_data, qoa_desc *qoa, unsigned int *out_len)
|
|||
#endif
|
||||
|
||||
int frame_len = QOA_FRAME_LEN;
|
||||
for (int sample_index = 0; sample_index < qoa->samples; sample_index += frame_len) {
|
||||
for (unsigned int sample_index = 0; sample_index < qoa->samples; sample_index += frame_len) {
|
||||
frame_len = qoa_clamp(QOA_FRAME_LEN, 0, qoa->samples - sample_index);
|
||||
const short *frame_samples = sample_data + sample_index * qoa->channels;
|
||||
unsigned int frame_size = qoa_encode_frame(frame_samples, qoa, frame_len, bytes + p);
|
||||
|
|
@ -576,14 +588,14 @@ unsigned int qoa_decode_frame(const unsigned char *bytes, unsigned int size, qoa
|
|||
|
||||
/* Read and verify the frame header */
|
||||
qoa_uint64_t frame_header = qoa_read_u64(bytes, &p);
|
||||
int channels = (frame_header >> 56) & 0x0000ff;
|
||||
int samplerate = (frame_header >> 32) & 0xffffff;
|
||||
int samples = (frame_header >> 16) & 0x00ffff;
|
||||
int frame_size = (frame_header ) & 0x00ffff;
|
||||
unsigned int channels = (frame_header >> 56) & 0x0000ff;
|
||||
unsigned int samplerate = (frame_header >> 32) & 0xffffff;
|
||||
unsigned int samples = (frame_header >> 16) & 0x00ffff;
|
||||
unsigned int frame_size = (frame_header ) & 0x00ffff;
|
||||
|
||||
int data_size = frame_size - 8 - QOA_LMS_LEN * 4 * channels;
|
||||
int num_slices = data_size / 8;
|
||||
int max_total_samples = num_slices * QOA_SLICE_LEN;
|
||||
unsigned int data_size = frame_size - 8 - QOA_LMS_LEN * 4 * channels;
|
||||
unsigned int num_slices = data_size / 8;
|
||||
unsigned int max_total_samples = num_slices * QOA_SLICE_LEN;
|
||||
|
||||
if (
|
||||
channels != qoa->channels ||
|
||||
|
|
@ -596,7 +608,7 @@ unsigned int qoa_decode_frame(const unsigned char *bytes, unsigned int size, qoa
|
|||
|
||||
|
||||
/* Read the LMS state: 4 x 2 bytes history, 4 x 2 bytes weights per channel */
|
||||
for (int c = 0; c < channels; c++) {
|
||||
for (unsigned int c = 0; c < channels; c++) {
|
||||
qoa_uint64_t history = qoa_read_u64(bytes, &p);
|
||||
qoa_uint64_t weights = qoa_read_u64(bytes, &p);
|
||||
for (int i = 0; i < QOA_LMS_LEN; i++) {
|
||||
|
|
@ -609,17 +621,19 @@ unsigned int qoa_decode_frame(const unsigned char *bytes, unsigned int size, qoa
|
|||
|
||||
|
||||
/* Decode all slices for all channels in this frame */
|
||||
for (int sample_index = 0; sample_index < samples; sample_index += QOA_SLICE_LEN) {
|
||||
for (int c = 0; c < channels; c++) {
|
||||
for (unsigned int sample_index = 0; sample_index < samples; sample_index += QOA_SLICE_LEN) {
|
||||
for (unsigned int c = 0; c < channels; c++) {
|
||||
qoa_uint64_t slice = qoa_read_u64(bytes, &p);
|
||||
|
||||
int scalefactor = (slice >> 60) & 0xf;
|
||||
slice <<= 4;
|
||||
|
||||
int slice_start = sample_index * channels + c;
|
||||
int slice_end = qoa_clamp(sample_index + QOA_SLICE_LEN, 0, samples) * channels + c;
|
||||
|
||||
for (int si = slice_start; si < slice_end; si += channels) {
|
||||
int predicted = qoa_lms_predict(&qoa->lms[c]);
|
||||
int quantized = (slice >> 57) & 0x7;
|
||||
int quantized = (slice >> 61) & 0x7;
|
||||
int dequantized = qoa_dequant_tab[scalefactor][quantized];
|
||||
int reconstructed = qoa_clamp_s16(predicted + dequantized);
|
||||
|
||||
|
|
|
|||
361
src/external/stb_image.h
vendored
|
|
@ -1,4 +1,4 @@
|
|||
/* stb_image - v2.28 - public domain image loader - http://nothings.org/stb
|
||||
/* stb_image - v2.30 - public domain image loader - http://nothings.org/stb
|
||||
no warranty implied; use at your own risk
|
||||
|
||||
Do this:
|
||||
|
|
@ -48,6 +48,8 @@ LICENSE
|
|||
|
||||
RECENT REVISION HISTORY:
|
||||
|
||||
2.30 (2024-05-31) avoid erroneous gcc warning
|
||||
2.29 (2023-05-xx) optimizations
|
||||
2.28 (2023-01-29) many error fixes, security errors, just tons of stuff
|
||||
2.27 (2021-07-11) document stbi_info better, 16-bit PNM support, bug fixes
|
||||
2.26 (2020-07-13) many minor fixes
|
||||
|
|
@ -1072,8 +1074,8 @@ static int stbi__addints_valid(int a, int b)
|
|||
return a <= INT_MAX - b;
|
||||
}
|
||||
|
||||
// returns 1 if the product of two signed shorts is valid, 0 on overflow.
|
||||
static int stbi__mul2shorts_valid(short a, short b)
|
||||
// returns 1 if the product of two ints fits in a signed short, 0 on overflow.
|
||||
static int stbi__mul2shorts_valid(int a, int b)
|
||||
{
|
||||
if (b == 0 || b == -1) return 1; // multiplication by 0 is always 0; check for -1 so SHRT_MIN/b doesn't overflow
|
||||
if ((a >= 0) == (b >= 0)) return a <= SHRT_MAX/b; // product is positive, so similar to mul2sizes_valid
|
||||
|
|
@ -3384,13 +3386,13 @@ static int stbi__decode_jpeg_header(stbi__jpeg *z, int scan)
|
|||
return 1;
|
||||
}
|
||||
|
||||
static int stbi__skip_jpeg_junk_at_end(stbi__jpeg *j)
|
||||
static stbi_uc stbi__skip_jpeg_junk_at_end(stbi__jpeg *j)
|
||||
{
|
||||
// some JPEGs have junk at end, skip over it but if we find what looks
|
||||
// like a valid marker, resume there
|
||||
while (!stbi__at_eof(j->s)) {
|
||||
int x = stbi__get8(j->s);
|
||||
while (x == 255) { // might be a marker
|
||||
stbi_uc x = stbi__get8(j->s);
|
||||
while (x == 0xff) { // might be a marker
|
||||
if (stbi__at_eof(j->s)) return STBI__MARKER_none;
|
||||
x = stbi__get8(j->s);
|
||||
if (x != 0x00 && x != 0xff) {
|
||||
|
|
@ -4176,6 +4178,7 @@ typedef struct
|
|||
{
|
||||
stbi_uc *zbuffer, *zbuffer_end;
|
||||
int num_bits;
|
||||
int hit_zeof_once;
|
||||
stbi__uint32 code_buffer;
|
||||
|
||||
char *zout;
|
||||
|
|
@ -4242,10 +4245,21 @@ stbi_inline static int stbi__zhuffman_decode(stbi__zbuf *a, stbi__zhuffman *z)
|
|||
int b,s;
|
||||
if (a->num_bits < 16) {
|
||||
if (stbi__zeof(a)) {
|
||||
return -1; /* report error for unexpected end of data. */
|
||||
if (!a->hit_zeof_once) {
|
||||
// This is the first time we hit eof, insert 16 extra padding btis
|
||||
// to allow us to keep going; if we actually consume any of them
|
||||
// though, that is invalid data. This is caught later.
|
||||
a->hit_zeof_once = 1;
|
||||
a->num_bits += 16; // add 16 implicit zero bits
|
||||
} else {
|
||||
// We already inserted our extra 16 padding bits and are again
|
||||
// out, this stream is actually prematurely terminated.
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
stbi__fill_bits(a);
|
||||
}
|
||||
}
|
||||
b = z->fast[a->code_buffer & STBI__ZFAST_MASK];
|
||||
if (b) {
|
||||
s = b >> 9;
|
||||
|
|
@ -4309,6 +4323,13 @@ static int stbi__parse_huffman_block(stbi__zbuf *a)
|
|||
int len,dist;
|
||||
if (z == 256) {
|
||||
a->zout = zout;
|
||||
if (a->hit_zeof_once && a->num_bits < 16) {
|
||||
// The first time we hit zeof, we inserted 16 extra zero bits into our bit
|
||||
// buffer so the decoder can just do its speculative decoding. But if we
|
||||
// actually consumed any of those bits (which is the case when num_bits < 16),
|
||||
// the stream actually read past the end so it is malformed.
|
||||
return stbi__err("unexpected end","Corrupt PNG");
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
if (z >= 286) return stbi__err("bad huffman code","Corrupt PNG"); // per DEFLATE, length codes 286 and 287 must not appear in compressed data
|
||||
|
|
@ -4320,7 +4341,7 @@ static int stbi__parse_huffman_block(stbi__zbuf *a)
|
|||
dist = stbi__zdist_base[z];
|
||||
if (stbi__zdist_extra[z]) dist += stbi__zreceive(a, stbi__zdist_extra[z]);
|
||||
if (zout - a->zout_start < dist) return stbi__err("bad dist","Corrupt PNG");
|
||||
if (zout + len > a->zout_end) {
|
||||
if (len > a->zout_end - zout) {
|
||||
if (!stbi__zexpand(a, zout, len)) return 0;
|
||||
zout = a->zout;
|
||||
}
|
||||
|
|
@ -4464,6 +4485,7 @@ static int stbi__parse_zlib(stbi__zbuf *a, int parse_header)
|
|||
if (!stbi__parse_zlib_header(a)) return 0;
|
||||
a->num_bits = 0;
|
||||
a->code_buffer = 0;
|
||||
a->hit_zeof_once = 0;
|
||||
do {
|
||||
final = stbi__zreceive(a,1);
|
||||
type = stbi__zreceive(a,2);
|
||||
|
|
@ -4619,9 +4641,8 @@ enum {
|
|||
STBI__F_up=2,
|
||||
STBI__F_avg=3,
|
||||
STBI__F_paeth=4,
|
||||
// synthetic filters used for first scanline to avoid needing a dummy row of 0s
|
||||
STBI__F_avg_first,
|
||||
STBI__F_paeth_first
|
||||
// synthetic filter used for first scanline to avoid needing a dummy row of 0s
|
||||
STBI__F_avg_first
|
||||
};
|
||||
|
||||
static stbi_uc first_row_filter[5] =
|
||||
|
|
@ -4630,29 +4651,56 @@ static stbi_uc first_row_filter[5] =
|
|||
STBI__F_sub,
|
||||
STBI__F_none,
|
||||
STBI__F_avg_first,
|
||||
STBI__F_paeth_first
|
||||
STBI__F_sub // Paeth with b=c=0 turns out to be equivalent to sub
|
||||
};
|
||||
|
||||
static int stbi__paeth(int a, int b, int c)
|
||||
{
|
||||
int p = a + b - c;
|
||||
int pa = abs(p-a);
|
||||
int pb = abs(p-b);
|
||||
int pc = abs(p-c);
|
||||
if (pa <= pb && pa <= pc) return a;
|
||||
if (pb <= pc) return b;
|
||||
return c;
|
||||
// This formulation looks very different from the reference in the PNG spec, but is
|
||||
// actually equivalent and has favorable data dependencies and admits straightforward
|
||||
// generation of branch-free code, which helps performance significantly.
|
||||
int thresh = c*3 - (a + b);
|
||||
int lo = a < b ? a : b;
|
||||
int hi = a < b ? b : a;
|
||||
int t0 = (hi <= thresh) ? lo : c;
|
||||
int t1 = (thresh <= lo) ? hi : t0;
|
||||
return t1;
|
||||
}
|
||||
|
||||
static const stbi_uc stbi__depth_scale_table[9] = { 0, 0xff, 0x55, 0, 0x11, 0,0,0, 0x01 };
|
||||
|
||||
// adds an extra all-255 alpha channel
|
||||
// dest == src is legal
|
||||
// img_n must be 1 or 3
|
||||
static void stbi__create_png_alpha_expand8(stbi_uc *dest, stbi_uc *src, stbi__uint32 x, int img_n)
|
||||
{
|
||||
int i;
|
||||
// must process data backwards since we allow dest==src
|
||||
if (img_n == 1) {
|
||||
for (i=x-1; i >= 0; --i) {
|
||||
dest[i*2+1] = 255;
|
||||
dest[i*2+0] = src[i];
|
||||
}
|
||||
} else {
|
||||
STBI_ASSERT(img_n == 3);
|
||||
for (i=x-1; i >= 0; --i) {
|
||||
dest[i*4+3] = 255;
|
||||
dest[i*4+2] = src[i*3+2];
|
||||
dest[i*4+1] = src[i*3+1];
|
||||
dest[i*4+0] = src[i*3+0];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// create the png data from post-deflated data
|
||||
static int stbi__create_png_image_raw(stbi__png *a, stbi_uc *raw, stbi__uint32 raw_len, int out_n, stbi__uint32 x, stbi__uint32 y, int depth, int color)
|
||||
{
|
||||
int bytes = (depth == 16? 2 : 1);
|
||||
int bytes = (depth == 16 ? 2 : 1);
|
||||
stbi__context *s = a->s;
|
||||
stbi__uint32 i,j,stride = x*out_n*bytes;
|
||||
stbi__uint32 img_len, img_width_bytes;
|
||||
stbi_uc *filter_buf;
|
||||
int all_ok = 1;
|
||||
int k;
|
||||
int img_n = s->img_n; // copy it into a local for later
|
||||
|
||||
|
|
@ -4664,8 +4712,11 @@ static int stbi__create_png_image_raw(stbi__png *a, stbi_uc *raw, stbi__uint32 r
|
|||
a->out = (stbi_uc *) stbi__malloc_mad3(x, y, output_bytes, 0); // extra bytes to write off the end into
|
||||
if (!a->out) return stbi__err("outofmem", "Out of memory");
|
||||
|
||||
// note: error exits here don't need to clean up a->out individually,
|
||||
// stbi__do_png always does on error.
|
||||
if (!stbi__mad3sizes_valid(img_n, x, depth, 7)) return stbi__err("too large", "Corrupt PNG");
|
||||
img_width_bytes = (((img_n * x * depth) + 7) >> 3);
|
||||
if (!stbi__mad2sizes_valid(img_width_bytes, y, img_width_bytes)) return stbi__err("too large", "Corrupt PNG");
|
||||
img_len = (img_width_bytes + 1) * y;
|
||||
|
||||
// we used to check for exact match between raw_len and img_len on non-interlaced PNGs,
|
||||
|
|
@ -4673,188 +4724,136 @@ static int stbi__create_png_image_raw(stbi__png *a, stbi_uc *raw, stbi__uint32 r
|
|||
// so just check for raw_len < img_len always.
|
||||
if (raw_len < img_len) return stbi__err("not enough pixels","Corrupt PNG");
|
||||
|
||||
for (j=0; j < y; ++j) {
|
||||
stbi_uc *cur = a->out + stride*j;
|
||||
stbi_uc *prior;
|
||||
int filter = *raw++;
|
||||
|
||||
if (filter > 4)
|
||||
return stbi__err("invalid filter","Corrupt PNG");
|
||||
// Allocate two scan lines worth of filter workspace buffer.
|
||||
filter_buf = (stbi_uc *) stbi__malloc_mad2(img_width_bytes, 2, 0);
|
||||
if (!filter_buf) return stbi__err("outofmem", "Out of memory");
|
||||
|
||||
// Filtering for low-bit-depth images
|
||||
if (depth < 8) {
|
||||
if (img_width_bytes > x) return stbi__err("invalid width","Corrupt PNG");
|
||||
cur += x*out_n - img_width_bytes; // store output to the rightmost img_len bytes, so we can decode in place
|
||||
filter_bytes = 1;
|
||||
width = img_width_bytes;
|
||||
}
|
||||
prior = cur - stride; // bugfix: need to compute this after 'cur +=' computation above
|
||||
|
||||
for (j=0; j < y; ++j) {
|
||||
// cur/prior filter buffers alternate
|
||||
stbi_uc *cur = filter_buf + (j & 1)*img_width_bytes;
|
||||
stbi_uc *prior = filter_buf + (~j & 1)*img_width_bytes;
|
||||
stbi_uc *dest = a->out + stride*j;
|
||||
int nk = width * filter_bytes;
|
||||
int filter = *raw++;
|
||||
|
||||
// check filter type
|
||||
if (filter > 4) {
|
||||
all_ok = stbi__err("invalid filter","Corrupt PNG");
|
||||
break;
|
||||
}
|
||||
|
||||
// if first row, use special filter that doesn't sample previous row
|
||||
if (j == 0) filter = first_row_filter[filter];
|
||||
|
||||
// handle first byte explicitly
|
||||
for (k=0; k < filter_bytes; ++k) {
|
||||
// perform actual filtering
|
||||
switch (filter) {
|
||||
case STBI__F_none : cur[k] = raw[k]; break;
|
||||
case STBI__F_sub : cur[k] = raw[k]; break;
|
||||
case STBI__F_up : cur[k] = STBI__BYTECAST(raw[k] + prior[k]); break;
|
||||
case STBI__F_avg : cur[k] = STBI__BYTECAST(raw[k] + (prior[k]>>1)); break;
|
||||
case STBI__F_paeth : cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(0,prior[k],0)); break;
|
||||
case STBI__F_avg_first : cur[k] = raw[k]; break;
|
||||
case STBI__F_paeth_first: cur[k] = raw[k]; break;
|
||||
}
|
||||
case STBI__F_none:
|
||||
memcpy(cur, raw, nk);
|
||||
break;
|
||||
case STBI__F_sub:
|
||||
memcpy(cur, raw, filter_bytes);
|
||||
for (k = filter_bytes; k < nk; ++k)
|
||||
cur[k] = STBI__BYTECAST(raw[k] + cur[k-filter_bytes]);
|
||||
break;
|
||||
case STBI__F_up:
|
||||
for (k = 0; k < nk; ++k)
|
||||
cur[k] = STBI__BYTECAST(raw[k] + prior[k]);
|
||||
break;
|
||||
case STBI__F_avg:
|
||||
for (k = 0; k < filter_bytes; ++k)
|
||||
cur[k] = STBI__BYTECAST(raw[k] + (prior[k]>>1));
|
||||
for (k = filter_bytes; k < nk; ++k)
|
||||
cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k-filter_bytes])>>1));
|
||||
break;
|
||||
case STBI__F_paeth:
|
||||
for (k = 0; k < filter_bytes; ++k)
|
||||
cur[k] = STBI__BYTECAST(raw[k] + prior[k]); // prior[k] == stbi__paeth(0,prior[k],0)
|
||||
for (k = filter_bytes; k < nk; ++k)
|
||||
cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k-filter_bytes], prior[k], prior[k-filter_bytes]));
|
||||
break;
|
||||
case STBI__F_avg_first:
|
||||
memcpy(cur, raw, filter_bytes);
|
||||
for (k = filter_bytes; k < nk; ++k)
|
||||
cur[k] = STBI__BYTECAST(raw[k] + (cur[k-filter_bytes] >> 1));
|
||||
break;
|
||||
}
|
||||
|
||||
if (depth == 8) {
|
||||
if (img_n != out_n)
|
||||
cur[img_n] = 255; // first pixel
|
||||
raw += img_n;
|
||||
cur += out_n;
|
||||
prior += out_n;
|
||||
} else if (depth == 16) {
|
||||
if (img_n != out_n) {
|
||||
cur[filter_bytes] = 255; // first pixel top byte
|
||||
cur[filter_bytes+1] = 255; // first pixel bottom byte
|
||||
}
|
||||
raw += filter_bytes;
|
||||
cur += output_bytes;
|
||||
prior += output_bytes;
|
||||
} else {
|
||||
raw += 1;
|
||||
cur += 1;
|
||||
prior += 1;
|
||||
}
|
||||
|
||||
// this is a little gross, so that we don't switch per-pixel or per-component
|
||||
if (depth < 8 || img_n == out_n) {
|
||||
int nk = (width - 1)*filter_bytes;
|
||||
#define STBI__CASE(f) \
|
||||
case f: \
|
||||
for (k=0; k < nk; ++k)
|
||||
switch (filter) {
|
||||
// "none" filter turns into a memcpy here; make that explicit.
|
||||
case STBI__F_none: memcpy(cur, raw, nk); break;
|
||||
STBI__CASE(STBI__F_sub) { cur[k] = STBI__BYTECAST(raw[k] + cur[k-filter_bytes]); } break;
|
||||
STBI__CASE(STBI__F_up) { cur[k] = STBI__BYTECAST(raw[k] + prior[k]); } break;
|
||||
STBI__CASE(STBI__F_avg) { cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k-filter_bytes])>>1)); } break;
|
||||
STBI__CASE(STBI__F_paeth) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k-filter_bytes],prior[k],prior[k-filter_bytes])); } break;
|
||||
STBI__CASE(STBI__F_avg_first) { cur[k] = STBI__BYTECAST(raw[k] + (cur[k-filter_bytes] >> 1)); } break;
|
||||
STBI__CASE(STBI__F_paeth_first) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k-filter_bytes],0,0)); } break;
|
||||
}
|
||||
#undef STBI__CASE
|
||||
raw += nk;
|
||||
|
||||
// expand decoded bits in cur to dest, also adding an extra alpha channel if desired
|
||||
if (depth < 8) {
|
||||
stbi_uc scale = (color == 0) ? stbi__depth_scale_table[depth] : 1; // scale grayscale values to 0..255 range
|
||||
stbi_uc *in = cur;
|
||||
stbi_uc *out = dest;
|
||||
stbi_uc inb = 0;
|
||||
stbi__uint32 nsmp = x*img_n;
|
||||
|
||||
// expand bits to bytes first
|
||||
if (depth == 4) {
|
||||
for (i=0; i < nsmp; ++i) {
|
||||
if ((i & 1) == 0) inb = *in++;
|
||||
*out++ = scale * (inb >> 4);
|
||||
inb <<= 4;
|
||||
}
|
||||
} else if (depth == 2) {
|
||||
for (i=0; i < nsmp; ++i) {
|
||||
if ((i & 3) == 0) inb = *in++;
|
||||
*out++ = scale * (inb >> 6);
|
||||
inb <<= 2;
|
||||
}
|
||||
} else {
|
||||
STBI_ASSERT(depth == 1);
|
||||
for (i=0; i < nsmp; ++i) {
|
||||
if ((i & 7) == 0) inb = *in++;
|
||||
*out++ = scale * (inb >> 7);
|
||||
inb <<= 1;
|
||||
}
|
||||
}
|
||||
|
||||
// insert alpha=255 values if desired
|
||||
if (img_n != out_n)
|
||||
stbi__create_png_alpha_expand8(dest, dest, x, img_n);
|
||||
} else if (depth == 8) {
|
||||
if (img_n == out_n)
|
||||
memcpy(dest, cur, x*img_n);
|
||||
else
|
||||
stbi__create_png_alpha_expand8(dest, cur, x, img_n);
|
||||
} else if (depth == 16) {
|
||||
// convert the image data from big-endian to platform-native
|
||||
stbi__uint16 *dest16 = (stbi__uint16*)dest;
|
||||
stbi__uint32 nsmp = x*img_n;
|
||||
|
||||
if (img_n == out_n) {
|
||||
for (i = 0; i < nsmp; ++i, ++dest16, cur += 2)
|
||||
*dest16 = (cur[0] << 8) | cur[1];
|
||||
} else {
|
||||
STBI_ASSERT(img_n+1 == out_n);
|
||||
#define STBI__CASE(f) \
|
||||
case f: \
|
||||
for (i=x-1; i >= 1; --i, cur[filter_bytes]=255,raw+=filter_bytes,cur+=output_bytes,prior+=output_bytes) \
|
||||
for (k=0; k < filter_bytes; ++k)
|
||||
switch (filter) {
|
||||
STBI__CASE(STBI__F_none) { cur[k] = raw[k]; } break;
|
||||
STBI__CASE(STBI__F_sub) { cur[k] = STBI__BYTECAST(raw[k] + cur[k- output_bytes]); } break;
|
||||
STBI__CASE(STBI__F_up) { cur[k] = STBI__BYTECAST(raw[k] + prior[k]); } break;
|
||||
STBI__CASE(STBI__F_avg) { cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k- output_bytes])>>1)); } break;
|
||||
STBI__CASE(STBI__F_paeth) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k- output_bytes],prior[k],prior[k- output_bytes])); } break;
|
||||
STBI__CASE(STBI__F_avg_first) { cur[k] = STBI__BYTECAST(raw[k] + (cur[k- output_bytes] >> 1)); } break;
|
||||
STBI__CASE(STBI__F_paeth_first) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k- output_bytes],0,0)); } break;
|
||||
}
|
||||
#undef STBI__CASE
|
||||
|
||||
// the loop above sets the high byte of the pixels' alpha, but for
|
||||
// 16 bit png files we also need the low byte set. we'll do that here.
|
||||
if (depth == 16) {
|
||||
cur = a->out + stride*j; // start at the beginning of the row again
|
||||
for (i=0; i < x; ++i,cur+=output_bytes) {
|
||||
cur[filter_bytes+1] = 255;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// we make a separate pass to expand bits to pixels; for performance,
|
||||
// this could run two scanlines behind the above code, so it won't
|
||||
// intefere with filtering but will still be in the cache.
|
||||
if (depth < 8) {
|
||||
for (j=0; j < y; ++j) {
|
||||
stbi_uc *cur = a->out + stride*j;
|
||||
stbi_uc *in = a->out + stride*j + x*out_n - img_width_bytes;
|
||||
// unpack 1/2/4-bit into a 8-bit buffer. allows us to keep the common 8-bit path optimal at minimal cost for 1/2/4-bit
|
||||
// png guarante byte alignment, if width is not multiple of 8/4/2 we'll decode dummy trailing data that will be skipped in the later loop
|
||||
stbi_uc scale = (color == 0) ? stbi__depth_scale_table[depth] : 1; // scale grayscale values to 0..255 range
|
||||
|
||||
// note that the final byte might overshoot and write more data than desired.
|
||||
// we can allocate enough data that this never writes out of memory, but it
|
||||
// could also overwrite the next scanline. can it overwrite non-empty data
|
||||
// on the next scanline? yes, consider 1-pixel-wide scanlines with 1-bit-per-pixel.
|
||||
// so we need to explicitly clamp the final ones
|
||||
|
||||
if (depth == 4) {
|
||||
for (k=x*img_n; k >= 2; k-=2, ++in) {
|
||||
*cur++ = scale * ((*in >> 4) );
|
||||
*cur++ = scale * ((*in ) & 0x0f);
|
||||
}
|
||||
if (k > 0) *cur++ = scale * ((*in >> 4) );
|
||||
} else if (depth == 2) {
|
||||
for (k=x*img_n; k >= 4; k-=4, ++in) {
|
||||
*cur++ = scale * ((*in >> 6) );
|
||||
*cur++ = scale * ((*in >> 4) & 0x03);
|
||||
*cur++ = scale * ((*in >> 2) & 0x03);
|
||||
*cur++ = scale * ((*in ) & 0x03);
|
||||
}
|
||||
if (k > 0) *cur++ = scale * ((*in >> 6) );
|
||||
if (k > 1) *cur++ = scale * ((*in >> 4) & 0x03);
|
||||
if (k > 2) *cur++ = scale * ((*in >> 2) & 0x03);
|
||||
} else if (depth == 1) {
|
||||
for (k=x*img_n; k >= 8; k-=8, ++in) {
|
||||
*cur++ = scale * ((*in >> 7) );
|
||||
*cur++ = scale * ((*in >> 6) & 0x01);
|
||||
*cur++ = scale * ((*in >> 5) & 0x01);
|
||||
*cur++ = scale * ((*in >> 4) & 0x01);
|
||||
*cur++ = scale * ((*in >> 3) & 0x01);
|
||||
*cur++ = scale * ((*in >> 2) & 0x01);
|
||||
*cur++ = scale * ((*in >> 1) & 0x01);
|
||||
*cur++ = scale * ((*in ) & 0x01);
|
||||
}
|
||||
if (k > 0) *cur++ = scale * ((*in >> 7) );
|
||||
if (k > 1) *cur++ = scale * ((*in >> 6) & 0x01);
|
||||
if (k > 2) *cur++ = scale * ((*in >> 5) & 0x01);
|
||||
if (k > 3) *cur++ = scale * ((*in >> 4) & 0x01);
|
||||
if (k > 4) *cur++ = scale * ((*in >> 3) & 0x01);
|
||||
if (k > 5) *cur++ = scale * ((*in >> 2) & 0x01);
|
||||
if (k > 6) *cur++ = scale * ((*in >> 1) & 0x01);
|
||||
}
|
||||
if (img_n != out_n) {
|
||||
int q;
|
||||
// insert alpha = 255
|
||||
cur = a->out + stride*j;
|
||||
if (img_n == 1) {
|
||||
for (q=x-1; q >= 0; --q) {
|
||||
cur[q*2+1] = 255;
|
||||
cur[q*2+0] = cur[q];
|
||||
for (i = 0; i < x; ++i, dest16 += 2, cur += 2) {
|
||||
dest16[0] = (cur[0] << 8) | cur[1];
|
||||
dest16[1] = 0xffff;
|
||||
}
|
||||
} else {
|
||||
STBI_ASSERT(img_n == 3);
|
||||
for (q=x-1; q >= 0; --q) {
|
||||
cur[q*4+3] = 255;
|
||||
cur[q*4+2] = cur[q*3+2];
|
||||
cur[q*4+1] = cur[q*3+1];
|
||||
cur[q*4+0] = cur[q*3+0];
|
||||
for (i = 0; i < x; ++i, dest16 += 4, cur += 6) {
|
||||
dest16[0] = (cur[0] << 8) | cur[1];
|
||||
dest16[1] = (cur[2] << 8) | cur[3];
|
||||
dest16[2] = (cur[4] << 8) | cur[5];
|
||||
dest16[3] = 0xffff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (depth == 16) {
|
||||
// force the image data from big-endian to platform-native.
|
||||
// this is done in a separate pass due to the decoding relying
|
||||
// on the data being untouched, but could probably be done
|
||||
// per-line during decode if care is taken.
|
||||
stbi_uc *cur = a->out;
|
||||
stbi__uint16 *cur16 = (stbi__uint16*)cur;
|
||||
|
||||
for(i=0; i < x*y*out_n; ++i,cur16++,cur+=2) {
|
||||
*cur16 = (cur[0] << 8) | cur[1];
|
||||
}
|
||||
}
|
||||
STBI_FREE(filter_buf);
|
||||
if (!all_ok) return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -5161,9 +5160,11 @@ static int stbi__parse_png_file(stbi__png *z, int scan, int req_comp)
|
|||
// non-paletted with tRNS = constant alpha. if header-scanning, we can stop now.
|
||||
if (scan == STBI__SCAN_header) { ++s->img_n; return 1; }
|
||||
if (z->depth == 16) {
|
||||
for (k = 0; k < s->img_n; ++k) tc16[k] = (stbi__uint16)stbi__get16be(s); // copy the values as-is
|
||||
for (k = 0; k < s->img_n && k < 3; ++k) // extra loop test to suppress false GCC warning
|
||||
tc16[k] = (stbi__uint16)stbi__get16be(s); // copy the values as-is
|
||||
} else {
|
||||
for (k = 0; k < s->img_n; ++k) tc[k] = (stbi_uc)(stbi__get16be(s) & 255) * stbi__depth_scale_table[z->depth]; // non 8-bit images will be larger
|
||||
for (k = 0; k < s->img_n && k < 3; ++k)
|
||||
tc[k] = (stbi_uc)(stbi__get16be(s) & 255) * stbi__depth_scale_table[z->depth]; // non 8-bit images will be larger
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
105
src/external/stb_image_resize2.h
vendored
|
|
@ -1,4 +1,4 @@
|
|||
/* stb_image_resize2 - v2.10 - public domain image resizing
|
||||
/* stb_image_resize2 - v2.12 - public domain image resizing
|
||||
|
||||
by Jeff Roberts (v2) and Jorge L Rodriguez
|
||||
http://github.com/nothings/stb
|
||||
|
|
@ -11,35 +11,6 @@
|
|||
#define STB_IMAGE_RESIZE_IMPLEMENTATION
|
||||
before the #include. That will create the implementation in that file.
|
||||
|
||||
PORTING FROM VERSION 1
|
||||
|
||||
The API has changed. You can continue to use the old version of stb_image_resize.h,
|
||||
which is available in the "deprecated/" directory.
|
||||
|
||||
If you're using the old simple-to-use API, porting is straightforward.
|
||||
(For more advanced APIs, read the documentation.)
|
||||
|
||||
stbir_resize_uint8():
|
||||
- call `stbir_resize_uint8_linear`, cast channel count to `stbir_pixel_layout`
|
||||
|
||||
stbir_resize_float():
|
||||
- call `stbir_resize_float_linear`, cast channel count to `stbir_pixel_layout`
|
||||
|
||||
stbir_resize_uint8_srgb():
|
||||
- function name is unchanged
|
||||
- cast channel count to `stbir_pixel_layout`
|
||||
- above is sufficient unless your image has alpha and it's not RGBA/BGRA
|
||||
- in that case, follow the below instructions for stbir_resize_uint8_srgb_edgemode
|
||||
|
||||
stbir_resize_uint8_srgb_edgemode()
|
||||
- switch to the "medium complexity" API
|
||||
- stbir_resize(), very similar API but a few more parameters:
|
||||
- pixel_layout: cast channel count to `stbir_pixel_layout`
|
||||
- data_type: STBIR_TYPE_UINT8_SRGB
|
||||
- edge: unchanged (STBIR_EDGE_WRAP, etc.)
|
||||
- filter: STBIR_FILTER_DEFAULT
|
||||
- which channel is alpha is specified in stbir_pixel_layout, see enum for details
|
||||
|
||||
EASY API CALLS:
|
||||
Easy API downsamples w/Mitchell filter, upsamples w/cubic interpolation, clamps to edge.
|
||||
|
||||
|
|
@ -296,6 +267,34 @@
|
|||
ASSERT
|
||||
Define STBIR_ASSERT(boolval) to override assert() and not use assert.h
|
||||
|
||||
PORTING FROM VERSION 1
|
||||
The API has changed. You can continue to use the old version of stb_image_resize.h,
|
||||
which is available in the "deprecated/" directory.
|
||||
|
||||
If you're using the old simple-to-use API, porting is straightforward.
|
||||
(For more advanced APIs, read the documentation.)
|
||||
|
||||
stbir_resize_uint8():
|
||||
- call `stbir_resize_uint8_linear`, cast channel count to `stbir_pixel_layout`
|
||||
|
||||
stbir_resize_float():
|
||||
- call `stbir_resize_float_linear`, cast channel count to `stbir_pixel_layout`
|
||||
|
||||
stbir_resize_uint8_srgb():
|
||||
- function name is unchanged
|
||||
- cast channel count to `stbir_pixel_layout`
|
||||
- above is sufficient unless your image has alpha and it's not RGBA/BGRA
|
||||
- in that case, follow the below instructions for stbir_resize_uint8_srgb_edgemode
|
||||
|
||||
stbir_resize_uint8_srgb_edgemode()
|
||||
- switch to the "medium complexity" API
|
||||
- stbir_resize(), very similar API but a few more parameters:
|
||||
- pixel_layout: cast channel count to `stbir_pixel_layout`
|
||||
- data_type: STBIR_TYPE_UINT8_SRGB
|
||||
- edge: unchanged (STBIR_EDGE_WRAP, etc.)
|
||||
- filter: STBIR_FILTER_DEFAULT
|
||||
- which channel is alpha is specified in stbir_pixel_layout, see enum for details
|
||||
|
||||
FUTURE TODOS
|
||||
* For polyphase integral filters, we just memcpy the coeffs to dupe
|
||||
them, but we should indirect and use the same coeff memory.
|
||||
|
|
@ -328,6 +327,10 @@
|
|||
Nathan Reed: warning fixes for 1.0
|
||||
|
||||
REVISIONS
|
||||
2.12 (2024-10-18) fix incorrect use of user_data with STBIR_FREE
|
||||
2.11 (2024-09-08) fix harmless asan warnings in 2-channel and 3-channel mode
|
||||
with AVX-2, fix some weird scaling edge conditions with
|
||||
point sample mode.
|
||||
2.10 (2024-07-27) fix the defines GCC and mingw for loop unroll control,
|
||||
fix MSVC 32-bit arm half float routines.
|
||||
2.09 (2024-06-19) fix the defines for 32-bit ARM GCC builds (was selecting
|
||||
|
|
@ -3247,6 +3250,7 @@ static void stbir__calculate_in_pixel_range( int * first_pixel, int * last_pixel
|
|||
|
||||
first = (int)(STBIR_FLOORF(in_pixel_influence_lowerbound + 0.5f));
|
||||
last = (int)(STBIR_FLOORF(in_pixel_influence_upperbound - 0.5f));
|
||||
if ( last < first ) last = first; // point sample mode can span a value *right* at 0.5, and cause these to cross
|
||||
|
||||
if ( edge == STBIR_EDGE_WRAP )
|
||||
{
|
||||
|
|
@ -3282,6 +3286,11 @@ static void stbir__calculate_coefficients_for_gather_upsample( float out_filter_
|
|||
|
||||
stbir__calculate_in_pixel_range( &in_first_pixel, &in_last_pixel, out_pixel_center, out_filter_radius, inv_scale, out_shift, input_size, edge );
|
||||
|
||||
// make sure we never generate a range larger than our precalculated coeff width
|
||||
// this only happens in point sample mode, but it's a good safe thing to do anyway
|
||||
if ( ( in_last_pixel - in_first_pixel + 1 ) > coefficient_width )
|
||||
in_last_pixel = in_first_pixel + coefficient_width - 1;
|
||||
|
||||
last_non_zero = -1;
|
||||
for (i = 0; i <= in_last_pixel - in_first_pixel; i++)
|
||||
{
|
||||
|
|
@ -3317,11 +3326,13 @@ static void stbir__calculate_coefficients_for_gather_upsample( float out_filter_
|
|||
}
|
||||
}
|
||||
|
||||
static void stbir__insert_coeff( stbir__contributors * contribs, float * coeffs, int new_pixel, float new_coeff )
|
||||
static void stbir__insert_coeff( stbir__contributors * contribs, float * coeffs, int new_pixel, float new_coeff, int max_width )
|
||||
{
|
||||
if ( new_pixel <= contribs->n1 ) // before the end
|
||||
{
|
||||
if ( new_pixel < contribs->n0 ) // before the front?
|
||||
{
|
||||
if ( ( contribs->n1 - new_pixel + 1 ) <= max_width )
|
||||
{
|
||||
int j, o = contribs->n0 - new_pixel;
|
||||
for ( j = contribs->n1 - contribs->n0 ; j <= 0 ; j-- )
|
||||
|
|
@ -3331,12 +3342,15 @@ static void stbir__insert_coeff( stbir__contributors * contribs, float * coeffs,
|
|||
coeffs[ 0 ] = new_coeff;
|
||||
contribs->n0 = new_pixel;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
coeffs[ new_pixel - contribs->n0 ] += new_coeff;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( ( new_pixel - contribs->n0 + 1 ) <= max_width )
|
||||
{
|
||||
int j, e = new_pixel - contribs->n0;
|
||||
for( j = ( contribs->n1 - contribs->n0 ) + 1 ; j < e ; j++ ) // clear in-betweens coeffs if there are any
|
||||
|
|
@ -3345,6 +3359,7 @@ static void stbir__insert_coeff( stbir__contributors * contribs, float * coeffs,
|
|||
coeffs[ e ] = new_coeff;
|
||||
contribs->n1 = new_pixel;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void stbir__calculate_out_pixel_range( int * first_pixel, int * last_pixel, float in_pixel_center, float in_pixels_radius, float scale, float out_shift, int out_size )
|
||||
|
|
@ -3522,6 +3537,7 @@ static void stbir__cleanup_gathered_coefficients( stbir_edge edge, stbir__filter
|
|||
|
||||
coeffs = coefficient_group;
|
||||
contribs = contributors;
|
||||
|
||||
for (n = 0; n < num_contributors; n++)
|
||||
{
|
||||
int i;
|
||||
|
|
@ -3561,7 +3577,7 @@ static void stbir__cleanup_gathered_coefficients( stbir_edge edge, stbir__filter
|
|||
int endi = contribs->n1;
|
||||
contribs->n1 = input_last_n1;
|
||||
for( i = input_size; i <= endi; i++ )
|
||||
stbir__insert_coeff( contribs, coeffs, stbir__edge_wrap_slow[edge]( i, input_size ), coeffs[i-start] );
|
||||
stbir__insert_coeff( contribs, coeffs, stbir__edge_wrap_slow[edge]( i, input_size ), coeffs[i-start], coefficient_width );
|
||||
}
|
||||
|
||||
// now check left hand edge
|
||||
|
|
@ -3573,7 +3589,7 @@ static void stbir__cleanup_gathered_coefficients( stbir_edge edge, stbir__filter
|
|||
|
||||
// reinsert the coeffs with it reflected or clamped (insert accumulates, if the coeffs exist)
|
||||
for( i = -1 ; i > contribs->n0 ; i-- )
|
||||
stbir__insert_coeff( contribs, coeffs, stbir__edge_wrap_slow[edge]( i, input_size ), *c-- );
|
||||
stbir__insert_coeff( contribs, coeffs, stbir__edge_wrap_slow[edge]( i, input_size ), *c--, coefficient_width );
|
||||
save_n0 = contribs->n0;
|
||||
save_n0_coeff = c[0]; // save it, since we didn't do the final one (i==n0), because there might be too many coeffs to hold (before we resize)!
|
||||
|
||||
|
|
@ -3583,7 +3599,7 @@ static void stbir__cleanup_gathered_coefficients( stbir_edge edge, stbir__filter
|
|||
coeffs[i] = coeffs[i-save_n0];
|
||||
|
||||
// now that we have shrunk down the contribs, we insert the first one safely
|
||||
stbir__insert_coeff( contribs, coeffs, stbir__edge_wrap_slow[edge]( save_n0, input_size ), save_n0_coeff );
|
||||
stbir__insert_coeff( contribs, coeffs, stbir__edge_wrap_slow[edge]( save_n0, input_size ), save_n0_coeff, coefficient_width );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3592,6 +3608,7 @@ static void stbir__cleanup_gathered_coefficients( stbir_edge edge, stbir__filter
|
|||
int diff = contribs->n1 - contribs->n0 + 1;
|
||||
while ( diff && ( coeffs[ diff-1 ] == 0.0f ) )
|
||||
--diff;
|
||||
|
||||
contribs->n1 = contribs->n0 + diff - 1;
|
||||
|
||||
if ( contribs->n0 <= contribs->n1 )
|
||||
|
|
@ -3964,7 +3981,7 @@ static void stbir__calculate_filters( stbir__sampler * samp, stbir__sampler * ot
|
|||
}
|
||||
else
|
||||
{
|
||||
stbir__insert_coeff( scatter_contributors, scatter_coeffs, n, gc );
|
||||
stbir__insert_coeff( scatter_contributors, scatter_coeffs, n, gc, scatter_coefficient_width );
|
||||
}
|
||||
STBIR_ASSERT( ( scatter_contributors->n1 - scatter_contributors->n0 + 1 ) <= scatter_coefficient_width );
|
||||
}
|
||||
|
|
@ -4810,10 +4827,11 @@ static void stbir__decode_scanline(stbir__info const * stbir_info, int n, float
|
|||
stbir__simdf8_madd_mem( tot0, tot0, c, decode+(ofs)*2 );
|
||||
|
||||
#define stbir__1_coeff_remnant( ofs ) \
|
||||
{ stbir__simdf t; \
|
||||
{ stbir__simdf t,d; \
|
||||
stbir__simdf_load1z( t, hc + (ofs) ); \
|
||||
stbir__simdf_load2( d, decode + (ofs) * 2 ); \
|
||||
stbir__simdf_0123to0011( t, t ); \
|
||||
stbir__simdf_mult_mem( t, t, decode+(ofs)*2 ); \
|
||||
stbir__simdf_mult( t, t, d ); \
|
||||
stbir__simdf8_add4( tot0, tot0, t ); }
|
||||
|
||||
#define stbir__2_coeff_remnant( ofs ) \
|
||||
|
|
@ -6714,7 +6732,7 @@ static void stbir__free_internal_mem( stbir__info *info )
|
|||
STBIR__FREE_AND_CLEAR( info->horizontal.coefficients );
|
||||
STBIR__FREE_AND_CLEAR( info->horizontal.contributors );
|
||||
STBIR__FREE_AND_CLEAR( info->alloced_mem );
|
||||
STBIR__FREE_AND_CLEAR( info );
|
||||
STBIR_FREE( info, info->user_data );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
@ -7112,6 +7130,11 @@ static stbir__info * stbir__alloc_internal_mem_and_build_samplers( stbir__sample
|
|||
|
||||
#ifdef STBIR__SEPARATE_ALLOCATIONS
|
||||
temp_mem_amt = decode_buffer_size;
|
||||
|
||||
#ifdef STBIR_SIMD8
|
||||
if ( effective_channels == 3 )
|
||||
--temp_mem_amt; // avx in 3 channel mode needs one float at the start of the buffer
|
||||
#endif
|
||||
#else
|
||||
temp_mem_amt = ( decode_buffer_size + ring_buffer_size + vertical_buffer_size ) * splits;
|
||||
#endif
|
||||
|
|
@ -7217,6 +7240,12 @@ static stbir__info * stbir__alloc_internal_mem_and_build_samplers( stbir__sample
|
|||
int t, ofs, start;
|
||||
|
||||
ofs = decode_buffer_size / 4;
|
||||
|
||||
#if defined( STBIR__SEPARATE_ALLOCATIONS ) && defined(STBIR_SIMD8)
|
||||
if ( effective_channels == 3 )
|
||||
--ofs; // avx in 3 channel mode needs one float at the start of the buffer, so we snap back for clearing
|
||||
#endif
|
||||
|
||||
start = ofs - 4;
|
||||
if ( start < 0 ) start = 0;
|
||||
|
||||
|
|
|
|||
14
src/external/stb_truetype.h
vendored
|
|
@ -54,7 +54,7 @@
|
|||
// Hou Qiming Derek Vinyard
|
||||
// Rob Loach Cort Stratton
|
||||
// Kenney Phillis Jr. Brian Costabile
|
||||
// Ken Voskuil (kaesve)
|
||||
// Ken Voskuil (kaesve) Yakov Galka
|
||||
//
|
||||
// VERSION HISTORY
|
||||
//
|
||||
|
|
@ -4604,6 +4604,8 @@ STBTT_DEF unsigned char * stbtt_GetGlyphSDF(const stbtt_fontinfo *info, float sc
|
|||
scale_y = -scale_y;
|
||||
|
||||
{
|
||||
// distance from singular values (in the same units as the pixel grid)
|
||||
const float eps = 1./1024, eps2 = eps*eps;
|
||||
int x,y,i,j;
|
||||
float *precompute;
|
||||
stbtt_vertex *verts;
|
||||
|
|
@ -4616,15 +4618,15 @@ STBTT_DEF unsigned char * stbtt_GetGlyphSDF(const stbtt_fontinfo *info, float sc
|
|||
float x0 = verts[i].x*scale_x, y0 = verts[i].y*scale_y;
|
||||
float x1 = verts[j].x*scale_x, y1 = verts[j].y*scale_y;
|
||||
float dist = (float) STBTT_sqrt((x1-x0)*(x1-x0) + (y1-y0)*(y1-y0));
|
||||
precompute[i] = (dist == 0) ? 0.0f : 1.0f / dist;
|
||||
precompute[i] = (dist < eps) ? 0.0f : 1.0f / dist;
|
||||
} else if (verts[i].type == STBTT_vcurve) {
|
||||
float x2 = verts[j].x *scale_x, y2 = verts[j].y *scale_y;
|
||||
float x1 = verts[i].cx*scale_x, y1 = verts[i].cy*scale_y;
|
||||
float x0 = verts[i].x *scale_x, y0 = verts[i].y *scale_y;
|
||||
float bx = x0 - 2*x1 + x2, by = y0 - 2*y1 + y2;
|
||||
float len2 = bx*bx + by*by;
|
||||
if (len2 != 0.0f)
|
||||
precompute[i] = 1.0f / (bx*bx + by*by);
|
||||
if (len2 >= eps2)
|
||||
precompute[i] = 1.0f / len2;
|
||||
else
|
||||
precompute[i] = 0.0f;
|
||||
} else
|
||||
|
|
@ -4689,8 +4691,8 @@ STBTT_DEF unsigned char * stbtt_GetGlyphSDF(const stbtt_fontinfo *info, float sc
|
|||
float a = 3*(ax*bx + ay*by);
|
||||
float b = 2*(ax*ax + ay*ay) + (mx*bx+my*by);
|
||||
float c = mx*ax+my*ay;
|
||||
if (a == 0.0) { // if a is 0, it's linear
|
||||
if (b != 0.0) {
|
||||
if (STBTT_fabs(a) < eps2) { // if a is 0, it's linear
|
||||
if (STBTT_fabs(b) >= eps2) {
|
||||
res[num++] = -c/b;
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
374
src/external/win32_clipboard.h
vendored
Normal file
|
|
@ -0,0 +1,374 @@
|
|||
#if !defined(_WIN32)
|
||||
# error "This module is only made for Windows OS"
|
||||
#endif
|
||||
|
||||
#ifndef WIN32_CLIPBOARD_
|
||||
#define WIN32_CLIPBOARD_
|
||||
unsigned char* Win32GetClipboardImageData(int* width, int* height, unsigned long long int *dataSize);
|
||||
#endif // WIN32_CLIPBOARD_
|
||||
|
||||
#ifdef WIN32_CLIPBOARD_IMPLEMENTATION
|
||||
#include <stdio.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
|
||||
// NOTE: These search for architecture is taken from "Windows.h", and it's necessary if we really don't wanna import windows.h
|
||||
// and still make it compile on msvc, because import indirectly importing "winnt.h" (e.g. <minwindef.h>) can cause problems is these are not defined.
|
||||
#if !defined(_X86_) && !defined(_68K_) && !defined(_MPPC_) && !defined(_IA64_) && !defined(_AMD64_) && !defined(_ARM_) && !defined(_ARM64_) && !defined(_ARM64EC_) && defined(_M_IX86)
|
||||
#define _X86_
|
||||
#if !defined(_CHPE_X86_ARM64_) && defined(_M_HYBRID)
|
||||
#define _CHPE_X86_ARM64_
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(_AMD64_) && !defined(_68K_) && !defined(_MPPC_) && !defined(_X86_) && !defined(_IA64_) && !defined(_AMD64_) && !defined(_ARM_) && !defined(_ARM64_) && (defined(_M_AMD64) || defined(_M_ARM64EC))
|
||||
#define _AMD64_
|
||||
#endif
|
||||
|
||||
#if !defined(_ARM_) && !defined(_68K_) && !defined(_MPPC_) && !defined(_X86_) && !defined(_IA64_) && !defined(_AMD64_) && !defined(_ARM64_) && !defined(_ARM64EC_) && defined(_M_ARM)
|
||||
#define _ARM_
|
||||
#endif
|
||||
|
||||
#if !defined(_ARM64_) && !defined(_68K_) && !defined(_MPPC_) && !defined(_X86_) && !defined(_IA64_) && !defined(_AMD64_) && !defined(_ARM_) && !defined(_ARM64EC_) && defined(_M_ARM64)
|
||||
#define _ARM64_
|
||||
#endif
|
||||
|
||||
#if !defined(_68K_) && !defined(_MPPC_) && !defined(_X86_) && !defined(_IA64_) && !defined(_ARM_) && !defined(_ARM64_) && !defined(_ARM64EC_) && defined(_M_ARM64EC)
|
||||
#define _ARM64EC_
|
||||
#endif
|
||||
|
||||
#if !defined(_68K_) && !defined(_MPPC_) && !defined(_X86_) && !defined(_IA64_) && !defined(_AMD64_) && !defined(_ARM_) && !defined(_ARM64_) && !defined(_ARM64EC_) && defined(_M_M68K)
|
||||
#define _68K_
|
||||
#endif
|
||||
|
||||
#if !defined(_68K_) && !defined(_MPPC_) && !defined(_X86_) && !defined(_IA64_) && !defined(_AMD64_) && !defined(_ARM_) && !defined(_ARM64_) && !defined(_ARM64EC_) && defined(_M_MPPC)
|
||||
#define _MPPC_
|
||||
#endif
|
||||
|
||||
#if !defined(_IA64_) && !defined(_68K_) && !defined(_MPPC_) && !defined(_X86_) && !defined(_M_IX86) && !defined(_AMD64_) && !defined(_ARM_) && !defined(_ARM64_) && !defined(_ARM64EC_) && defined(_M_IA64)
|
||||
#define _IA64_
|
||||
#endif
|
||||
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
// #include <sdkddkver.h>
|
||||
// #include <windows.h>
|
||||
// #include <winuser.h>
|
||||
#include <minwindef.h>
|
||||
// #include <minwinbase.h>
|
||||
|
||||
#ifndef WINAPI
|
||||
#if defined(_ARM_)
|
||||
#define WINAPI
|
||||
#else
|
||||
#define WINAPI __stdcall
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef WINAPI
|
||||
#if defined(_ARM_)
|
||||
#define WINAPI
|
||||
#else
|
||||
#define WINAPI __stdcall
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef WINBASEAPI
|
||||
#ifndef _KERNEL32_
|
||||
#define WINBASEAPI DECLSPEC_IMPORT
|
||||
#else
|
||||
#define WINBASEAPI
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef WINUSERAPI
|
||||
#ifndef _USER32_
|
||||
#define WINUSERAPI __declspec (dllimport)
|
||||
#else
|
||||
#define WINUSERAPI
|
||||
#endif
|
||||
#endif
|
||||
|
||||
typedef int WINBOOL;
|
||||
|
||||
|
||||
|
||||
// typedef HANDLE HGLOBAL;
|
||||
|
||||
#ifndef HWND
|
||||
#define HWND void*
|
||||
#endif
|
||||
|
||||
|
||||
#if !defined(_WINUSER_) || !defined(WINUSER_ALREADY_INCLUDED)
|
||||
WINUSERAPI WINBOOL WINAPI OpenClipboard(HWND hWndNewOwner);
|
||||
WINUSERAPI WINBOOL WINAPI CloseClipboard(VOID);
|
||||
WINUSERAPI DWORD WINAPI GetClipboardSequenceNumber(VOID);
|
||||
WINUSERAPI HWND WINAPI GetClipboardOwner(VOID);
|
||||
WINUSERAPI HWND WINAPI SetClipboardViewer(HWND hWndNewViewer);
|
||||
WINUSERAPI HWND WINAPI GetClipboardViewer(VOID);
|
||||
WINUSERAPI WINBOOL WINAPI ChangeClipboardChain(HWND hWndRemove, HWND hWndNewNext);
|
||||
WINUSERAPI HANDLE WINAPI SetClipboardData(UINT uFormat, HANDLE hMem);
|
||||
WINUSERAPI HANDLE WINAPI GetClipboardData(UINT uFormat);
|
||||
WINUSERAPI UINT WINAPI RegisterClipboardFormatA(LPCSTR lpszFormat);
|
||||
WINUSERAPI UINT WINAPI RegisterClipboardFormatW(LPCWSTR lpszFormat);
|
||||
WINUSERAPI int WINAPI CountClipboardFormats(VOID);
|
||||
WINUSERAPI UINT WINAPI EnumClipboardFormats(UINT format);
|
||||
WINUSERAPI int WINAPI GetClipboardFormatNameA(UINT format, LPSTR lpszFormatName, int cchMaxCount);
|
||||
WINUSERAPI int WINAPI GetClipboardFormatNameW(UINT format, LPWSTR lpszFormatName, int cchMaxCount);
|
||||
WINUSERAPI WINBOOL WINAPI EmptyClipboard(VOID);
|
||||
WINUSERAPI WINBOOL WINAPI IsClipboardFormatAvailable(UINT format);
|
||||
WINUSERAPI int WINAPI GetPriorityClipboardFormat(UINT *paFormatPriorityList, int cFormats);
|
||||
WINUSERAPI HWND WINAPI GetOpenClipboardWindow(VOID);
|
||||
#endif
|
||||
|
||||
#ifndef HGLOBAL
|
||||
#define HGLOBAL void*
|
||||
#endif
|
||||
|
||||
#if !defined(_WINBASE_) || !defined(WINBASE_ALREADY_INCLUDED)
|
||||
WINBASEAPI SIZE_T WINAPI GlobalSize (HGLOBAL hMem);
|
||||
WINBASEAPI LPVOID WINAPI GlobalLock (HGLOBAL hMem);
|
||||
WINBASEAPI WINBOOL WINAPI GlobalUnlock (HGLOBAL hMem);
|
||||
#endif
|
||||
|
||||
|
||||
#if !defined(_WINGDI_) || !defined(WINGDI_ALREADY_INCLUDED)
|
||||
#ifndef BITMAPINFOHEADER_ALREADY_DEFINED
|
||||
#define BITMAPINFOHEADER_ALREADY_DEFINED
|
||||
// Does this header need to be packed ? by the windowps header it doesnt seem to be
|
||||
#pragma pack(push, 1)
|
||||
typedef struct tagBITMAPINFOHEADER {
|
||||
DWORD biSize;
|
||||
LONG biWidth;
|
||||
LONG biHeight;
|
||||
WORD biPlanes;
|
||||
WORD biBitCount;
|
||||
DWORD biCompression;
|
||||
DWORD biSizeImage;
|
||||
LONG biXPelsPerMeter;
|
||||
LONG biYPelsPerMeter;
|
||||
DWORD biClrUsed;
|
||||
DWORD biClrImportant;
|
||||
} BITMAPINFOHEADER,*LPBITMAPINFOHEADER,*PBITMAPINFOHEADER;
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifndef BITMAPFILEHEADER_ALREADY_DEFINED
|
||||
#define BITMAPFILEHEADER_ALREADY_DEFINED
|
||||
#pragma pack(push, 1)
|
||||
typedef struct tagBITMAPFILEHEADER {
|
||||
WORD bfType;
|
||||
DWORD bfSize;
|
||||
WORD bfReserved1;
|
||||
WORD bfReserved2;
|
||||
DWORD bfOffBits;
|
||||
} BITMAPFILEHEADER,*LPBITMAPFILEHEADER,*PBITMAPFILEHEADER;
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifndef RGBQUAD_ALREADY_DEFINED
|
||||
#define RGBQUAD_ALREADY_DEFINED
|
||||
typedef struct tagRGBQUAD {
|
||||
BYTE rgbBlue;
|
||||
BYTE rgbGreen;
|
||||
BYTE rgbRed;
|
||||
BYTE rgbReserved;
|
||||
} RGBQUAD, *LPRGBQUAD;
|
||||
#endif
|
||||
|
||||
|
||||
// https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-wmf/4e588f70-bd92-4a6f-b77f-35d0feaf7a57
|
||||
#define BI_RGB 0x0000
|
||||
#define BI_RLE8 0x0001
|
||||
#define BI_RLE4 0x0002
|
||||
#define BI_BITFIELDS 0x0003
|
||||
#define BI_JPEG 0x0004
|
||||
#define BI_PNG 0x0005
|
||||
#define BI_CMYK 0x000B
|
||||
#define BI_CMYKRLE8 0x000C
|
||||
#define BI_CMYKRLE4 0x000D
|
||||
|
||||
#endif
|
||||
|
||||
// https://learn.microsoft.com/en-us/windows/win32/dataxchg/standard-clipboard-formats
|
||||
#define CF_DIB 8
|
||||
|
||||
// https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setsystemcursor
|
||||
// #define OCR_NORMAL 32512 // Normal select
|
||||
// #define OCR_IBEAM 32513 // Text select
|
||||
// #define OCR_WAIT 32514 // Busy
|
||||
// #define OCR_CROSS 32515 // Precision select
|
||||
// #define OCR_UP 32516 // Alternate select
|
||||
// #define OCR_SIZENWSE 32642 // Diagonal resize 1
|
||||
// #define OCR_SIZENESW 32643 // Diagonal resize 2
|
||||
// #define OCR_SIZEWE 32644 // Horizontal resize
|
||||
// #define OCR_SIZENS 32645 // Vertical resize
|
||||
// #define OCR_SIZEALL 32646 // Move
|
||||
// #define OCR_NO 32648 // Unavailable
|
||||
// #define OCR_HAND 32649 // Link select
|
||||
// #define OCR_APPSTARTING 32650 //
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------
|
||||
// Module Internal Functions Declaration
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
|
||||
static BOOL OpenClipboardRetrying(HWND handle); // Open clipboard with a number of retries
|
||||
static int GetPixelDataOffset(BITMAPINFOHEADER bih);
|
||||
|
||||
unsigned char* Win32GetClipboardImageData(int* width, int* height, unsigned long long int *dataSize)
|
||||
{
|
||||
HWND win = NULL; // Get from somewhere but is doesnt seem to matter
|
||||
const char* msgString = "";
|
||||
int severity = LOG_INFO;
|
||||
BYTE* bmpData = NULL;
|
||||
if (!OpenClipboardRetrying(win)) {
|
||||
severity = LOG_ERROR;
|
||||
msgString = "Couldn't open clipboard";
|
||||
goto end;
|
||||
}
|
||||
|
||||
HGLOBAL clipHandle = (HGLOBAL)GetClipboardData(CF_DIB);
|
||||
if (!clipHandle) {
|
||||
severity = LOG_ERROR;
|
||||
msgString = "Clipboard data is not an Image";
|
||||
goto close;
|
||||
}
|
||||
|
||||
BITMAPINFOHEADER *bmpInfoHeader = (BITMAPINFOHEADER *)GlobalLock(clipHandle);
|
||||
if (!bmpInfoHeader) {
|
||||
// Mapping from HGLOBAL to our local *address space* failed
|
||||
severity = LOG_ERROR;
|
||||
msgString = "Clipboard data failed to be locked";
|
||||
goto unlock;
|
||||
}
|
||||
|
||||
*width = bmpInfoHeader->biWidth;
|
||||
*height = bmpInfoHeader->biHeight;
|
||||
|
||||
SIZE_T clipDataSize = GlobalSize(clipHandle);
|
||||
if (clipDataSize < sizeof(BITMAPINFOHEADER)) {
|
||||
// Format CF_DIB needs space for BITMAPINFOHEADER struct.
|
||||
msgString = "Clipboard has Malformed data";
|
||||
severity = LOG_ERROR;
|
||||
goto unlock;
|
||||
}
|
||||
|
||||
// Denotes where the pixel data starts from the bmpInfoHeader pointer
|
||||
int pixelOffset = GetPixelDataOffset(*bmpInfoHeader);
|
||||
|
||||
//--------------------------------------------------------------------------------//
|
||||
//
|
||||
// The rest of the section is about create the bytes for a correct BMP file
|
||||
// Then we copy the data and to a pointer
|
||||
//
|
||||
//--------------------------------------------------------------------------------//
|
||||
|
||||
BITMAPFILEHEADER bmpFileHeader = {0};
|
||||
SIZE_T bmpFileSize = sizeof(bmpFileHeader) + clipDataSize;
|
||||
*dataSize = bmpFileSize;
|
||||
|
||||
bmpFileHeader.bfType = 0x4D42; //https://stackoverflow.com/questions/601430/multibyte-character-constants-and-bitmap-file-header-type-constants#601536
|
||||
|
||||
bmpFileHeader.bfSize = (DWORD)bmpFileSize; // Up to 4GB works fine
|
||||
bmpFileHeader.bfOffBits = sizeof(bmpFileHeader) + pixelOffset;
|
||||
|
||||
//
|
||||
// Each process has a default heap provided by the system
|
||||
// Memory objects allocated by GlobalAlloc and LocalAlloc are in private,
|
||||
// committed pages with read/write access that cannot be accessed by other processes.
|
||||
//
|
||||
// This may be wrong since we might be allocating in a DLL and freeing from another module, the main application
|
||||
// that may cause heap corruption. We could create a FreeImage function
|
||||
//
|
||||
bmpData = malloc(sizeof(bmpFileHeader) + clipDataSize);
|
||||
// First we add the header for a bmp file
|
||||
memcpy(bmpData, &bmpFileHeader, sizeof(bmpFileHeader));
|
||||
// Then we add the header for the bmp itself + the pixel data
|
||||
memcpy(bmpData + sizeof(bmpFileHeader), bmpInfoHeader, clipDataSize);
|
||||
msgString = "Clipboad image acquired successfully";
|
||||
|
||||
|
||||
unlock:
|
||||
GlobalUnlock(clipHandle);
|
||||
close:
|
||||
CloseClipboard();
|
||||
end:
|
||||
|
||||
TRACELOG(severity, msgString);
|
||||
return bmpData;
|
||||
}
|
||||
|
||||
static BOOL OpenClipboardRetrying(HWND hWnd)
|
||||
{
|
||||
static const int maxTries = 20;
|
||||
static const int sleepTimeMS = 60;
|
||||
for (int _ = 0; _ < maxTries; ++_)
|
||||
{
|
||||
// Might be being hold by another process
|
||||
// Or yourself forgot to CloseClipboard
|
||||
if (OpenClipboard(hWnd)) {
|
||||
return true;
|
||||
}
|
||||
Sleep(sleepTimeMS);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Based off of researching microsoft docs and reponses from this question https://stackoverflow.com/questions/30552255/how-to-read-a-bitmap-from-the-windows-clipboard#30552856
|
||||
// https://learn.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-bitmapinfoheader
|
||||
// Get the byte offset where does the pixels data start (from a packed DIB)
|
||||
static int GetPixelDataOffset(BITMAPINFOHEADER bih)
|
||||
{
|
||||
int offset = 0;
|
||||
const unsigned int rgbaSize = sizeof(RGBQUAD);
|
||||
|
||||
// biSize Specifies the number of bytes required by the structure
|
||||
// We expect to always be 40 because it should be packed
|
||||
if (40 == bih.biSize && 40 == sizeof(BITMAPINFOHEADER))
|
||||
{
|
||||
//
|
||||
// biBitCount Specifies the number of bits per pixel.
|
||||
// Might exist some bit masks *after* the header and *before* the pixel offset
|
||||
// we're looking, but only if we have more than
|
||||
// 8 bits per pixel, so we need to ajust for that
|
||||
//
|
||||
if (bih.biBitCount > 8)
|
||||
{
|
||||
// if bih.biCompression is RBG we should NOT offset more
|
||||
|
||||
if (bih.biCompression == BI_BITFIELDS)
|
||||
{
|
||||
offset += 3 * rgbaSize;
|
||||
} else if (bih.biCompression == 6 /* BI_ALPHABITFIELDS */)
|
||||
{
|
||||
// Not widely supported, but valid.
|
||||
offset += 4 * rgbaSize;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// biClrUsed Specifies the number of color indices in the color table that are actually used by the bitmap.
|
||||
// If this value is zero, the bitmap uses the maximum number of colors
|
||||
// corresponding to the value of the biBitCount member for the compression mode specified by biCompression.
|
||||
// If biClrUsed is nonzero and the biBitCount member is less than 16
|
||||
// the biClrUsed member specifies the actual number of colors
|
||||
//
|
||||
if (bih.biClrUsed > 0) {
|
||||
offset += bih.biClrUsed * rgbaSize;
|
||||
} else {
|
||||
if (bih.biBitCount < 16)
|
||||
{
|
||||
offset = offset + (rgbaSize << bih.biBitCount);
|
||||
}
|
||||
}
|
||||
|
||||
return bih.biSize + offset;
|
||||
}
|
||||
#endif // WIN32_CLIPBOARD_IMPLEMENTATION
|
||||
// EOF
|
||||
|
||||
|
|
@ -515,6 +515,16 @@ const char *GetClipboardText(void)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
// Get clipboard image
|
||||
Image GetClipboardImage(void)
|
||||
{
|
||||
Image image = { 0 };
|
||||
|
||||
TRACELOG(LOG_WARNING, "GetClipboardImage() not implemented on target platform");
|
||||
|
||||
return image;
|
||||
}
|
||||
|
||||
// Show mouse cursor
|
||||
void ShowCursor(void)
|
||||
{
|
||||
|
|
@ -615,7 +625,7 @@ int SetGamepadMappings(const char *mappings)
|
|||
}
|
||||
|
||||
// Set gamepad vibration
|
||||
void SetGamepadVibration(int gamepad, float leftMotor, float rightMotor)
|
||||
void SetGamepadVibration(int gamepad, float leftMotor, float rightMotor, float duration)
|
||||
{
|
||||
TRACELOG(LOG_WARNING, "GamepadSetVibration() not implemented on target platform");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@
|
|||
#if defined(_WIN32)
|
||||
typedef void *PVOID;
|
||||
typedef PVOID HANDLE;
|
||||
#include "../external/win32_clipboard.h"
|
||||
typedef HANDLE HWND;
|
||||
#define GLFW_EXPOSE_NATIVE_WIN32
|
||||
#define GLFW_NATIVE_INCLUDE_NONE // To avoid some symbols re-definition in windows.h
|
||||
|
|
@ -65,8 +66,9 @@
|
|||
|
||||
#if defined(SUPPORT_WINMM_HIGHRES_TIMER) && !defined(SUPPORT_BUSY_WAIT_LOOP)
|
||||
// NOTE: Those functions require linking with winmm library
|
||||
unsigned int __stdcall timeBeginPeriod(unsigned int uPeriod);
|
||||
unsigned int __stdcall timeEndPeriod(unsigned int uPeriod);
|
||||
//#pragma warning(disable: 4273)
|
||||
__declspec(dllimport) unsigned int __stdcall timeEndPeriod(unsigned int uPeriod);
|
||||
//#pragma warning(default: 4273)
|
||||
#endif
|
||||
#endif
|
||||
#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)
|
||||
|
|
@ -965,6 +967,30 @@ const char *GetClipboardText(void)
|
|||
return glfwGetClipboardString(platform.handle);
|
||||
}
|
||||
|
||||
// Get clipboard image
|
||||
Image GetClipboardImage(void)
|
||||
{
|
||||
Image image = { 0 };
|
||||
|
||||
#if defined(SUPPORT_CLIPBOARD_IMAGE)
|
||||
#if defined(_WIN32)
|
||||
unsigned long long int dataSize = 0;
|
||||
void *fileData = NULL;
|
||||
int width = 0;
|
||||
int height = 0;
|
||||
|
||||
fileData = (void*)Win32GetClipboardImageData(&width, &height, &dataSize);
|
||||
|
||||
if (fileData == NULL) TRACELOG(LOG_WARNING, "Clipboard image: Couldn't get clipboard data.");
|
||||
else image = LoadImageFromMemory(".bmp", fileData, (int)dataSize);
|
||||
#else
|
||||
TRACELOG(LOG_WARNING, "GetClipboardImage() not implemented on target platform");
|
||||
#endif
|
||||
#endif // SUPPORT_CLIPBOARD_IMAGE
|
||||
|
||||
return image;
|
||||
}
|
||||
|
||||
// Show mouse cursor
|
||||
void ShowCursor(void)
|
||||
{
|
||||
|
|
@ -1060,7 +1086,7 @@ int SetGamepadMappings(const char *mappings)
|
|||
}
|
||||
|
||||
// Set gamepad vibration
|
||||
void SetGamepadVibration(int gamepad, float leftMotor, float rightMotor)
|
||||
void SetGamepadVibration(int gamepad, float leftMotor, float rightMotor, float duration)
|
||||
{
|
||||
TRACELOG(LOG_WARNING, "GamepadSetVibration() not available on target platform");
|
||||
}
|
||||
|
|
@ -1897,4 +1923,8 @@ static void JoystickCallback(int jid, int event)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
# define WIN32_CLIPBOARD_IMPLEMENTATION
|
||||
# include "../external/win32_clipboard.h"
|
||||
#endif
|
||||
// EOF
|
||||
|
|
|
|||
|
|
@ -63,12 +63,15 @@ void CloseWindow(void);
|
|||
|
||||
#define RGFW_IMPLEMENTATION
|
||||
|
||||
#if defined(__WIN32) || defined(__WIN64)
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#define Rectangle rectangle_win32
|
||||
#define CloseWindow CloseWindow_win32
|
||||
#define ShowCursor __imp_ShowCursor
|
||||
#define _APISETSTRING_
|
||||
|
||||
#undef MAX_PATH
|
||||
|
||||
__declspec(dllimport) int __stdcall MultiByteToWideChar(unsigned int CodePage, unsigned long dwFlags, const char *lpMultiByteStr, int cbMultiByte, wchar_t *lpWideCharStr, int cchWideChar);
|
||||
#endif
|
||||
|
||||
|
|
@ -79,11 +82,14 @@ void CloseWindow(void);
|
|||
|
||||
#include "../external/RGFW.h"
|
||||
|
||||
#if defined(__WIN32) || defined(__WIN64)
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
#undef DrawText
|
||||
#undef ShowCursor
|
||||
#undef CloseWindow
|
||||
#undef Rectangle
|
||||
|
||||
#undef MAX_PATH
|
||||
#define MAX_PATH 1025
|
||||
#endif
|
||||
|
||||
#if defined(__APPLE__)
|
||||
|
|
@ -514,6 +520,9 @@ void SetWindowMaxSize(int width, int height)
|
|||
// Set window dimensions
|
||||
void SetWindowSize(int width, int height)
|
||||
{
|
||||
CORE.Window.screen.width = width;
|
||||
CORE.Window.screen.height = height;
|
||||
|
||||
RGFW_window_resize(platform.window, RGFW_AREA(width, height));
|
||||
}
|
||||
|
||||
|
|
@ -578,7 +587,7 @@ Vector2 GetMonitorPosition(int monitor)
|
|||
{
|
||||
RGFW_monitor *mons = RGFW_getMonitors();
|
||||
|
||||
return (Vector2){mons[monitor].rect.x, mons[monitor].rect.y};
|
||||
return (Vector2){(float)mons[monitor].rect.x, (float)mons[monitor].rect.y};
|
||||
}
|
||||
|
||||
// Get selected monitor width (currently used by monitor)
|
||||
|
|
@ -602,7 +611,7 @@ int GetMonitorPhysicalWidth(int monitor)
|
|||
{
|
||||
RGFW_monitor* mons = RGFW_getMonitors();
|
||||
|
||||
return mons[monitor].physW;
|
||||
return (int)mons[monitor].physW;
|
||||
}
|
||||
|
||||
// Get selected monitor physical height in millimetres
|
||||
|
|
@ -610,7 +619,7 @@ int GetMonitorPhysicalHeight(int monitor)
|
|||
{
|
||||
RGFW_monitor *mons = RGFW_getMonitors();
|
||||
|
||||
return mons[monitor].physH;
|
||||
return (int)mons[monitor].physH;
|
||||
}
|
||||
|
||||
// Get selected monitor refresh rate
|
||||
|
|
@ -631,7 +640,7 @@ const char *GetMonitorName(int monitor)
|
|||
// Get window position XY on monitor
|
||||
Vector2 GetWindowPosition(void)
|
||||
{
|
||||
return (Vector2){ platform.window->r.x, platform.window->r.y };
|
||||
return (Vector2){ (float)platform.window->r.x, (float)platform.window->r.y };
|
||||
}
|
||||
|
||||
// Get window scale DPI factor for current monitor
|
||||
|
|
@ -645,7 +654,7 @@ Vector2 GetWindowScaleDPI(void)
|
|||
// Set clipboard text content
|
||||
void SetClipboardText(const char *text)
|
||||
{
|
||||
RGFW_writeClipboard(text, strlen(text));
|
||||
RGFW_writeClipboard(text, (u32)strlen(text));
|
||||
}
|
||||
|
||||
// Get clipboard text content
|
||||
|
|
@ -655,6 +664,40 @@ const char *GetClipboardText(void)
|
|||
return RGFW_readClipboard(NULL);
|
||||
}
|
||||
|
||||
#if defined(SUPPORT_CLIPBOARD_IMAGE)
|
||||
#if defined(_WIN32)
|
||||
#define WIN32_CLIPBOARD_IMPLEMENTATION
|
||||
#define WINUSER_ALREADY_INCLUDED
|
||||
#define WINBASE_ALREADY_INCLUDED
|
||||
#define WINGDI_ALREADY_INCLUDED
|
||||
#include "../external/win32_clipboard.h"
|
||||
#endif
|
||||
#endif // SUPPORT_CLIPBOARD_IMAGE
|
||||
|
||||
// Get clipboard image
|
||||
Image GetClipboardImage(void)
|
||||
{
|
||||
Image image = { 0 };
|
||||
|
||||
#if defined(SUPPORT_CLIPBOARD_IMAGE)
|
||||
#if defined(_WIN32)
|
||||
unsigned long long int dataSize = 0;
|
||||
void *fileData = NULL;
|
||||
int width = 0;
|
||||
int height = 0;
|
||||
|
||||
fileData = (void*)Win32GetClipboardImageData(&width, &height, &dataSize);
|
||||
|
||||
if (fileData == NULL) TRACELOG(LOG_WARNING, "Clipboard image: Couldn't get clipboard data.");
|
||||
else image = LoadImageFromMemory(".bmp", fileData, (int)dataSize);
|
||||
#else
|
||||
TRACELOG(LOG_WARNING, "GetClipboardImage() not implemented on target platform");
|
||||
#endif
|
||||
#endif // SUPPORT_CLIPBOARD_IMAGE
|
||||
|
||||
return image;
|
||||
}
|
||||
|
||||
// Show mouse cursor
|
||||
void ShowCursor(void)
|
||||
{
|
||||
|
|
@ -904,7 +947,7 @@ void PollInputEvents(void)
|
|||
case RGFW_quit: CORE.Window.shouldClose = true; break;
|
||||
case RGFW_dnd: // Dropped file
|
||||
{
|
||||
for (int i = 0; i < event->droppedFilesCount; i++)
|
||||
for (u32 i = 0; i < event->droppedFilesCount; i++)
|
||||
{
|
||||
if (CORE.Window.dropFileCount == 0)
|
||||
{
|
||||
|
|
@ -988,7 +1031,7 @@ void PollInputEvents(void)
|
|||
{
|
||||
if ((event->button == RGFW_mouseScrollUp) || (event->button == RGFW_mouseScrollDown))
|
||||
{
|
||||
CORE.Input.Mouse.currentWheelMove.y = event->scroll;
|
||||
CORE.Input.Mouse.currentWheelMove.y = (float)event->scroll;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -1007,7 +1050,7 @@ void PollInputEvents(void)
|
|||
|
||||
if ((event->button == RGFW_mouseScrollUp) || (event->button == RGFW_mouseScrollDown))
|
||||
{
|
||||
CORE.Input.Mouse.currentWheelMove.y = event->scroll;
|
||||
CORE.Input.Mouse.currentWheelMove.y = (float)event->scroll;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
* Custom flag for rcore on target platform -not used-
|
||||
*
|
||||
* DEPENDENCIES:
|
||||
* - SDL 2 (main library): Windowing and inputs management
|
||||
* - SDL 2 or SLD 3 (main library): Windowing and inputs management
|
||||
* - gestures: Gestures system for touch-ready devices (or simulated from mouse inputs)
|
||||
*
|
||||
*
|
||||
|
|
@ -48,6 +48,10 @@
|
|||
*
|
||||
**********************************************************************************************/
|
||||
|
||||
|
||||
#ifndef SDL_ENABLE_OLD_NAMES
|
||||
#define SDL_ENABLE_OLD_NAMES // Just in case we're on SDL3, we need some in-between compatibily
|
||||
#endif
|
||||
#include "SDL.h" // SDL base library (window/rendered, input, timing... functionality)
|
||||
|
||||
#if defined(GRAPHICS_API_OPENGL_ES2)
|
||||
|
|
@ -64,6 +68,12 @@
|
|||
#define MAX_CLIPBOARD_BUFFER_LENGTH 1024 // Size of the clipboard buffer used on GetClipboardText()
|
||||
#endif
|
||||
|
||||
#if ((defined(SDL_MAJOR_VERSION) && SDL_MAJOR_VERSION == 3) && (defined(SDL_MINOR_VERSION) && SDL_MINOR_VERSION >= 1))
|
||||
#ifndef PLATFORM_DESKTOP_SDL3
|
||||
#define PLATFORM_DESKTOP_SDL3
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//----------------------------------------------------------------------------------
|
||||
// Types and Structures Definition
|
||||
//----------------------------------------------------------------------------------
|
||||
|
|
@ -227,6 +237,184 @@ static const int CursorsLUT[] = {
|
|||
//SDL_SYSTEM_CURSOR_WAITARROW, // No equivalent implemented on MouseCursor enum on raylib.h
|
||||
};
|
||||
|
||||
|
||||
// SDL3 Migration Layer made to avoid `ifdefs` inside functions when we can.
|
||||
#if defined(PLATFORM_DESKTOP_SDL3)
|
||||
|
||||
// SDL3 Migration:
|
||||
// SDL_WINDOW_FULLSCREEN_DESKTOP has been removed,
|
||||
// and you can call SDL_GetWindowFullscreenMode()
|
||||
// to see whether an exclusive fullscreen mode will be used
|
||||
// or the borderless fullscreen desktop mode will be used
|
||||
#define SDL_WINDOW_FULLSCREEN_DESKTOP SDL_WINDOW_FULLSCREEN
|
||||
|
||||
#define SDL_IGNORE false
|
||||
#define SDL_DISABLE false
|
||||
#define SDL_ENABLE true
|
||||
|
||||
// SDL3 Migration: SDL_INIT_TIMER - no longer needed before calling SDL_AddTimer()
|
||||
#define SDL_INIT_TIMER 0x0 // It's a flag, so no problem in setting it to zero if we use in a bitor (|)
|
||||
|
||||
// SDL3 Migration: The SDL_WINDOW_SHOWN flag has been removed. Windows are shown by default and can be created hidden by using the SDL_WINDOW_HIDDEN flag.
|
||||
#define SDL_WINDOW_SHOWN 0x0 // It's a flag, so no problem in setting it to zero if we use in a bitor (|)
|
||||
|
||||
// SDL3 Migration: Renamed
|
||||
// IMPORTANT: Might need to call SDL_CleanupEvent somewhere see :https://github.com/libsdl-org/SDL/issues/3540#issuecomment-1793449852
|
||||
#define SDL_DROPFILE SDL_EVENT_DROP_FILE
|
||||
|
||||
// SDL2 implementation for SDL3 function
|
||||
const char *SDL_GameControllerNameForIndex(int joystickIndex)
|
||||
{
|
||||
// NOTE: SDL3 uses the IDs itself (SDL_JoystickID) instead of SDL2 joystick_index
|
||||
const char *name = NULL;
|
||||
int numJoysticks = 0;
|
||||
SDL_JoystickID *joysticks = SDL_GetJoysticks(&numJoysticks);
|
||||
|
||||
if (joysticks)
|
||||
{
|
||||
if (joystickIndex < numJoysticks)
|
||||
{
|
||||
SDL_JoystickID instance_id = joysticks[joystickIndex];
|
||||
name = SDL_GetGamepadNameForID(instance_id);
|
||||
}
|
||||
|
||||
SDL_free(joysticks);
|
||||
}
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
int SDL_GetNumVideoDisplays(void)
|
||||
{
|
||||
int monitorCount = 0;
|
||||
SDL_DisplayID *displays = SDL_GetDisplays(&monitorCount);
|
||||
|
||||
// Safe because If `mem` is NULL, SDL_free does nothing
|
||||
SDL_free(displays);
|
||||
|
||||
return monitorCount;
|
||||
}
|
||||
|
||||
// SLD3 Migration: To emulate SDL2 this function should return `SDL_DISABLE` or `SDL_ENABLE`
|
||||
// representing the *processing state* of the event before this function makes any changes to it
|
||||
Uint8 SDL_EventState(Uint32 type, int state)
|
||||
{
|
||||
Uint8 stateBefore = SDL_EventEnabled(type);
|
||||
|
||||
switch (state)
|
||||
{
|
||||
case SDL_DISABLE: SDL_SetEventEnabled(type, false); break;
|
||||
case SDL_ENABLE: SDL_SetEventEnabled(type, true); break;
|
||||
default: TRACELOG(LOG_WARNING, "Event sate: unknow type");
|
||||
}
|
||||
|
||||
return stateBefore;
|
||||
}
|
||||
|
||||
void SDL_GetCurrentDisplayMode_Adapter(SDL_DisplayID displayID, SDL_DisplayMode* mode)
|
||||
{
|
||||
const SDL_DisplayMode* currMode = SDL_GetCurrentDisplayMode(displayID);
|
||||
|
||||
if (currMode == NULL) TRACELOG(LOG_WARNING, "No current display mode");
|
||||
else *mode = *currMode;
|
||||
}
|
||||
|
||||
// SDL3 Migration: Renamed
|
||||
#define SDL_GetCurrentDisplayMode SDL_GetCurrentDisplayMode_Adapter
|
||||
|
||||
SDL_Surface *SDL_CreateRGBSurface(Uint32 flags, int width, int height, int depth, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask)
|
||||
{
|
||||
return SDL_CreateSurface(width, height, SDL_GetPixelFormatForMasks(depth, Rmask, Gmask, Bmask, Amask));
|
||||
}
|
||||
|
||||
// SDL3 Migration:
|
||||
// SDL_GetDisplayDPI() -
|
||||
// not reliable across platforms, approximately replaced by multiplying
|
||||
// SDL_GetWindowDisplayScale() times 160 on iPhone and Android, and 96 on other platforms.
|
||||
// returns 0 on success or a negative error code on failure
|
||||
int SDL_GetDisplayDPI(int displayIndex, float *ddpi, float *hdpi, float *vdpi)
|
||||
{
|
||||
float dpi = SDL_GetWindowDisplayScale(platform.window)*96.0;
|
||||
|
||||
if (ddpi != NULL) *ddpi = dpi;
|
||||
if (hdpi != NULL) *hdpi = dpi;
|
||||
if (vdpi != NULL) *vdpi = dpi;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
SDL_Surface *SDL_CreateRGBSurfaceWithFormat(Uint32 flags, int width, int height, int depth, Uint32 format)
|
||||
{
|
||||
return SDL_CreateSurface(width, height, format);
|
||||
}
|
||||
|
||||
SDL_Surface *SDL_CreateRGBSurfaceFrom(void *pixels, int width, int height, int depth, int pitch, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask)
|
||||
{
|
||||
return SDL_CreateSurfaceFrom(width, height, SDL_GetPixelFormatForMasks(depth, Rmask, Gmask, Bmask, Amask), pixels, pitch);
|
||||
}
|
||||
|
||||
SDL_Surface *SDL_CreateRGBSurfaceWithFormatFrom(void *pixels, int width, int height, int depth, int pitch, Uint32 format)
|
||||
{
|
||||
return SDL_CreateSurfaceFrom(width, height, format, pixels, pitch);
|
||||
}
|
||||
|
||||
int SDL_NumJoysticks(void)
|
||||
{
|
||||
int numJoysticks;
|
||||
SDL_JoystickID *joysticks = SDL_GetJoysticks(&numJoysticks);
|
||||
SDL_free(joysticks);
|
||||
return numJoysticks;
|
||||
}
|
||||
|
||||
// SDL_SetRelativeMouseMode
|
||||
// returns 0 on success or a negative error code on failure
|
||||
// If relative mode is not supported, this returns -1.
|
||||
int SDL_SetRelativeMouseMode_Adapter(SDL_bool enabled)
|
||||
{
|
||||
// SDL_SetWindowRelativeMouseMode(SDL_Window *window, bool enabled)
|
||||
// \returns true on success or false on failure; call SDL_GetError() for more
|
||||
if (SDL_SetWindowRelativeMouseMode(platform.window, enabled))
|
||||
{
|
||||
return 0; // success
|
||||
}
|
||||
else
|
||||
{
|
||||
return -1; // failure
|
||||
}
|
||||
}
|
||||
|
||||
#define SDL_SetRelativeMouseMode SDL_SetRelativeMouseMode_Adapter
|
||||
|
||||
bool SDL_GetRelativeMouseMode_Adapter(void)
|
||||
{
|
||||
return SDL_GetWindowRelativeMouseMode(platform.window);
|
||||
}
|
||||
|
||||
#define SDL_GetRelativeMouseMode SDL_GetRelativeMouseMode_Adapter
|
||||
|
||||
int SDL_GetNumTouchFingers(SDL_TouchID touchID)
|
||||
{
|
||||
// SDL_Finger **SDL_GetTouchFingers(SDL_TouchID touchID, int *count)
|
||||
int count = 0;
|
||||
SDL_Finger **fingers = SDL_GetTouchFingers(touchID, &count);
|
||||
SDL_free(fingers);
|
||||
return count;
|
||||
}
|
||||
|
||||
#else // We're on SDL2
|
||||
|
||||
// Since SDL2 doesn't have this function we leave a stub
|
||||
// SDL_GetClipboardData function is available since SDL 3.1.3. (e.g. SDL3)
|
||||
void* SDL_GetClipboardData(const char *mime_type, size_t *size)
|
||||
{
|
||||
TRACELOG(LOG_WARNING, "Getting clipboard data that is not text is only available in SDL3");
|
||||
|
||||
// We could possibly implement it ourselves in this case for some easier platforms
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#endif // PLATFORM_DESKTOP_SDL3
|
||||
|
||||
//----------------------------------------------------------------------------------
|
||||
// Module Internal Functions Declaration
|
||||
//----------------------------------------------------------------------------------
|
||||
|
|
@ -256,7 +444,12 @@ void ToggleFullscreen(void)
|
|||
{
|
||||
const int monitor = SDL_GetWindowDisplayIndex(platform.window);
|
||||
const int monitorCount = SDL_GetNumVideoDisplays();
|
||||
|
||||
#if defined(PLATFORM_DESKTOP_SDL3) // SDL3 Migration: Monitor is an id instead of index now, returns 0 on failure
|
||||
if ((monitor > 0) && (monitor <= monitorCount))
|
||||
#else
|
||||
if ((monitor >= 0) && (monitor < monitorCount))
|
||||
#endif
|
||||
{
|
||||
if ((CORE.Window.flags & FLAG_FULLSCREEN_MODE) > 0)
|
||||
{
|
||||
|
|
@ -279,7 +472,12 @@ void ToggleBorderlessWindowed(void)
|
|||
{
|
||||
const int monitor = SDL_GetWindowDisplayIndex(platform.window);
|
||||
const int monitorCount = SDL_GetNumVideoDisplays();
|
||||
|
||||
#if defined(PLATFORM_DESKTOP_SDL3) // SDL3 Migration: Monitor is an id instead of index now, returns 0 on failure
|
||||
if ((monitor > 0) && (monitor <= monitorCount))
|
||||
#else
|
||||
if ((monitor >= 0) && (monitor < monitorCount))
|
||||
#endif
|
||||
{
|
||||
if ((CORE.Window.flags & FLAG_BORDERLESS_WINDOWED_MODE) > 0)
|
||||
{
|
||||
|
|
@ -328,7 +526,12 @@ void SetWindowState(unsigned int flags)
|
|||
{
|
||||
const int monitor = SDL_GetWindowDisplayIndex(platform.window);
|
||||
const int monitorCount = SDL_GetNumVideoDisplays();
|
||||
|
||||
#if defined(PLATFORM_DESKTOP_SDL3) // SDL3 Migration: Monitor is an id instead of index now, returns 0 on failure
|
||||
if ((monitor > 0) && (monitor <= monitorCount))
|
||||
#else
|
||||
if ((monitor >= 0) && (monitor < monitorCount))
|
||||
#endif
|
||||
{
|
||||
SDL_SetWindowFullscreen(platform.window, SDL_WINDOW_FULLSCREEN);
|
||||
CORE.Window.fullscreen = true;
|
||||
|
|
@ -387,7 +590,12 @@ void SetWindowState(unsigned int flags)
|
|||
{
|
||||
const int monitor = SDL_GetWindowDisplayIndex(platform.window);
|
||||
const int monitorCount = SDL_GetNumVideoDisplays();
|
||||
|
||||
#if defined(PLATFORM_DESKTOP_SDL3) // SDL3 Migration: Monitor is an id instead of index now, returns 0 on failure
|
||||
if ((monitor > 0) && (monitor <= monitorCount))
|
||||
#else
|
||||
if ((monitor >= 0) && (monitor < monitorCount))
|
||||
#endif
|
||||
{
|
||||
SDL_SetWindowFullscreen(platform.window, SDL_WINDOW_FULLSCREEN_DESKTOP);
|
||||
}
|
||||
|
|
@ -606,7 +814,12 @@ void SetWindowMonitor(int monitor)
|
|||
const int screenWidth = CORE.Window.screen.width;
|
||||
const int screenHeight = CORE.Window.screen.height;
|
||||
SDL_Rect usableBounds;
|
||||
|
||||
#if defined(PLATFORM_DESKTOP_SDL3) // Different style for success checking
|
||||
if (SDL_GetDisplayUsableBounds(monitor, &usableBounds))
|
||||
#else
|
||||
if (SDL_GetDisplayUsableBounds(monitor, &usableBounds) == 0)
|
||||
#endif
|
||||
{
|
||||
if (wasFullscreen == 1) ToggleFullscreen(); // Leave fullscreen.
|
||||
|
||||
|
|
@ -704,6 +917,7 @@ int GetCurrentMonitor(void)
|
|||
{
|
||||
int currentMonitor = 0;
|
||||
|
||||
// Be aware that this returns an ID in SDL3 and a Index in SDL2
|
||||
currentMonitor = SDL_GetWindowDisplayIndex(platform.window);
|
||||
|
||||
return currentMonitor;
|
||||
|
|
@ -716,7 +930,12 @@ Vector2 GetMonitorPosition(int monitor)
|
|||
if ((monitor >= 0) && (monitor < monitorCount))
|
||||
{
|
||||
SDL_Rect displayBounds;
|
||||
|
||||
#if defined(PLATFORM_DESKTOP_SDL3)
|
||||
if (SDL_GetDisplayUsableBounds(monitor, &displayBounds))
|
||||
#else
|
||||
if (SDL_GetDisplayUsableBounds(monitor, &displayBounds) == 0)
|
||||
#endif
|
||||
{
|
||||
return (Vector2){ (float)displayBounds.x, (float)displayBounds.y };
|
||||
}
|
||||
|
|
@ -844,10 +1063,16 @@ Vector2 GetWindowScaleDPI(void)
|
|||
{
|
||||
Vector2 scale = { 1.0f, 1.0f };
|
||||
|
||||
#ifndef PLATFORM_DESKTOP_SDL3
|
||||
// NOTE: SDL_GetWindowDisplayScale was only added on SDL3
|
||||
// see https://wiki.libsdl.org/SDL3/SDL_GetWindowDisplayScale
|
||||
// TODO: Implement the window scale factor calculation manually.
|
||||
TRACELOG(LOG_WARNING, "GetWindowScaleDPI() not implemented on target platform");
|
||||
#else
|
||||
scale.x = SDL_GetWindowDisplayScale(platform.window);
|
||||
scale.y = scale.x;
|
||||
TRACELOG(LOG_INFO, "WindowScaleDPI is %f", scale.x);
|
||||
#endif
|
||||
|
||||
return scale;
|
||||
}
|
||||
|
|
@ -877,19 +1102,70 @@ const char *GetClipboardText(void)
|
|||
return buffer;
|
||||
}
|
||||
|
||||
// Get clipboard image
|
||||
Image GetClipboardImage(void)
|
||||
{
|
||||
Image image = { 0 };
|
||||
|
||||
#if defined(SUPPORT_CLIPBOARD_IMAGE)
|
||||
// Let's hope compiler put these arrays in static memory
|
||||
const char *imageFormats[] = {
|
||||
"image/bmp",
|
||||
"image/png",
|
||||
"image/jpg",
|
||||
"image/tiff",
|
||||
};
|
||||
const char *imageExtensions[] = {
|
||||
".bmp",
|
||||
".png",
|
||||
".jpg",
|
||||
".tiff",
|
||||
};
|
||||
|
||||
size_t dataSize = 0;
|
||||
void *fileData = NULL;
|
||||
|
||||
for (int i = 0; i < SDL_arraysize(imageFormats); ++i)
|
||||
{
|
||||
// NOTE: This pointer should be free with SDL_free() at some point
|
||||
fileData = SDL_GetClipboardData(imageFormats[i], &dataSize);
|
||||
|
||||
if (fileData)
|
||||
{
|
||||
image = LoadImageFromMemory(imageExtensions[i], fileData, dataSize);
|
||||
if (IsImageValid(image))
|
||||
{
|
||||
TRACELOG(LOG_INFO, "Clipboard image: Got image from clipboard as a `%s` successfully", imageExtensions[i]);
|
||||
return image;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!IsImageValid(image)) TRACELOG(LOG_WARNING, "Clipboard image: Couldn't get clipboard data. Error: %s", SDL_GetError());
|
||||
#endif
|
||||
|
||||
return image;
|
||||
}
|
||||
|
||||
// Show mouse cursor
|
||||
void ShowCursor(void)
|
||||
{
|
||||
#if defined(PLATFORM_DESKTOP_SDL3)
|
||||
SDL_ShowCursor();
|
||||
#else
|
||||
SDL_ShowCursor(SDL_ENABLE);
|
||||
|
||||
#endif
|
||||
CORE.Input.Mouse.cursorHidden = false;
|
||||
}
|
||||
|
||||
// Hides mouse cursor
|
||||
void HideCursor(void)
|
||||
{
|
||||
#if defined(PLATFORM_DESKTOP_SDL3)
|
||||
SDL_HideCursor();
|
||||
#else
|
||||
SDL_ShowCursor(SDL_DISABLE);
|
||||
|
||||
#endif
|
||||
CORE.Input.Mouse.cursorHidden = true;
|
||||
}
|
||||
|
||||
|
|
@ -897,7 +1173,13 @@ void HideCursor(void)
|
|||
void EnableCursor(void)
|
||||
{
|
||||
SDL_SetRelativeMouseMode(SDL_FALSE);
|
||||
|
||||
#if defined(PLATFORM_DESKTOP_SDL3)
|
||||
// SDL_ShowCursor() has been split into three functions: SDL_ShowCursor(), SDL_HideCursor(), and SDL_CursorVisible()
|
||||
SDL_ShowCursor();
|
||||
#else
|
||||
SDL_ShowCursor(SDL_ENABLE);
|
||||
#endif
|
||||
|
||||
platform.cursorRelative = false;
|
||||
CORE.Input.Mouse.cursorHidden = false;
|
||||
|
|
@ -953,17 +1235,17 @@ int SetGamepadMappings(const char *mappings)
|
|||
}
|
||||
|
||||
// Set gamepad vibration
|
||||
void SetGamepadVibration(int gamepad, float leftMotor, float rightMotor)
|
||||
void SetGamepadVibration(int gamepad, float leftMotor, float rightMotor, float duration)
|
||||
{
|
||||
// Limit input values to between 0.0f and 1.0f
|
||||
leftMotor = (0.0f > leftMotor)? 0.0f : leftMotor;
|
||||
rightMotor = (0.0f > rightMotor)? 0.0f : rightMotor;
|
||||
leftMotor = (1.0f < leftMotor)? 1.0f : leftMotor;
|
||||
rightMotor = (1.0f < rightMotor)? 1.0f : rightMotor;
|
||||
|
||||
if (IsGamepadAvailable(gamepad))
|
||||
if ((gamepad < MAX_GAMEPADS) && CORE.Input.Gamepad.ready[gamepad] && (duration > 0.0f))
|
||||
{
|
||||
SDL_GameControllerRumble(platform.gamepad[gamepad], (Uint16)(leftMotor*65535.0f), (Uint16)(rightMotor*65535.0f), (Uint32)(MAX_GAMEPAD_VIBRATION_TIME*1000.0f));
|
||||
if (leftMotor < 0.0f) leftMotor = 0.0f;
|
||||
if (leftMotor > 1.0f) leftMotor = 1.0f;
|
||||
if (rightMotor < 0.0f) rightMotor = 0.0f;
|
||||
if (rightMotor > 1.0f) rightMotor = 1.0f;
|
||||
if (duration > MAX_GAMEPAD_VIBRATION_TIME) duration = MAX_GAMEPAD_VIBRATION_TIME;
|
||||
|
||||
SDL_GameControllerRumble(platform.gamepad[gamepad], (Uint16)(leftMotor*65535.0f), (Uint16)(rightMotor*65535.0f), (Uint32)(duration*1000.0f));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -993,6 +1275,24 @@ const char *GetKeyName(int key)
|
|||
|
||||
static void UpdateTouchPointsSDL(SDL_TouchFingerEvent event)
|
||||
{
|
||||
#if defined(PLATFORM_DESKTOP_SDL3) // SDL3
|
||||
int count = 0;
|
||||
SDL_Finger **fingers = SDL_GetTouchFingers(event.touchID, &count);
|
||||
CORE.Input.Touch.pointCount = count;
|
||||
|
||||
for (int i = 0; i < CORE.Input.Touch.pointCount; i++)
|
||||
{
|
||||
SDL_Finger *finger = fingers[i];
|
||||
CORE.Input.Touch.pointId[i] = finger->id;
|
||||
CORE.Input.Touch.position[i].x = finger->x*CORE.Window.screen.width;
|
||||
CORE.Input.Touch.position[i].y = finger->y*CORE.Window.screen.height;
|
||||
CORE.Input.Touch.currentTouchState[i] = 1;
|
||||
}
|
||||
|
||||
SDL_free(fingers);
|
||||
|
||||
#else // SDL2
|
||||
|
||||
CORE.Input.Touch.pointCount = SDL_GetNumTouchFingers(event.touchId);
|
||||
|
||||
for (int i = 0; i < CORE.Input.Touch.pointCount; i++)
|
||||
|
|
@ -1003,6 +1303,7 @@ static void UpdateTouchPointsSDL(SDL_TouchFingerEvent event)
|
|||
CORE.Input.Touch.position[i].y = finger->y*CORE.Window.screen.height;
|
||||
CORE.Input.Touch.currentTouchState[i] = 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
for (int i = CORE.Input.Touch.pointCount; i < MAX_TOUCH_POINTS; i++) CORE.Input.Touch.currentTouchState[i] = 0;
|
||||
}
|
||||
|
|
@ -1094,16 +1395,28 @@ void PollInputEvents(void)
|
|||
CORE.Window.dropFilepaths = (char **)RL_CALLOC(1024, sizeof(char *));
|
||||
|
||||
CORE.Window.dropFilepaths[CORE.Window.dropFileCount] = (char *)RL_CALLOC(MAX_FILEPATH_LENGTH, sizeof(char));
|
||||
|
||||
#if defined(PLATFORM_DESKTOP_SDL3)
|
||||
// const char *data; /**< The text for SDL_EVENT_DROP_TEXT and the file name for SDL_EVENT_DROP_FILE, NULL for other events */
|
||||
// Event memory is now managed by SDL, so you should not free the data in SDL_EVENT_DROP_FILE, and if you want to hold onto the text in SDL_EVENT_TEXT_EDITING and SDL_EVENT_TEXT_INPUT events, you should make a copy of it. SDL_TEXTINPUTEVENT_TEXT_SIZE is no longer necessary and has been removed.
|
||||
strcpy(CORE.Window.dropFilepaths[CORE.Window.dropFileCount], event.drop.data);
|
||||
#else
|
||||
strcpy(CORE.Window.dropFilepaths[CORE.Window.dropFileCount], event.drop.file);
|
||||
SDL_free(event.drop.file);
|
||||
#endif
|
||||
|
||||
CORE.Window.dropFileCount++;
|
||||
}
|
||||
else if (CORE.Window.dropFileCount < 1024)
|
||||
{
|
||||
CORE.Window.dropFilepaths[CORE.Window.dropFileCount] = (char *)RL_CALLOC(MAX_FILEPATH_LENGTH, sizeof(char));
|
||||
|
||||
#if defined(PLATFORM_DESKTOP_SDL3)
|
||||
strcpy(CORE.Window.dropFilepaths[CORE.Window.dropFileCount], event.drop.data);
|
||||
#else
|
||||
strcpy(CORE.Window.dropFilepaths[CORE.Window.dropFileCount], event.drop.file);
|
||||
SDL_free(event.drop.file);
|
||||
#endif
|
||||
|
||||
CORE.Window.dropFileCount++;
|
||||
}
|
||||
|
|
@ -1112,10 +1425,18 @@ void PollInputEvents(void)
|
|||
} break;
|
||||
|
||||
// Window events are also polled (Minimized, maximized, close...)
|
||||
|
||||
#ifndef PLATFORM_DESKTOP_SDL3
|
||||
// SDL3 states:
|
||||
// The SDL_WINDOWEVENT_* events have been moved to top level events,
|
||||
// and SDL_WINDOWEVENT has been removed.
|
||||
// In general, handling this change just means checking for the individual events instead of first checking for SDL_WINDOWEVENT
|
||||
// and then checking for window events. You can compare the event >= SDL_EVENT_WINDOW_FIRST and <= SDL_EVENT_WINDOW_LAST if you need to see whether it's a window event.
|
||||
case SDL_WINDOWEVENT:
|
||||
{
|
||||
switch (event.window.event)
|
||||
{
|
||||
#endif
|
||||
case SDL_WINDOWEVENT_RESIZED:
|
||||
case SDL_WINDOWEVENT_SIZE_CHANGED:
|
||||
{
|
||||
|
|
@ -1143,14 +1464,23 @@ void PollInputEvents(void)
|
|||
case SDL_WINDOWEVENT_FOCUS_GAINED:
|
||||
case SDL_WINDOWEVENT_MAXIMIZED:
|
||||
case SDL_WINDOWEVENT_RESTORED:
|
||||
#if defined(PLATFORM_DESKTOP_SDL3)
|
||||
break;
|
||||
#else
|
||||
default: break;
|
||||
}
|
||||
} break;
|
||||
#endif
|
||||
|
||||
// Keyboard events
|
||||
case SDL_KEYDOWN:
|
||||
{
|
||||
#if defined(PLATFORM_DESKTOP_SDL3)
|
||||
// SDL3 Migration: The following structures have been removed: * SDL_Keysym
|
||||
KeyboardKey key = ConvertScancodeToKey(event.key.scancode);
|
||||
#else
|
||||
KeyboardKey key = ConvertScancodeToKey(event.key.keysym.scancode);
|
||||
#endif
|
||||
|
||||
if (key != KEY_NULL)
|
||||
{
|
||||
|
|
@ -1175,7 +1505,12 @@ void PollInputEvents(void)
|
|||
|
||||
case SDL_KEYUP:
|
||||
{
|
||||
|
||||
#if defined(PLATFORM_DESKTOP_SDL3)
|
||||
KeyboardKey key = ConvertScancodeToKey(event.key.scancode);
|
||||
#else
|
||||
KeyboardKey key = ConvertScancodeToKey(event.key.keysym.scancode);
|
||||
#endif
|
||||
if (key != KEY_NULL) CORE.Input.Keyboard.currentKeyState[key] = 0;
|
||||
} break;
|
||||
|
||||
|
|
@ -1527,7 +1862,11 @@ int InitPlatform(void)
|
|||
}
|
||||
|
||||
// Init window
|
||||
#if defined(PLATFORM_DESKTOP_SDL3)
|
||||
platform.window = SDL_CreateWindow(CORE.Window.title, CORE.Window.screen.width, CORE.Window.screen.height, flags);
|
||||
#else
|
||||
platform.window = SDL_CreateWindow(CORE.Window.title, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, CORE.Window.screen.width, CORE.Window.screen.height, flags);
|
||||
#endif
|
||||
|
||||
// Init OpenGL context
|
||||
platform.glContext = SDL_GL_CreateContext(platform.window);
|
||||
|
|
@ -1611,7 +1950,11 @@ int InitPlatform(void)
|
|||
CORE.Storage.basePath = SDL_GetBasePath(); // Alternative: GetWorkingDirectory();
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
TRACELOG(LOG_INFO, "PLATFORM: DESKTOP (SDL): Initialized successfully");
|
||||
#if defined(PLATFORM_DESKTOP_SDL3)
|
||||
TRACELOG(LOG_INFO, "PLATFORM: DESKTOP (SDL3): Initialized successfully");
|
||||
#else
|
||||
TRACELOG(LOG_INFO, "PLATFORM: DESKTOP (SDL2): Initialized successfully");
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -509,6 +509,16 @@ const char *GetClipboardText(void)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
// Get clipboard image
|
||||
Image GetClipboardImage(void)
|
||||
{
|
||||
Image image = { 0 };
|
||||
|
||||
TRACELOG(LOG_WARNING, "GetClipboardImage() not implemented on target platform");
|
||||
|
||||
return image;
|
||||
}
|
||||
|
||||
// Show mouse cursor
|
||||
void ShowCursor(void)
|
||||
{
|
||||
|
|
@ -610,7 +620,7 @@ int SetGamepadMappings(const char *mappings)
|
|||
}
|
||||
|
||||
// Set gamepad vibration
|
||||
void SetGamepadVibration(int gamepad, float leftMotor, float rightMotor)
|
||||
void SetGamepadVibration(int gamepad, float leftMotor, float rightMotor, float duration)
|
||||
{
|
||||
TRACELOG(LOG_WARNING, "GamepadSetVibration() not implemented on target platform");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -292,6 +292,16 @@ const char *GetClipboardText(void)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
// Get clipboard image
|
||||
Image GetClipboardImage(void)
|
||||
{
|
||||
Image image = { 0 };
|
||||
|
||||
TRACELOG(LOG_WARNING, "GetClipboardImage() not implemented on target platform");
|
||||
|
||||
return image;
|
||||
}
|
||||
|
||||
// Show mouse cursor
|
||||
void ShowCursor(void)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -324,8 +324,8 @@ void MaximizeWindow(void)
|
|||
platform.unmaximizedWidth = CORE.Window.screen.width;
|
||||
platform.unmaximizedHeight = CORE.Window.screen.height;
|
||||
|
||||
const int tabWidth = EM_ASM_INT( { return window.innerWidth; }, 0);
|
||||
const int tabHeight = EM_ASM_INT( { return window.innerHeight; }, 0);
|
||||
const int tabWidth = EM_ASM_INT( return window.innerWidth; );
|
||||
const int tabHeight = EM_ASM_INT( return window.innerHeight; );
|
||||
|
||||
if (tabWidth && tabHeight) glfwSetWindowSize(platform.handle, tabWidth, tabHeight);
|
||||
|
||||
|
|
@ -423,8 +423,8 @@ void SetWindowState(unsigned int flags)
|
|||
platform.unmaximizedWidth = CORE.Window.screen.width;
|
||||
platform.unmaximizedHeight = CORE.Window.screen.height;
|
||||
|
||||
const int tabWidth = EM_ASM_INT( { return window.innerWidth; }, 0);
|
||||
const int tabHeight = EM_ASM_INT( { return window.innerHeight; }, 0);
|
||||
const int tabWidth = EM_ASM_INT( return window.innerWidth; );
|
||||
const int tabHeight = EM_ASM_INT( return window.innerHeight; );
|
||||
|
||||
if (tabWidth && tabHeight) glfwSetWindowSize(platform.handle, tabWidth, tabHeight);
|
||||
|
||||
|
|
@ -771,8 +771,11 @@ Vector2 GetWindowPosition(void)
|
|||
// Get window scale DPI factor for current monitor
|
||||
Vector2 GetWindowScaleDPI(void)
|
||||
{
|
||||
TRACELOG(LOG_WARNING, "GetWindowScaleDPI() not implemented on target platform");
|
||||
return (Vector2){ 1.0f, 1.0f };
|
||||
// NOTE: Returned scale is relative to the current monitor where the browser window is located
|
||||
Vector2 scale = { 1.0f, 1.0f };
|
||||
scale.x = (float)EM_ASM_DOUBLE( { return window.devicePixelRatio; } );
|
||||
scale.y = scale.x;
|
||||
return scale;
|
||||
}
|
||||
|
||||
// Set clipboard text content
|
||||
|
|
@ -805,6 +808,16 @@ const char *GetClipboardText(void)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
// Get clipboard image
|
||||
Image GetClipboardImage(void)
|
||||
{
|
||||
Image image = { 0 };
|
||||
|
||||
TRACELOG(LOG_WARNING, "GetClipboardImage() not implemented on target platform");
|
||||
|
||||
return image;
|
||||
}
|
||||
|
||||
// Show mouse cursor
|
||||
void ShowCursor(void)
|
||||
{
|
||||
|
|
@ -892,9 +905,34 @@ int SetGamepadMappings(const char *mappings)
|
|||
}
|
||||
|
||||
// Set gamepad vibration
|
||||
void SetGamepadVibration(int gamepad, float leftMotor, float rightMotor)
|
||||
void SetGamepadVibration(int gamepad, float leftMotor, float rightMotor, float duration)
|
||||
{
|
||||
TRACELOG(LOG_WARNING, "GamepadSetVibration() not implemented on target platform");
|
||||
if ((gamepad < MAX_GAMEPADS) && CORE.Input.Gamepad.ready[gamepad] && (duration > 0.0f))
|
||||
{
|
||||
if (leftMotor < 0.0f) leftMotor = 0.0f;
|
||||
if (leftMotor > 1.0f) leftMotor = 1.0f;
|
||||
if (rightMotor < 0.0f) rightMotor = 0.0f;
|
||||
if (rightMotor > 1.0f) rightMotor = 1.0f;
|
||||
if (duration > MAX_GAMEPAD_VIBRATION_TIME) duration = MAX_GAMEPAD_VIBRATION_TIME;
|
||||
duration *= 1000.0f; // Convert duration to ms
|
||||
|
||||
// Note: At the moment (2024.10.21) Chrome, Edge, Opera, Safari, Android Chrome, Android Webview only support the vibrationActuator API,
|
||||
// and Firefox only supports the hapticActuators API
|
||||
EM_ASM({
|
||||
try
|
||||
{
|
||||
navigator.getGamepads()[$0].vibrationActuator.playEffect('dual-rumble', { startDelay: 0, duration: $3, weakMagnitude: $1, strongMagnitude: $2 });
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
try
|
||||
{
|
||||
navigator.getGamepads()[$0].hapticActuators[0].pulse($2, $3);
|
||||
}
|
||||
catch (e) { }
|
||||
}
|
||||
}, gamepad, leftMotor, rightMotor, duration);
|
||||
}
|
||||
}
|
||||
|
||||
// Set mouse position XY
|
||||
|
|
@ -1614,9 +1652,6 @@ static EM_BOOL EmscriptenFullscreenChangeCallback(int eventType, const Emscripte
|
|||
// return 1; // The event was consumed by the callback handler
|
||||
// }
|
||||
|
||||
EM_JS(int, GetWindowInnerWidth, (), { return window.innerWidth; });
|
||||
EM_JS(int, GetWindowInnerHeight, (), { return window.innerHeight; });
|
||||
|
||||
// Register DOM element resize event
|
||||
static EM_BOOL EmscriptenResizeCallback(int eventType, const EmscriptenUiEvent *event, void *userData)
|
||||
{
|
||||
|
|
@ -1625,8 +1660,8 @@ static EM_BOOL EmscriptenResizeCallback(int eventType, const EmscriptenUiEvent *
|
|||
|
||||
// This event is called whenever the window changes sizes,
|
||||
// so the size of the canvas object is explicitly retrieved below
|
||||
int width = GetWindowInnerWidth();
|
||||
int height = GetWindowInnerHeight();
|
||||
int width = EM_ASM_INT( return window.innerWidth; );
|
||||
int height = EM_ASM_INT( return window.innerHeight; );
|
||||
|
||||
if (width < (int)CORE.Window.screenMin.width) width = CORE.Window.screenMin.width;
|
||||
else if (width > (int)CORE.Window.screenMax.width && CORE.Window.screenMax.width > 0) width = CORE.Window.screenMax.width;
|
||||
|
|
@ -1756,11 +1791,14 @@ static EM_BOOL EmscriptenTouchCallback(int eventType, const EmscriptenTouchEvent
|
|||
|
||||
// Gesture data is sent to gestures system for processing
|
||||
ProcessGestureEvent(gestureEvent);
|
||||
|
||||
// Reset the pointCount for web, if it was the last Touch End event
|
||||
if (eventType == EMSCRIPTEN_EVENT_TOUCHEND && CORE.Input.Touch.pointCount == 1) CORE.Input.Touch.pointCount = 0;
|
||||
#endif
|
||||
|
||||
if (eventType == EMSCRIPTEN_EVENT_TOUCHEND)
|
||||
{
|
||||
CORE.Input.Touch.pointCount--;
|
||||
if (CORE.Input.Touch.pointCount < 0) CORE.Input.Touch.pointCount = 0;
|
||||
}
|
||||
|
||||
return 1; // The event was consumed by the callback handler
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1855,6 +1855,8 @@ void SeekMusicStream(Music music, float position)
|
|||
|
||||
ma_mutex_lock(&AUDIO.System.lock);
|
||||
music.stream.buffer->framesProcessed = positionInFrames;
|
||||
music.stream.buffer->isSubBufferProcessed[0] = true;
|
||||
music.stream.buffer->isSubBufferProcessed[1] = true;
|
||||
ma_mutex_unlock(&AUDIO.System.lock);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ BEGIN
|
|||
//BLOCK "080904E4" // English UK
|
||||
BLOCK "040904E4" // English US
|
||||
BEGIN
|
||||
//VALUE "CompanyName", "raylib technologies"
|
||||
VALUE "CompanyName", "raylib technologies"
|
||||
VALUE "FileDescription", "raylib dynamic library (www.raylib.com)"
|
||||
VALUE "FileVersion", "5.5.0"
|
||||
VALUE "InternalName", "raylib.dll"
|
||||
|
|
|
|||
78
src/raylib.h
|
|
@ -1,22 +1,22 @@
|
|||
/**********************************************************************************************
|
||||
*
|
||||
* raylib v5.5-dev - A simple and easy-to-use library to enjoy videogames programming (www.raylib.com)
|
||||
* raylib v5.6-dev - A simple and easy-to-use library to enjoy videogames programming (www.raylib.com)
|
||||
*
|
||||
* FEATURES:
|
||||
* - NO external dependencies, all required libraries included with raylib
|
||||
* - Multiplatform: Windows, Linux, FreeBSD, OpenBSD, NetBSD, DragonFly,
|
||||
* MacOS, Haiku, Android, Raspberry Pi, DRM native, HTML5.
|
||||
* - Written in plain C code (C99) in PascalCase/camelCase notation
|
||||
* - Hardware accelerated with OpenGL (1.1, 2.1, 3.3, 4.3 or ES2 - choose at compile)
|
||||
* - Hardware accelerated with OpenGL (1.1, 2.1, 3.3, 4.3, ES2, ES3 - choose at compile)
|
||||
* - Unique OpenGL abstraction layer (usable as standalone module): [rlgl]
|
||||
* - Multiple Fonts formats supported (TTF, XNA fonts, AngelCode fonts)
|
||||
* - Multiple Fonts formats supported (TTF, OTF, FNT, BDF, Sprite fonts)
|
||||
* - Outstanding texture formats support, including compressed formats (DXT, ETC, ASTC)
|
||||
* - Full 3d support for 3d Shapes, Models, Billboards, Heightmaps and more!
|
||||
* - Flexible Materials system, supporting classic maps and PBR maps
|
||||
* - Animated 3D models supported (skeletal bones animation) (IQM)
|
||||
* - Animated 3D models supported (skeletal bones animation) (IQM, M3D, GLTF)
|
||||
* - Shaders support, including Model shaders and Postprocessing shaders
|
||||
* - Powerful math module for Vector, Matrix and Quaternion operations: [raymath]
|
||||
* - Audio loading and playing with streaming support (WAV, OGG, MP3, FLAC, XM, MOD)
|
||||
* - Audio loading and playing with streaming support (WAV, OGG, MP3, FLAC, QOA, XM, MOD)
|
||||
* - VR stereo rendering with configurable HMD device parameters
|
||||
* - Bindings to multiple programming languages available!
|
||||
*
|
||||
|
|
@ -27,29 +27,35 @@
|
|||
* - One default RenderBatch is loaded on rlglInit()->rlLoadRenderBatch() [rlgl] (OpenGL 3.3 or ES2)
|
||||
*
|
||||
* DEPENDENCIES (included):
|
||||
* [rcore] rglfw (Camilla Löwy - github.com/glfw/glfw) for window/context management and input (PLATFORM_DESKTOP)
|
||||
* [rlgl] glad (David Herberth - github.com/Dav1dde/glad) for OpenGL 3.3 extensions loading (PLATFORM_DESKTOP)
|
||||
* [rcore][GLFW] rglfw (Camilla Löwy - github.com/glfw/glfw) for window/context management and input
|
||||
* [rcore][RGFW] rgfw (ColleagueRiley - github.com/ColleagueRiley/RGFW) for window/context management and input
|
||||
* [rlgl] glad/glad_gles2 (David Herberth - github.com/Dav1dde/glad) for OpenGL 3.3 extensions loading
|
||||
* [raudio] miniaudio (David Reid - github.com/mackron/miniaudio) for audio device/context management
|
||||
*
|
||||
* OPTIONAL DEPENDENCIES (included):
|
||||
* [rcore] msf_gif (Miles Fogle) for GIF recording
|
||||
* [rcore] sinfl (Micha Mettke) for DEFLATE decompression algorithm
|
||||
* [rcore] sdefl (Micha Mettke) for DEFLATE compression algorithm
|
||||
* [rcore] rprand (Ramon Snatamaria) for pseudo-random numbers generation
|
||||
* [rtextures] qoi (Dominic Szablewski - https://phoboslab.org) for QOI image manage
|
||||
* [rtextures] stb_image (Sean Barret) for images loading (BMP, TGA, PNG, JPEG, HDR...)
|
||||
* [rtextures] stb_image_write (Sean Barret) for image writing (BMP, TGA, PNG, JPG)
|
||||
* [rtextures] stb_image_resize (Sean Barret) for image resizing algorithms
|
||||
* [rtextures] stb_image_resize2 (Sean Barret) for image resizing algorithms
|
||||
* [rtextures] stb_perlin (Sean Barret) for Perlin Noise image generation
|
||||
* [rtext] stb_truetype (Sean Barret) for ttf fonts loading
|
||||
* [rtext] stb_rect_pack (Sean Barret) for rectangles packing
|
||||
* [rmodels] par_shapes (Philip Rideout) for parametric 3d shapes generation
|
||||
* [rmodels] tinyobj_loader_c (Syoyo Fujita) for models loading (OBJ, MTL)
|
||||
* [rmodels] cgltf (Johannes Kuhlmann) for models loading (glTF)
|
||||
* [rmodels] Model3D (bzt) for models loading (M3D, https://bztsrc.gitlab.io/model3d)
|
||||
* [rmodels] m3d (bzt) for models loading (M3D, https://bztsrc.gitlab.io/model3d)
|
||||
* [rmodels] vox_loader (Johann Nadalutti) for models loading (VOX)
|
||||
* [raudio] dr_wav (David Reid) for WAV audio file loading
|
||||
* [raudio] dr_flac (David Reid) for FLAC audio file loading
|
||||
* [raudio] dr_mp3 (David Reid) for MP3 audio file loading
|
||||
* [raudio] stb_vorbis (Sean Barret) for OGG audio loading
|
||||
* [raudio] jar_xm (Joshua Reisenauer) for XM audio module loading
|
||||
* [raudio] jar_mod (Joshua Reisenauer) for MOD audio module loading
|
||||
* [raudio] qoa (Dominic Szablewski - https://phoboslab.org) for QOA audio manage
|
||||
*
|
||||
*
|
||||
* LICENSE: zlib/libpng
|
||||
|
|
@ -82,9 +88,9 @@
|
|||
#include <stdarg.h> // Required for: va_list - Only used by TraceLogCallback
|
||||
|
||||
#define RAYLIB_VERSION_MAJOR 5
|
||||
#define RAYLIB_VERSION_MINOR 5
|
||||
#define RAYLIB_VERSION_MINOR 6
|
||||
#define RAYLIB_VERSION_PATCH 0
|
||||
#define RAYLIB_VERSION "5.5-dev"
|
||||
#define RAYLIB_VERSION "5.6-dev"
|
||||
|
||||
// Function specifiers in case library is build/used as a shared library
|
||||
// NOTE: Microsoft specifiers to tell compiler that symbols are imported/exported from a .dll
|
||||
|
|
@ -877,8 +883,7 @@ typedef enum {
|
|||
CUBEMAP_LAYOUT_LINE_VERTICAL, // Layout is defined by a vertical line with faces
|
||||
CUBEMAP_LAYOUT_LINE_HORIZONTAL, // Layout is defined by a horizontal line with faces
|
||||
CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR, // Layout is defined by a 3x4 cross with cubemap faces
|
||||
CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE, // Layout is defined by a 4x3 cross with cubemap faces
|
||||
CUBEMAP_LAYOUT_PANORAMA // Layout is defined by a panorama image (equirrectangular map)
|
||||
CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE // Layout is defined by a 4x3 cross with cubemap faces
|
||||
} CubemapLayout;
|
||||
|
||||
// Font type, defines generation method
|
||||
|
|
@ -965,36 +970,36 @@ RLAPI void CloseWindow(void); // Close windo
|
|||
RLAPI bool WindowShouldClose(void); // Check if application should close (KEY_ESCAPE pressed or windows close icon clicked)
|
||||
RLAPI bool IsWindowReady(void); // Check if window has been initialized successfully
|
||||
RLAPI bool IsWindowFullscreen(void); // Check if window is currently fullscreen
|
||||
RLAPI bool IsWindowHidden(void); // Check if window is currently hidden (only PLATFORM_DESKTOP)
|
||||
RLAPI bool IsWindowMinimized(void); // Check if window is currently minimized (only PLATFORM_DESKTOP)
|
||||
RLAPI bool IsWindowMaximized(void); // Check if window is currently maximized (only PLATFORM_DESKTOP)
|
||||
RLAPI bool IsWindowFocused(void); // Check if window is currently focused (only PLATFORM_DESKTOP)
|
||||
RLAPI bool IsWindowHidden(void); // Check if window is currently hidden
|
||||
RLAPI bool IsWindowMinimized(void); // Check if window is currently minimized
|
||||
RLAPI bool IsWindowMaximized(void); // Check if window is currently maximized
|
||||
RLAPI bool IsWindowFocused(void); // Check if window is currently focused
|
||||
RLAPI bool IsWindowResized(void); // Check if window has been resized last frame
|
||||
RLAPI bool IsWindowState(unsigned int flag); // Check if one specific window flag is enabled
|
||||
RLAPI void SetWindowState(unsigned int flags); // Set window configuration state using flags (only PLATFORM_DESKTOP)
|
||||
RLAPI void SetWindowState(unsigned int flags); // Set window configuration state using flags
|
||||
RLAPI void ClearWindowState(unsigned int flags); // Clear window configuration state flags
|
||||
RLAPI void ToggleFullscreen(void); // Toggle window state: fullscreen/windowed [resizes monitor to match window resolution] (only PLATFORM_DESKTOP)
|
||||
RLAPI void ToggleBorderlessWindowed(void); // Toggle window state: borderless windowed [resizes window to match monitor resolution] (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 RestoreWindow(void); // Set window state: not minimized/maximized (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 and PLATFORM_WEB)
|
||||
RLAPI void SetWindowPosition(int x, int y); // Set window position on screen (only PLATFORM_DESKTOP)
|
||||
RLAPI void ToggleFullscreen(void); // Toggle window state: fullscreen/windowed, resizes monitor to match window resolution
|
||||
RLAPI void ToggleBorderlessWindowed(void); // Toggle window state: borderless windowed, resizes window to match monitor resolution
|
||||
RLAPI void MaximizeWindow(void); // Set window state: maximized, if resizable
|
||||
RLAPI void MinimizeWindow(void); // Set window state: minimized, if resizable
|
||||
RLAPI void RestoreWindow(void); // Set window state: not minimized/maximized
|
||||
RLAPI void SetWindowIcon(Image image); // Set icon for window (single image, RGBA 32bit)
|
||||
RLAPI void SetWindowIcons(Image *images, int count); // Set icon for window (multiple images, RGBA 32bit)
|
||||
RLAPI void SetWindowTitle(const char *title); // Set title for window
|
||||
RLAPI void SetWindowPosition(int x, int y); // Set window position on screen
|
||||
RLAPI void SetWindowMonitor(int monitor); // Set monitor for the current window
|
||||
RLAPI void SetWindowMinSize(int width, int height); // Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE)
|
||||
RLAPI void SetWindowMaxSize(int width, int height); // Set window maximum dimensions (for FLAG_WINDOW_RESIZABLE)
|
||||
RLAPI void SetWindowSize(int width, int height); // Set window dimensions
|
||||
RLAPI void SetWindowOpacity(float opacity); // Set window opacity [0.0f..1.0f] (only PLATFORM_DESKTOP)
|
||||
RLAPI void SetWindowFocused(void); // Set window focused (only PLATFORM_DESKTOP)
|
||||
RLAPI void SetWindowOpacity(float opacity); // Set window opacity [0.0f..1.0f]
|
||||
RLAPI void SetWindowFocused(void); // Set window focused
|
||||
RLAPI void *GetWindowHandle(void); // Get native window handle
|
||||
RLAPI int GetScreenWidth(void); // Get current screen width
|
||||
RLAPI int GetScreenHeight(void); // Get current screen height
|
||||
RLAPI int GetRenderWidth(void); // Get current render width (it considers HiDPI)
|
||||
RLAPI int GetRenderHeight(void); // Get current render height (it considers HiDPI)
|
||||
RLAPI int GetMonitorCount(void); // Get number of connected monitors
|
||||
RLAPI int GetCurrentMonitor(void); // Get current connected monitor
|
||||
RLAPI int GetCurrentMonitor(void); // Get current monitor where window is placed
|
||||
RLAPI Vector2 GetMonitorPosition(int monitor); // Get specified monitor position
|
||||
RLAPI int GetMonitorWidth(int monitor); // Get specified monitor width (current video mode used by monitor)
|
||||
RLAPI int GetMonitorHeight(int monitor); // Get specified monitor height (current video mode used by monitor)
|
||||
|
|
@ -1006,6 +1011,7 @@ RLAPI Vector2 GetWindowScaleDPI(void); // Get window
|
|||
RLAPI const char *GetMonitorName(int monitor); // Get the human-readable, UTF-8 encoded name of the specified monitor
|
||||
RLAPI void SetClipboardText(const char *text); // Set clipboard text content
|
||||
RLAPI const char *GetClipboardText(void); // Get clipboard text content
|
||||
RLAPI Image GetClipboardImage(void); // Get clipboard image content
|
||||
RLAPI void EnableEventWaiting(void); // Enable waiting for events on EndDrawing(), no automatic event polling
|
||||
RLAPI void DisableEventWaiting(void); // Disable waiting for events on EndDrawing(), automatic events polling
|
||||
|
||||
|
|
@ -1165,7 +1171,7 @@ RLAPI void PlayAutomationEvent(AutomationEvent event);
|
|||
|
||||
// Input-related functions: keyboard
|
||||
RLAPI bool IsKeyPressed(int key); // Check if a key has been pressed once
|
||||
RLAPI bool IsKeyPressedRepeat(int key); // Check if a key has been pressed again (Only PLATFORM_DESKTOP)
|
||||
RLAPI bool IsKeyPressedRepeat(int key); // Check if a key has been pressed again
|
||||
RLAPI bool IsKeyDown(int key); // Check if a key is being pressed
|
||||
RLAPI bool IsKeyReleased(int key); // Check if a key has been released once
|
||||
RLAPI bool IsKeyUp(int key); // Check if a key is NOT being pressed
|
||||
|
|
@ -1184,7 +1190,7 @@ RLAPI int GetGamepadButtonPressed(void);
|
|||
RLAPI int GetGamepadAxisCount(int gamepad); // Get gamepad axis count for a gamepad
|
||||
RLAPI float GetGamepadAxisMovement(int gamepad, int axis); // Get axis movement value for a gamepad axis
|
||||
RLAPI int SetGamepadMappings(const char *mappings); // Set internal gamepad mappings (SDL_GameControllerDB)
|
||||
RLAPI void SetGamepadVibration(int gamepad, float leftMotor, float rightMotor); // Set gamepad vibration for both motors
|
||||
RLAPI void SetGamepadVibration(int gamepad, float leftMotor, float rightMotor, float duration); // Set gamepad vibration for both motors (duration in seconds)
|
||||
|
||||
// Input-related functions: mouse
|
||||
RLAPI bool IsMouseButtonPressed(int button); // Check if a mouse button has been pressed once
|
||||
|
|
@ -1299,13 +1305,13 @@ RLAPI Vector2 GetSplinePointBezierCubic(Vector2 p1, Vector2 c2, Vector2 c3, Vect
|
|||
RLAPI bool CheckCollisionRecs(Rectangle rec1, Rectangle rec2); // Check collision between two rectangles
|
||||
RLAPI bool CheckCollisionCircles(Vector2 center1, float radius1, Vector2 center2, float radius2); // Check collision between two circles
|
||||
RLAPI bool CheckCollisionCircleRec(Vector2 center, float radius, Rectangle rec); // Check collision between circle and rectangle
|
||||
RLAPI bool CheckCollisionCircleLine(Vector2 center, float radius, Vector2 p1, Vector2 p2); // Check if circle collides with a line created betweeen two points [p1] and [p2]
|
||||
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 CheckCollisionPointTriangle(Vector2 point, Vector2 p1, Vector2 p2, Vector2 p3); // Check if point is inside a triangle
|
||||
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 CheckCollisionPointPoly(Vector2 point, const 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 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 CheckCollisionCircleLine(Vector2 center, float radius, Vector2 p1, Vector2 p2); // Check if circle collides with a line created betweeen two points [p1] and [p2]
|
||||
RLAPI Rectangle GetCollisionRec(Rectangle rec1, Rectangle rec2); // Get collision rectangle for two rectangles collision
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
|
|
@ -1596,11 +1602,11 @@ RLAPI void SetModelMeshMaterial(Model *model, int meshId, int materialId);
|
|||
|
||||
// Model animations loading/unloading functions
|
||||
RLAPI ModelAnimation *LoadModelAnimations(const char *fileName, int *animCount); // Load model animations from file
|
||||
RLAPI void UpdateModelAnimation(Model model, ModelAnimation anim, int frame); // Update model animation pose
|
||||
RLAPI void UpdateModelAnimation(Model model, ModelAnimation anim, int frame); // Update model animation pose (CPU)
|
||||
RLAPI void UpdateModelAnimationBones(Model model, ModelAnimation anim, int frame); // Update model animation mesh bone matrices (GPU skinning)
|
||||
RLAPI void UnloadModelAnimation(ModelAnimation anim); // Unload animation data
|
||||
RLAPI void UnloadModelAnimations(ModelAnimation *animations, int animCount); // Unload animation array data
|
||||
RLAPI bool IsModelAnimationValid(Model model, ModelAnimation anim); // Check model animation skeleton match
|
||||
RLAPI void UpdateModelAnimationBoneMatrices(Model model, ModelAnimation anim, int frame); // Update model animation mesh bone matrices (Note GPU skinning does not work on Mac)
|
||||
|
||||
// Collision detection functions
|
||||
RLAPI bool CheckCollisionSpheres(Vector3 center1, float radius1, Vector3 center2, float radius2); // Check collision between two spheres
|
||||
|
|
|
|||
BIN
src/raylib.ico
|
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 6.0 KiB |
|
|
@ -9,12 +9,12 @@ BEGIN
|
|||
//BLOCK "080904E4" // English UK
|
||||
BLOCK "040904E4" // English US
|
||||
BEGIN
|
||||
//VALUE "CompanyName", "raylib technologies"
|
||||
VALUE "CompanyName", "raylib technologies"
|
||||
VALUE "FileDescription", "raylib application (www.raylib.com)"
|
||||
VALUE "FileVersion", "5.5.0"
|
||||
VALUE "InternalName", "raylib app"
|
||||
VALUE "InternalName", "raylib"
|
||||
VALUE "LegalCopyright", "(c) 2024 Ramon Santamaria (@raysan5)"
|
||||
//VALUE "OriginalFilename", "raylib_app"
|
||||
VALUE "OriginalFilename", "raylib"
|
||||
VALUE "ProductName", "raylib app"
|
||||
VALUE "ProductVersion", "5.5.0"
|
||||
END
|
||||
|
|
|
|||
|
|
@ -304,6 +304,14 @@ RMAPI float Vector2DotProduct(Vector2 v1, Vector2 v2)
|
|||
return result;
|
||||
}
|
||||
|
||||
// Calculate two vectors cross product
|
||||
RMAPI float Vector2CrossProduct(Vector2 v1, Vector2 v2)
|
||||
{
|
||||
float result = (v1.x*v2.y - v1.y*v2.x);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// Calculate distance between two vectors
|
||||
RMAPI float Vector2Distance(Vector2 v1, Vector2 v2)
|
||||
{
|
||||
|
|
@ -2569,7 +2577,13 @@ RMAPI void MatrixDecompose(Matrix mat, Vector3 *translation, Quaternion *rotatio
|
|||
if (!FloatEquals(det, 0))
|
||||
{
|
||||
clone.m0 /= s.x;
|
||||
clone.m4 /= s.x;
|
||||
clone.m8 /= s.x;
|
||||
clone.m1 /= s.y;
|
||||
clone.m5 /= s.y;
|
||||
clone.m9 /= s.y;
|
||||
clone.m2 /= s.z;
|
||||
clone.m6 /= s.z;
|
||||
clone.m10 /= s.z;
|
||||
|
||||
// Extract rotation
|
||||
|
|
@ -2642,7 +2656,7 @@ inline Vector2 operator * (const Vector2& lhs, const Matrix& rhs)
|
|||
return Vector2Transform(lhs, rhs);
|
||||
}
|
||||
|
||||
inline const Vector2& operator -= (Vector2& lhs, const Matrix& rhs)
|
||||
inline const Vector2& operator *= (Vector2& lhs, const Matrix& rhs)
|
||||
{
|
||||
lhs = Vector2Transform(lhs, rhs);
|
||||
return lhs;
|
||||
|
|
@ -2655,7 +2669,7 @@ inline Vector2 operator / (const Vector2& lhs, const float& rhs)
|
|||
|
||||
inline const Vector2& operator /= (Vector2& lhs, const float& rhs)
|
||||
{
|
||||
lhs = Vector2Scale(lhs, rhs);
|
||||
lhs = Vector2Scale(lhs, 1.0f / rhs);
|
||||
return lhs;
|
||||
}
|
||||
|
||||
|
|
@ -2736,7 +2750,7 @@ inline Vector3 operator * (const Vector3& lhs, const Matrix& rhs)
|
|||
return Vector3Transform(lhs, rhs);
|
||||
}
|
||||
|
||||
inline const Vector3& operator -= (Vector3& lhs, const Matrix& rhs)
|
||||
inline const Vector3& operator *= (Vector3& lhs, const Matrix& rhs)
|
||||
{
|
||||
lhs = Vector3Transform(lhs, rhs);
|
||||
return lhs;
|
||||
|
|
@ -2749,7 +2763,7 @@ inline Vector3 operator / (const Vector3& lhs, const float& rhs)
|
|||
|
||||
inline const Vector3& operator /= (Vector3& lhs, const float& rhs)
|
||||
{
|
||||
lhs = Vector3Scale(lhs, rhs);
|
||||
lhs = Vector3Scale(lhs, 1.0f / rhs);
|
||||
return lhs;
|
||||
}
|
||||
|
||||
|
|
@ -2833,7 +2847,7 @@ inline Vector4 operator / (const Vector4& lhs, const float& rhs)
|
|||
|
||||
inline const Vector4& operator /= (Vector4& lhs, const float& rhs)
|
||||
{
|
||||
lhs = Vector4Scale(lhs, rhs);
|
||||
lhs = Vector4Scale(lhs, 1.0f / rhs);
|
||||
return lhs;
|
||||
}
|
||||
|
||||
|
|
|
|||
30
src/rcore.c
|
|
@ -161,8 +161,8 @@
|
|||
__declspec(dllimport) unsigned long __stdcall GetModuleFileNameA(void *hModule, void *lpFilename, unsigned long nSize);
|
||||
__declspec(dllimport) unsigned long __stdcall GetModuleFileNameW(void *hModule, void *lpFilename, unsigned long nSize);
|
||||
__declspec(dllimport) int __stdcall WideCharToMultiByte(unsigned int cp, unsigned long flags, void *widestr, int cchwide, void *str, int cbmb, void *defchar, int *used_default);
|
||||
unsigned int __stdcall timeBeginPeriod(unsigned int uPeriod);
|
||||
unsigned int __stdcall timeEndPeriod(unsigned int uPeriod);
|
||||
__declspec(dllimport) unsigned int __stdcall timeBeginPeriod(unsigned int uPeriod);
|
||||
__declspec(dllimport) unsigned int __stdcall timeEndPeriod(unsigned int uPeriod);
|
||||
#elif defined(__linux__)
|
||||
#include <unistd.h>
|
||||
#elif defined(__FreeBSD__)
|
||||
|
|
@ -512,6 +512,29 @@ const char *TextFormat(const char *text, ...); // Formatting of tex
|
|||
#define PLATFORM_DESKTOP_GLFW
|
||||
#endif
|
||||
|
||||
// We're using `#pragma message` because `#warning` is not adopted by MSVC.
|
||||
#if defined(SUPPORT_CLIPBOARD_IMAGE)
|
||||
#if !defined(SUPPORT_MODULE_RTEXTURES)
|
||||
#pragma message ("Warning: Enabling SUPPORT_CLIPBOARD_IMAGE requires SUPPORT_MODULE_RTEXTURES to work properly")
|
||||
#endif
|
||||
|
||||
// It's nice to have support Bitmap on Linux as well, but not as necessary as Windows
|
||||
#if !defined(SUPPORT_FILEFORMAT_BMP) && defined(_WIN32)
|
||||
#pragma message ("Warning: Enabling SUPPORT_CLIPBOARD_IMAGE requires SUPPORT_FILEFORMAT_BMP, specially on Windows")
|
||||
#endif
|
||||
|
||||
// From what I've tested applications on Wayland saves images on clipboard as PNG.
|
||||
#if (!defined(SUPPORT_FILEFORMAT_PNG) || !defined(SUPPORT_FILEFORMAT_JPG)) && !defined(_WIN32)
|
||||
#pragma message ("Warning: Getting image from the clipboard might not work without SUPPORT_FILEFORMAT_PNG or SUPPORT_FILEFORMAT_JPG")
|
||||
#endif
|
||||
|
||||
// Not needed because `rtexture.c` will automatically defined STBI_REQUIRED when any SUPPORT_FILEFORMAT_* is defined.
|
||||
// #if !defined(STBI_REQUIRED)
|
||||
// #pragma message ("Warning: "STBI_REQUIRED is not defined, that means we can't load images from clipbard"
|
||||
// #endif
|
||||
|
||||
#endif // SUPPORT_CLIPBOARD_IMAGE
|
||||
|
||||
// Include platform-specific submodules
|
||||
#if defined(PLATFORM_DESKTOP_GLFW)
|
||||
#include "platforms/rcore_desktop_glfw.c"
|
||||
|
|
@ -3295,8 +3318,7 @@ float GetGamepadAxisMovement(int gamepad, int axis)
|
|||
if ((gamepad < MAX_GAMEPADS) && CORE.Input.Gamepad.ready[gamepad] && (axis < MAX_GAMEPAD_AXIS)) {
|
||||
float movement = value < 0.0f ? CORE.Input.Gamepad.axisState[gamepad][axis] : fabsf(CORE.Input.Gamepad.axisState[gamepad][axis]);
|
||||
|
||||
// 0.1f = GAMEPAD_AXIS_MINIMUM_DRIFT/DELTA
|
||||
if (movement > value + 0.1f) value = CORE.Input.Gamepad.axisState[gamepad][axis];
|
||||
if (movement > value) value = CORE.Input.Gamepad.axisState[gamepad][axis];
|
||||
}
|
||||
|
||||
return value;
|
||||
|
|
|
|||
98
src/rlgl.h
|
|
@ -3,22 +3,22 @@
|
|||
* rlgl v5.0 - A multi-OpenGL abstraction layer with an immediate-mode style API
|
||||
*
|
||||
* DESCRIPTION:
|
||||
* 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, ES 3.0)
|
||||
* that provides a pseudo-OpenGL 1.1 immediate-mode style API (rlVertex, rlTranslate, rlRotate...)
|
||||
*
|
||||
* ADDITIONAL NOTES:
|
||||
* When choosing an OpenGL backend different than OpenGL 1.1, some internal buffer are
|
||||
* initialized on rlglInit() to accumulate vertex data.
|
||||
* initialized on rlglInit() to accumulate vertex data
|
||||
*
|
||||
* When an internal state change is required all the stored vertex data is renderer in batch,
|
||||
* additionally, rlDrawRenderBatchActive() could be called to force flushing of the batch.
|
||||
* additionally, rlDrawRenderBatchActive() could be called to force flushing of the batch
|
||||
*
|
||||
* Some resources are also loaded for convenience, here the complete list:
|
||||
* - Default batch (RLGL.defaultBatch): RenderBatch system to accumulate vertex data
|
||||
* - Default texture (RLGL.defaultTextureId): 1x1 white pixel R8G8B8A8
|
||||
* - Default shader (RLGL.State.defaultShaderId, RLGL.State.defaultShaderLocs)
|
||||
*
|
||||
* Internal buffer (and resources) must be manually unloaded calling rlglClose().
|
||||
* Internal buffer (and resources) must be manually unloaded calling rlglClose()
|
||||
*
|
||||
* CONFIGURATION:
|
||||
* #define GRAPHICS_API_OPENGL_11
|
||||
|
|
@ -32,9 +32,9 @@
|
|||
* required by any other module, use rlGetVersion() to check it
|
||||
*
|
||||
* #define RLGL_IMPLEMENTATION
|
||||
* Generates the implementation of the library into the included file.
|
||||
* 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.
|
||||
* or source files without problems. But only ONE file should hold the implementation
|
||||
*
|
||||
* #define RLGL_RENDER_TEXTURES_HINT
|
||||
* Enable framebuffer objects (fbo) support (enabled by default)
|
||||
|
|
@ -749,7 +749,7 @@ RLAPI void rlDrawVertexArrayElementsInstanced(int offset, int count, const void
|
|||
// Textures management
|
||||
RLAPI unsigned int rlLoadTexture(const void *data, int width, int height, int format, int mipmapCount); // Load texture data
|
||||
RLAPI unsigned int rlLoadTextureDepth(int width, int height, bool useRenderBuffer); // Load depth texture/renderbuffer (to be attached to fbo)
|
||||
RLAPI unsigned int rlLoadTextureCubemap(const void *data, int size, int format); // Load texture cubemap data
|
||||
RLAPI unsigned int rlLoadTextureCubemap(const void *data, int size, int format, int mipmapCount); // Load texture cubemap data
|
||||
RLAPI void rlUpdateTexture(unsigned int id, int offsetX, int offsetY, int width, int height, int format, const void *data); // Update texture with new data on GPU
|
||||
RLAPI void rlGetGlTextureFormats(int format, unsigned int *glInternalFormat, unsigned int *glFormat, unsigned int *glType); // Get OpenGL internal formats
|
||||
RLAPI const char *rlGetPixelFormatName(unsigned int format); // Get name string for pixel format
|
||||
|
|
@ -1503,8 +1503,8 @@ void rlVertex3f(float x, float y, float z)
|
|||
tz = RLGL.State.transform.m2*x + RLGL.State.transform.m6*y + RLGL.State.transform.m10*z + RLGL.State.transform.m14;
|
||||
}
|
||||
|
||||
// WARNING: We can't break primitives when launching a new batch.
|
||||
// RL_LINES comes in pairs, RL_TRIANGLES come in groups of 3 vertices and RL_QUADS come in groups of 4 vertices.
|
||||
// WARNING: We can't break primitives when launching a new batch
|
||||
// RL_LINES comes in pairs, RL_TRIANGLES come in groups of 3 vertices and RL_QUADS come in groups of 4 vertices
|
||||
// We must check current draw.mode when a new vertex is required and finish the batch only if the draw.mode draw.vertexCount is %2, %3 or %4
|
||||
if (RLGL.State.vertexCounter > (RLGL.currentBatch->vertexBuffer[RLGL.currentBatch->currentBuffer].elementCount*4 - 4))
|
||||
{
|
||||
|
|
@ -2933,11 +2933,11 @@ void rlDrawRenderBatch(rlRenderBatch *batch)
|
|||
glBufferSubData(GL_ARRAY_BUFFER, 0, RLGL.State.vertexCounter*4*sizeof(unsigned char), batch->vertexBuffer[batch->currentBuffer].colors);
|
||||
//glBufferData(GL_ARRAY_BUFFER, sizeof(float)*4*4*batch->vertexBuffer[batch->currentBuffer].elementCount, batch->vertexBuffer[batch->currentBuffer].colors, GL_DYNAMIC_DRAW); // Update all buffer
|
||||
|
||||
// NOTE: glMapBuffer() causes sync issue.
|
||||
// If GPU is working with this buffer, glMapBuffer() will wait(stall) until GPU to finish its job.
|
||||
// To avoid waiting (idle), you can call first glBufferData() with NULL pointer before glMapBuffer().
|
||||
// NOTE: glMapBuffer() causes sync issue
|
||||
// If GPU is working with this buffer, glMapBuffer() will wait(stall) until GPU to finish its job
|
||||
// To avoid waiting (idle), you can call first glBufferData() with NULL pointer before glMapBuffer()
|
||||
// If you do that, the previous data in PBO will be discarded and glMapBuffer() returns a new
|
||||
// allocated pointer immediately even if GPU is still working with the previous data.
|
||||
// allocated pointer immediately even if GPU is still working with the previous data
|
||||
|
||||
// Another option: map the buffer object into client's memory
|
||||
// Probably this code could be moved somewhere else...
|
||||
|
|
@ -2990,7 +2990,7 @@ void rlDrawRenderBatch(rlRenderBatch *batch)
|
|||
}
|
||||
|
||||
// WARNING: For the following setup of the view, model, and normal matrices, it is expected that
|
||||
// transformations and rendering occur between rlPushMatrix and rlPopMatrix.
|
||||
// transformations and rendering occur between rlPushMatrix() and rlPopMatrix()
|
||||
|
||||
if (RLGL.State.currentShaderLocs[RL_SHADER_LOC_MATRIX_VIEW] != -1)
|
||||
{
|
||||
|
|
@ -3060,15 +3060,15 @@ void rlDrawRenderBatch(rlRenderBatch *batch)
|
|||
if ((batch->draws[i].mode == RL_LINES) || (batch->draws[i].mode == RL_TRIANGLES)) glDrawArrays(batch->draws[i].mode, vertexOffset, batch->draws[i].vertexCount);
|
||||
else
|
||||
{
|
||||
#if defined(GRAPHICS_API_OPENGL_33)
|
||||
#if defined(GRAPHICS_API_OPENGL_33)
|
||||
// We need to define the number of indices to be processed: elementCount*6
|
||||
// NOTE: The final parameter tells the GPU the offset in bytes from the
|
||||
// start of the index buffer to the location of the first index to process
|
||||
glDrawElements(GL_TRIANGLES, batch->draws[i].vertexCount/4*6, GL_UNSIGNED_INT, (GLvoid *)(vertexOffset/4*6*sizeof(GLuint)));
|
||||
#endif
|
||||
#if defined(GRAPHICS_API_OPENGL_ES2)
|
||||
#endif
|
||||
#if defined(GRAPHICS_API_OPENGL_ES2)
|
||||
glDrawElements(GL_TRIANGLES, batch->draws[i].vertexCount/4*6, GL_UNSIGNED_SHORT, (GLvoid *)(vertexOffset/4*6*sizeof(GLushort)));
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
vertexOffset += (batch->draws[i].vertexCount + batch->draws[i].vertexAlignment);
|
||||
|
|
@ -3386,11 +3386,17 @@ unsigned int rlLoadTextureDepth(int width, int height, bool useRenderBuffer)
|
|||
// Load texture cubemap
|
||||
// NOTE: Cubemap data is expected to be 6 images in a single data array (one after the other),
|
||||
// expected the following convention: +X, -X, +Y, -Y, +Z, -Z
|
||||
unsigned int rlLoadTextureCubemap(const void *data, int size, int format)
|
||||
unsigned int rlLoadTextureCubemap(const void *data, int size, int format, int mipmapCount)
|
||||
{
|
||||
unsigned int id = 0;
|
||||
|
||||
#if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2)
|
||||
int mipSize = size;
|
||||
|
||||
// NOTE: Added pointer math separately from function to avoid UBSAN complaining
|
||||
unsigned char *dataPtr = NULL;
|
||||
if (data != NULL) dataPtr = (unsigned char *)data;
|
||||
|
||||
unsigned int dataSize = rlGetPixelDataSize(size, size, format);
|
||||
|
||||
glGenTextures(1, &id);
|
||||
|
|
@ -3401,24 +3407,28 @@ unsigned int rlLoadTextureCubemap(const void *data, int size, int format)
|
|||
|
||||
if (glInternalFormat != 0)
|
||||
{
|
||||
// Load cubemap faces
|
||||
for (unsigned int i = 0; i < 6; i++)
|
||||
// Load cubemap faces/mipmaps
|
||||
for (int i = 0; i < 6*mipmapCount; i++)
|
||||
{
|
||||
int mipmapLevel = i/6;
|
||||
int face = i%6;
|
||||
|
||||
if (data == NULL)
|
||||
{
|
||||
if (format < RL_PIXELFORMAT_COMPRESSED_DXT1_RGB)
|
||||
{
|
||||
if ((format == RL_PIXELFORMAT_UNCOMPRESSED_R32) || (format == RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32A32)
|
||||
|| (format == RL_PIXELFORMAT_UNCOMPRESSED_R16) || (format == RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16A16))
|
||||
TRACELOG(RL_LOG_WARNING, "TEXTURES: Cubemap requested format not supported");
|
||||
else glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, glInternalFormat, size, size, 0, glFormat, glType, NULL);
|
||||
if ((format == RL_PIXELFORMAT_UNCOMPRESSED_R32) ||
|
||||
(format == RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32A32) ||
|
||||
(format == RL_PIXELFORMAT_UNCOMPRESSED_R16) ||
|
||||
(format == RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16A16)) TRACELOG(RL_LOG_WARNING, "TEXTURES: Cubemap requested format not supported");
|
||||
else glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + face, mipmapLevel, glInternalFormat, mipSize, mipSize, 0, glFormat, glType, NULL);
|
||||
}
|
||||
else TRACELOG(RL_LOG_WARNING, "TEXTURES: Empty cubemap creation does not support compressed format");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (format < RL_PIXELFORMAT_COMPRESSED_DXT1_RGB) glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, glInternalFormat, size, size, 0, glFormat, glType, (unsigned char *)data + i*dataSize);
|
||||
else glCompressedTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, glInternalFormat, size, size, 0, dataSize, (unsigned char *)data + i*dataSize);
|
||||
if (format < RL_PIXELFORMAT_COMPRESSED_DXT1_RGB) glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + face, mipmapLevel, glInternalFormat, mipSize, mipSize, 0, glFormat, glType, (unsigned char *)dataPtr + face*dataSize);
|
||||
else glCompressedTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + face, mipmapLevel, glInternalFormat, mipSize, mipSize, 0, dataSize, (unsigned char *)dataPtr + face*dataSize);
|
||||
}
|
||||
|
||||
#if defined(GRAPHICS_API_OPENGL_33)
|
||||
|
|
@ -3437,11 +3447,23 @@ unsigned int rlLoadTextureCubemap(const void *data, int size, int format)
|
|||
glTexParameteriv(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_SWIZZLE_RGBA, swizzleMask);
|
||||
}
|
||||
#endif
|
||||
if (face == 5)
|
||||
{
|
||||
mipSize /= 2;
|
||||
if (data != NULL) dataPtr += dataSize*6; // Increment data pointer to next mipmap
|
||||
|
||||
// Security check for NPOT textures
|
||||
if (mipSize < 1) mipSize = 1;
|
||||
|
||||
dataSize = rlGetPixelDataSize(mipSize, mipSize, format);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Set cubemap texture sampling parameters
|
||||
glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||
if (mipmapCount > 1) glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
|
||||
else glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||
|
||||
glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||
glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||
|
|
@ -3600,8 +3622,8 @@ void *rlReadTexturePixels(unsigned int id, int width, int height, int format)
|
|||
//glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_HEIGHT, &height);
|
||||
//glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_INTERNAL_FORMAT, &format);
|
||||
|
||||
// NOTE: Each row written to or read from by OpenGL pixel operations like glGetTexImage are aligned to a 4 byte boundary by default, which may add some padding.
|
||||
// Use glPixelStorei to modify padding with the GL_[UN]PACK_ALIGNMENT setting.
|
||||
// NOTE: Each row written to or read from by OpenGL pixel operations like glGetTexImage are aligned to a 4 byte boundary by default, which may add some padding
|
||||
// Use glPixelStorei to modify padding with the GL_[UN]PACK_ALIGNMENT setting
|
||||
// GL_PACK_ALIGNMENT affects operations that read from OpenGL memory (glReadPixels, glGetTexImage, etc.)
|
||||
// GL_UNPACK_ALIGNMENT affects operations that write to OpenGL memory (glTexImage, etc.)
|
||||
glPixelStorei(GL_PACK_ALIGNMENT, 1);
|
||||
|
|
@ -3622,7 +3644,7 @@ void *rlReadTexturePixels(unsigned int id, int width, int height, int format)
|
|||
|
||||
#if defined(GRAPHICS_API_OPENGL_ES2)
|
||||
// glGetTexImage() is not available on OpenGL ES 2.0
|
||||
// Texture width and height are required on OpenGL ES 2.0. There is no way to get it from texture id.
|
||||
// Texture width and height are required on OpenGL ES 2.0, there is no way to get it from texture id
|
||||
// Two possible Options:
|
||||
// 1 - Bind texture to color fbo attachment and glReadPixels()
|
||||
// 2 - Create an fbo, activate it, render quad with texture, glReadPixels()
|
||||
|
|
@ -3788,7 +3810,7 @@ void rlUnloadFramebuffer(unsigned int id)
|
|||
else if (depthType == GL_TEXTURE) glDeleteTextures(1, &depthIdU);
|
||||
|
||||
// NOTE: If a texture object is deleted while its image is attached to the *currently bound* framebuffer,
|
||||
// the texture image is automatically detached from the currently bound framebuffer.
|
||||
// the texture image is automatically detached from the currently bound framebuffer
|
||||
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, 0);
|
||||
glDeleteFramebuffers(1, &id);
|
||||
|
|
@ -4231,7 +4253,7 @@ unsigned int rlLoadShaderProgram(unsigned int vShaderId, unsigned int fShaderId)
|
|||
else
|
||||
{
|
||||
// Get the size of compiled shader program (not available on OpenGL ES 2.0)
|
||||
// NOTE: If GL_LINK_STATUS is GL_FALSE, program binary length is zero.
|
||||
// NOTE: If GL_LINK_STATUS is GL_FALSE, program binary length is zero
|
||||
//GLint binarySize = 0;
|
||||
//glGetProgramiv(id, GL_PROGRAM_BINARY_LENGTH, &binarySize);
|
||||
|
||||
|
|
@ -4337,8 +4359,12 @@ void rlSetUniformMatrix(int locIndex, Matrix mat)
|
|||
// Set shader value uniform matrix
|
||||
void rlSetUniformMatrices(int locIndex, const Matrix *matrices, int count)
|
||||
{
|
||||
#if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2)
|
||||
glUniformMatrix4fv(locIndex, count, true, (const float*)matrices);
|
||||
#if defined(GRAPHICS_API_OPENGL_33)
|
||||
glUniformMatrix4fv(locIndex, count, true, (const float *)matrices);
|
||||
#elif defined(GRAPHICS_API_OPENGL_ES2)
|
||||
// WARNING: WebGL does not support Matrix transpose ("true" parameter)
|
||||
// REF: https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/uniformMatrix
|
||||
glUniformMatrix4fv(locIndex, count, false, (const float *)matrices);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
@ -4421,7 +4447,7 @@ unsigned int rlLoadComputeShaderProgram(unsigned int shaderId)
|
|||
else
|
||||
{
|
||||
// Get the size of compiled shader program (not available on OpenGL ES 2.0)
|
||||
// NOTE: If GL_LINK_STATUS is GL_FALSE, program binary length is zero.
|
||||
// NOTE: If GL_LINK_STATUS is GL_FALSE, program binary length is zero
|
||||
//GLint binarySize = 0;
|
||||
//glGetProgramiv(id, GL_PROGRAM_BINARY_LENGTH, &binarySize);
|
||||
|
||||
|
|
|
|||
199
src/rmodels.c
|
|
@ -603,7 +603,7 @@ void DrawCylinder(Vector3 position, float radiusTop, float radiusBottom, float h
|
|||
for (int i = 0; i < sides; i++)
|
||||
{
|
||||
rlVertex3f(0, 0, 0);
|
||||
rlVertex3f(sinf(DEG2RAD*i*angleStep)*radiusBottom, 0, cosf(DEG2RAD*(i+1)*angleStep)*radiusBottom);
|
||||
rlVertex3f(sinf(DEG2RAD*(i+1)*angleStep)*radiusBottom, 0, cosf(DEG2RAD*(i+1)*angleStep)*radiusBottom);
|
||||
rlVertex3f(sinf(DEG2RAD*i*angleStep)*radiusBottom, 0, cosf(DEG2RAD*i*angleStep)*radiusBottom);
|
||||
}
|
||||
|
||||
|
|
@ -1508,7 +1508,7 @@ void DrawMesh(Mesh mesh, Material material, Matrix transform)
|
|||
|
||||
#ifdef RL_SUPPORT_MESH_GPU_SKINNING
|
||||
// Upload Bone Transforms
|
||||
if (material.shader.locs[SHADER_LOC_BONE_MATRICES] != -1 && mesh.boneMatrices)
|
||||
if ((material.shader.locs[SHADER_LOC_BONE_MATRICES] != -1) && mesh.boneMatrices)
|
||||
{
|
||||
rlSetUniformMatrices(material.shader.locs[SHADER_LOC_BONE_MATRICES], mesh.boneMatrices, mesh.boneCount);
|
||||
}
|
||||
|
|
@ -1754,7 +1754,7 @@ void DrawMeshInstanced(Mesh mesh, Material material, const Matrix *transforms, i
|
|||
|
||||
#ifdef RL_SUPPORT_MESH_GPU_SKINNING
|
||||
// Upload Bone Transforms
|
||||
if (material.shader.locs[SHADER_LOC_BONE_MATRICES] != -1 && mesh.boneMatrices)
|
||||
if ((material.shader.locs[SHADER_LOC_BONE_MATRICES] != -1) && mesh.boneMatrices)
|
||||
{
|
||||
rlSetUniformMatrices(material.shader.locs[SHADER_LOC_BONE_MATRICES], mesh.boneMatrices, mesh.boneCount);
|
||||
}
|
||||
|
|
@ -1943,13 +1943,14 @@ bool ExportMesh(Mesh mesh, const char *fileName)
|
|||
if (IsFileExtension(fileName, ".obj"))
|
||||
{
|
||||
// Estimated data size, it should be enough...
|
||||
int dataSize = mesh.vertexCount*(int)strlen("v 0000.00f 0000.00f 0000.00f") +
|
||||
mesh.vertexCount*(int)strlen("vt 0.000f 0.00f") +
|
||||
mesh.vertexCount*(int)strlen("vn 0.000f 0.00f 0.00f") +
|
||||
mesh.triangleCount*(int)strlen("f 00000/00000/00000 00000/00000/00000 00000/00000/00000");
|
||||
int vc = mesh.vertexCount;
|
||||
int dataSize = vc*(int)strlen("v -0000.000000f -0000.000000f -0000.000000f\n") +
|
||||
vc*(int)strlen("vt -0.000000f -0.000000f\n") +
|
||||
vc*(int)strlen("vn -0.0000f -0.0000f -0.0000f\n") +
|
||||
mesh.triangleCount*snprintf(NULL, 0, "f %i/%i/%i %i/%i/%i %i/%i/%i\n", vc, vc, vc, vc, vc, vc, vc, vc, vc);
|
||||
|
||||
// NOTE: Text data buffer size is estimated considering mesh data size
|
||||
char *txtData = (char *)RL_CALLOC(dataSize*2 + 2000, sizeof(char));
|
||||
char *txtData = (char *)RL_CALLOC(dataSize + 1000, sizeof(char));
|
||||
|
||||
int byteCount = 0;
|
||||
byteCount += sprintf(txtData + byteCount, "# //////////////////////////////////////////////////////////////////////////////////\n");
|
||||
|
|
@ -1969,17 +1970,17 @@ bool ExportMesh(Mesh mesh, const char *fileName)
|
|||
|
||||
for (int i = 0, v = 0; i < mesh.vertexCount; i++, v += 3)
|
||||
{
|
||||
byteCount += sprintf(txtData + byteCount, "v %.2f %.2f %.2f\n", mesh.vertices[v], mesh.vertices[v + 1], mesh.vertices[v + 2]);
|
||||
byteCount += sprintf(txtData + byteCount, "v %.6f %.6f %.6f\n", mesh.vertices[v], mesh.vertices[v + 1], mesh.vertices[v + 2]);
|
||||
}
|
||||
|
||||
for (int i = 0, v = 0; i < mesh.vertexCount; i++, v += 2)
|
||||
{
|
||||
byteCount += sprintf(txtData + byteCount, "vt %.3f %.3f\n", mesh.texcoords[v], mesh.texcoords[v + 1]);
|
||||
byteCount += sprintf(txtData + byteCount, "vt %.6f %.6f\n", mesh.texcoords[v], mesh.texcoords[v + 1]);
|
||||
}
|
||||
|
||||
for (int i = 0, v = 0; i < mesh.vertexCount; i++, v += 3)
|
||||
{
|
||||
byteCount += sprintf(txtData + byteCount, "vn %.3f %.3f %.3f\n", mesh.normals[v], mesh.normals[v + 1], mesh.normals[v + 2]);
|
||||
byteCount += sprintf(txtData + byteCount, "vn %.4f %.4f %.4f\n", mesh.normals[v], mesh.normals[v + 1], mesh.normals[v + 2]);
|
||||
}
|
||||
|
||||
if (mesh.indices != NULL)
|
||||
|
|
@ -2000,8 +2001,6 @@ bool ExportMesh(Mesh mesh, const char *fileName)
|
|||
}
|
||||
}
|
||||
|
||||
byteCount += sprintf(txtData + byteCount, "\n");
|
||||
|
||||
// NOTE: Text data length exported is determined by '\0' (NULL) character
|
||||
success = SaveFileText(fileName, txtData);
|
||||
|
||||
|
|
@ -2262,109 +2261,10 @@ ModelAnimation *LoadModelAnimations(const char *fileName, int *animCount)
|
|||
return animations;
|
||||
}
|
||||
|
||||
// Update model animated vertex data (positions and normals) for a given frame
|
||||
// NOTE: Updated data is uploaded to GPU
|
||||
void UpdateModelAnimation(Model model, ModelAnimation anim, int frame)
|
||||
{
|
||||
if ((anim.frameCount > 0) && (anim.bones != NULL) && (anim.framePoses != NULL))
|
||||
{
|
||||
if (frame >= anim.frameCount) frame = frame%anim.frameCount;
|
||||
|
||||
for (int m = 0; m < model.meshCount; m++)
|
||||
{
|
||||
Mesh mesh = model.meshes[m];
|
||||
|
||||
if (mesh.boneIds == NULL || mesh.boneWeights == NULL)
|
||||
{
|
||||
TRACELOG(LOG_WARNING, "MODEL: UpdateModelAnimation(): Mesh %i has no connection to bones", m);
|
||||
continue;
|
||||
}
|
||||
|
||||
bool updated = false; // Flag to check when anim vertex information is updated
|
||||
Vector3 animVertex = { 0 };
|
||||
Vector3 animNormal = { 0 };
|
||||
|
||||
Vector3 inTranslation = { 0 };
|
||||
Quaternion inRotation = { 0 };
|
||||
// Vector3 inScale = { 0 };
|
||||
|
||||
Vector3 outTranslation = { 0 };
|
||||
Quaternion outRotation = { 0 };
|
||||
Vector3 outScale = { 0 };
|
||||
|
||||
int boneId = 0;
|
||||
int boneCounter = 0;
|
||||
float boneWeight = 0.0;
|
||||
|
||||
const int vValues = mesh.vertexCount*3;
|
||||
for (int vCounter = 0; vCounter < vValues; vCounter += 3)
|
||||
{
|
||||
mesh.animVertices[vCounter] = 0;
|
||||
mesh.animVertices[vCounter + 1] = 0;
|
||||
mesh.animVertices[vCounter + 2] = 0;
|
||||
|
||||
if (mesh.animNormals != NULL)
|
||||
{
|
||||
mesh.animNormals[vCounter] = 0;
|
||||
mesh.animNormals[vCounter + 1] = 0;
|
||||
mesh.animNormals[vCounter + 2] = 0;
|
||||
}
|
||||
|
||||
// Iterates over 4 bones per vertex
|
||||
for (int j = 0; j < 4; j++, boneCounter++)
|
||||
{
|
||||
boneWeight = mesh.boneWeights[boneCounter];
|
||||
|
||||
// Early stop when no transformation will be applied
|
||||
if (boneWeight == 0.0f) continue;
|
||||
|
||||
boneId = mesh.boneIds[boneCounter];
|
||||
//int boneIdParent = model.bones[boneId].parent;
|
||||
inTranslation = model.bindPose[boneId].translation;
|
||||
inRotation = model.bindPose[boneId].rotation;
|
||||
//inScale = model.bindPose[boneId].scale;
|
||||
outTranslation = anim.framePoses[frame][boneId].translation;
|
||||
outRotation = anim.framePoses[frame][boneId].rotation;
|
||||
outScale = anim.framePoses[frame][boneId].scale;
|
||||
|
||||
// Vertices processing
|
||||
// NOTE: We use meshes.vertices (default vertex position) to calculate meshes.animVertices (animated vertex position)
|
||||
animVertex = (Vector3){ mesh.vertices[vCounter], mesh.vertices[vCounter + 1], mesh.vertices[vCounter + 2] };
|
||||
animVertex = Vector3Subtract(animVertex, inTranslation);
|
||||
animVertex = Vector3Multiply(animVertex, outScale);
|
||||
animVertex = Vector3RotateByQuaternion(animVertex, QuaternionMultiply(outRotation, QuaternionInvert(inRotation)));
|
||||
animVertex = Vector3Add(animVertex, outTranslation);
|
||||
//animVertex = Vector3Transform(animVertex, model.transform);
|
||||
mesh.animVertices[vCounter] += animVertex.x*boneWeight;
|
||||
mesh.animVertices[vCounter + 1] += animVertex.y*boneWeight;
|
||||
mesh.animVertices[vCounter + 2] += animVertex.z*boneWeight;
|
||||
updated = true;
|
||||
|
||||
// Normals processing
|
||||
// NOTE: We use meshes.baseNormals (default normal) to calculate meshes.normals (animated normals)
|
||||
if (mesh.normals != NULL)
|
||||
{
|
||||
animNormal = (Vector3){ mesh.normals[vCounter], mesh.normals[vCounter + 1], mesh.normals[vCounter + 2] };
|
||||
animNormal = Vector3RotateByQuaternion(animNormal, QuaternionMultiply(outRotation, QuaternionInvert(inRotation)));
|
||||
mesh.animNormals[vCounter] += animNormal.x*boneWeight;
|
||||
mesh.animNormals[vCounter + 1] += animNormal.y*boneWeight;
|
||||
mesh.animNormals[vCounter + 2] += animNormal.z*boneWeight;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Upload new vertex data to GPU for model drawing
|
||||
// NOTE: Only update data when values changed
|
||||
if (updated)
|
||||
{
|
||||
rlUpdateVertexBuffer(mesh.vboId[0], mesh.animVertices, mesh.vertexCount*3*sizeof(float), 0); // Update vertex position
|
||||
rlUpdateVertexBuffer(mesh.vboId[2], mesh.animNormals, mesh.vertexCount*3*sizeof(float), 0); // Update vertex normals
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateModelAnimationBoneMatrices(Model model, ModelAnimation anim, int frame)
|
||||
// Update model animated bones transform matrices for a given frame
|
||||
// NOTE: Updated data is not uploaded to GPU but kept at model.meshes[i].boneMatrices[boneId],
|
||||
// to be uploaded to shader at drawing, in case GPU skinning is enabled
|
||||
void UpdateModelAnimationBones(Model model, ModelAnimation anim, int frame)
|
||||
{
|
||||
if ((anim.frameCount > 0) && (anim.bones != NULL) && (anim.framePoses != NULL))
|
||||
{
|
||||
|
|
@ -2408,6 +2308,66 @@ void UpdateModelAnimationBoneMatrices(Model model, ModelAnimation anim, int fram
|
|||
}
|
||||
}
|
||||
|
||||
// at least 2x speed up vs the old method
|
||||
// Update model animated vertex data (positions and normals) for a given frame
|
||||
// NOTE: Updated data is uploaded to GPU
|
||||
void UpdateModelAnimation(Model model, ModelAnimation anim, int frame)
|
||||
{
|
||||
UpdateModelAnimationBones(model,anim,frame);
|
||||
for (int m = 0; m < model.meshCount; m++)
|
||||
{
|
||||
Mesh mesh = model.meshes[m];
|
||||
Vector3 animVertex = { 0 };
|
||||
Vector3 animNormal = { 0 };
|
||||
int boneId = 0;
|
||||
int boneCounter = 0;
|
||||
float boneWeight = 0.0;
|
||||
bool updated = false; // Flag to check when anim vertex information is updated
|
||||
const int vValues = mesh.vertexCount*3;
|
||||
for (int vCounter = 0; vCounter < vValues; vCounter += 3)
|
||||
{
|
||||
mesh.animVertices[vCounter] = 0;
|
||||
mesh.animVertices[vCounter + 1] = 0;
|
||||
mesh.animVertices[vCounter + 2] = 0;
|
||||
if (mesh.animNormals != NULL)
|
||||
{
|
||||
mesh.animNormals[vCounter] = 0;
|
||||
mesh.animNormals[vCounter + 1] = 0;
|
||||
mesh.animNormals[vCounter + 2] = 0;
|
||||
}
|
||||
// Iterates over 4 bones per vertex
|
||||
for (int j = 0; j < 4; j++, boneCounter++)
|
||||
{
|
||||
boneWeight = mesh.boneWeights[boneCounter];
|
||||
boneId = mesh.boneIds[boneCounter];
|
||||
// Early stop when no transformation will be applied
|
||||
if (boneWeight == 0.0f) continue;
|
||||
animVertex = (Vector3){ mesh.vertices[vCounter], mesh.vertices[vCounter + 1], mesh.vertices[vCounter + 2] };
|
||||
animVertex = Vector3Transform(animVertex,model.meshes[m].boneMatrices[boneId]);
|
||||
mesh.animVertices[vCounter] += animVertex.x * boneWeight;
|
||||
mesh.animVertices[vCounter+1] += animVertex.y * boneWeight;
|
||||
mesh.animVertices[vCounter+2] += animVertex.z * boneWeight;
|
||||
updated = true;
|
||||
// Normals processing
|
||||
// NOTE: We use meshes.baseNormals (default normal) to calculate meshes.normals (animated normals)
|
||||
if (mesh.normals != NULL)
|
||||
{
|
||||
animNormal = (Vector3){ mesh.normals[vCounter], mesh.normals[vCounter + 1], mesh.normals[vCounter + 2] };
|
||||
animNormal = Vector3Transform(animNormal,model.meshes[m].boneMatrices[boneId]);
|
||||
mesh.animNormals[vCounter] += animNormal.x*boneWeight;
|
||||
mesh.animNormals[vCounter + 1] += animNormal.y*boneWeight;
|
||||
mesh.animNormals[vCounter + 2] += animNormal.z*boneWeight;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (updated)
|
||||
{
|
||||
rlUpdateVertexBuffer(mesh.vboId[0], mesh.animVertices, mesh.vertexCount*3*sizeof(float), 0); // Update vertex position
|
||||
rlUpdateVertexBuffer(mesh.vboId[2], mesh.animNormals, mesh.vertexCount*3*sizeof(float), 0); // Update vertex normals
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Unload animation array data
|
||||
void UnloadModelAnimations(ModelAnimation *animations, int animCount)
|
||||
{
|
||||
|
|
@ -2817,6 +2777,7 @@ Mesh GenMeshSphere(float radius, int rings, int slices)
|
|||
|
||||
if ((rings >= 3) && (slices >= 3))
|
||||
{
|
||||
par_shapes_set_epsilon_degenerate_sphere(0.0);
|
||||
par_shapes_mesh *sphere = par_shapes_create_parametric_sphere(slices, rings);
|
||||
par_shapes_scale(sphere, radius, radius, radius);
|
||||
// NOTE: Soft normals are computed internally
|
||||
|
|
@ -4282,7 +4243,7 @@ static Model LoadOBJ(const char *fileName)
|
|||
// walk all the faces
|
||||
for (unsigned int faceId = 0; faceId < objAttributes.num_faces; faceId++)
|
||||
{
|
||||
if (faceVertIndex >= nextShapeEnd)
|
||||
if (faceId >= nextShapeEnd)
|
||||
{
|
||||
// try to find the last vert in the next shape
|
||||
nextShape++;
|
||||
|
|
@ -4333,7 +4294,7 @@ static Model LoadOBJ(const char *fileName)
|
|||
for (unsigned int faceId = 0; faceId < objAttributes.num_faces; faceId++)
|
||||
{
|
||||
bool newMesh = false; // do we need a new mesh?
|
||||
if (faceVertIndex >= nextShapeEnd)
|
||||
if (faceId >= nextShapeEnd)
|
||||
{
|
||||
// try to find the last vert in the next shape
|
||||
nextShape++;
|
||||
|
|
@ -4395,7 +4356,7 @@ static Model LoadOBJ(const char *fileName)
|
|||
for (unsigned int faceId = 0; faceId < objAttributes.num_faces; faceId++)
|
||||
{
|
||||
bool newMesh = false; // do we need a new mesh?
|
||||
if (faceVertIndex >= nextShapeEnd)
|
||||
if (faceId >= nextShapeEnd)
|
||||
{
|
||||
// try to find the last vert in the next shape
|
||||
nextShape++;
|
||||
|
|
|
|||
|
|
@ -807,6 +807,30 @@ void DrawRectangleGradientEx(Rectangle rec, Color topLeft, Color bottomLeft, Col
|
|||
// but it solves another issue: https://github.com/raysan5/raylib/issues/3884
|
||||
void DrawRectangleLines(int posX, int posY, int width, int height, Color color)
|
||||
{
|
||||
Matrix mat = rlGetMatrixModelview();
|
||||
float zoomFactor = 0.5f/mat.m0;
|
||||
rlBegin(RL_LINES);
|
||||
rlColor4ub(color.r, color.g, color.b, color.a);
|
||||
rlVertex2f((float)posX - zoomFactor, (float)posY);
|
||||
rlVertex2f((float)posX + (float)width + zoomFactor, (float)posY);
|
||||
|
||||
rlVertex2f((float)posX + (float)width, (float)posY - zoomFactor);
|
||||
rlVertex2f((float)posX + (float)width, (float)posY + (float)height + zoomFactor);
|
||||
|
||||
rlVertex2f((float)posX + (float)width + zoomFactor, (float)posY + (float)height);
|
||||
rlVertex2f((float)posX - zoomFactor, (float)posY + (float)height);
|
||||
|
||||
rlVertex2f((float)posX, (float)posY + (float)height + zoomFactor);
|
||||
rlVertex2f((float)posX, (float)posY - zoomFactor);
|
||||
rlEnd();
|
||||
/*
|
||||
// Previous implementation, it has issues... but it does not require view matrix...
|
||||
#if defined(SUPPORT_QUADS_DRAW_MODE)
|
||||
DrawRectangle(posX, posY, width, 1, color);
|
||||
DrawRectangle(posX + width - 1, posY + 1, 1, height - 2, color);
|
||||
DrawRectangle(posX, posY + height - 1, width, 1, color);
|
||||
DrawRectangle(posX, posY + 1, 1, height - 2, color);
|
||||
#else
|
||||
rlBegin(RL_LINES);
|
||||
rlColor4ub(color.r, color.g, color.b, color.a);
|
||||
rlVertex2f((float)posX, (float)posY);
|
||||
|
|
@ -821,6 +845,8 @@ void DrawRectangleLines(int posX, int posY, int width, int height, Color color)
|
|||
rlVertex2f((float)posX + 1, (float)posY + (float)height);
|
||||
rlVertex2f((float)posX + 1, (float)posY + 1);
|
||||
rlEnd();
|
||||
//#endif
|
||||
*/
|
||||
}
|
||||
|
||||
// Draw rectangle outline with extended parameters
|
||||
|
|
@ -1650,7 +1676,7 @@ void DrawSplineLinear(const Vector2 *points, int pointCount, float thick, Color
|
|||
prevNormal = normal;
|
||||
}
|
||||
|
||||
#else // !SUPPORT_SPLINE_MITTERS
|
||||
#else // !SUPPORT_SPLINE_MITERS
|
||||
|
||||
Vector2 delta = { 0 };
|
||||
float length = 0.0f;
|
||||
|
|
|
|||
|
|
@ -1282,7 +1282,8 @@ Vector2 MeasureTextEx(Font font, const char *text, float fontSize, float spacing
|
|||
{
|
||||
Vector2 textSize = { 0 };
|
||||
|
||||
if ((isGpuReady && (font.texture.id == 0)) || (text == NULL)) return textSize; // Security check
|
||||
if ((isGpuReady && (font.texture.id == 0)) ||
|
||||
(text == NULL) || (text[0] == '\0')) return textSize; // Security check
|
||||
|
||||
int size = TextLength(text); // Get size in bytes of text
|
||||
int tempByteCounter = 0; // Used to count longer text line num chars
|
||||
|
|
@ -1338,6 +1339,7 @@ Vector2 MeasureTextEx(Font font, const char *text, float fontSize, float spacing
|
|||
int GetGlyphIndex(Font font, int codepoint)
|
||||
{
|
||||
int index = 0;
|
||||
if (!IsFontValid(font)) return index;
|
||||
|
||||
#define SUPPORT_UNORDERED_CHARSET
|
||||
#if defined(SUPPORT_UNORDERED_CHARSET)
|
||||
|
|
|
|||
|
|
@ -827,16 +827,27 @@ Image GenImageGradientLinear(int width, int height, int direction, Color start,
|
|||
float cosDir = cosf(radianDirection);
|
||||
float sinDir = sinf(radianDirection);
|
||||
|
||||
// Calculate how far the top-left pixel is along the gradient direction from the center of said gradient
|
||||
float startingPos = 0.5f - (cosDir*width/2) - (sinDir*height/2);
|
||||
// With directions that lie in the first or third quadrant (i.e. from top-left to
|
||||
// bottom-right or vice-versa), pixel (0, 0) is the farthest point on the gradient
|
||||
// (i.e. the pixel which should become one of the gradient's ends color); while for
|
||||
// directions that lie in the second or fourth quadrant, that point is pixel (width, 0).
|
||||
float maxPosValue =
|
||||
((signbit(sinDir) != 0) == (signbit(cosDir) != 0))
|
||||
? fabsf(startingPos)
|
||||
: fabsf(startingPos+width*cosDir);
|
||||
for (int i = 0; i < width; i++)
|
||||
{
|
||||
for (int j = 0; j < height; j++)
|
||||
{
|
||||
// Calculate the relative position of the pixel along the gradient direction
|
||||
float pos = (i*cosDir + j*sinDir)/(width*cosDir + height*sinDir);
|
||||
float pos = (startingPos + (i*cosDir + j*sinDir)) / maxPosValue;
|
||||
|
||||
float factor = pos;
|
||||
factor = (factor > 1.0f)? 1.0f : factor; // Clamp to [0,1]
|
||||
factor = (factor < 0.0f)? 0.0f : factor; // Clamp to [0,1]
|
||||
factor = (factor > 1.0f)? 1.0f : factor; // Clamp to [-1,1]
|
||||
factor = (factor < -1.0f)? -1.0f : factor; // Clamp to [-1,1]
|
||||
factor = factor / 2 + 0.5f;
|
||||
|
||||
// Generate the color for this pixel
|
||||
pixels[j*width + i].r = (int)((float)end.r*factor + (float)start.r*(1.0f - factor));
|
||||
|
|
@ -1111,8 +1122,7 @@ Image GenImageText(int width, int height, const char *text)
|
|||
{
|
||||
Image image = { 0 };
|
||||
|
||||
#if defined(SUPPORT_MODULE_RTEXT)
|
||||
int textLength = TextLength(text);
|
||||
int textLength = (int)strlen(text);
|
||||
int imageViewSize = width*height;
|
||||
|
||||
image.width = width;
|
||||
|
|
@ -1122,10 +1132,6 @@ Image GenImageText(int width, int height, const char *text)
|
|||
image.mipmaps = 1;
|
||||
|
||||
memcpy(image.data, text, (textLength > imageViewSize)? imageViewSize : textLength);
|
||||
#else
|
||||
TRACELOG(LOG_WARNING, "IMAGE: GenImageText() requires module: rtext");
|
||||
image = GenImageColor(width, height, BLACK); // Generating placeholder black image rectangle
|
||||
#endif
|
||||
|
||||
return image;
|
||||
}
|
||||
|
|
@ -2395,22 +2401,16 @@ void ImageMipmaps(Image *image)
|
|||
else TRACELOG(LOG_WARNING, "IMAGE: Mipmaps required memory could not be allocated");
|
||||
|
||||
// Pointer to allocated memory point where store next mipmap level data
|
||||
unsigned char *nextmip = (unsigned char *)image->data + GetPixelDataSize(image->width, image->height, image->format);
|
||||
unsigned char *nextmip = image->data;
|
||||
|
||||
mipWidth = image->width/2;
|
||||
mipHeight = image->height/2;
|
||||
mipWidth = image->width;
|
||||
mipHeight = image->height;
|
||||
mipSize = GetPixelDataSize(mipWidth, mipHeight, image->format);
|
||||
Image imCopy = ImageCopy(*image);
|
||||
|
||||
for (int i = 1; i < mipCount; i++)
|
||||
{
|
||||
TRACELOGD("IMAGE: Generating mipmap level: %i (%i x %i) - size: %i - offset: 0x%x", i, mipWidth, mipHeight, mipSize, nextmip);
|
||||
|
||||
ImageResize(&imCopy, mipWidth, mipHeight); // Uses internally Mitchell cubic downscale filter
|
||||
|
||||
memcpy(nextmip, imCopy.data, mipSize);
|
||||
nextmip += mipSize;
|
||||
image->mipmaps++;
|
||||
|
||||
mipWidth /= 2;
|
||||
mipHeight /= 2;
|
||||
|
|
@ -2420,9 +2420,19 @@ void ImageMipmaps(Image *image)
|
|||
if (mipHeight < 1) mipHeight = 1;
|
||||
|
||||
mipSize = GetPixelDataSize(mipWidth, mipHeight, image->format);
|
||||
|
||||
if (i < image->mipmaps) continue;
|
||||
|
||||
TRACELOGD("IMAGE: Generating mipmap level: %i (%i x %i) - size: %i - offset: 0x%x", i, mipWidth, mipHeight, mipSize, nextmip);
|
||||
|
||||
ImageResize(&imCopy, mipWidth, mipHeight); // Uses internally Mitchell cubic downscale filter
|
||||
|
||||
memcpy(nextmip, imCopy.data, mipSize);
|
||||
}
|
||||
|
||||
UnloadImage(imCopy);
|
||||
|
||||
image->mipmaps = mipCount;
|
||||
}
|
||||
else TRACELOG(LOG_WARNING, "IMAGE: Mipmaps already available");
|
||||
}
|
||||
|
|
@ -3911,7 +3921,6 @@ void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec, Color
|
|||
if ((dst->data == NULL) || (dst->width == 0) || (dst->height == 0) ||
|
||||
(src.data == NULL) || (src.width == 0) || (src.height == 0)) return;
|
||||
|
||||
if (dst->mipmaps > 1) TRACELOG(LOG_WARNING, "Image drawing only applied to base mipmap level");
|
||||
if (dst->format >= PIXELFORMAT_COMPRESSED_DXT1_RGB) TRACELOG(LOG_WARNING, "Image drawing not supported for compressed formats");
|
||||
else
|
||||
{
|
||||
|
|
@ -4024,6 +4033,35 @@ void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec, Color
|
|||
}
|
||||
|
||||
if (useSrcMod) UnloadImage(srcMod); // Unload source modified image
|
||||
|
||||
if ((dst->mipmaps > 1) && (src.mipmaps > 1))
|
||||
{
|
||||
Image mipmapDst = *dst;
|
||||
mipmapDst.data = (char *)mipmapDst.data + GetPixelDataSize(mipmapDst.width, mipmapDst.height, mipmapDst.format);
|
||||
mipmapDst.width /= 2;
|
||||
mipmapDst.height /= 2;
|
||||
mipmapDst.mipmaps--;
|
||||
|
||||
Image mipmapSrc = src;
|
||||
mipmapSrc.data = (char *)mipmapSrc.data + GetPixelDataSize(mipmapSrc.width, mipmapSrc.height, mipmapSrc.format);
|
||||
mipmapSrc.width /= 2;
|
||||
mipmapSrc.height /= 2;
|
||||
mipmapSrc.mipmaps--;
|
||||
|
||||
Rectangle mipmapSrcRec = srcRec;
|
||||
mipmapSrcRec.width /= 2;
|
||||
mipmapSrcRec.height /= 2;
|
||||
mipmapSrcRec.x /= 2;
|
||||
mipmapSrcRec.y /= 2;
|
||||
|
||||
Rectangle mipmapDstRec = dstRec;
|
||||
mipmapDstRec.width /= 2;
|
||||
mipmapDstRec.height /= 2;
|
||||
mipmapDstRec.x /= 2;
|
||||
mipmapDstRec.y /= 2;
|
||||
|
||||
ImageDraw(&mipmapDst, mipmapSrc, mipmapSrcRec, mipmapDstRec, tint);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -4105,7 +4143,6 @@ TextureCubemap LoadTextureCubemap(Image image, int layout)
|
|||
{
|
||||
if ((image.width/6) == image.height) { layout = CUBEMAP_LAYOUT_LINE_HORIZONTAL; cubemap.width = image.width/6; }
|
||||
else if ((image.width/4) == (image.height/3)) { layout = CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE; cubemap.width = image.width/4; }
|
||||
else if (image.width >= (int)((float)image.height*1.85f)) { layout = CUBEMAP_LAYOUT_PANORAMA; cubemap.width = image.width/4; }
|
||||
}
|
||||
else if (image.height > image.width)
|
||||
{
|
||||
|
|
@ -4119,7 +4156,6 @@ TextureCubemap LoadTextureCubemap(Image image, int layout)
|
|||
if (layout == CUBEMAP_LAYOUT_LINE_HORIZONTAL) cubemap.width = image.width/6;
|
||||
if (layout == CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR) cubemap.width = image.width/3;
|
||||
if (layout == CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE) cubemap.width = image.width/4;
|
||||
if (layout == CUBEMAP_LAYOUT_PANORAMA) cubemap.width = image.width/4;
|
||||
}
|
||||
|
||||
cubemap.height = cubemap.width;
|
||||
|
|
@ -4138,11 +4174,11 @@ TextureCubemap LoadTextureCubemap(Image image, int layout)
|
|||
{
|
||||
faces = ImageCopy(image); // Image data already follows expected convention
|
||||
}
|
||||
else if (layout == CUBEMAP_LAYOUT_PANORAMA)
|
||||
/*else if (layout == CUBEMAP_LAYOUT_PANORAMA)
|
||||
{
|
||||
// TODO: Convert panorama image to square faces...
|
||||
// TODO: implement panorama by converting image to square faces...
|
||||
// Ref: https://github.com/denivip/panorama/blob/master/panorama.cpp
|
||||
}
|
||||
} */
|
||||
else
|
||||
{
|
||||
if (layout == CUBEMAP_LAYOUT_LINE_HORIZONTAL) for (int i = 0; i < 6; i++) faceRecs[i].x = (float)size*i;
|
||||
|
|
@ -4169,14 +4205,20 @@ TextureCubemap LoadTextureCubemap(Image image, int layout)
|
|||
faces = GenImageColor(size, size*6, MAGENTA);
|
||||
ImageFormat(&faces, image.format);
|
||||
|
||||
Image mipmapped = ImageCopy(image);
|
||||
ImageMipmaps(&mipmapped);
|
||||
ImageMipmaps(&faces);
|
||||
|
||||
// NOTE: Image formatting does not work with compressed textures
|
||||
|
||||
for (int i = 0; i < 6; i++) ImageDraw(&faces, image, faceRecs[i], (Rectangle){ 0, (float)size*i, (float)size, (float)size }, WHITE);
|
||||
for (int i = 0; i < 6; i++) ImageDraw(&faces, mipmapped, faceRecs[i], (Rectangle){ 0, (float)size*i, (float)size, (float)size }, WHITE);
|
||||
|
||||
UnloadImage(mipmapped);
|
||||
}
|
||||
|
||||
// NOTE: Cubemap data is expected to be provided as 6 images in a single data array,
|
||||
// one after the other (that's a vertical image), following convention: +X, -X, +Y, -Y, +Z, -Z
|
||||
cubemap.id = rlLoadTextureCubemap(faces.data, size, faces.format);
|
||||
cubemap.id = rlLoadTextureCubemap(faces.data, size, faces.format, faces.mipmaps);
|
||||
|
||||
if (cubemap.id != 0)
|
||||
{
|
||||
|
|
|
|||