Compare commits

...

1395 commits

Author SHA1 Message Date
21a377707f
Disable stdin input by default and add ability to disable EVDEV input 2025-06-10 21:19:02 -04:00
15afe89aff
Add stub function for GetClipboardImage() to improve Python binding support 2025-06-08 08:27:36 -04:00
07c5e54f59
Add CMake building support 2025-06-07 18:58:42 -04:00
a77f0c6c77
Fix raylib logo animation path 2025-06-07 17:33:24 -04:00
c65f420215
Modify README to indicate we're a fork 2025-06-07 17:32:39 -04:00
cc772e4bcb
Add Wayland DRM leasing support to the Linux DRM backend 2025-06-07 17:29:20 -04:00
3366acf975
Remove existing GitHub workflows 2025-06-07 17:15:44 -04:00
Ray
c1ab645ca2 Update HISTORY.md
Some checks failed
Windows Examples / build (push) Has been cancelled
Windows / build (i686, pe-i386, 32, mingw-w64) (push) Has been cancelled
Windows / build (x64, x64, 64, msvc16) (push) Has been cancelled
Windows / build (x86, Win32, 32, msvc16) (push) Has been cancelled
Windows / build (x86_64, pe-x86-64, 64, mingw-w64) (push) Has been cancelled
WebAssembly / build (push) Has been cancelled
Parse raylib_api / build (push) Has been cancelled
macOS / build (push) Has been cancelled
Linux Examples / build (push) Has been cancelled
Linux / build (i386, i386, /user/bin, 32) (push) Has been cancelled
Linux / build (x86_64, amd64, /user/bin, 64) (push) Has been cancelled
CMakeBuilds / Windows Build (push) Has been cancelled
CMakeBuilds / Linux Build (push) Has been cancelled
Android / build (arm64) (push) Has been cancelled
Android / build (x86_64) (push) Has been cancelled
2024-11-18 13:21:10 +01:00
Ray
68503ed96f
Update webassembly.yml 2024-11-16 19:00:28 +01:00
github-actions[bot]
88c922f433 Update raylib_api.* by CI 2024-11-16 17:45:33 +00:00
Ray
938b805bfb Update raylib.h 2024-11-16 18:45:16 +01:00
Ray
162efc1ec7 Update core_basic_window.c 2024-11-16 18:45:12 +01:00
Ray
da7ab04052
Update HISTORY.md 2024-11-16 18:44:48 +01:00
Ray
dd688d81a6 Thanks @everyone for everything 😄 2024-11-16 18:16:00 +01:00
Ray
d567b35d9a Update HISTORY.md 2024-11-16 17:57:00 +01:00
Ray
816b605054 Update CHANGELOG 2024-11-16 13:18:04 +01:00
Eike Decker
7c5d74e98e
Fixing an OBJ loader bug that fragmented the loaded meshes (#4494)
The nextShapeEnd integer is a pointer in the OBJ data structures.
The faceVertIndex is a vertex index counter for the mesh we are
about to create. Both integers are not compatible, which causes
the code to finish the meshes too early, thus writing the OBJ data
incompletely into the target meshes.

It wasn't noticed because for the last mesh, it process all remaining
data, causing the last mesh to contain all remaining triangles.

This would have been noticed if the OBJ meshes used different textures
for each mesh.
2024-11-15 16:40:14 +01:00
Oussama Teyib
4f091f44a8
Fix typo in BINDINGS.md (#4493) 2024-11-15 08:26:22 +01:00
Jeffery Myers
a2f6ae6796
Fix warnings in examples (#4492)
Move shapes/shapes_rectangle_advanced to the correct folder in MSVC project
Add core_input_virtual_controls.vcxproj back into sln file
2024-11-15 08:25:09 +01:00
Ray
5e6cdf3a73 Update emsdk path on Windows to match new raylib installer package 2024-11-14 18:41:37 +01:00
Ray
76016aae20 Update raylib.ico 2024-11-14 16:40:04 +01:00
Ray
15eb8221e3 Updated raylib resource data 2024-11-14 16:39:58 +01:00
Ray
928535a828 Commented code issuing warnings on w64devkit (GCC)
Tested with w64devkit/MSVC and all seem to work as expected
2024-11-14 16:39:38 +01:00
Ray
637debb62d Updated Notepad++ autocomplete list for raylib 5.5 2024-11-14 16:38:55 +01:00
Ray
14d3bbbb86 Update raygui.h 2024-11-14 16:38:27 +01:00
Asdqwe
700e2c5e5d
Fix touch count reset (#4488) 2024-11-14 10:49:35 +01:00
Ray
8af7985ece Update CHANGELOG 2024-11-14 10:46:34 +01:00
Ray
0c7edbc2ee Update HISTORY.md 2024-11-14 10:45:56 +01:00
Ray
2841eaba3e Merge branch 'master' of https://github.com/raysan5/raylib 2024-11-14 10:45:24 +01:00
Ray
f76a5e2b10 Update CHANGELOG 2024-11-14 10:45:19 +01:00
Asdqwe
377248b1ac
Fix Makefile.Web (#4487) 2024-11-13 22:21:10 +01:00
kimierik
7053970f7b
build.zig: remove raygui from options and re add adding raygui as a (#4485)
function
2024-11-13 18:52:12 +01:00
Ray
4ddf4679b4 Update CHANGELOG 2024-11-11 20:28:25 +01:00
Jeffery Myers
10fd4de258
Fix the example lighting shaders to use both frag and diffuse colors so they work with shapes and meshes. (#4482) 2024-11-11 19:55:33 +01:00
Everton Jr.
5cc06f4ba4
[rcore]: Issue an warning instead of an error when checking SUPPORT_CLIPBOARD_IMAGE necessary support detection (#4477) 2024-11-11 19:47:25 +01:00
Jeffery Myers
fb69b39d54
Fix a typecast warning in glfw clipboard access (#4479) 2024-11-11 19:46:54 +01:00
Jeffery Myers
2af4f31712
Fix the X axis of the second vertex of the Y negative cap of a cylinders, triangle fan (#4478) 2024-11-10 22:04:58 +01:00
Ray
09570a05b3 Merge branch 'master' of https://github.com/raysan5/raylib 2024-11-10 17:54:02 +01:00
Ray
85de743d1c Improved logos size 2024-11-10 17:53:50 +01:00
Tomas Slusny
ce3b121f07
build.zig: Remove addRaylib and fix raygui builds when using raylib as dep (#4475)
- addRaylib just duplicates what adding raylib as dependency already does
  so it do not needs to exist
- move raygui build to standard build process when flag is enabled. this
  works correctly when using raylib as dependency and having raygui as
  dependency as well. problem with previous approach was that raygui was in
  options but it was doing nothing because you had to also use addRaygui for
  it to be effective

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
2024-11-10 13:47:15 +01:00
github-actions[bot]
d8feef5279 Update raylib_api.* by CI 2024-11-09 18:40:56 +00:00
Everton Jr.
00396e3436
[rcore] Clipboard Image Support (#4459)
* [rcore] add 'GetClipboardImage' for windows

* [rcore] GetClipboardImage removed some unneeded defines

* [rcore] PLATFORM_SDL: create a compatility layer for SDL3

* external: add win32_clipboard.h header only lib

* [rcore] using win32_clipboard on platforms rlfw and rgfw

* [rcore] fix warnings in SDL3 compatibility layer

* Makefile: Allow specifying SDL_LIBRARIES to link, this helps with SDL3

* Makefile: examples makefile now compile others/rlgl_standalone only when TARGET_PLATFORM is PLATFORM_DESKTOP_GFLW

* Makefile: examples makefile now compile others/rlgl_standalone only when TARGET_PLATFORM is PLATFORM_DESKTOP_GFLW

* [rcore]: PLATFORM_SDL: improve clipboard data retrieval

* external: remove unused function from win32_clipboard.h

* Makefile: allow for extra flags necessary when compiling for SDL3

* [rcore]: fix string typo

* [rcore]: Properly handle NULL dpi passing. As is allowed in SDL2

* external: fix arch finding on win32_clipboard.h to allow compilation on msvc cmake CI

* [rcore]: PLATFORM_SDL: Treat monitor as an ID in SDL3 as opposed to an index as in SDL2

* [rcore]: typo
2024-11-09 19:40:41 +01:00
Tomas Slusny
53b929cbfb
Improve cross-compilation with zig builds (#4468)
- Add xcode_frameworks when cross compiling for mac (ref:
https://github.com/hexops/mach/blob/main/build.zig)
- Add emsdk when cross compiling for wasm (ref:
https://github.com/floooh/sokol-zig/blob/master/build.zig)

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
2024-11-08 14:31:31 +01:00
Jett
dc489786b0
UpdateModelAnimation speedup (#4470)
If we borrow from the GPU skinned animation code, we can just multiply the vertex by the matrix * weight and shave a chunk of CPU time.
2024-11-08 14:28:39 +01:00
Jeffery Myers
55a64f51b8
fix float casting warnings (#4471) 2024-11-07 21:42:59 +01:00
Ray
a617e1e217 Update core_2d_camera_mouse_zoom.c 2024-11-06 12:00:39 +01:00
Ray
b47fffb48b Update Makefile.Web 2024-11-05 00:09:12 +01:00
decromo
281ee51aff
implemented new linear gradient generation function (#4462) 2024-11-04 15:57:50 +01:00
Ray
ec953240b1 Update CHANGELOG 2024-11-03 21:02:13 +01:00
waveydave
66a4f2e90b
Fix for issue 4454, MatrixDecompose() gave incorrect output for certain combinations of scale and rotation (#4461) 2024-11-03 20:36:32 +01:00
github-actions[bot]
6028052c7e Update raylib_api.* by CI 2024-11-03 12:12:25 +00:00
Ray
be360d2ad1 RENAMED: UpdateModelAnimationBoneMatrices() to UpdateModelAnimationBones()
Still, not fully convinced of those functions naming, despite quite descriptive, sounds a bit confusing to me...
2024-11-03 13:12:01 +01:00
Ray
24724d33bb Added last week commits info 2024-11-03 12:30:02 +01:00
MikiZX1
8e5d5f89c2
Update rmodels.c - 'fix' for GenMeshSphere artifact (#4460)
When creating a new sphere mesh with high number of slices/rings the top and bottom parts of the generated sphere are removed. This happens because the triangles in those parts, due to high resolution, end up being very small and are removed as part of the 'par_shapes' library's optimization. Adding par_shapes_set_epsilon_degenerate_sphere(0.0); before generating the sphere mesh sets the threshold for removal of small triangles is removed and the sphere is returned to raylib correctly.
2024-11-01 22:35:35 +01:00
Ray
9e2591e612 Update Makefile 2024-11-01 12:14:06 +01:00
Ray
b7ef2fd580
Update HISTORY.md 2024-11-01 12:07:27 +01:00
Asdqwe
b8c0842b2e
Fix SetWindowSize() for PLATFORM_WEB (#4452) 2024-10-30 22:21:37 +01:00
Arche Washi
3bad05aa7b
fix the issue with GetScreenWidth/GetScreenHeight that was identified on other platforms (#4451) 2024-10-30 20:13:53 +01:00
Everton Jr.
ad79d4a884
[shapes] Add shapes_rectangle_advanced example implementing a DrawRectangleRoundedGradientH function (#4435)
* [rshapes] Add  function

* "[shapes] rectangle advanced: fix screen width and height to fit with other examples"
2024-10-29 22:23:51 +01:00
Ray
d15e583460 Update rtext.c 2024-10-29 09:37:38 +01:00
Ray
10c8e4e435 Update rcore_desktop_glfw.c 2024-10-29 09:37:33 +01:00
Jeffery Myers
743e557e1e
Fix inconsistent dll linkage warning on windows (#4447) 2024-10-29 09:34:57 +01:00
mpv-enjoyer
de7ab83f5a
Fix empty input string for MeasureTextEx (#4448) 2024-10-29 09:33:03 +01:00
Ray
f59e185d7a
Update README.md 2024-10-27 22:27:18 +01:00
Jeffery Myers
0e1fc33c5c
Fix signed/unsigned mismatch in rlgl (#4443) 2024-10-26 22:59:50 +02:00
Colleague Riley
7fe5f7126b
Fix MSVC errors for PLATFORM_DESKTOP_RGFW (#4441)
* (rcore_desktop_rgfw.c) fix errors when compiling with mingw

* define WideCharToMultiByte

* update RGFW

* move stdcall def to windows only

* fix raw cursor input

* Fix warnings, update RGFW, fix msvc errors (make sure windows macro _WIN32 is correct)
2024-10-26 22:59:10 +02:00
Nikolas
38cf9f3224
[rtextures] LoadTextureCubemap(): Copy image before generating mipmaps, to avoid dangling re-allocated pointers (#4439) 2024-10-26 22:52:24 +02:00
NishiOwO
ff66b49c19
fix (#4440) 2024-10-26 15:10:35 +02:00
Ray
7ad8fa689f REVIEWED: LoadTextureCubemap() to avoid crash #4429 2024-10-26 13:51:10 +02:00
Ray
8b9ea8cd5f Update Makefile 2024-10-26 13:46:56 +02:00
NishiOwO
3dcddaedd7
Fix examples Makefile for NetBSD (#4438)
* fix makefile

* moving to LDPATHS

* fix clean and ldlibs stuff
2024-10-26 13:41:54 +02:00
Ray
ec79bffa20 Update stb_truetype.h 2024-10-26 13:13:05 +02:00
Ray
dc679cd1c7 Update stb_image_resize2.h 2024-10-26 13:12:38 +02:00
Ray
28e7e2cffd Update stb_image.h 2024-10-26 13:12:36 +02:00
Ray
d0e11a8c92 Update qoa.h 2024-10-26 13:12:33 +02:00
Ray
e70bf2bce1 Update dr_wav.h 2024-10-26 13:12:30 +02:00
Ray
c085c73014 Update dr_mp3.h 2024-10-26 13:12:26 +02:00
Ray
c6b1ecc593 Update cgltf.h 2024-10-26 13:12:24 +02:00
Ray
1f6b3384fa Reviewed formatting, remove end-line points, for consistency with comments 2024-10-26 12:26:00 +02:00
Ray
80b490c8f1 Reviewed formating to follow raylib conventions #4429 2024-10-26 12:15:06 +02:00
Nikolas
7fedf9e0b8
[rtextures/rlgl] Load mipmaps for cubemaps (#4429)
* [rlgl] Load cubemap mipmaps

* [rtextures] Only generate mipmaps that don't already exist

* [rtextures] ImageDraw(): Implement drawing to mipmaps

* [rtextures] Load cubemap mipmaps
2024-10-26 12:09:38 +02:00
Asdqwe
91a4f04794
Use mingw32-make for Windows (#4436) 2024-10-26 11:39:24 +02:00
Ray
4e3fc84050 Minor format tweaks 2024-10-26 00:52:22 +02:00
Ray
22c77d17b7 REVIEWED: WebGL2 (OpenGL ES 3.0) backend flags (PLATFORM_WEB) #4330 2024-10-26 00:51:37 +02:00
Ray
7ac36e20cd Update Makefile.Web 2024-10-25 23:55:31 +02:00
Asdqwe
8b36253e2f
[build] [web] Fix examples Makefile for PLATFORM_WEB (#4434)
* Fix examples Makefile for PLATFORM_WEB

* Replace shell with assignment operator

* Replace tab with spaces
2024-10-25 23:47:55 +02:00
Peter0x44
204872de09
[build] CMake: Don't build for wayland by default (#4432)
This is to align with the behavior of #4369, see #4371 for rationale on
disabling Wayland by default.
2024-10-25 09:47:35 +02:00
Jeffery Myers
f03f093909
Add input_virtual_controls to MSVC projects (#4433)
Fix input_virtual_controls example to use correct default font sizes
2024-10-25 09:47:04 +02:00
Jeffery Myers
728ccc96bc
Use the vertex color as part of the base shader in GLSL330 (#4431) 2024-10-24 23:49:30 +02:00
Jeffery Myers
6c3b1fa1de
Add shadow map example to MSVC projects (#4430) 2024-10-24 23:37:23 +02:00
IcyLeave6109
15f6c47f07
Use free camera in model shader example (#4428) 2024-10-24 17:49:47 +02:00
Ray
16368cd353 REVIEWED: DrawRectangleLines(), considering view matrix for lines "alignment" 2024-10-24 13:11:39 +02:00
RadsammyT
385187f795
[rshapes] Review DrawRectangleLines() pixel offset (#4261)
* [rshapes] Remove `DrawRectangleLines()`'s + 1 offset

* ... and replace it with a -/+ 0.5 offset divided by current cam's zoom.
2024-10-24 13:08:12 +02:00
Ray
530bb3dc57 Merge branch 'master' of https://github.com/raysan5/raylib 2024-10-24 12:53:24 +02:00
Ray
6962364bfb Update emsdk paths to latest versions 2024-10-24 12:53:16 +02:00
github-actions[bot]
cb73970f08 Update raylib_api.* by CI 2024-10-24 10:46:22 +00:00
Ray
6ff0b03629 REVIEWED: UpdateModelAnimationBoneMatrices() comments 2024-10-24 12:46:02 +02:00
Ray
5065b85d33 Update rlgl.h 2024-10-24 12:45:12 +02:00
Ray
6760d1bff8 Merge branch 'master' of https://github.com/raysan5/raylib 2024-10-24 12:25:14 +02:00
Ray
b0140b876b REVIEWED: GPU skninning on Web, some gotchas! #4412 2024-10-24 12:25:05 +02:00
github-actions[bot]
865265b832 Update raylib_api.* by CI 2024-10-24 09:58:05 +00:00
Ray
670fbd8c10 Merge branch 'master' of https://github.com/raysan5/raylib 2024-10-24 11:57:44 +02:00
Ray
3483a4d9cb Update raylib.h 2024-10-24 11:57:36 +02:00
github-actions[bot]
b0e77c7afd Update raylib_api.* by CI 2024-10-24 09:50:59 +00:00
Ray
5706cfd600 Update Makefile 2024-10-24 11:50:42 +02:00
Ray
d85c6fe2c0 Update raylib.h 2024-10-24 11:50:30 +02:00
Ray
26dfd4c3f8 Merge branch 'master' of https://github.com/raysan5/raylib 2024-10-24 10:01:06 +02:00
Ray
0f5e76f91f Update CHANGELOG 2024-10-24 10:00:57 +02:00
github-actions[bot]
c6a58d9744 Update raylib_api.* by CI 2024-10-24 08:00:11 +00:00
Ray
2072b4fa04 Update raylib.h 2024-10-24 09:59:54 +02:00
Ray
51bc6ca834 Merge branch 'master' of https://github.com/raysan5/raylib 2024-10-24 09:59:32 +02:00
Ray
4abc6c3989 Update CHANGELOG 2024-10-24 09:59:21 +02:00
Ray
f80a44c729
Update HISTORY.md 2024-10-24 09:58:37 +02:00
Jeffery Myers
0b650f62a6
[RTEXTURES] Remove the panorama cubemap layout option (#4425)
* Remove the panorama cubemap layout, it was not implemented.
Left a todo in the code for some aspiring developer to finish.

* Update raylib_api.* by CI

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-24 09:06:24 +02:00
Ray
eb04154c98 Update Makefile 2024-10-24 01:35:44 +02:00
Ray
00c1f0836b Update Makefile 2024-10-24 01:35:37 +02:00
Ray
ea81436bef Update CHANGELOG 2024-10-24 00:14:36 +02:00
Ray
6184a2db3d ADDED: CHANGELOG for raylib 5.5 -WIP- 2024-10-23 23:29:49 +02:00
Ray
708089f560 Reviewed and reverted unneeded module check, rtextures should not depend on rtext 2024-10-23 23:29:05 +02:00
Ray
de6487b177 Merge branch 'master' of https://github.com/raysan5/raylib 2024-10-23 23:28:08 +02:00
Ray
cd845368d8 Update skinning.fs 2024-10-23 23:28:01 +02:00
Asdqwe
157ee79a8e
Add drawing for generic gamepad on core_input_gamepad example (#4424) 2024-10-23 20:31:57 +02:00
Franz
6f4407cb15
Fix typo in rshapes.c (#4421) 2024-10-23 17:04:15 +02:00
Cypress
df38564f62
Grammar fix in CONTRIBUTING.md (#4423)
"Can you write some tutorial/example?"
"Can you write some tutorials/examples?"
2024-10-23 17:03:50 +02:00
Asdqwe
fe6da67066
[examples] Add deadzone handling to core_input_gamepad example (#4422)
* Add deadzone handling to core_input_gamepad example

* Rename variables
2024-10-23 16:31:27 +02:00
Asdqwe
7a4a84a561
[rcore] Fix #4405 (#4420)
* Fix #4405 at runtime

* Add parameter validation

* Remove default global deadzone
2024-10-23 00:59:50 +02:00
Asdqwe
75a4c5bf20
Update core_input_gamepad example (#4416) 2024-10-23 00:28:20 +02:00
github-actions[bot]
ebcfc7f49e Update raylib_api.* by CI 2024-10-22 22:21:35 +00:00
Ray
4b60ce700f Update raylib.h 2024-10-23 00:21:14 +02:00
Ray
352f4ce2c4 Update config.h 2024-10-23 00:21:06 +02:00
Ray
79e2be68c2 Reviewed skinning shaders #4412 2024-10-23 00:20:59 +02:00
Sage Hane
53f7da2506
build.zig: Fix a minor issue with -Dconfig (#4418) 2024-10-22 18:31:26 +02:00
Sage Hane
55249faa58
build.zig: Re-add OpenGL to Linux deps (#4417) 2024-10-22 17:35:08 +02:00
Asdqwe
4cd243f0a3
Simplify EmscriptenResizeCallback() (#4415) 2024-10-22 13:44:53 +02:00
Sage Hane
b89bf0185a
build.zig: Better specify Linux dependencies (#4406) 2024-10-22 13:20:09 +02:00
Ray
b2dca724c7 REVIEWED: skinning shader for GLSL 100 #4412 2024-10-22 10:41:43 +02:00
Anthony Carbajal
fe66bfb785
moved update out of draw area (#4413) 2024-10-22 10:31:44 +02:00
github-actions[bot]
2a0963ce09 Update raylib_api.* by CI 2024-10-21 22:06:52 +00:00
Asdqwe
f8f6aa0907
[rcore] Adds implementation to SetGamepadVibration() on PLATFORM_WEB and updates it on PLATFORM_DESKTOP_SDL to handle duration (#4410)
* Updates SetGamepadVibration()

* Handle MAX_GAMEPAD_VIBRATION_TIME

* Revert low/high parameters back to left/rightMotor

* Fix missin semicolon

* Convert duration to seconds

* Add SetGamepadVibration() implementation to PLATFORM_WEB
2024-10-22 00:06:37 +02:00
github-actions[bot]
ae150e9640 Update raylib_api.* by CI 2024-10-21 18:47:41 +00:00
Ray
cd3de0af0c Merge branch 'master' of https://github.com/raysan5/raylib 2024-10-21 20:47:10 +02:00
Ray
f4cbc1fbae REVIEWED: GetGestureHoldDuration() comments 2024-10-21 20:47:08 +02:00
Jeffery Myers
a2fcbc94fd
[Raymath] Add matrix operators to raymath for C++ (#4409)
* Add matrix operators to raymath for C++

* Fix spaces
2024-10-21 18:38:42 +02:00
Ray
f60c6d472c Update raymath.h 2024-10-21 17:26:42 +02:00
Ray
f141c75cde Removed trailing spaces 2024-10-21 17:00:52 +02:00
Ray
c935ca3168 Reviewed formatting #4408 2024-10-21 16:59:55 +02:00
Rapha
f402147a63
Updated instanced rendering support loading (#4408) 2024-10-21 16:56:19 +02:00
Ray
7601468211 REVIEWED: Formatting and raymath version #4385 2024-10-21 16:25:45 +02:00
Jeffery Myers
72f8c354b0
[Raymath] Add C++ operator overloads for common math function (#4385)
* Update raylib_api.* by CI

* Add math operators for C++ to raymath

* better #define for disabling C++ operators

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-21 16:17:50 +02:00
Sage Hane
110ee74875
build.zig: Merge src/build.zig to build.zig (#4393)
* build.zig: Move `src/build.zig` to `build.zig`

* build.zig: Remove uses of `@src`

* build.zig: Update entry point
2024-10-21 12:57:11 +02:00
Asdqwe
9d0b1f0171
Adds SetWindowOpacity() implementation for PLATFORM_WEB (#4403) 2024-10-21 09:47:19 +02:00
Asdqwe
cb21fe88d3
Fix MaximizeWindow() for PLATFORM_WEB (#4404) 2024-10-21 09:45:46 +02:00
Asdqwe
4290a0d9f2
[rcore] [web] Updates SetWindowState() and ClearWindowState() to handle FLAG_WINDOW_MAXIMIZED for PLATFORM_WEB (#4402)
* Updates SetWindowState() and ClearWindowState() to handle FLAG_WINDOW_MAXIMIZED for PLATFORM_WEB

* Update MaximizeWindow() and RestoreWindow() to set/unset the FLAG_WINDOW_MAXIMIZED
2024-10-21 01:04:32 +02:00
Anthony Carbajal
680238689b
removed extra update command (#4401) 2024-10-21 01:03:01 +02:00
Nikolas
51ff6586f4
[rtextures] ImageDraw(): Don't try to blend images without alpha (#4395) 2024-10-21 00:31:01 +02:00
Asdqwe
3dbbe60376
Adds MaximizeWindow() and RestoreWindow() implementation for PLATFORM_WEB (#4397) 2024-10-21 00:29:32 +02:00
Sage Hane
ce9259cd02
build.zig: Fix various issues around -Dconfig (#4398)
* build.zig: Fix various issues around `-Dconfig`

* build.zig: Parse all relevant flags from `src/config.h` at comptime
2024-10-21 00:27:25 +02:00
Le Juez Victor
23354e1551
correction of comments (#4400)
The indication of locations for bone ids and bone weights did not correspond to their default values ​​in config.h
2024-10-21 00:26:15 +02:00
Nikolas
902d3c92e3
[rl_gputex] Correctly load mipmaps from DDS files (#4399) 2024-10-21 00:25:33 +02:00
Sage Hane
dc5e6e0ad0
build.zig: Clean up my mess (#4387) 2024-10-18 21:03:27 +02:00
github-actions[bot]
c6d67f006d Update raylib_api.* by CI 2024-10-17 23:15:33 +00:00
Anthony Carbajal
80393c0fb6
[rcore] added sha1 implementation (#4390)
* added sha1 implementation

* added missing part

* fixed issue

* fix to match other implementations
2024-10-18 01:15:19 +02:00
Alan Arrecis
b201b74c3f
Fix VSCode Makefile to support multiple .c files (#4391)
Updated the VSCode Makefile to allow compilation of multiple .c files instead of just one (main.c).
- Replaced `SRC` and `OBJS` definitions to dynamically include all .c and .h files in the project.
- This change enables automatic handling of any number of source files specifically in the VSCode setup.
2024-10-18 01:08:07 +02:00
Asdqwe
a2e31c4e1b
Fix #4388 (#4392) 2024-10-17 15:35:49 +02:00
github-actions[bot]
d6399622a0 Update raylib_api.* by CI 2024-10-16 17:26:49 +00:00
Ray
8cbf34ddc4 WARNING: BREAKING: Renamed several functions for data validation #3930 2024-10-16 19:26:12 +02:00
github-actions[bot]
9b3d019502 Update raylib_api.* by CI 2024-10-16 14:50:42 +00:00
Ray
361b0e85c1 ADDED: Utility functions: ComputeCRC32() and ComputeMD5() 2024-10-16 16:49:50 +02:00
Jojaby
c9c830cb97
Fix rectangle width and height check to account for squares (#4382) 2024-10-15 19:04:30 +02:00
R-YaTian
8d267aaf23
qoi: Added support for image of channels 3 (#4384) 2024-10-15 19:03:17 +02:00
yuval_dev
99ff770edc
Fix the type mismatch caused due to unsupported ?[]const u8 (#4383)
Co-authored-by: Yuval Herman <yuvalherman99@gmail.com>
2024-10-15 19:02:20 +02:00
Sage Hane
c18677e70f
build.zig: Very minor fixes (#4381) 2024-10-13 20:24:39 +02:00
Ray
735308f8eb REVIEWED: CodepointToUTF8(), clean static buffer #4379 2024-10-13 20:02:40 +02:00
Sage Hane
bac3798ad3
build.zig: Fix @src logic and a few things (#4380) 2024-10-13 18:58:42 +02:00
Anand Swaroop
59417636ca
Update BINDINGS.md (#4378) 2024-10-12 13:14:35 +02:00
github-actions[bot]
f5328a9bb6 Update raylib_api.* by CI 2024-10-10 19:17:48 +00:00
Ray
d29eb34cfb REMOVED: LoadImageSvg() 2024-10-10 21:17:31 +02:00
Ray
1effe92129 WARNING: REMOVED: SVG files loading and drawing, moving it to raylib-extras 2024-10-10 20:37:46 +02:00
Sage Hane
d3f86eb957
build.zig: Improve logic (#4375)
* build.zig: Fix `@src` logic

* build.zig: Clarify build error

* build.zig: Add option for enabling `raygui`

* build.zig: Expose `Options` type
2024-10-10 18:56:43 +02:00
William Culver
c4be013294
Fix build.zig (#4374) 2024-10-10 18:56:29 +02:00
Harald Scheirich
454acca84b
Some update to gltf loading (#4373)
Only warns when there are more animations than currently implemented
Allows mesh indices to be unsigned char
2024-10-10 18:53:02 +02:00
Ray
3fb1ba25ac Removed tabs and triple line-breaks 2024-10-08 18:45:52 +02:00
Colleague Riley
44e37c5f97
Update RGFW (#4372)
* (rcore_desktop_rgfw.c) fix errors when compiling with mingw

* define WideCharToMultiByte

* update RGFW

* move stdcall def to windows only

* fix raw cursor input
2024-10-08 18:39:15 +02:00
Anthony Carbajal
712ab798d1
updated makefile to disable wayland by default (#4369) 2024-10-08 18:33:33 +02:00
Ray
89a37cd315
Update CHANGELOG 2024-10-07 21:03:55 +02:00
Anthony Carbajal
43b109a4e3
removed old comment (#4370) 2024-10-07 09:32:04 +02:00
Visen
b290d47bd5
[zig] Fix build.zig bug (#4366)
* fixed zig config.h bug

* zig fmt
2024-10-06 15:52:01 +02:00
Magnus Oblerion
74ce90ce67
[example] Input virtual controls example (#4342)
* Add files via upload

* Update core_input_gamepad_virtual.c

* Add files via upload

* Update and rename core_input_gamepad_virtual.c to core_virtual_Dpad.c

* Update and rename core_virtual_Dpad.c to core_input_virtual_controls.c

* Delete examples/core/core_input_gamepad_virtual.png

* Add files via upload

* Update Makefile

* Update Makefile.Web

* Update README.md

* Update README.md

* Create core_input_virtual_controls.vcxproj

* Delete projects/VS2022/examples/core_input_virtual_controls.vcxproj
2024-10-06 15:47:47 +02:00
Ray
f9e709915a Fix #4355 2024-10-04 11:24:02 +02:00
Anthony Carbajal
d06287d562
taken from FluxFlus PR (#4363) 2024-10-04 11:16:03 +02:00
Anthony Carbajal
da95f88c36
updated camera speeds with GetFrameTime (#4362) 2024-10-04 11:15:43 +02:00
Kacper Zybała
cded378205
[build] CMake: Fix GRAPHICS check (#4359) 2024-10-04 11:08:12 +02:00
Nikolas
0ef0791854
Allow Zig build script to change desktop backend (#4358) 2024-10-04 11:05:19 +02:00
Ashley Chekhov
20ce8ba046
Typo fix (#4356)
Seemed to be a typo. Hope this helps.
2024-10-04 11:04:26 +02:00
Asdqwe
96d91a3892
[rlgl] Fix rlgl standalone defaults (#4357)
* Fix rlgl standalone defaults

* Fix rmodels
2024-10-02 11:41:21 +02:00
Jeffery Myers
09987b01cc
[MODELS] Better fix for GPU skinning issues (#4353)
* Make the max VBO match the animation flag.

* re-enable GPU skinning for mac, and fix the max buffer to be correct based on the GPU skinning support flag.
2024-10-02 10:49:56 +02:00
Asdqwe
d9c10ed264
Fixes GetClipboardText() memory leak for PLATFORM_DESKTOP_SDL (#4354) 2024-10-02 10:49:06 +02:00
Asdqwe
282d6478ba
Complements the #4348 GPU skinning fix (#4352) 2024-10-01 12:09:06 +02:00
Jeffery Myers
0e7bcd5639
[MODELS] Disable GPU skinning for MacOS platform (#4348)
* Update raylib_api.* by CI

* Disable GPU skinning on MacOS
Add GPU skinning example to MSVC Projects.

* Update raylib_api.* by CI

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-30 12:10:02 +02:00
Ray
84a4d93bc4 Fix #4349 2024-09-30 12:06:53 +02:00
Jeffery Myers
0573ef0382
[SHAPES] Add more detail to comment for DrawPixel (#4344)
* Update raylib_api.* by CI

* Add comment that draw pixel uses geometry and may be slow

* Update raylib_api.* by CI

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-27 23:06:54 +02:00
Menno van der Graaf
55e83468c9
Fix isGpuReady flag on android (#4340) 2024-09-24 20:02:54 +02:00
Ray
13178b9373 Update rcore.c 2024-09-22 23:01:22 +02:00
Ray
291063c98f Update rcore.c 2024-09-22 22:56:21 +02:00
Ray
24a1cd8c5b Update rcore.c 2024-09-22 22:50:47 +02:00
Ray
352c450ad0 Update rcore.c 2024-09-22 22:43:35 +02:00
Ray
a643dd058b Merge branch 'master' of https://github.com/raysan5/raylib 2024-09-22 22:36:26 +02:00
Ray
100f6624d6 Update rcore.c 2024-09-22 22:36:17 +02:00
github-actions[bot]
1c7b18923c Update raylib_api.* by CI 2024-09-22 20:11:24 +00:00
Ray
55a25ac04b ADDED: MakeDirectory() 2024-09-22 22:11:08 +02:00
Ray
1eb8ff5e54 LoadFontDefault(): Initialize glyphs and recs to zero #4319 2024-09-22 18:05:58 +02:00
Daniil Kisel
7d3f04ca35
Update BINDINGS.md (#4337)
Updated Lean4 bindings
2024-09-22 14:36:06 +02:00
Daniil Kisel
daaca40416
Update parser's readme to mirror fixed help text (#4336) 2024-09-22 13:45:10 +02:00
Ridge3Dproductions
9337913766
Projects: Fix CMake example project (#4332)
* Update CMakeLists.txt

Add missing link flags

* Update README.md

Remove unneeded flag because this flag is defined in the updated CMakeList file

* Update CMakeLists.txt
2024-09-21 23:12:48 +02:00
Asdqwe
212b1e5fe7
Fix rlgl standalone defaults (#4334) 2024-09-21 23:11:40 +02:00
Ray
e5d0cc978a Some minor tweaks 2024-09-20 17:32:01 +02:00
github-actions[bot]
c09dadd9b5 Update raylib_api.* by CI 2024-09-20 15:30:53 +00:00
Daniel Holden
86ead96263
[rmodels] Optional GPU skinning (#4321)
* Added optional GPU skinning

* Added skinned bone matrices support for different file formats.

* Moved new shader locations to end of enum to avoid breaking existing examples. Added gpu skinning on drawing of instanced meshes.

* Added GPU skinning example.

* Removed variable declaration to avoid shadowing warning.
2024-09-20 17:30:37 +02:00
Brian E
2f0cf8fbe1
[BINDINGS.md] Added raylib-bqn, moved rayed-bqn (#4331)
* [BINDINGS.md] Added raylib-bqn, moved rayed-bqn

rayed-bqn has had a lot of progress and I've realized it has diverged too much from raylib, and so I made raylib-bqn to be a simple binding, while rayed-bqn will be a utility wrapper.

* removed accidental newline
2024-09-20 09:01:15 +02:00
github-actions[bot]
c762a99bd5 Update raylib_api.* by CI 2024-09-17 15:30:59 +00:00
Ray
0a03ed913b Update raylib.h 2024-09-17 17:30:40 +02:00
Ray
c2bd1845eb Reviewed #4323 2024-09-17 10:30:26 +02:00
Ray
627e76cf7b REVIEWED: Directory filter tag #4323 2024-09-17 10:26:32 +02:00
Ray
186787e311 Merge branch 'master' of https://github.com/raysan5/raylib 2024-09-15 13:21:22 +02:00
Ray
0e4ebaf89d REVIEWED: DrawTexturePro() to avoid negative dest rec #4316 2024-09-15 13:20:43 +02:00
github-actions[bot]
7ec1c288be Update raylib_api.* by CI 2024-09-15 11:05:15 +00:00
foxblock
16e9317220
[rcore] Add filtering folders to LoadDirectoryFilesEx()/ScanDirectoryFiles() (#4302)
* Add filtering folders in ScanDirectoryFiles and ScanDirectoryFilesRecursively

Add define FILTER_FOLDER for that purpose
Fix folder names matching filter being added to result

* Move FILTER_FOLDER define to internals of rcore and document option in comment
2024-09-15 13:05:01 +02:00
Ray
329b2df4f2 Merge branch 'master' of https://github.com/raysan5/raylib 2024-09-15 13:03:38 +02:00
Ray
e9bbf02b2b Update rtextures.c 2024-09-15 13:03:12 +02:00
github-actions[bot]
8d92e65773 Update raylib_api.* by CI 2024-09-15 11:02:18 +00:00
Ray
b807f633d9 REVIEWED: ColorLerp() formatting #4310 2024-09-15 13:01:59 +02:00
github-actions[bot]
68e7cadabc Update raylib_api.* by CI 2024-09-15 10:56:01 +00:00
SusgUY446
ddc523ffbe
[rtextures] add MixColors. a function to mix 2 colors together (#4310)
* added MixColors function to mix 2 colors together (Line 1428 raylib.h and Line 4995 in rtextures.c)

* renamed MixColors to ColorLerp (https://github.com/raysan5/raylib/pull/4310#issuecomment-2340121038)

* changed ColorLerp to be more like other functions

---------

Co-authored-by: CI <-ci@not-real.com>
2024-09-15 12:55:45 +02:00
base
d02fcc5262
chore: GetApplicationDirectory definition for FreeBSD (#4318) 2024-09-15 12:51:20 +02:00
Jett
ed702673ea
fix for hardcoded index values in vboID array (#4312)
changing any of the #defines in CONFIG.H would cause issues when rendering.
2024-09-11 22:57:19 +02:00
Alex
fd961deba7
Update BINDINGS.md (#4311)
I've updated the bindings
2024-09-10 07:44:25 +02:00
masnm
0656440e38
fix vld1q_f16 undeclared in arm on stb_image_resize2.h v2.10 (#4309) 2024-09-08 20:24:53 +02:00
masnm
10b01ba7c2
Change implicit conversion to explicit conversion to remove warning (#4308) 2024-09-06 23:16:17 +02:00
Chris Warren-Smith
ed61bdb568
Fix seg fault with long comment lines (#4306)
#4304
2024-09-04 13:07:00 +02:00
Michał Jaskólski
42022c3531
fix: In certain cases the connector status is reported UNKNOWN, should be conisdered as CONNECTED (#4305)
Co-authored-by: Michal Jaskolski <michal.jaskolski@hexagon.com>
2024-09-03 14:38:12 +02:00
carverdamien
59b44a4908
Add uConsole mapping (#4297) 2024-09-02 10:01:30 +02:00
hanaxars
5f49ec3d64
Fix missing equal sign (#4294)
I just noticed there is a missing equal sign. This PR fixes this.
2024-08-28 18:35:35 +02:00
Hesham Abourgheba
8ea5db3ec4
fix(rcore/android): Allow main() to return it its caller on configuration changes. (#4288) 2024-08-25 18:51:08 +02:00
Jeffery Myers
91a9888baa
[rModels] Correctly split obj meshes by material (#4285)
* Correctly split meshes from tinyobj by material so they can be represented by raylib correctly

* PR Feedback
2024-08-25 18:49:52 +02:00
Ray
f5ef357810 Update rtext.c 2024-08-25 13:55:53 +02:00
Ray
5604f6d8a3 Update rlgl.h 2024-08-25 12:57:05 +02:00
Ray
157c7c21d4 ADDED: more uniform data type options #4137 2024-08-25 12:52:27 +02:00
Ray
dec7f12b14 Update raylib.h 2024-08-25 12:51:55 +02:00
Tchan0
8dbf371244
Examples makefiles: align /usr/local with /src Makefile (#4286)
* align /usr/local with src Makefile

Align /usr/local with the /src Makefile, where it can be overriden.

* /usr/local: allow override

align /usr/local with the /src Makefile, where it can be overriden
2024-08-25 11:23:08 +02:00
Tchan0
d314afc451
rlgl.h: glint64 did not exist before OpenGL 3.2 (#4284)
Compilation breaks on rlgl.h for early OpenGL versions.
Glint64 did not exist on those versions (< OpenGL 3.2)
2024-08-24 20:35:49 +02:00
Dave Green
0c06a08e07
[rcore][desktop_glfw] Keeping CORE.Window.position properly in sync with glfw window position (#4190)
* WindowPosCallback added.

CORE.Window.position is now properly kept in sync with the glfw window position.

* Update rcore_desktop_glfw.c

Comments updated.

* Setting CORE.Window.position correctly in InitPlatform() as well.

This also fixes not centering the window correctly when the high dpi flag was enabled.

* Fixes centering the window in the SetWindowMonitor() function.

Here the render size has to be used again in case the high dpi flag is enabled.

* Update Window Position

Update Window Position right away in ToggleFullscreen() & ToggleBorderlessWindowed() functions
2024-08-24 20:33:21 +02:00
Jeffery Myers
0aba21f71c
[RCORE] Update comments on fullscreen and boderless window to describe what they do (#4280)
* Update raylib_api.* by CI

* update fullscreen and borderless comments to better describe what they do.

* Update raylib_api.* by CI

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-24 20:31:28 +02:00
Ray
4c9282b090 ADDED: isGpuReady flag, allow font loading with no GPU acceleration 2024-08-24 18:59:24 +02:00
Ray
78e86b6ea5 Update rlgl.h 2024-08-24 18:58:43 +02:00
Ray
414133dbe7 Update models_point_rendering.c 2024-08-24 18:56:06 +02:00
Colleague Riley
bc0bd98763
(rcore_desktop_rgfw.c) fix errors when compiling with mingw (#4282)
* (rcore_desktop_rgfw.c) fix errors when compiling with mingw

* define WideCharToMultiByte
2024-08-24 18:43:46 +02:00
github-actions[bot]
dfd8055270 Update raylib_api.* by CI 2024-08-24 16:42:52 +00:00
Reese Gallagher
7bde76ca2c
[rmodels] More performant point cloud rendering with DrawModelPoints() (#4203)
* Added the ability to draw a model as a point cloud

* Added example to demonstrate drawing a model as a point cloud

* polished the demo a bit

* picture for example

* adhere to conventions for example

* update png to match aspect ratio

* minor changes

* address code convention comments

* added point rendering to makefiles

* added point rendering to readme and renumbered examples

* comment formatting

---------

Co-authored-by: Reese Gallagher <re325479@ucf.edu.com>
Co-authored-by: Ray <raysan5@gmail.com>
2024-08-24 18:42:38 +02:00
konstruktor227
b0c3013b51
[raudio] Support 24-bit FLACs in LoadMusicStreamFromMemory (#4279)
Force conversion to 16-bit, same as how it is done in `LoadMusicStream`.
This fixes the problem where 24-bit FLACs play silence or broken sound.
2024-08-23 22:51:29 +02:00
Menno van der Graaf
3079c69725
Replace deprecated Android function ALooper_pollAll with ALooper_pollOnce (#4275) 2024-08-23 22:32:20 +02:00
Peter0x44
ecf863969c
[build] CMake: Fix warnings in projects/CMake/CMakeLists.txt (#4278)
Currently, when building, the cmake example in projects/CMake gives this
warning, with CMake 3.30.2

CMake Warning (dev) at /usr/share/cmake/Modules/FetchContent.cmake:1953 (message):
  Calling FetchContent_Populate(raylib) is deprecated, call
  FetchContent_MakeAvailable(raylib) instead.  Policy CMP0169 can be set to
  OLD to allow FetchContent_Populate(raylib) to be called directly for now,
  but the ability to call it with declared details will be removed completely
  in a future version.
Call Stack (most recent call first):
  CMakeLists.txt:20 (FetchContent_Populate)
This warning is for project developers.  Use -Wno-dev to suppress it.

Changing FetchContent_Populate to FetchContent_MakeAvailable didn't
cause any issues I could observe when building. I'm not sure why it
wasn't like that to begin with.
2024-08-23 22:29:40 +02:00
Bugsia
77172e34db
Fixing GenImagePerlinNoise() being stretched, if Image is not rectangular (#4276) 2024-08-23 22:22:36 +02:00
Peter0x44
74350fa7cf
[build] CMake: Delete BuildOptions.cmake (#4277)
This file seems to not do anything useful. From what I can tell the
OSX_FATLIB option sets CMAKE_OSX_ARCHITECTURES to "x86_64;i386". This
doesn't account for the arm that apple now has, as well as 32 bit
support being completely removed, and I think it's entirely reasonable
to expect users to pass the necessary architectures they want
themselves. It's possible this could break some users who rely on this,
but I sincerely doubt anyone does. The solution is trivial either way
(put -DCMAKE_OSX_ARCHITECTURES="i386;x86_64" on the command line
yourself)

The second part of BuildOptions.cmake claims to set PLATFORM to "Web" if
the emscripten toolchain file is used (if (EMSCRIPTEN)), but it does not
work correctly anyway. Currently, glfw searches for wayland and x11
libraries and fails likeso:

CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:645 (message):
  The following required packages were not found:
   - wayland-client>=0.2.7
   - wayland-cursor>=0.2.7
   - wayland-egl>=0.2.7
   - xkbcommon>=0.5.0

Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPkgConfig.cmake:873 (_pkg_check_modules_internal)
  src/external/glfw/src/CMakeLists.txt:163 (pkg_check_modules)

Considering this code doesn't work as described, it's okay to delete it.
I think a better check should be implemented, but that is for a
different PR.
2024-08-23 22:21:22 +02:00
listeria
cc88e0b780
rtext: always multiply by sign in TextToFloat() (#4273)
Co-authored-by: Listeria monocytogenes <listeria@disroot.org>
2024-08-21 17:45:14 +02:00
Jeffery Myers
c8bee7c439
[rmodels] Add a warning when loading an OBJ with multiple materials. (#4271)
* Update raylib_api.* by CI

* Add a temp warning about material assignments during OBJ loading if the file has more than one material. To be replaced when the OBJ translation code is fixed.

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-21 17:11:59 +02:00
github-actions[bot]
bae0af241e Update raylib_api.* by CI 2024-08-21 12:08:09 +00:00
Paperdomo101
fa3f73d881
[rshapes] Review DrawGradient color parameter names (#4270)
void DrawCircleGradient(int centerX, int centerY, float radius, Color color1, Color color2);
void DrawRectangleGradientV(int posX, int posY, int width, int height, Color color1, Color color2);
void DrawRectangleGradientH(int posX, int posY, int width, int height, Color color1, Color color2);
void DrawRectangleGradientEx(Rectangle rec, Color col1, Color col2, Color col3, Color col4);

Have been changed to:

void DrawCircleGradient(int centerX, int centerY, float radius, Color inner, Color outer);
void DrawRectangleGradientV(int posX, int posY, int width, int height, Color top, Color bottom);
void DrawRectangleGradientH(int posX, int posY, int width, int height, Color left, Color right);
void DrawRectangleGradientEx(Rectangle rec, Color topLeft, Color bottomLeft, Color topRight, Color bottomRight);
2024-08-21 14:07:52 +02:00
Ray
039df36f4b REVIEWED: Automation events mouse wheel #4263 2024-08-20 19:13:18 +02:00
hanaxars
7fab03c0b4
Fix warnings (#4264)
Fix following gcc warnings when SVG enabled:

rtextures.c: In function 'LoadImageSvg':
rtextures.c:374:52: warning: pointer targets in passing argument 1 of 'nsvgParse' differ in signedness [-Wpointer-sign]
  374 |             struct NSVGimage *svgImage = nsvgParse(fileData, "px", 96.0f);
      |                                                    ^~~~~~~~
      |                                                    |
      |                                                    unsigned char *
In file included from rtextures.c:230:
external/nanosvg.h:2952:28: note: expected 'char *' but argument is of type 'unsigned char *'
 2952 | NSVGimage* nsvgParse(char* input, const char* units, float dpi)
      |                      ~~~~~~^~~~~
rtextures.c:407:43: warning: comparison of distinct pointer types lacks a cast [-Wcompare-distinct-pointer-types]
  407 |         if (isSvgStringValid && (fileData != fileNameOrString)) UnloadFileData(fileData);
      |                                           ^~
rtextures.c: In function 'LoadImageFromMemory':
rtextures.c:614:52: warning: passing argument 1 of 'nsvgParse' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  614 |             struct NSVGimage *svgImage = nsvgParse(fileData, "px", 96.0f);
      |                                                    ^~~~~~~~
external/nanosvg.h:2952:28: note: expected 'char *' but argument is of type 'const unsigned char *'
 2952 | NSVGimage* nsvgParse(char* input, const char* units, float dpi)
      |                      ~~~~~~^~~~~
2024-08-19 13:41:20 +02:00
Colleague Riley
b432aa2b9c
Update RGFW (#4259)
* update RGFW

* fix bug with GetCurrentMonitor

* update RGFW

* update RGFW

* clean up merge

* update RGFW
2024-08-17 14:00:54 +02:00
Lázaro Albuquerque
308b77cd42
Fix warnings (#4251)
* Update rmodels.c

fix these warnings:

```
/src/rmodels.c:5744:17: warning: missing initializer for field 'w' of 'Vector4' [-Wmissing-field-initializers]
[build]  5744 |                 Vector4 outTangent1 = {tmp[0], tmp[1], tmp[2]};
[build]       |                 ^~~~~~~
```

* Update rcore_web.c

fix warnings
2024-08-17 01:07:23 +02:00
Ray
f70d8a33cb REVIEWED: Shader load failing returns 0, instead of fallback 2024-08-17 00:46:08 +02:00
Ray
fa374f9cc9 Update webassembly.yml 2024-08-17 00:44:33 +02:00
Brian E
63ae57d2e3
Added raylib-APL to BINDINGS.md (#4253)
* Added raylib-APL to BINDINGS.md

* added back the newline

* Made APL binding be version 5.0 instead of auto

Also alligned the bars of the new entry.
2024-08-15 10:05:34 +02:00
Lázaro Albuquerque
6e644a27fc
Change some global variables to have internal linkage (#4252)
* Change some global variables to have internal linkage

* Update rcore.c

* Update rcore.c
2024-08-13 19:16:07 +02:00
hanaxars
65c4003546
Make camera movement independant of framerate (#4247)
Instead of moving camera with constant speed per frame, speed is multiplied with delta time before movement.
2024-08-12 18:47:52 +02:00
Anthony Carbajal
418b878053
[Examples] set FPS to 60 (#4235)
* set FPS to 60

* remove extra commented lines
2024-08-10 20:07:23 +02:00
Asdqwe
46cb6af437
Fix core_input_gamepad_info example so all buttons are displayed within the window (#4241) 2024-08-09 19:03:14 +02:00
Maxim Knyazkin
13491a485a
Fixed compilation for OpenGL ES (#4243) 2024-08-09 19:02:18 +02:00
Anthony Carbajal
e4529ff8f9
update text input box (#4229) 2024-08-09 09:18:00 +02:00
Anthony Carbajal
3c5bdae7ab
update shapes bouncing ball (#4226) 2024-08-09 09:16:05 +02:00
Anthony Carbajal
06aeb21429
update shaders basic pbr (#4225) 2024-08-09 09:15:07 +02:00
Anthony Carbajal
85c6489d81
update models box collisions (#4224) 2024-08-09 09:12:26 +02:00
Anthony Carbajal
243801c2d1
update text writing anim (#4230) 2024-08-09 09:07:56 +02:00
Maxim Knyazkin
2590a30d04
[rlgl] Adding warnings in case OpenGL 4.3 is not enabled (#4202)
* Adding warnings for OpenGL 4.3

* Removed logging from frequently called functions
2024-08-09 09:05:46 +02:00
NishiOwO
fe9e371f27
[miniaudio] Fixing miniaudio and Makefile for NetBSD (#4212)
* fixing miniaudio

* another fix for NetBSD

* adding wl-r. should not affect other bsd
2024-08-09 09:04:18 +02:00
Anthony Carbajal
070c1c9d63
update examples missing unloadtexture (#4234) 2024-08-09 09:03:27 +02:00
Anthony Carbajal
5233b80fb7
update raygui (#4238) 2024-08-09 08:55:16 +02:00
Jeffery Myers
9ef678d90a
Fix warnings (#4239)
* Update raylib_api.* by CI

* Fix typecast warnings

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-09 08:54:22 +02:00
freakmangd
cae0946764
Fix build.zig and use zig fmt (#4242)
+ `std.mem.split` is deprecated, `splitScalar` seems like the intended choice here
+ zig files should be formatted according to `zig fmt`
2024-08-09 08:53:29 +02:00
kai-z99
97c02b2425
[examples] Fix some examples (#4211)
* Add text

* small typo
2024-08-07 01:05:53 +02:00
Ray
5af331d708 REVIEWED #4206 2024-08-07 01:01:45 +02:00
Ray
db8b199363 Reviewed shader 2024-08-06 18:32:14 +02:00
CDM15y
b44b759b8f
[examples][shaders_raymarching] Add raymarching.fs for GLSL120 (#4183)
* Create raymarching.fs

* Update raymarching.fs

* Update raymarching.fs

* Update raymarching.fs

Remove `fragColor` as it is unused

Move the license to the top of the code to improve readability.
2024-08-06 18:30:15 +02:00
Anthony Carbajal
4b84b5563e
Update audio mixed processor (#4214)
* updated audio mixed processor

* remove float cast, better parenthesis
2024-08-06 18:29:10 +02:00
lnc3l0t
8b714e9dd9
[build.zig] check if wayland-scanner is installed (#4217)
#4150 introduced a default value for linux_display_backend,
which makes X11-only systems fail to build.
2024-08-06 18:28:33 +02:00
Ray
9c2ba3bfb7 REVIEWED: possible overflow... again #4206 2024-08-04 23:22:27 +02:00
Ray
923f983719 REVIEWED: Possible overflow #4206 2024-08-04 22:08:38 +02:00
Ray
b657001e0d REVIEWED: shaders_vertex_displacement 2024-08-04 22:06:20 +02:00
lnc3l0t
b2d48ff172
[build.zig] Override config.h definitions (#4193)
* [build.zig] Overridable definitions from config.h
The new Options field "config" holds a string the user can set in the
format "-Dflag_a=1 -Dflag_b=0 ..." to override the values set in
`config.h`.
The file is parsed and the default values are appended to the
compilation flags, if the user doesn't override them.
The user string is appended to the compilation flags.
The "-DEXTERNAL_CONFIG_FLAGS" is added to prevent "config.h" inclusion.

Note: a certain format is assumed for the formatting of config.h
Note: this commit references the closed issue #3516

* [build.zig] Only SUPPORT_* definitions are overridable

Lines from `config.h` which contains "SUPPORT" are added to compilation after being parsed:
- remove whitespace
- format to preprocessor option https://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html

The user supplied flags have priority over the ones read from the file.

NOTE: extension to commit 4da7f82e6f, the logic is simplified
because the SUPPORT flags only have binary values, which makes them easier to parse.
2024-08-04 22:01:28 +02:00
Dave Green
596cc3a645
[rcore][desktop_glfw] Set AUTO_ICONIFY flag to false per default (#4188)
* GLFW AUTO_ICONIFY flag is now set to false per default.

Previously AUTO_ICONIFY was only disabled if the user requested a Fullscreen window from the start. After that it was not possible to change this behavior on the user side anymore, even when changing to a Fullscreen window.

The AUTO_ICONIFY causes problems on macOS. On macOS if the window is minimized because of AUTO_ICONIFY than the only way to restore it is to click on the icon in the dock. In other words when AUTO_ICONIFY is enabled alt/cmd-tabbing through windows does not work correctly. On windows it works even when AUTO_ICONIFY is enabled.

Additionally if a raylib window is in Fullscreen mode on another monitor the AUTO_ICONIFY behavior is a problem because the user might want to window to stay on the monitor even if it loses focus. (problem on all OS's)

AUTO_ICONIFY also restores the monitor hardware resolution if a fullscreen window loses focus.

* Update rcore_desktop_glfw.c

Extra space removed and comments updated with a space at the beginning
2024-08-04 21:59:48 +02:00
Alex ZH
43b0c9410e
[examples] Add new example: shaders_vertex_displacement (#4186)
* shaders-vertex_displacement init

* implement simulation of wave in ocean

* update examples/README & add some comments

* update comments

* add gl100 shaders
2024-08-04 21:58:26 +02:00
Randy Palamar
92f60a99f6
[rlgl] use GLint64 for glGetBufferParameteri64v (#4197) 2024-08-04 21:53:56 +02:00
Anthony Carbajal
6595bab8ff
update make for examples (#4209) 2024-08-04 21:45:50 +02:00
Rico P
a8ec8472ff
replace unicode characters by ascii characters in jar_xml to avoid warning in MSVC (#4196) 2024-08-02 21:04:33 +02:00
maxmutant
9e39788e07
[rcore] fix gamepad axis movement and its automation event recording (#4184)
* [rcore] fix gamepad axis movement and its automation event recording

This commit fixes 2 issues:
- Automation events aren't recorded for negative axis movements on
  gamepads (e.g. stick going left/up)
- 'GetGamepadAxisMovement' drift check isn't working correctly for
  triggers. Axis values between [-0.1, 0.1] are clamped to 0.0

Behaviour change:
- 'GetGamepadAxisMovement' returns default value for each axis, even
  if gamepad isn't attached.

* [rcore] inline body of 'GetGamepadAxisMovementDefault' and remove it
2024-07-28 22:07:47 +02:00
Dave Green
e5a1fc4f20
No longer set the RL_TEXTURE_FILTER_LINEAR when high dpi flag is enabled. (#4189) 2024-07-27 20:19:05 +02:00
Ray
efce4d69ce Merge branch 'master' of https://github.com/raysan5/raylib 2024-07-25 11:44:59 +02:00
Ray
5041d20f00 Update rcore_desktop_glfw.c 2024-07-25 11:44:49 +02:00
Jutastre
f5d2f8d545
Warning on invalid image data (#4179)
* Adds log warnings on invalid file data

* Separate error on missing file extension

* Changed LOG_ERROR to LOG_WARNING

---------

Co-authored-by: Jutastre <pukarlindgren@gmail.com>
2024-07-24 21:21:45 +02:00
Lázaro Albuquerque
bbcb0109e1
Add default vertex/fragment shader to OpenGL ES 3.0 based on the ones from OpenGL 3.3 (#4178) 2024-07-23 21:10:23 +02:00
Lázaro Albuquerque
30f9ca7eb6
A better default that saves the whopping amount of 28KB on the final bundle (#4177) 2024-07-22 22:23:03 +02:00
Colleague Riley
f1f08861a1
Update RGFW (#4176)
* update RGFW

* fix bug with GetCurrentMonitor

* update RGFW

* update RGFW

* clean up merge
2024-07-22 22:19:09 +02:00
Jaen
047a4da696
Fix Carp link - BINDINGS.md (#4175)
The current link 404's. Replace it with a fork.
2024-07-21 13:44:34 +02:00
github-actions[bot]
ad72e3ec8f Update raylib_api.* by CI 2024-07-21 08:28:53 +00:00
Ray
474ab48f8b Update rtextures.c 2024-07-21 10:28:34 +02:00
Ray
fde0dcd0ab ADDED: Working directory info at initialization 2024-07-21 10:28:23 +02:00
Ray
fc5eab5676 Update version to avoid confusions...
...considering that `raylib 5.5` official release could still take some time...
2024-07-21 10:28:01 +02:00
CDM15y
2d94d8d06d
[examples] Fix PBR and Shadowmap example shaders for GLSL 1.20 (#4167)
* Update pbr.fs

remove presicion mediump float because it is for GLES, and not desktop GL

* Fix shadowmap.fs

also suffers the same problem as pbr.fs
2024-07-20 10:42:55 +02:00
Julianiolo
aa70d32786
Fix a dependance of rtexture to rtext (#4171) 2024-07-20 10:39:14 +02:00
Ray
996f50393e Minor tweaks 2024-07-19 00:39:58 +02:00
Ray
61393fff1f Update rcore_desktop_glfw.c 2024-07-19 00:39:11 +02:00
_Tradam
50000f4b01
added brainfuck bindings (#4169) 2024-07-18 21:06:18 +02:00
Lázaro Albuquerque
24726a4bc2
Removes the redundant USE_AUDIO flag (#4158) 2024-07-16 14:16:41 +02:00
red thing
0c03cbff90
Update BINDINGS.md: dray binding supports raylib 5.0 (#4163) 2024-07-16 14:00:30 +02:00
MrScautHD
576bee5cce
Adding GetKeyName(int key) (WIP) (#4161) 2024-07-16 14:00:00 +02:00
jkaup
5ede47618b
Fix crash when switching playback device (#4102)
Co-authored-by: jj <noname@nomail.fi>
2024-07-13 23:10:28 +02:00
Kai Kitagawa-Jones
8d5374a443
Replace glGetInteger64v with glGetBufferParameteri64v (#4154) 2024-07-11 21:31:13 +02:00
InventorXtreme
44c6cd2d37
[build.zig] GLFW Platform Detection Support (#4150)
* Zig Both Linux Desktop Platform Support

* Formating and Default Fix
Made formating fit within raylib standards and changed the default option to support both X11 and wayland on Linux.

* caught one hiding tab
2024-07-11 09:59:26 +02:00
Jeffery Myers
74680748b9
[Shapes] Remove duplicate color calls in DrawGrid (#4148)
* Update raylib_api.* by CI

* No need to call the color 4 times in a row, it's batched

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-07-09 19:45:07 +02:00
SuperUserNameMan
174313acbf
WindowSizeCallback() should not try to handle DPI since already managed by GLFW (#4143)
If `FLAG_WINDOW_HIGHDPI` is set, `InitPlatform()` will aks GLFW to handle resize window content area based on the monitor content scale using : ` glfwWindowHint(GLFW_SCALE_TO_MONITOR, GLFW_TRUE); `

So `WindowSizeCallback()` does not have to handle it a second time.
2024-07-09 09:23:14 +02:00
Ray
fa03246d0e REVIEWED: Code formatting to follow raylib conventions 2024-07-09 09:21:57 +02:00
Colleague Riley
98662b6a4a
update RGFW to RGFW 1.0 (#4144)
* update RGFW

* fix bug with GetCurrentMonitor
2024-07-09 09:12:03 +02:00
Ray
3abe728712 Minor tweaks 2024-07-08 22:54:19 +02:00
NishiOwO
598b7f5210
Add workaround for NetBSD (#4139) 2024-07-08 22:47:35 +02:00
Ray
9764fef262 Update models_billboard.c 2024-07-07 21:02:35 +02:00
Ray
43fe992b94 Merge branch 'master' of https://github.com/raysan5/raylib 2024-07-07 21:02:29 +02:00
Ray
b8e5179431 Update rmodels.c 2024-07-07 21:02:20 +02:00
github-actions[bot]
bc6cf61794 Update raylib_api.* by CI 2024-07-07 18:57:40 +00:00
Ray
df4ff4e78b REVIEWED: Direction must be normalized #4131 2024-07-07 20:57:18 +02:00
bohonghuang
6dd2a0e645
[rmodels] Consistent DrawBillboardPro with DrawTexturePro (#4132)
* [rmodels] Re-implement `DrawBillboardPro`

* [rmodels] Add comments to `DrawBillboardPro`

* [rmodels] Make `DrawBillboardPro` consistent with `DrawTexturePro`

* Update raylib_api.* by CI

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-07-07 20:27:51 +02:00
Ninad Sachania
b61303244c
Fix Reddit badge (#4136) 2024-07-07 10:47:44 +02:00
Ray
a8240722c6 REVIEWED: CheckCollisionPointRec() 2024-07-07 09:09:34 +02:00
kai-z99
1039e3c1bd
[rshapes] Give CheckCollisionPointCircle() its own implementation (#4135)
* remove function call

* fix
2024-07-07 09:05:25 +02:00
Ray
9a280cda0b Update rlgl.h 2024-07-04 11:12:24 +02:00
Ray
c95b2e88b7 Example review 2024-07-04 11:12:20 +02:00
Frank Kartheuser
8fbb447a6d
Change SDL_Joystick to SDL_GameController (#4129)
With SDL_Joystick my game controller wasn't working properly. That's why I changed it to SDL_GameController.
2024-07-04 00:01:40 +02:00
Jeffery Myers
9d3bd43c6e
[CORE] Fix MSVC warnings/errors and raymath.h in C++ (#4125)
* Update raylib_api.* by CI

* Fix MSVC warnings.
Make raymath.h work in C++ in MSVC

* whitespace cleanup

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-07-01 22:03:21 +02:00
Ray
ab20b2179f Update Makefile 2024-07-01 18:56:06 +02:00
Ray
9f47e562d9 Merge branch 'master' of https://github.com/raysan5/raylib 2024-07-01 18:49:54 +02:00
Ray
18d726be65 Update Makefile 2024-07-01 18:49:47 +02:00
github-actions[bot]
899d03e77e Update raylib_api.* by CI 2024-07-01 16:31:58 +00:00
Ray
2efd36a124 Merge branch 'master' of https://github.com/raysan5/raylib 2024-07-01 18:31:33 +02:00
Ray
2f49250baf WARNING: UPDATE: Starting works on raylib 5.5 release 2024-07-01 18:31:16 +02:00
github-actions[bot]
6d30220acc Update raylib_api.* by CI 2024-07-01 16:30:47 +00:00
Ray
fbd79cde5f Reverted memory allocators additional checks 2024-07-01 18:30:22 +02:00
Ray
d243094ede WARNING: BREAKING: Renamed PLATFORM_DESKTOP to PLATFORM_DESKTOP_GLFW
This could potentially be a breaking change, for consistency, now every possible desktop backend has the proper name assigned: GLFW, SDL, RGFW
raylib build system has been reviewed to fallback to `PLATFORM_DESKTOP_GLFW` by default when `PLATFORM_DESKTOP` defined
2024-07-01 18:28:44 +02:00
github-actions[bot]
1fb0565148 Update raylib_api.* by CI 2024-07-01 11:06:39 +00:00
Ray
2bc75b877a WARNING: TEST: Security check to address potential overflow cocerns 2024-07-01 13:06:15 +02:00
Ray
a1d516354e Merge branch 'master' of https://github.com/raysan5/raylib 2024-07-01 13:06:00 +02:00
Ray
61cfd1afcb Minor tweaks 2024-07-01 13:05:20 +02:00
Bruno Cabral
b5473d5ffd
[rtextures] advance k in LoadImageColors (#4120)
Some formats are not advancing k to get pixels values
2024-07-01 12:24:01 +02:00
Mike Will
9e22fddf1a
[build.zig] Make emscripten build compatible with Zig 0.13.0 (#4121) 2024-07-01 12:22:12 +02:00
Ray
c8313d9ebc Update Storage base path, use provided SDL base path 2024-07-01 11:44:20 +02:00
github-actions[bot]
4c90fc6eff Update raylib_api.* by CI 2024-06-30 09:38:16 +00:00
Ray
1e1061d5c7 REVIEWED: Formatting, follow raylib coding conventions 2024-06-30 11:37:58 +02:00
Ray
13e3092511 REVIEWED: DrawSphereEx(), added educational info 2024-06-30 11:15:45 +02:00
smalltimewizard
953df38ac4
[rmodels] DrawSphereEx() optimization (#4106)
* Optimize DrawSphereEx()

Precalculates sin/cos to eliminate unnecessary calls.

* Formatting correction to previous commit

* Bugfix to optimized DrawSphereEx()

OBO error -- added 1 additional precalculated cos/sin value to each array to complete the 360-degree wraparound. Technically the value of these last elements will always be the same as the first element due to 360-degree wraparound, but this is the simplest solution.

* Corrected missing free()

* Formatting correction

* New DrawSphereEx() algorithm
2024-06-30 11:09:21 +02:00
github-actions[bot]
d8214c916e Update raylib_api.* by CI 2024-06-30 09:07:57 +00:00
Ray
17cbc75aa7 REVIEWED: Formatting, follow raylib coding conventions 2024-06-30 11:07:38 +02:00
github-actions[bot]
a805f46f55 Update raylib_api.* by CI 2024-06-30 08:33:45 +00:00
Bruno Cabral
6e2661f92d
[rtextures] Created ImageFromChannel() (#4105)
* created ImageFromChannel

Adds the possibility to extract a specific channel from an image

* naming convention

* example window height

* removed threshold

* removed alpha channel

* channel example organization

* updated channel example image
2024-06-30 10:33:32 +02:00
VitoTringolo
5b8efd68ba
[rmodels] Return true if no need to interpolate to avoid log flooding (#4118) 2024-06-30 09:50:12 +02:00
Jeffery Myers
c1ea32655a
[EXAMPLES] Default Skybox example to not use HDR (#4115)
* Update raylib_api.* by CI

* Default to not use HDR, and note that HDR support requires that raylib be built with HDR enabled.

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-28 19:08:55 +02:00
SuperUserNameMan
a3ef381b3e
rmodels.c, LoadImageFromCgltfImage() : fix base64 padding support (#4112)
* rmodels.c, LoadImageFromCgltfImage() : fix base64 padding support

This should fix the issue related to `.gltf` embeded image in base64 format, by ignoring `=` padding and calculating the data size in bytes correctly.

* follow guidelin convention

* try to follow guideline convention as much as possible

* clarify comments

i hope it's clear ennough
2024-06-28 09:56:27 +02:00
Colleague Riley
84971d81f3
Update RGFW and replace long switch in rcore_desktop_rgfw.c with a lookup table (#4108)
* Fix Makefile issues (RGFW) (linux) (macOS)

* Do not use nanosleep on windows at all (PLATFORM_DESKTOP_RGFW)

* remove #define RGFWDEF and make the #undefs only happen for their OS

* Update RGFW.h

* fix to match the RGFW updates

* remove line that shows the cursor for no reason

* Update RGFW, replace long switch with an array, update rgfw platform for RGFW

* update RGFW (fix reported glitch with drag and drop files) (linux)

* remove u16
2024-06-28 09:55:14 +02:00
VitoTringolo
05d76c74a6
Fix GLTF animations (#4107)
Co-authored-by: Vito Tringolo <vito.tringolo@recognitionrobotics.com>
2024-06-28 09:53:29 +02:00
InKryption
5e91444e3e
[build.zig] pass the real build.zig file (#4113)
`@This()` was naively passed to `dependencyFromBuildZig` while inside
a file that is not actually the build file, causing a panic when
actually used. Passing `@import("../build.zig")` fixes this.
2024-06-27 22:25:15 +02:00
InKryption
57b5f11e2a
[build.zig] Leverage dependencyFromBuildZig (#4109) 2024-06-27 11:52:36 +02:00
jspast
37205bba84
[web] Fix undesired scrollbars on shell files (#4104) 2024-06-25 22:15:29 +02:00
Ray
0979eafa84 WARNING: REMOVED: Default font fallback 2024-06-25 21:40:41 +02:00
Ray
4239e66c55 Update rshapes.c 2024-06-25 21:39:43 +02:00
Peter0x44
dfabbd8ba8
[rtext] Don't return default font if LoadFontEx fails (#4077)
It is currently impossible to check a font loaded successfully with
IsFontReady because LoadFontEx will always return a valid font.

DrawTextEx has this check:
if (font.texture.id == 0) font = GetFontDefault();  // Security check in case of not valid font

So anyone relying on the default font as a fallback for fonts failing to
load should still be covered.
2024-06-25 21:38:55 +02:00
Ray
3e441ae98b REVIEWED: DrawLine() #4075 2024-06-25 16:37:20 +02:00
github-actions[bot]
ec95ee85a3 Update raylib_api.* by CI 2024-06-24 16:42:01 +00:00
Ray
385e60dd41 Minor tweaks 2024-06-24 18:41:33 +02:00
Jeffery Myers
e96bab7ce6
[Build] Fix warnings when building in VS 2022 (#4095)
* Update raylib_api.* by CI

* Fix warnings when building examples in MSVC 2022

* fix auto-format that sneaked in there.

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-24 17:47:32 +02:00
Peter0x44
4311db5ba5
[rmodels] Fix -Wstringop-truncation warning (#4096)
rmodels.c: In function ‘LoadBoneInfoGLTF.isra’:
rmodels.c:4874:32: warning: ‘strncpy’ specified bound 32 equals destination size [-Wstringop-truncation]
 4874 |         if (node.name != NULL) strncpy(bones[i].name, node.name, sizeof(bones[i].name));
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2024-06-24 09:29:10 +02:00
github-actions[bot]
f947f89061 Update raylib_api.* by CI 2024-06-24 07:28:17 +00:00
Le Juez Victor
c2df169847
[rtextures] Adding ImageDrawLineEx function (#4097)
* adding `ImageDrawLineEx` function
also review other functions for drawing lines in images

* fix `ImageDrawLineV`
2024-06-24 09:27:59 +02:00
github-actions[bot]
c7bda3d10f Update raylib_api.* by CI 2024-06-23 20:51:38 +00:00
Le Juez Victor
7e50270d49
[rtextures] Adding triangle drawing function for images (#4094)
* adding triangle drawing function for images

* remove unnecessary check

* fix an iteration mistake
2024-06-23 22:51:24 +02:00
SuperUserNameMan
7773254022
LoadIQM() set model.meshMaterial[] (#4092) 2024-06-23 21:14:03 +02:00
Paul Melis
d582becbc2
[rmodels] Initial work to correctly handle the node hierarchy in a glTF file (#4037)
* Initial work to correctly handle the node hierarchy in a glTF file.
Static meshes seem to work fine in my tests. Haven't tried anything
animated yet, but it's almost certainly broken.

* Fix variable naming, some comment tweaks

* Only count primitives made up of triangles in glTF meshes

* Update processing of gltf mesh animation data, to match earlier
changes to vertex/normal/tangent data
2024-06-22 19:42:11 +02:00
manuel5975p
5ba18575de
[build] CMake: pass -sFULL_ES3 instead of -sFULL_ES3=1 (#4090)
* Allow ES3 in LibraryConfigurations.cmake

* Put FULL_ES3 as linker option

* Remove =1
2024-06-22 19:20:33 +02:00
Alice Nyaa
b0d49579c1
fixed LoadCodepoints returning a freed ptr when count is 0 (#4089) 2024-06-22 19:17:31 +02:00
Peter0x44
28f88fd984
Fix mistakes in example usages in raylib_parser help text (#4084) 2024-06-22 19:16:36 +02:00
Anthony Carbajal
0d59235ade
add warning log multiple of 4 (#4080) 2024-06-22 19:15:21 +02:00
manuel5975p
e7acdd12d8
[build] CMake: support OpenGL ES3 in LibraryConfigurations.cmake (#4079)
* Allow ES3 in LibraryConfigurations.cmake

* Put FULL_ES3 as linker option
2024-06-21 09:07:01 +02:00
Anthony Carbajal
52f2a10db6
fixed issue with GetScreenWidth/GetScreenHeight (#4074) 2024-06-17 13:42:53 +02:00
Ray
dcf2f6a8e9 Added note about performace #4067 2024-06-16 11:17:34 +02:00
Lázaro Albuquerque
307c998495
[build] Making config.h fully available to CMake users (#4044)
* Create ParseConfigHeader.cmake

This script parses the config.h file to automate the process of exposing the configuration flags and configuration values found in the latter.

* Update CompileDefinitions.cmake

Makes use of the new functionality found in ParseConfigHeader.cmake to make things consistent.

* Update CMakeOptions.txt

Makes use of the new functionality found in ParseConfigHeader.cmake to make things consistent.

* Update CMakeLists.txt

Changes required to make possible building raylib for web on Windows 10.

* Update LibraryConfigurations.cmake

Removes a warning that linker-only flags were being passed to the compiler, which is in accordance to https://emscripten.org/docs/tools_reference/settings_reference.html.

* Update CMakeOptions.txt

Removed clutter.

* Update CompileDefinitions.cmake

Removed clutter.

* Update CompileDefinitions.cmake

Some applications might check for PLATFORM_WEB instead of __EMSCRIPTEN__.

* Update CompileDefinitions.cmake

Reverting

* Update CMakeLists.txt

USE_AUDIO is redundant in the presence of the already existent and more descriptive SUPPORT_MODULE_RAUDIO.

* Update CompileDefinitions.cmake

USE_AUDIO is redundant in the presence of the already existent and more descriptive SUPPORT_MODULE_RAUDIO.

* Update ParseConfigHeader.cmake

* Revert "Update CMakeLists.txt"

This reverts commit 1785fc06b5.

* Revert "Update CompileDefinitions.cmake"

This reverts commit 62f9a3a0ea.

* Revert "Update CMakeLists.txt"

This reverts commit 3e7912144e.

* Revert "Update LibraryConfigurations.cmake"

This reverts commit bcc4310c49.
2024-06-16 10:49:59 +02:00
kai-z99
a29d334734
[rmodels] Read uninitialized values in GenMeshTangents() - fix bounding case (#4066)
* fix

* assert
2024-06-16 10:44:31 +02:00
Lázaro Albuquerque
cc40a91343
[build] Fix some warnings on web builds and remove some redundant flags. (#4069)
* update

* Revert "update"

This reverts commit e8adcabd94.

* update

* remove a not stricly required flag
2024-06-16 10:42:50 +02:00
Ray
04735fa9bb Merge branch 'master' of https://github.com/raysan5/raylib 2024-06-16 10:42:02 +02:00
Ray
715633e0de REVIEWED: Spline cubic bezier example 2024-06-16 10:41:47 +02:00
github-actions[bot]
32c98717b1 Update raylib_api.* by CI 2024-06-16 08:23:57 +00:00
Ray
4119b6dd66 Update raylib.h 2024-06-16 10:23:38 +02:00
Santiago Pelufo
640eaca8bf
[rshapes] Fix multisegment Bezier splines. (#3744)
* [rshapes] Fix multisegment Bezier splines.

It seems to me that these functions are wrong, if you step the index by 1 you move to a control point instead of the next segment.

* Fix example shapes/shapes_splines_drawing for bezier splines.

* Draw circles to fill gaps between bezier segments.
2024-06-16 10:21:54 +02:00
Mike Will
81ff879b04
zig: run examples from their directories (#4063)
So that they can find their respective resource folders.
2024-06-16 09:38:54 +02:00
Viktor Pocedulić
eff7b065eb
[build.zig] Fix raygui build when using addRaygui externally (#4027)
When addRaygui is used from an external build, for example in a
bindings project, the build of a generated `raygui.c` fails with
"raylib.h not found" error from the compiler.

I've traced this down to a raylib step not adding its `src/` to the
shared list of include paths using `addIncludePath` but relying on
`addCSourceFiles` `.root` to provide the implicit include path for
raylib proper's own files.

If raygui is later added to the step the compiler won't know where
to look for `raylib.h` and friends and will fail to build.

This change simply adds raylib's `src/` to the include path list.
2024-06-16 09:37:45 +02:00
ShalokShalom
b4fbdc0283
Update Julia Bindings (#4068) 2024-06-14 22:46:50 +02:00
kai-z99
fca53c7799
optimize (#4065) 2024-06-14 08:19:17 +02:00
listeria
df849d2fb0
[raudio] fix mapping of wave data in LoadWaveSamples() (#4062)
Co-authored-by: Listeria monocytogenes <listeria@disroot.org>
2024-06-13 16:05:22 +02:00
TokyoSU
735c0160b5
Update rlgl.h (#4059)
- The function rlGetMatrixProjectionStereo and rlGetMatrixViewOffsetStereo have RLAPI for the function declaration and cause error when compiling using RLGL_IMPLEMENTATION.
2024-06-12 19:36:25 +02:00
Alexey Kutepov
33c598123c
[raudio] Add 24 bits samples support for FLAC format (#4058)
Similarly to how it's done for WAV format, by forcing the conversion
to s16 on UpdateMusicStream().
2024-06-12 11:42:41 +02:00
Karl Zylinski
fffae1a975
Fix fragPosition using wrong matrix in lighting_instancing.vs (#4056)
fragPosition was multiplied by mvp*instanceTransform, but it should only be multiplied by instanceTransform. Compare to lighting.vs, there we only use mvp for gl_Position, but matModel for the fragPosition.
2024-06-11 20:55:13 +02:00
Jeffery Myers
2609211207
[SHAPES] Make functions that draw point arrays take them as const (#4051)
* Update raylib_api.* by CI

* make functions that take a pointer to an array take them as const pointers

* Update raylib_api.* by CI

* fix comment alignment.

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-11 11:51:49 +02:00
VitoTringolo
0fc4b61906
LoadBoneInfoGLTF add check for animation name being NULL (#4053)
Co-authored-by: Vito Tringolo <vito.tringolo@recognitionrobotics.com>
2024-06-11 11:50:42 +02:00
Lázaro Albuquerque
c636618d77
Update Makefile (#4054)
Since the flag CUSTOM_CFLAGS should allow users customize things, in particular the optimization level, I figured it should come after other default ones.

Based on: "If you use multiple -O options, with or without level numbers, the last such option is the one that is effective."

Source: https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
2024-06-10 20:50:09 +02:00
MrScautHD
29ac31f409
Removed Raylib.NET (#4050) 2024-06-09 18:03:05 +02:00
carverdamien
a0a81fddee
Make addRaylib use options.opengl_version (#4049) 2024-06-09 13:29:09 +02:00
Ray
8cbde7f84c tweaks 2024-06-09 13:16:29 +02:00
Ray
6b3c1148bf REVIEWED: Animation name being NULL #4037 2024-06-09 13:16:18 +02:00
Colleague Riley
8c712f82d1
Update RGFW (#4048)
* Fix Makefile issues (RGFW) (linux) (macOS)

* Do not use nanosleep on windows at all (PLATFORM_DESKTOP_RGFW)

* remove #define RGFWDEF and make the #undefs only happen for their OS

* Update RGFW.h

* fix to match the RGFW updates

* remove line that shows the cursor for no reason
2024-06-08 22:26:46 +02:00
fruzitent
7b92b5bde7
fix: infer CMAKE_MODULE_PATH in super-build (#4042) 2024-06-07 10:22:24 +02:00
Konrad Gutvik Grande
3948656d84
The example always showed a xbox controller, never a ps3 controller (#4040) 2024-06-07 10:21:02 +02:00
jgabaut
f05316b11d
[rlgl] Rename near, far variables (#4039) 2024-06-06 15:29:15 +02:00
Sprix
e74d13e6db
Fix examples not building with gestures system disabled (#4020)
Build no longer fails with -DSUPPORT_GESTURES_SYSTEM=OFF and -DBUILD_EXAMPLES=ON
2024-06-06 11:47:07 +02:00
Ray
38018192b8 RENAME: near, far vaiables 2024-06-06 10:12:23 +02:00
Ray
5767c4cd05 Update rcore_desktop.c 2024-06-04 23:00:12 +02:00
Paul Melis
e1379afb01
Fix #4024, cylinder drawing was incorrect due to imprecise angle (#4034)
* Fix #4024, cylinder drawing was incorrect due to imprecise angle
stepping (mostly noticeable with semi-transparent cylinders)

* Fix var name and spacing
2024-06-04 11:46:57 +02:00
IoIxD
39f12859dc
rtext: added functions for camel case and snake case (reopened due to formatting errors) (#4033)
* rtext: added functions for camel case and snake case

* Update raylib_api.* by CI

* rtext: removed always false comparison

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-03 20:13:28 +02:00
Jett
06f8c4f733
LoadIQM: attempt to load texture from IQM at loadtime. (#4029)
tries to load the texture with the base path of the original IQM file, relative paths should work.
2024-06-03 09:03:33 +02:00
MrScautHD
0cad25f798
Update Raylib-CSharp to 5.1-dev. (#4030)
* Update BINDINGS.md

* Update BINDINGS.md

* Update BINDINGS.md
2024-06-03 08:52:51 +02:00
David Holland
11202bf299
[rmodels] Send full matModel to shader in DrawMesh (#4005) (#4022) 2024-06-02 11:52:00 +02:00
Jett
2998f8671b
LoadModelAnimationsIQM: fix corrupted animation names (#4026)
Correctly copies animation names from IQM animation to raylib animation.
2024-06-02 11:51:25 +02:00
github-actions[bot]
1344979c70 Update raylib_api.* by CI 2024-05-30 06:24:58 +00:00
kai-z99
606cc1d897
[rshapes]Circle line collision function (#4018)
* inital function

* working 1

* optimize

* optimized dot product

* simplify

* cleanup

* cleanup

* cleanup

* comment

* var name change

* epsilon
2024-05-30 08:24:44 +02:00
vaezim
d7a8af144d
Fix typos in markdowns and comments, Fix invalid links in HISTORY.md (#4017) 2024-05-30 08:22:07 +02:00
Le Juez Victor
f2344cd089
review color tint functions (#4015) 2024-05-29 23:44:20 +02:00
Ray
c04629f6d4 Update raylib.h 2024-05-29 17:38:19 +02:00
Ray
e37d19ab1e REVIEWED: ExportFontAsCode(), avoid const #4013 2024-05-29 17:28:55 +02:00
DarkAssassin23
2804e75869
[rtext] Added cast to ExportFontAsCode output to fix C++ compiler errors (#4013) 2024-05-29 17:22:59 +02:00
Dylan
2e38069475
[build.zig] Fix Zig emscripten build (#4012)
* Fix for issue #4010

Split the code for Zig's master branch and >= 0.12.0 due to changes in https://github.com/ziglang/zig/pull/19623

* Restore the cache_include path which was removed in error

Accidently removed a couple lines I didn't mean to 🙈
2024-05-29 17:07:28 +02:00
github-actions[bot]
a942a3bc70 Update raylib_api.* by CI 2024-05-29 15:02:00 +00:00
Ray
c335c3c52c ADDED: IsFileNameValid() 2024-05-29 17:01:42 +02:00
Le Juez Victor
797de0f9ad
[rmodels] Multiplication of colors in DrawModelEx which can be simplified (#4002)
* simplifies color multiplication `DrawModelEx`

* add explicit casts
2024-05-29 13:16:19 +02:00
avx0
9cc7e3528f
[parser] MemoryCopy() calls: Prevent buffer overflow by replacing hard-coded arguments (#4011)
In future, if a dev edits the second arg and miscalulates the corresponding 3rd arg, there will be a buffer overflow or the string (2nd arg) will be cut short. This commit prevents that.
2024-05-29 11:30:28 +02:00
Lionel Briand
785ec74b92
Update BINDINGS.md (#4004)
Add L-Briand/raylib-zig-bindings to the Language Bindings table
2024-05-24 18:26:17 +02:00
listeria
b429dbdc4b
fix WaveCrop(): update wave->frameCount (#4003)
also allow `finalFrame = wave->frameCount' as the range of frames does
not include it.

Co-authored-by: Listeria monocytogenes <listeria@disroot.org>
2024-05-24 18:24:40 +02:00
Antonis Geralis
d9c5066382
nim bindings are in 5.1-dev, remove umaintained repos (#3999)
* nim bindings are in 5.1-dev, remove umaintained repos

* Update BINDINGS.md

* move to umaintained

* Update BINDINGS.md

* github editor is pranking me
2024-05-21 21:51:19 +02:00
Ray
b212750b85 Update rcore_desktop_sdl.c 2024-05-21 20:53:51 +02:00
Ray
3abb6d9eaf REVIEWED: ColorToInt() PR 2024-05-21 20:52:48 +02:00
JupiterRider
c7f098f4d2
Call SDL_GL_SetSwapInterval() after GL context creation (#3997) 2024-05-21 20:48:48 +02:00
OetkenPurveyorOfCode
9ef29aff9a
[rtextures] Fix Undefined behaviour in ColorToInt (#3996) 2024-05-21 15:44:02 +02:00
Salvador Galindo
c4a51a3ebd
fixed out of bounds error in GenMeshTangents (#3990) 2024-05-21 13:47:26 +02:00
Ray
b2f4f4d8fd
Update BINDINGS.md 2024-05-21 13:10:38 +02:00
Carmine Pietroluongo
fc9634a4de
Update BINDINGS.md (#3995) 2024-05-21 13:07:31 +02:00
IoIxD
74d7e78b70
BINDINGS.md: raylib-rs now at 5.0 (#3991) 2024-05-21 12:53:05 +02:00
github-actions[bot]
272a142ee5 Update raylib_api.* by CI 2024-05-21 06:14:05 +00:00
listeria
bb9bd73f43
fix WaveCrop() and use frames instead of samples (#3994)
Co-authored-by: Listeria monocytogenes <listeria@disroot.org>
2024-05-21 08:13:46 +02:00
Ray
9d67f4734b REVIEWED: LoadBMFont(), issue on not glyph data initialized 2024-05-18 07:41:37 +02:00
Ray
00ac9b6c53 Update config.h 2024-05-18 07:40:59 +02:00
FishingHacks
3d70d6179c
[raudio] Removed drwav_uninit in LoadMusicStream to fix a crash (#3986) 2024-05-16 19:47:39 +02:00
Cemal Gönültaş
1d52985943
[rcore_web] Relative mouse mode issues. (#3940)
* [rcore_web] Relative mouse mode issues.

* Review formatting.
2024-05-16 12:01:27 +02:00
Jeffery Myers
f26bfa0c8e
[RAYMATH] Revert Extern 'C' in raymath (#3985)
* Update raylib_api.* by CI

* Remove Extern C for raymath, it breaks some cases in mingw-w64 and does not fix any warning issues.

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-16 07:42:52 +02:00
CosmicBagel
d6b22b17ae
LazyPath.path has been deprecated, using b.path() (#3983)
This works in zig 0.12, LazyPath.path has been removed in zig 0.13

Co-authored-by: CosmicBagel <>
2024-05-15 23:20:34 +02:00
Ray
02d98a3e44 REVIEWED: 2d camera zoom, add alternative method #3977 2024-05-15 16:33:06 +02:00
Ray
479bd84400 Update shaders_palette_switch.c 2024-05-15 16:19:53 +02:00
Mike Will
46f9806359
Use logarithmic scaling for a 2d example with zoom functionality (#3977) 2024-05-15 16:19:22 +02:00
Peter0x44
bf5eecc71f
[parser] Don't crash for files that don't end in newlines (#3981)
The parser assumes all lines end in newlines, but sometimes this isn't
true. Check for a null terminator along with '\n' when stripping leading
spaces.
2024-05-15 16:16:45 +02:00
Jeffery Myers
3d885ef919
[raymath] Add extern "C" to raymath header for C++ (#3978)
* Update raylib_api.* by CI

* Add an extern C to raymath to prevent warnings in C++

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-13 00:36:23 +02:00
Filyus
3f13f7921d
Fix parsing of empty parentheses (#3974)
Co-authored-by: Filyus <fahmedyanov@dpg.email>
2024-05-13 00:33:09 +02:00
Alexei Mozaidze
f4b5622ba3
feat(zig): add opengl_version option (#3979)
Added `opengl_version` option to `src/build.zig`.
2024-05-13 00:27:02 +02:00
Ray
7a1cad3e61 Reviewed input params #3974 2024-05-12 13:31:38 +02:00
Colleague Riley
f62202198e
remove #define RGFWDEF and make the #undefs only happen for their OS (RGFW) (#3971)
* Fix Makefile issues (RGFW) (linux) (macOS)

* Do not use nanosleep on windows at all (PLATFORM_DESKTOP_RGFW)

* remove #define RGFWDEF and make the #undefs only happen for their OS
2024-05-10 21:09:22 +02:00
Colleague Riley
8a5fd3ac1d
Do not use "nanosleep" on windows at all (PLATFORM_DESKTOP_RGFW) (#3970)
* Fix Makefile issues (RGFW) (linux) (macOS)

* Do not use nanosleep on windows at all (PLATFORM_DESKTOP_RGFW)

---------

Co-authored-by: ColleagueRiley <ColleagueRiley@gmail.com>
2024-05-09 16:35:26 +02:00
Colleague Riley
6ec925554c
Fix Makefile issues (RGFW) (linux) (macOS) (#3969)
Co-authored-by: ColleagueRiley <ColleagueRiley@gmail.com>
2024-05-09 14:18:18 +02:00
veins1
1aa3559155
Fixes for loading Music (#3966)
* Fixes for loading Music

Fix for #3889
Fixes for QOA crashes.
Memory leak FIX on unsuccessful .wav loading.

* Added comments
2024-05-07 20:44:41 +02:00
Ray
08ae888722 Update Makefile 2024-05-07 20:40:41 +02:00
Colleague Riley
9805fe0b1a
make RGFW a custom platform (#3941)
* fix minor bugs and errors (x86) for the RGFW platform, update RGFW platform license, update makefile info for RGFW platform

* revert

* (RGFW) (winapi) fix mouse hide bug when cursor changes

* ensure PLATFORM_SHELL is defined (PLATFORM_RGFW)

---------

Co-authored-by: ColleagueRiley <ColleagueRiley@gmail.com>
2024-05-07 20:30:52 +02:00
gabriel-marques
fa2b1c8f09
Implementing GetMonitorWidth/Height for DRM (#3956)
* Implementing GetMonitorWidth/Height and GetMonitorPhysicalWidth/Height for drm

Added implementation for DRM for functions :
 - GetMonitorWidth()
 - GetMonitorHeight()
 - GetMonitorPhysicalWidth()
 - GetMonitorPhysicalHeight()
 - GetMonnitorName()

These functions take an argument but only the value 0 is accepted. This is because the DRM platform implementation manages only one screen for now

* Refactor "GetMonitor" properties for DRM Platform

Refactored GetMonitorHeight, GetMonitorWidth, GetMonitorPhysicalHeight,
GetMonitorPhysicalWidth and GetMonitorName to accept only argument "0"
as more than one screen is not supported in DRM platform.
2024-05-07 10:33:56 +02:00
MrScautHD
f69ae58304
Update BINDINGS.md (#3963) 2024-05-06 12:50:05 +02:00
Christian Haas
3d9aafed3b
[rcore_desktop] Fix 3693 initial window geometry (#3950)
* Rework window placement and dimensions for multi-monitor setups;

- fullscreen apps use primary monitor, exclusively
- non-fullscreen apps come in two variants:
a) pre-determined window size by user
b) use-active-monitor dimensions by user specifying 0x0
Either way, the window shall be centred at the monitor where it was created

This may have been the original intent, yet the primary monitor was used also for the second case, regardless where the window opened.

* Clean up code, handle error, fix integer-overflow for centering windowed fullscreen
2024-05-05 20:22:58 +02:00
bohonghuang
23385231c6
[rlgl] Fix incorrect matrix multiplication order in rlMultMatrixf (#3935) 2024-05-05 20:19:25 +02:00
Ray
34d00d5217 Minor formatting tweaks 2024-05-05 19:46:31 +02:00
Ray
f1007554a0 Set default init values for random #3954 2024-05-01 22:58:33 +02:00
Ray
33b32ca53a Default shader attrib locations need to be exposed
They need to be exposed on `rlgl.h` header section (not implementation section) because with some specific use cases (custom config.h, rmodels module enabled), building fails otherwise.
2024-05-01 18:41:28 +02:00
Ray
c21edadab0 Update rprand.h 2024-05-01 18:39:38 +02:00
Ray
763129e96b Reviewed some warnings 2024-05-01 18:12:57 +02:00
github-actions[bot]
27a015d022 Update raylib_api.* by CI 2024-04-30 21:47:28 +00:00
UmgefallenesGlas
7246d798ad
Changed one minor Comment (#3949) 2024-04-30 23:47:11 +02:00
Ray
b03c8ba945 WARNING: BREAKING: REDESIGN: SetTextLineSpacing()
Redesigned function to only consider separation between the end of vertical size of one line and the beginning of next line
2024-04-28 23:07:21 +02:00
Ray
e0027eb767 REVIEWED: DrawLine() to avoid pixel rounding issues #3931 2024-04-28 22:59:35 +02:00
github-actions[bot]
915dd95d88 Update raylib_api.* by CI 2024-04-28 20:39:44 +00:00
Tomas Fabrizio Orsi
80d318461f
Made comments on raylib.h match those present in rcamera.h (#3942)
Signed-off-by: Tomas Fabrizio Orsi <torsi@fi.uba.ar>
2024-04-28 22:39:28 +02:00
OetkenPurveyorOfCode
f78721991f
Use builtin_clz for clang on windows (#3939) 2024-04-28 20:29:45 +02:00
Tomas Fabrizio Orsi
10e702facd
FIX: Added CAMERA_CUSTOM check in UpdateCamera(Camera *camera, int mode) (#3938)
Signed-off-by: Tomas Fabrizio Orsi <torsi@fi.uba.ar>
2024-04-28 20:28:19 +02:00
Ray
e47ebec661 FIX: Issue with texcoords loading for glTF 2024-04-24 17:02:03 +02:00
Ray
2e77443209 WARNING: Fix breaking issue (introduced some days ago) 2024-04-23 22:55:51 +02:00
Ray
f15455552d Review formatting 2024-04-23 19:38:45 +02:00
KotzaBoss
4b0e25d3af
Add rlCullDistance variables/getters and rlSetClipPlanes function (#3912)
The `RL_CULL_DISTANCE_` definition remains as the initial value
of the variables.

Basic usage can be:
```c
#include <raylib.h>
#include <rlgl.h>

rlSetClipPlanes(RL_CULL_DISTANCE_NEAR, MY_CULL_DISTANCE_FAR);

if (must_reset_clip_planes)
    rlSetClipPlanes(RL_CULL_DISTANCE_NEAR, RL_CULL_DISTANCE_FAR);
```
2024-04-23 14:24:37 +02:00
bohonghuang
d80febde7d
[rlgl] Implement vertex normals for RLGL immediate drawing mode (#3866)
* Fix several non-functional `target_compile_definitions`

* Avoid hardcoding the default vertex attribute locations

* Implement functional `rlNormal3f`

* Add normal definitions for `DrawCube`

* Update the basic lighting example to use `DrawCube` and `DrawPlane`
2024-04-23 14:22:29 +02:00
freakmangd
e0f6faa151
[build.zig] Drop support for 0.11.0 and use more idiomatic build script code (#3927)
* Remove support for 0.11.0, and make build script more idiomatic
+ remove all 0.11.0 compatibility functions
+ remove most LazyPath .path variants
  + I didn't touch emscripten, I don't know if its relative or absolute
+ change all absolute paths to use .cwd_relative
+ only use the builder allocator
+ have local dependencies use the package manager
+ make adding raygui more flexible
+ use zig-cache for generated wayland files

* Remove support for 0.11.0 in examples/build.zig

* update examples further and add clarifying comment on addRaygui
2024-04-22 09:13:01 +02:00
Ray
3caa424ad4 Review formatting 2024-04-21 12:29:09 +02:00
Ray
cf47fbb20b REVIEWED: LoadImageRaw() #3926 2024-04-20 23:58:22 +02:00
Ray
8f24d86c1f REVIEWED: LoadImageRaw() #3926 2024-04-20 23:44:07 +02:00
Ray
f795941521 REVIEWED: rlSetVertexAttribute(), define last parameter as offset #3800 2024-04-20 23:37:31 +02:00
Ray
5cfcf13d4b REVIEWED: LoadGLTF(), support 2nd texture coordinates loading 2024-04-20 23:23:30 +02:00
Ray
e543b78bb7 REVIEWED: LoadGLTF(), support additional vertex attributes data formats #3890 2024-04-20 22:01:59 +02:00
Ray
6435ef43f5 REVIEWED: LoadGLTF(), JOINTS loading #3836
Support all JOINT formats supported by glTF specs
2024-04-20 21:22:49 +02:00
Ray
f6d85e5df7 Update project 2024-04-20 21:21:31 +02:00
Ray
77cabc8bf2 Update shapes_draw_rectangle_rounded.c 2024-04-20 20:32:37 +02:00
Ray
e85f245ad4 REVIEWED: Remove final punctuation in code comments 2024-04-20 20:31:06 +02:00
Ray
c1943f0f7c REVIEWED: Move some functions, made them static 2024-04-20 20:30:35 +02:00
Christian Haas
d80a622972
[raudio] Fix 3664: crash in raudio from multithreading issues (#3907)
* Flip release of buffer;

First it needs to be taken out of the processing chain, then it can be released. The inverse of the initialization.

* Add mutex locks to audio buffer functions; Separate those used from both threads

* Flip release of buffer;

First it needs to be taken out of the processing chain, then it can be released. The inverse of the initialization.

* Remove TODO marker; The buffer is in stopped state and its data won't be accessed

* Add mutex locks to music/stream functions directly operating on buffer

* Secure UpdateMusicStream/PlayMusicStream/UpdateAudioStream;

This change is twofold:
* Add locks to UpdateMusicStream/UpdateAudioStream (second one needed separation)
* Remove unnecessary hack to restart music - inlining the statements resulted in a no-op

Especially the second part made it easier to ensure thread-safety overall

* Remove redundant check; Already checked at beginning of function
2024-04-20 20:15:09 +02:00
Ray
d95d4d4ad5 Merge branch 'master' of https://github.com/raysan5/raylib 2024-04-20 19:59:41 +02:00
Ray
68201c10c2 Update models_cubicmap.c 2024-04-20 19:58:14 +02:00
Ray
41b0c5c4f9 REVIEWED: DrawRectangleLines() pixel offset
This could be actually very tricky and GPU/drivers dependant...
2024-04-20 19:58:10 +02:00
github-actions[bot]
349ff16600 Update raylib_api.* by CI 2024-04-20 17:54:14 +00:00
Ray
b51f4db8c2 REVIEWED: DrawRectangleLines() #3884
For consistency, now _almost_ all `Draw*Lines()` functions use `RL_LINES` mode for drawing. It solves the linked issue but it can have other implications, as mentioned in the WARNING comment in `DrawRectangleLines()`.

Side note: `DrawRectangleRoundedLines()` now should be reviewed for consistency.
2024-04-20 19:53:59 +02:00
Ray
29ce13b777 Code gardening
- Review formatting
 - Improve readability for some functions result return
 - Minimize early returns
 - Align LoadFileData() to UnloadFileData()
2024-04-20 13:53:13 +02:00
Ray
2754c80596 Added security checks #3924 2024-04-20 13:50:34 +02:00
Ray
a17a81f05b Review code formating 2024-04-19 21:13:52 +02:00
Ray
51486a0606 Update rtext.c 2024-04-19 21:13:36 +02:00
Ray
b88365fb01 Disable some font formats support 2024-04-19 21:13:28 +02:00
Rafael Bordoni
88f7762921
Fix window not initializing on primary monitor on GLFW backend (#3923)
The way the current code worked was by calling `GetCurrentMonitor()`,
which would always return the monitor at position (0,0). This isn't the
primary monitor on all platforms, on Linux in particular it isn't the
case.

This isn't the case on the SDL backend, after calling `InitWindow()` the
window would always show up on the primary monitor. Even on the GLFW
backend, if the full screen flag was set it would attempt to put it on
the primary monitor as it would call `glfwGetPrimaryMonitor()` to do it,
so for consistency's sake we should do it on windowed mode too.
2024-04-19 15:17:22 +02:00
Benji
b00e467494
Revert "Build specific example using -DBUILD_EXAMPLE cmake flag (#3921)" (#3922)
This reverts commit c1fd98591d.
2024-04-19 08:43:24 +02:00
Benji
c1fd98591d
Build specific example using -DBUILD_EXAMPLE cmake flag (#3921) 2024-04-17 19:26:18 +02:00
Ray
112ce672e1 FIX: #3918 2024-04-17 19:12:47 +02:00
Ray
a6a08c75eb Update corrupted-header sounds #3554 2024-04-17 18:30:02 +02:00
Benji
4491ff0426
Replaced SQUAD quat interpolation with cubic hermite to align with gltf 2.0 spec (#3920) 2024-04-17 08:10:48 +02:00
Arthur
e42f9263b8
Fix GetKeyPressed for PLATFORM_DESKTOP_SDL (#3869)
The key handling in PLATFORM_DESKTOP_SDL was faulty in two ways, which
led to GetKeyPressed returning incorrect data.

CORE.Input.Keyboard.keyPressedQueue was updated only on SDL_TEXTINPUT,
meaning only text characters were registered as a pressed key, but not
function keys (eg. tab, backspace...). Also on such event, both
CORE.Input.Keyboard.keyPressedQueue and
CORE.Input.Keyboard.charPressedQueue were assigned the key's
corresponding codepoint, when CORE.Input.Keyboard.keyPressedQueue
should get the raylib keycode instead.

CORE.Input.Keyboard.keyPressedQueue is now updated on SDL_KEYDOWN event
instead.

Co-authored-by: Arthur <hi@thenightwat.ch>
2024-04-15 23:09:20 +02:00
Benji
4e37c8e370
Added missing interpolation types for GLTF animation channels (#3919) 2024-04-15 23:08:09 +02:00
veins1
289e7d3a6c
Reset music.ctxType if loading wasn't succesful (#3917)
Fixes some crashes, e.g. calling StopMusicStream after trying to load Music from a non-existant .mp3 file
2024-04-14 00:15:50 +02:00
Dylan
583f81f458
Fix FileNotFound: .../src/raylib.h (#3915) 2024-04-13 23:35:23 +02:00
freakmangd
ba2a103011
[build.zig] Fix local dependency breakage (#3913)
* fix local dependency breakage

* revert accidental change in include path
2024-04-13 23:34:14 +02:00
Mute
214b1997a8
Changed RLGL_VERSION from "4.5" to "5.0 (#3914)
Line 110 of file rlgl.h is the one in question.
2024-04-13 23:33:21 +02:00
freakmangd
b3dfa2d8ab
Update to latest zig and simplify build.zig (#3905)
* update to latest zig, and don't use srcdir

* preserve compatibility, simplify Child.run compatibility
2024-04-10 10:36:18 +02:00
Yousif
a4819f99cb
Update shaders_hybrid_render.c (#3908)
Fix typo
2024-04-10 10:36:03 +02:00
Aria
a1f5e34d81
Update rcore_android.c (#3910)
add gamepad previous button state tracking to Android
2024-04-10 10:34:05 +02:00
Ray
04afba260f REVIEWED: Window positioning, avoid out-of-screen window-bar 2024-04-08 11:27:56 +02:00
Nikolas
892e57d46e
Update raylib-zig version (#3902) 2024-04-07 23:03:39 +02:00
Belllg
3e658ef502
Update Makefile RAYLIB_VERSION (#3901)
Changed the raylib version from 4.2.0 to 5.1-dev, just like the raylib.h file
2024-04-07 14:48:32 +02:00
Ray
8bcf044983
Remove broken-link bindings #3899 2024-04-07 10:01:25 +02:00
Ray
aca9ab0ebb Update cgltf.h 2024-04-07 09:47:28 +02:00
jtainer
1b14c082ed
Remove redundant axis length calculation (#3900) 2024-04-06 13:56:20 +02:00
iarkn
414229bcf9
Fix #3891 breaking builds for Zig v0.11.0 (#3896)
The changes brought by #3891 uses `std.process.Child.run` which was
renamed from `std.process.Child.exec` in Zig version 0.11.0. This commit
adds a version check to use the appropriate function names.

Additionally, the `linux_display_backend` configuration option is added
so users can set it when running `zig build` with the `-D` option or
when using raylib as a dependency.
2024-04-05 12:55:23 +02:00
Ray
890058abcd Update raylib.h 2024-04-04 13:18:28 +02:00
github-actions[bot]
1987c90c73 Update raylib_api.* by CI 2024-04-03 18:10:31 +00:00
Ray
d30cfea82d REVIEWED: GetScreenToWorldRayEx() 2024-04-03 20:10:15 +02:00
Rob Loach
9070eb9a13
Fix framerate recording for .gifs (#3894) 2024-04-03 12:10:52 +02:00
Ray
c9d71689ed Remove TABS 2024-04-02 09:40:19 +02:00
Ray
646d70e93a Remove trailing spaces 2024-04-02 09:38:06 +02:00
github-actions[bot]
1b047995d1 Update raylib_api.* by CI 2024-04-01 16:01:29 +00:00
Ray
fdf9ac66da Merge branch 'master' of https://github.com/raysan5/raylib 2024-04-01 18:01:02 +02:00
Ray
3b353da3ab Address parsing issue when generating XML #3893 2024-04-01 18:00:52 +02:00
Nikolas Mauropoulos
d374457040
Fixes zig build that was broken on #3863 (#3891)
* Fixes zig build that was broken on #3863

* Make this work with wayland
2024-03-30 19:36:30 +01:00
github-actions[bot]
7c75746b91 Update raylib_api.* by CI 2024-03-29 00:40:37 +00:00
MrMugame
eda239cc97
Fixing gamepad buttons not working in drm backend (#3888)
* Fixing gamepad buttons in drm backend

* Remove trailing spaces

* Axis enumeration now works properly
2024-03-29 01:40:20 +01:00
Ray
07128896af Update rcore_drm.c 2024-03-28 19:55:55 +01:00
MrMugame
30781c423b
Organizing the drm backend to only use one api to allow for more devices (#3879)
* Updating rcore_drm.c to only use one api for input

* Change RPI log prefix to DRM

* Remove relative checking which is not supported currently

* Loop should continue on invalid event in drm backend

* Fixed and cleaned up PollKeyboardEvents() in drm backend
2024-03-28 13:14:21 +01:00
proberge-dev
b905dafca0
[rtextures] Fix LoadImageFromScreen scaling (#3881) 2024-03-26 08:47:25 +01:00
Ray
35252fceef Merge branch 'master' of https://github.com/raysan5/raylib 2024-03-21 15:43:08 +01:00
Ray
dcb9db5fe6 Update rcore.c 2024-03-21 15:43:00 +01:00
Kacper Zybała
9cf408f77c
Remove redundant rlDisableVertexAttribute for SHADER_LOC_VERTEX_COLOR (#3871) 2024-03-18 18:37:09 +01:00
Ray
28c232d856 Update rcore_desktop.c 2024-03-18 09:13:34 +01:00
Jeffery Myers
9bb3d9977a
Put GLFW in relative mouse mode when the cursor is disabled. (#3874) 2024-03-18 09:12:36 +01:00
Ray
d7ff0175c1 Fix #3876 and also rlgl review on #3783 2024-03-18 09:09:26 +01:00
Ray
8b0dd44316 Fix #3876 and also rlgl review on #3783 2024-03-18 09:08:51 +01:00
Alexandre Almeida
9a8d73e6c3
Fix GLFW runtime platform detection (#3863)
* Fix GLFW runtime platform detection

* Add libwayland-dev package to workflows

* Add libxkbcommon-dev package to workflows

* Add libwayland-bin package to codeql.yml

* Add libwayland-client0 and libwayland-cursor0 packages to codeql.yml

* Use libwayland-dev in codeql.yml

* Add libxkbcommon-dev to codeql.yml

* Remove libwayland-bin from linux.yml and linux_examples.yml (libwayland-dev includes it as a dependency)

---------

Co-authored-by: Ray <raysan5@gmail.com>
2024-03-14 16:54:39 +01:00
joyousblunder
42db6badd0
Update BINDINGS.md (#3868)
Odin's binding were bumped to 5.0 back in November 2023
2024-03-13 23:33:10 +01:00
Ray
17d631f508
Update codeql.yml 2024-03-12 22:51:16 +01:00
iP
1fad8277a3
optimisation of the "bone socket" tutorial (#3864)
Less matrix operations doing.
2024-03-10 21:49:04 +01:00
Peter0x44
f072497551
Implement IsCursorOnScreen for PLATFORM_DESKTOP_SDL (#3862)
I did some testing and this seems to work okay, but it *is* different to
GLFW. GLFW seems to lose "IsCursorOnScreen" for one frame upon pressing
alt+tab over the window, without a different window covering it. SDL
seems to have a more reasonable behavior for this case. Either way it's
an edge case and I don't know the exact way to fix, likely requires
internal GLFW changes.
2024-03-09 11:43:29 +01:00
Rob Loach
ba066656f7
[cmake] Disable SDL rlgl_standalone example (#3861)
* cmake: For SDL, disable rlgl_standalone

* cmake: Only build rlgl_standalone when on Desktop, and not shared libs
2024-03-08 12:33:40 +01:00
Ray
30604080ef Update rmodels.c 2024-03-07 12:33:45 +01:00
Ray
93a828f744 REVIEWED: GetMouseRay() functions rename #3830 2024-03-07 12:33:37 +01:00
github-actions[bot]
b1029a40b2 Update raylib_api.* by CI 2024-03-07 11:28:26 +00:00
aiafrasinei
3b7be85151
Screen space related functions consistency (#3830)
* Screen/world-space related functions rename

* Update raylib_api.* by CI

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-07 12:28:11 +01:00
Rob Loach
fccdfa7926
cmake: For SDL build, link the glfw dependency (#3860) 2024-03-07 12:11:46 +01:00
Ray
c1c9b69290 Implemented fix for #3859 2024-03-07 12:10:26 +01:00
Ray
1904873838 Merge branch 'master' of https://github.com/raysan5/raylib 2024-03-07 12:10:18 +01:00
Ray
68b553cfc1 Update raylib.h 2024-03-07 12:10:02 +01:00
Ray
c7b362d19d
Update cmake.yml 2024-03-05 14:04:32 +01:00
Ray
38bdcafea1
Update cmake.yml 2024-03-05 14:02:57 +01:00
Ray
2114e48393
Update cmake.yml 2024-03-05 14:00:56 +01:00
Ray
36dabe485c
Update cmake.yml 2024-03-05 13:59:36 +01:00
Ray
7584b6aa0b
Update cmake.yml 2024-03-04 20:08:59 +01:00
Alexandre Almeida
85a46e42bd
CMake: Remove USE_WAYLAND option (#3851)
* CMake: Remove USE_WAYLAND option

* Consistency fix

* Fix oversight
2024-03-04 19:59:26 +01:00
Ray
6e9dcdb599
Update linux_examples.yml 2024-03-04 19:59:04 +01:00
Ray
c970afeccd
Update linux.yml 2024-03-04 19:58:49 +01:00
Caleb Barger
25caf14be8
Fix fix-build-paths (#3849) 2024-03-01 12:43:19 +01:00
Alexandre Almeida
dc1cec8bab
Remove GLFW mouse passthrough hack and increase GLFW version in CMake (#3852) 2024-03-01 08:34:53 +01:00
Ray
449f7d3fa6 Merge branch 'master' of https://github.com/raysan5/raylib 2024-02-29 18:50:55 +01:00
Ray
fea3395fc1 Review formatting 2024-02-29 18:50:44 +01:00
github-actions[bot]
d3f2d94f23 Update raylib_api.* by CI 2024-02-29 17:40:30 +00:00
Ray
1e8450665c ADDED: New function ColorIsEqual() 2024-02-29 18:40:10 +01:00
mooff
94c79917e3
Fix SDL multitouch tracking (#3810)
The fingerId from SDL was used as an index into the CORE.Input.Touch
arrays, but it's an opaque / arbitrary int64, way bigger
than MAX_TOUCH_POINTS, so the first non-simulated touch event would segfault.
2024-02-29 18:30:38 +01:00
Alexandre Almeida
6589311a0b
Update GLFW to 3.4 (#3827)
* Update GLFW to 3.4 (draft)

* Add _glfwConnectNull() function to rglfw.c

* Update rglfw.c

* Update Makefile

* Makefile: Replace USE_WAYLAND_DISPLAY with DISABLE_WAYLAND

* Revert "Makefile: Replace USE_WAYLAND_DISPLAY with DISABLE_WAYLAND"

This reverts commit 9e79abde78.

* GlfwImport.cmake: Replace GLFW_USE_WAYLAND with GLFW_BUILD_WAYLAND

* Update rglfw.c

* Output platform selected by GLFW to TRACELOG

* GLFW has removed Mir support
2024-02-29 18:29:32 +01:00
johann nadalutti
53221eb799
feat: vox_loader normals and new voxels shader (#3843) 2024-02-29 18:28:51 +01:00
Dalton Overmyer
077ab6d56b
Add an example that generates a random sequence. (#3846) 2024-02-29 18:26:49 +01:00
Ray
ed9a6d862b Update rtextures.c 2024-02-28 16:27:55 +01:00
aiafrasinei
2aed94cfc2
Fix examples warnings for macos (#3842) 2024-02-27 22:15:09 +01:00
Laurentino Luna
f0807d2be1
Change sanitization check for ExportDataAsCode (#3837)
* Change sanitization check for `ExportDataAsCode`

I opted to use `isalnum` function since it should handle most cases. It
cannot however handle cases of files beginning with numbers.

* Update `ExportDataAsCode` condition

* Reinsert comment on `ExportDataAsCode`
2024-02-27 13:08:47 +01:00
Christian W. Zuckschwerdt
074fbb0264
Fix DRM cross-compile without sysroot (#3839) 2024-02-27 13:08:16 +01:00
Steve Biedermann
1fc4f4ac9c
fix build paths (#3835) 2024-02-26 11:20:18 +01:00
Ray
7fae41b5c6 Update models_bone_socket.c 2024-02-26 11:03:12 +01:00
Ray
a6425fa1b9 Added note #3822 2024-02-26 11:03:09 +01:00
Ray
7d6e59170b Update rtextures.c 2024-02-26 10:49:04 +01:00
Ray
3086bf1668 Update models_bone_socket.c 2024-02-26 10:49:01 +01:00
Gary M
bd6c0bab44
add 16-bit unsigned short vec4 format for gltf joint loading (#3821) 2024-02-26 10:48:19 +01:00
Bowserinator
d919d457d3
Add Vector4 math functions & Vector2 variants of some Vector3 functions (#3828) 2024-02-26 10:41:21 +01:00
iP
2a263a09cc
bone socket tutorial (#3833)
Tutorial on how to use bones as sockets to calculate the position of something.
2024-02-26 10:30:22 +01:00
Peter0x44
1df91e74b9
Fix building of raylib_opengl_interop on PLATFORM_DESKTOP_SDL (#3826)
I tested this with CMake. I don't know if the examples makefile
currently handles this case.
2024-02-26 10:29:21 +01:00
Gary M
53cfc7c965
assign format to cubemap (#3823) 2024-02-26 10:26:39 +01:00
Alex Macafee
6db5bb5ccd
Update BINDINGS.md (#3829)
Raylib VAPI has been updated to support all features added by Raylib 5.0
2024-02-26 10:26:17 +01:00
Peter0x44
b86f78f6b1
Fix examples linking with CMake and -DPLATFORM=SDL (#3825)
Currently, every example fails linking likeso:

[  3%] Linking C executable audio_mixed_processor
/usr/bin/ld: ../raylib/libraylib.a(raudio.c.o): undefined reference to symbol 'exp@@GLIBC_2.29'
/usr/bin/ld: /usr/lib/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

Apparently, linking libm explicitly is the solution.
2024-02-26 10:25:47 +01:00
4rk
c588a291e6
Add very little sanitization to indentifier names in ExportDataAsCode() (#3832) 2024-02-26 10:22:06 +01:00
github-actions[bot]
2a774a88f5 Update raylib_api.* by CI 2024-02-24 15:47:42 +00:00
GideonSerf
371d25c8c9
Gamepad rumble support with SDL2 (#3819)
* Added gamepad rumble to rcore_desktop.c and rcore_desktop_sdl.c
Still need to add to the rest of the platforms.

* Add SetGamepadVibration warnings to unimplemented platforms.

* Added MAX_GAMEPAD_VIBRATION_TIME
The rumble in SDL2 will continue for MAX_GAMEPAD_VIBRATION_TIME unless the user cancels it with a call to SetGamepadVibration(0.0f,0.0f,0.0f)

* Cast float duration value to Uint 32

* Changed defines from int to float and fixed typo

---------

Co-authored-by: Gideon Serfontein <gse@newspacesystems.com>
2024-02-24 16:47:27 +01:00
Abhishek Rathore
bda919033d
Fixed typo in a comment (#3816) (#3817)
Fixed a grammatical error by removing "are" to change `... but some are have multiple purposes ...` to `... but some have multiple purposes ...` in `textures/textures_image_generation`
2024-02-23 19:17:33 +01:00
Ray
23616153d4 Update Makefile 2024-02-22 23:25:05 +01:00
Peter0x44
31c6a340ab
Remove all uses of deps/mingw (#3805)
The purpose of this directory in GLFW is to provide some headers that
"mingw.org" doesn't. Raylib has long been unable to build with mingw.org
due to using certain symbols that aren't exposed in their headers.
(_ftelli64 and _access, among others.). Mingw-w64 already has the
necessary headers included, and doesn't need any of these external
implementations. For some reason, this also causes the following error
when building with Visual Studio's clang:

clang  -c rglfw.c -Wall -D_GNU_SOURCE -DPLATFORM_DESKTOP -DGRAPHICS_API_OPENGL_33 -Wno-missing-braces -Werror=pointer-arith -fno-strict-aliasing  -std=c99 -O1 -Werror=implicit-function-declaration -I. -Iexternal/glfw/include -Iexternal/glfw/deps/mingw
In file included from rglfw.c:61:
In file included from ./external/glfw/src/init.c:30:
In file included from ./external/glfw/src/internal.h:331:
In file included from ./external/glfw/src/platform.h:31:
In file included from ./external/glfw/src/win32_platform.h:70:
external/glfw/deps/mingw\xinput.h:227:26: error: a parameter list without types is only allowed in a function definition
  227 | void WINAPI XInputEnable(WINBOOL);
      |

If the last -Iexternal/glfw/deps/mingw is removed, the build works fine.

So, this workaround causes other problems, while not actually helping
raylib.

0bb605cd79/src/CMakeLists.txt (L272-L279)

GLFW's CMakeLists.txt first checks if either dinput.h or xinput.h are
provided by the toolchain, before telling the compiler to search for
headers in that directory. For EVERY compiler that can build raylib,
this is true.

In summary: This directory causes issues when building with some
compilers, and every toolchain that needs this workaround can't build
raylib anyway.
2024-02-22 23:06:22 +01:00
mooff
4f283a0789
Add CMake PLATFORM option for Desktop SDL (#3809) 2024-02-22 23:05:41 +01:00
Nikita Blizniuk
54e0af40c1
fixed loading GLTF animations with 1 frame (#3804) 2024-02-19 18:51:04 +01:00
Ray
77eeb0010e Updated workflows 2024-02-18 12:06:16 +01:00
Ray
e42e3188f5 Remove some unneeded line breaks 2024-02-18 11:59:40 +01:00
João Foscarini
c251e9309e
Fix implicit conversion from float to double then back to float again (#3799) 2024-02-17 10:41:03 +01:00
Ray
dc7f81a7b0 Update workflows to use latest actions/upload-artifact 2024-02-13 16:15:18 +01:00
Ray
abe243d469
Update linux.yml 2024-02-13 16:13:46 +01:00
Ray
401c5a8638 Minor tweaks to avoid some CodeQL warnings 2024-02-13 15:58:02 +01:00
Ray
bb741f53a8 Update rtext.c 2024-02-13 10:43:24 +01:00
Mingjie Shen
6280771dad
[rtext] Change strcpy to strncpy to fix buffer overflow (#3795) 2024-02-13 10:38:13 +01:00
Jeffery Myers
4cd71a9750
Fix warnings in raylib (#3793) 2024-02-10 20:02:05 +01:00
Ray
dd8b5613ca REVIEWED: DrawPixel() not drawing 2024-02-08 08:45:59 +01:00
Ray
8ba7c61625
Update README.md 2024-02-07 15:56:11 +01:00
Ray
e52ae870f2 Reverted Makefile GL_ENABLE_GET_PROC_ADDRESS #3713 2024-02-05 21:38:13 +01:00
Ray
ea31bd47e5 REVIEWED: PLATFORM_WEB build flags, added GL_ENABLE_GET_PROC_ADDRESS
Reviewed flags formating
2024-02-05 21:12:57 +01:00
Danil
6a8cc62b67
Fix GetCameraRight (#3784) 2024-02-05 20:53:14 +01:00
Ray
e9291fa4c7 Update rtext.c 2024-02-04 22:50:54 +01:00
Ray
c0c2e28c1b Merge branch 'master' of https://github.com/raysan5/raylib 2024-02-04 12:14:15 +01:00
Ray
615ee9d177 REVIEWED: rlLoadFramebuffer() 2024-02-04 12:13:56 +01:00
Ray
cd8da72fea
Update rtext.c (#3777) (#3779) 2024-02-04 12:08:49 +01:00
github-actions[bot]
31ce1374e4 Update raylib_api.* by CI 2024-02-04 11:03:25 +00:00
Ray
80580746e5 Reorder functions 2024-02-04 12:02:58 +01:00
Ray
d34956b197 Merge branch 'master' of https://github.com/raysan5/raylib 2024-02-04 11:53:04 +01:00
Ray
c31559101a REVIEWED: rlLoadFramebuffer(), parameters not required 2024-02-04 11:52:49 +01:00
github-actions[bot]
250d89b621 Update raylib_api.* by CI 2024-02-04 10:37:24 +00:00
Luís Almeida
9a5dddc311
Added viewport independent raycast (#3709)
* added viewport independent raycast

* Renamed GetMouseRayEx to GetViewRay
2024-02-04 11:37:10 +01:00
Ray
f033b30703 Review formating and some defines naming consistency 2024-02-04 11:33:38 +01:00
oblerion
d91e9104aa
[rcore] Fix GetFileNameWithoutExt() (#3771)
* Update rcore.c

fix [rcore] GetFileNameWithoutExt

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Update rcore.c
2024-02-04 11:28:58 +01:00
A
a96b224b38
Add gamepad support to PLATFORM_DESKTOP_SDL (#3776)
Co-authored-by: Arthur <hi@thenightwat.ch>
2024-02-04 11:24:05 +01:00
Ray
868d515fbc Update rtext.c 2024-02-04 11:18:46 +01:00
Ray
eed56a45d6 REVIEWED: LoadFontDataBDF() name and formating 2024-02-04 11:10:46 +01:00
Stanley Fuller
0932cd3059
[rtext] Add BDF font support (#3735)
* Add BDF font support

* Include font ascent in glyph y-offset when loading BDF font
2024-02-03 19:28:12 +01:00
Brandon Baker
29ff658d92
Update BINDINGS.md (#3774)
Bump supported raylib version of Raylib-cs to 5.0
2024-02-02 18:06:30 +01:00
IoIxD
7ec43022c1
Fix segfault in ExportWaveAsCode (#3769)
`char *txtData = (char *)RL_CALLOC(waveDataSize * 6 + 2000, sizeof(char));`

assumes every chunk being added to txtData is 6 bytes. This is not always true, sometimes a newline is involved and the data becomes 12 bytes instead, and this can cause a random segfault.

This commit changes `6` to `12`, and explains why in the comment.
2024-02-01 21:16:57 +01:00
Marrony Neris
c0b081fac0
Fix MeasureTextEx() height calculation (#3770) 2024-02-01 21:14:22 +01:00
Ray
25306eae42 REVIEWED: Issue on parsing #3765 2024-02-01 00:05:30 +01:00
Ray
d79828076f REVIEWED: macOS issues #3767 2024-02-01 00:03:06 +01:00
Ray
deaffb0698 Review PR #3746 formating 2024-01-29 21:16:17 +01:00
Jeffery Myers
bebf9547bd
[CORE,RLGL] Fix scale issues when ending a mode (#3746)
* Only restore GL scale back to screen scale if we are returning to a screen, not a render texture.

* blankspace

* reset back to default screen scale when ending a render texture since we are back on the default fbo
2024-01-29 21:10:23 +01:00
Brian E
812645b077
cleaned away unused macros in rcamera.h (#3762) 2024-01-28 13:49:07 +01:00
Alessandro Nikolaev
cf10cdd6b3
Added missing "standalone" functions to raudio.c & fixed return bug (#3760)
* Added GetFileNameWithoutExt, GetFileName & strprbrk to raudio.c

* Gave return values to SaveFileData & SaveFileText in raudio.c
2024-01-28 13:46:27 +01:00
veins1
f4add5f10d
Fix rlSetUniformSampler (#3759)
Fix rlSetUniformSampler not setting sampler uniform if the same texture was already passed to a different sampler uniform
2024-01-28 13:45:19 +01:00
Ray
40f3df5b86 Update core_2d_camera_platformer.c 2024-01-24 21:17:11 +01:00
Victor Gallet
ff1eeafb95
Fix bug to retrieve material specular map in DrawMesh function, with incorrect index (#3758) 2024-01-23 12:37:54 +01:00
Idir Carlos Aliane
cb97a8063d
[rtext.c] fixing some comments to align comments style (#3756) 2024-01-22 23:15:25 +01:00
Idir Carlos Aliane
6f1c31b25d
Change some minor comments to align with comments style (#3755) 2024-01-22 21:26:18 +01:00
Idir Carlos Aliane
c133fee286
[raymath.h] Small code refactor (#3753)
* [raymath.h] Small refactor to avoid duplicated code

* Fixing some blank spaces to match same syle convention
2024-01-22 19:48:18 +01:00
Brian E
27645e16ab
fixed small typo, replaced th with the (#3752) 2024-01-22 11:36:38 +01:00
Antonio Raúl
ef92ced370
fix CheckCollisionPointPoly (#3750) 2024-01-22 11:35:55 +01:00
Idir Carlos Aliane
68c32a4184
Fix typo in HISTORY.md (#3751)
There is a typo where 'undoubtdly' appears instead of 'undoubtedly'.
2024-01-22 07:58:47 +01:00
Alexandre Almeida
5c25913e09
Fix Android keycode translation and duplicate key constants (#3733)
* Fix Android keycode translation

* Simplify code a bit

* Rename KEYCODE_MAPPED_NUM to KEYCODE_MAP_SIZE

* Fix KEY_R and KEY_MENU duplicate

* Update raylib_api.* by CI

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-20 21:22:33 +01:00
John
192f7f1b29
[rcore rglfw] Feature Test Macros before include (#3737)
Move/Add Feature Test Macros before any includes.
See: [GNU Feature Test Macros](https://www.gnu.org/software/libc/manual/html_node/Feature-Test-Macros.html)
> You should define these macros by using ‘#define’ preprocessor directives at the top of your source code files. These directives must come before any #include of a system header file. It is best to make them the very first thing in the file, preceded only by comments.

Alternative changes to rcore would be to change _POSIX_C_SOURCE to
200809L, which removes the need to define _XOPEN_SOURCE >= 500.

These changes allow for compilation with -std=c* (such as -std=c99)
without adding -D macros to the build step.

Co-authored-by: JayLCypher <jaylcypher@github.com>
2024-01-20 21:08:19 +01:00
Hongyu Ouyang
0a8165c0ac
Make raylib/raygui work better on touchscreen (#3728)
* Fix that touch doesn't work for click/drag/raygui

* Add comments

* comments update
2024-01-20 21:05:30 +01:00
Anand Swaroop
b600786c52
Update BINDINGS.md (#3739) 2024-01-18 00:22:10 +01:00
Ray
c57b8d5a6a REVIEWED: ImageKernelConvolution(), formating and warnings 2024-01-15 20:32:46 +01:00
Blockguy24
d2b1256e5c
Fix bounds check for ImageDrawRectangleRec (#3732) 2024-01-14 11:21:29 +01:00
Tobias Mock
02133092f8
Update OCaml bindings version (#3730) 2024-01-13 23:46:33 +01:00
Ray
cb2572fe07 Avoid asserts because could crash some decompressions https://github.com/raysan5/raygui/issues/364 2024-01-13 16:57:25 +01:00
Karl Zylinski
520c8cffb2
Simplified GetWindowScaleDPI() so it does not fetch the wrong DPI scale some times (Windows looks at center of window while the old raylib code looked on upper left corner of window, now it just uses the glfw function to fetch the window's current scaling). Also introduced a callback to update the CORE.Window.screenScaling when the content scaling updates, previously scaling did not work correctly on systems with multiple monitors that have different DPI scaling. (#3701) 2024-01-13 10:49:04 +01:00
Andrew Lee
b7141d556e
Add shared library build option for build.zig and update to zig 0.12.0-dev.2139 (#3727)
* update build.zig to 0.12.0-dev.2139 and add shared lib option

* add no-sanitize workarounds
2024-01-13 10:46:53 +01:00
kolunmi
9d628d1d49
Enable animation names for the m3d model format. (#3714) 2024-01-11 19:49:25 +01:00
freakmangd
482722d881
Update to latest zig 0.12.0dev while keeping 0.11.0 compatibility (#3715)
* update build.zig for latest zig 0.12.0dev while still allowing 0.11.0

* update examples/build.zig and add nicer message for type mismatch
2024-01-11 19:48:37 +01:00
Lieven Petersen
a820c37ab2
implemented fill color TODO in ImageResizeCanvas() (#3720) 2024-01-11 19:48:14 +01:00
Le Juez Victor
746f129bfe
Fix ImageDrawRectangleRec (#3721) 2024-01-11 19:37:42 +01:00
Hongyu Ouyang
64ba5cb570
Update a comment (#3724) 2024-01-11 19:33:24 +01:00
Tim Romero
2c124c96df
[rtext] Adjust font atlas area calculation so padding area is not underestimated at small font sizes. (#3719) 2024-01-10 21:34:04 +01:00
Ray
be78255bea
Update codeql.yml: Exclude src/external files 2024-01-08 01:13:44 +01:00
Alice Nyaa
be0ea89f83
Simplified for loop for some image manip functions (#3712) 2024-01-06 19:41:43 +01:00
Hongyu Ouyang
721e273547
Fix a bug in examples/shapes/shapes_following_eyes (#3710) 2024-01-06 11:32:10 +01:00
Ray
a4dc325a0c Reviewed Makefile SDL2 expected include/lib paths #3705 2024-01-05 22:51:46 +01:00
Ray
b4cb0f3e7d REVIEWED: LoadImageAnimFromMemory() #3704 2024-01-05 22:33:56 +01:00
Ray
e428ec940b Merge branch 'master' of https://github.com/raysan5/raylib 2024-01-05 22:33:22 +01:00
Ray
c95b71d40d Update raudio.c 2024-01-05 22:33:02 +01:00
Ray
3afb4dda97 Update raygui.h 2024-01-05 22:32:59 +01:00
ubkp
19bdcedf1c
Hide unused warnings from stb_image_resize2.h (#3708) 2024-01-05 22:22:58 +01:00
Michael Scherbakow
eb6dcab308
Update raylib.zig version to 5.1-dev (#3698) 2024-01-04 10:51:53 +01:00
Ray
e46b6147fc Update copyright year to 2024 2024-01-03 14:16:39 +01:00
Ray
3f1e59a7cf Update copyright to 2024 2024-01-02 20:58:12 +01:00
seiren
0a25a3ed70
Update raylib_api.* by CI (#3692)
* wip: add parse.yml

* Temporarily force run

* Auto commit parse files

* Update raylib_api.* by CI

* Remove temporary setting

* format

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-31 15:06:46 +01:00
Kenta
710e811b27
Update BINDINGS.md (#3689)
Update Raylib.c3 to 5.0
2023-12-29 23:41:44 +01:00
Ray
1f3121d2fa Revert "Update raylib.h"
This reverts commit 7ea6adb29e.
2023-12-28 23:17:07 +01:00
Ray
dde738a2fd Merge branch 'master' of https://github.com/raysan5/raylib 2023-12-28 23:16:57 +01:00
ubkp
fd5e1e6afb
[rtextures] Fix LoadImageAnimFromMemory() warning for fileData (#3686)
* Fix LoadImageAnimFromMemory() warning for fileData

* Add LoadImageAnimFromMemory() to raylib.h

* Fix missing ; on previous commit
2023-12-28 23:15:04 +01:00
ubkp
5b5a2d035d
Fix TextReplace warning for const (#3687) 2023-12-28 23:13:47 +01:00
Ray
7ea6adb29e Update raylib.h 2023-12-28 22:10:10 +01:00
IoIxD
3fc43c1096
LoadImageAnimFromMemory (#3681) 2023-12-28 20:12:52 +01:00
maverikou
7cfdf33ff0
TextReplace const correctness (#3678)
* TextReplace const correctness

* cleanup
2023-12-28 20:09:49 +01:00
ubkp
43b4f90eb7
Fix SUPPORT_WINMM_HIGHRES_TIMER for PLATFORM_DESKTOP_SDL (#3679) 2023-12-28 20:08:04 +01:00
WisonYe
1727ddb9ea
[ fix-crash-caused-by-zig-build ] - Fixed 'Illegal instruction' crash on 'rtextures' and 'raudio' model that caused by zig build. (#3682) 2023-12-28 15:41:33 +01:00
Jeffery Myers
ad64a43b34
[rshapes] Expose shapes drawing texture and rectangle (#3677)
* provide access to the shape texture so that shapes can be extended outside of raylib with the same optimizations as internal raylib functions.

* PR feedback, comply with C standards

* oops
2023-12-28 15:40:03 +01:00
Ray
99f22a47ff
Update some versions BINDINGS.md 2023-12-25 14:44:49 +01:00
iacore
21bfd06570
Update BINDINGS.md (#3672)
Update zig libs version
2023-12-25 14:38:49 +01:00
Ray
36df9c5bd6 Update shaders_basic_pbr.c 2023-12-23 18:16:06 +01:00
Ray
e039a221a3 Review formating 2023-12-23 14:07:45 +01:00
Ray
706f74bce0 Update shaders_basic_pbr.c 2023-12-23 13:32:47 +01:00
Antonis Geralis
7ca95512d8
Review UnloadAutomationEventList (#3658)
* Review UnloadAutomationEventList

* Update raylib.h

* Update rcore.c

* Update core_automation_events.c

* Fix mistake
2023-12-23 12:14:39 +01:00
Ray
efe3510a9a REVIEWED: SDL text input to Unicode codepoints #3650
REVIEWED: GLFW naming conventions to reflect codepoints reading
2023-12-23 12:04:19 +01:00
Ray
1792bce292 REVIEWED: LoadTextureCubemap(), added mipmaps #3665 2023-12-23 11:26:23 +01:00
Tim Romero
f914020d45
VSCode sample project Mac fixup (#3666)
Change vscode config and makefile to add a missing IOKit framework reference and use whichever MacOSX sdk symlink is available
2023-12-23 11:22:16 +01:00
o3o
a06f3d0e34
Update BINDINGS.md (#3662)
Udated version of `bindbd-raylib3` to 5.0.0 (bind to raylib 5.0.0)
2023-12-22 17:40:57 +01:00
Ray
bb18018f29 REVIEWED: shaders_basic_pbr, added more comments 2023-12-21 21:32:53 +01:00
Ray
afbad4bbc6 Merge branch 'master' of https://github.com/raysan5/raylib 2023-12-21 21:32:04 +01:00
Ray
4805dddc18 Update shaders_deferred_render.c 2023-12-21 21:32:00 +01:00
glowiak
fbecab32e7
Add new COBOL binding (#3661) 2023-12-21 19:31:34 +01:00
Ray
68b6c79c3f Update rlgl.h 2023-12-20 01:03:52 +01:00
Ray
2fe68a8a12 REVIEWED PR deferred render 2023-12-20 00:51:51 +01:00
Jett
e71153258b
fix for deferred rendering example. (#3655)
* fix for deferred rendering example.

* missed defines to build.
2023-12-20 00:27:59 +01:00
fubark
3f776df94e
Update ray-cyber to 5.0 in BINDINGS.md (#3654) 2023-12-19 23:30:17 +01:00
Cinghy Creations
57a5ebe6c6
Don't use a separate thread when polling for gamepad events on DRM platforms (#3641) 2023-12-19 10:47:04 +01:00
kolunmi
8b5943d930
[rmodels] Set cgltf callbacks to use LoadFileData() and UnloadFileData() (#3652) 2023-12-19 10:38:57 +01:00
TheManTheMythTheGameDev
1fc3d9aeb2
Add shadowmapping example (#3653) 2023-12-19 10:37:41 +01:00
TheManTheMythTheGameDev
34a9163c52
Remove dependencies from PBR example (#3649)
* Remove dependencies from PBR example

* Reviewed example PR

---------

Co-authored-by: Ray <raysan5@gmail.com>
2023-12-19 10:36:03 +01:00
ubkp
9fcfc8d64b
[rcore] Fix ShowCursor(), HideCursor() and review SetMouseCursor() for PLATFORM_WEB (#3647)
* Fix ShowCursor(), HideCursor() and review SetMouseCursor() for PLATFORM_WEB

* Add static to cursorLUT[]

* Re-review SetMouseCursor()
2023-12-17 13:46:21 +01:00
ubkp
2487174b48
Fix CORE.Input.Mouse.cursorHidden with callbacks for PLATFORM_WEB (#3644) 2023-12-16 18:25:55 +01:00
ubkp
0df78d4eeb
Fix fullscreen known issue 1 for PLATFORM_WEB (#3642) 2023-12-16 18:22:02 +01:00
Ray
fd84ab3cf7 Bump CMake version required to avoid deprecated #3639 2023-12-15 19:17:44 +01:00
Ray
f3adde8bbd REVIEWED: DrawSplineLinear() to SUPPORT_SPLINE_MITERS 2023-12-15 18:40:19 +01:00
Toctave
0fc1765ff3
Implement miters in DrawSplineLinear (#3585)
* Implement miters in DrawSplineLinear

* Follow raylib style
2023-12-15 18:34:34 +01:00
Dongkun Lee
9de79861ea
BM Font Extender (#3536)
* loadbmfont

* bmfontextender

* bm font

* Modify LoadBM Font

* Delete loadbmfontex.diff

* REVIEWED: `LoadBMFont()` PR

* Update rtext.c

* Update rtext.c

---------

Co-authored-by: Dongkun Lee <hope81dklee@outlook.com>
Co-authored-by: Ray <raysan5@gmail.com>
2023-12-15 18:32:01 +01:00
ubkp
e001f7e75e
Add ToggleFullscreen() and required changes for PLATFORM_WEB (#3634) 2023-12-15 17:36:27 +01:00
devdad
9bdc217987
basic PBR example (#3621)
* basic pbr example

pbr implementation  includes rpbr.h and few shader files header only file, which self contain everything needed for pbr rendering. Few textures and one model of the car which is under free licence which is included inside basic_pbr.c example file  currently supported shader versions are 120 and 330 , version 100 has small issue which I have to resolve

* Unloading PBRMAterial

I forgot unloading PBRMaterial

* fix small issue with texOffset assigment.

value was Vector4 at first but I found out it would be unclear for and users, so I change to have two Vector2 instead, but forgot to assign offset .

* Changed size of textures and file name changed

Changed size of textures from 2048x2048 to 1024x1024 and file name changed to shaders_basic_pbr.c ,
Added the function PBRModel PBRModelLoadFromMesh(Mesh mesh);
but GenMeshPlane(2, 2.0, 3, 3) culdn't be used because it crash once GenMeshTangents() is used with that plane mesh
2023-12-15 17:13:44 +01:00
ubkp
489f0b93f9
[rcore] Add GetWindowPosition() implementation for PLATFORM_WEB and fixes #3636 style/format (#3637)
* Add GetWindowPosition() implementation for PLATFORM_WEB and fixes #3636 style/format

* Remove double space
2023-12-15 16:24:45 +01:00
Braedon Lewis
1e7b99562a
Add new raylib-beef binding (#3640) 2023-12-15 16:23:35 +01:00
ubkp
10c82595b0
Add GetMonitorWidth() and GetMonitorHeight() implementations for PLATFORM_WEB (#3636) 2023-12-14 20:55:33 +01:00
Ray
38626dcffd REVIEWED: HighDPI support on Web platform #3372 -WIP-
NOTE: The code is commented until the build system gets updated to latest emscripten.
2023-12-14 15:32:53 +01:00
Ray
d29b36310f Merge branch 'master' of https://github.com/raysan5/raylib 2023-12-14 15:32:45 +01:00
Ray
88db11fda4 Update rtextures.c 2023-12-14 15:30:48 +01:00
Matthew Oros
cec2261e96
[rcore] Flip VR screens (#3633) 2023-12-13 21:24:24 +01:00
Matthew Oros
387506faab
[rcore] Remove unused vScreenCenter (#3632) 2023-12-13 21:22:44 +01:00
Romash
222f6f7877
Fix box blur symmetry & simplify code (#3631) 2023-12-13 21:21:08 +01:00
Benjamin Schmid Ties
6083d2b9f3
fixed coding style in function TextToFloat (#3627)
* function to convert string to float

* fix code to match coding conventions
2023-12-13 21:20:13 +01:00
lipx
a57a0ecd96
Update audio_stream_effects.c (#3618)
* Update audio_stream_effects.c

This may slightly improve performance and be more welcoming for new users despite being an more advanced feature. 
void * usually throws an error in most compilers and it would be better to just avoid it.

Also added <stdbool.h> because booleans are, sometimes, not defined by <stddef.h>.

* Update audio_stream_effects.c
2023-12-13 21:19:14 +01:00
2Bear
9322ad0f9b
Ignore compiled dll binaries. (#3628) 2023-12-12 23:05:14 +01:00
Ray
c5ebdb8ba7 REVIEWED: Issue in sequence generation #3612 2023-12-11 09:33:21 +01:00
Ray
6f3c87a999 Fix #3613 2023-12-11 09:21:30 +01:00
riadbettole
31d3ed97c7
Update audio_raw_stream.c (#3624)
AudioInputCallBack has this
    audioFrequency += 1.0f;
    audioFrequency -= 1.0f;

cancels out each others
2023-12-11 09:12:30 +01:00
ubkp
a2e45239c3
[rcore] Complement SetWindowState() and ClearWindowState() for PLATFORM_WEB (#3625)
* Complement SetWindowState() and ClearWindowState() for PLATFORM_WEB

* Add FLAG_WINDOW_RESIZABLE to SetWindowState() and ClearWindowState() for PLATFORM_WEB
2023-12-11 09:11:42 +01:00
ubkp
39457ace2f
[rcore] Add ToggleBorderlessWindowed() implementation for PLATFORM_WEB (#3622)
* Add ToggleBorderlessWindowed() for PLATFORM_WEB

* Fix coding convention
2023-12-11 09:11:20 +01:00
ubkp
44eeda2475
Optimize gesture handling for PLATFORM_DRM (#3616) 2023-12-11 08:58:55 +01:00
ubkp
ed8a18ea64
[rcore] Fix real touch gestures for PLATFORM_DESKTOP_SDL (#3614)
* Fix touch gestures for PLATFORM_DESKTOP_SDL

* Complement note and optimization

* Events optimization

* Optimize gesture handling

* Reverts previous commit and fixes GESTURE_DRAG to not trigger GESTURE_SWIPE* when it ends

* Reapply previous gesture handling optimization also fixing GESTURE_DRAG to not trigger GESTURE_SWIPE* when it ends
2023-12-11 08:57:51 +01:00
Peter0x44
28bdaa2da6
Update projects/CMake/CMakeLists.txt to raylib 5.0 (#3623) 2023-12-11 08:29:19 +01:00
David Williams
032cc497ca
Updating CMake version to 5.0 so libraries are correctly versioned (#3615) 2023-12-09 19:33:12 +01:00
ubkp
a9ba51aa72
[rcore] Fix IsMouseButtonUp() for PLATFORM_WEB and PLATFORM_DRM (#3611)
* Fix IsMouseButtonUp() for PLATFORM_WEB

* Fix IsMouseButtonUp() for PLATFORM_DRM
2023-12-07 19:53:27 +01:00
ubkp
ab9bddb3bd
[rcore] Fix IsMouseButtonUp() and add touch events for PLATFORM_DESKTOP_SDL (#3610)
* Fix IsMouseButtonUp() and add touch events for PLATFORM_DESKTOP_SDL

* Fix coding convention
2023-12-07 19:53:02 +01:00
Kenneth M
8b33d1eeb9
Fix IsMouseButtonUp() (#3609) 2023-12-07 19:50:36 +01:00
lesleyrs
6b93180130
Fix for free camera mode (#3603)
* fix free and fp cam

* revert
2023-12-07 19:49:49 +01:00
ubkp
d99617d084
[rcore] Fix IsKeyPressedRepeat() for PLATFORM_DESKTOP_SDL (#3605)
* Fix IsKeyPressedRepeat() for PLATFORM_DESKTOP_SDL

* Fix missing space
2023-12-07 19:47:58 +01:00
ubkp
984e83c2d0
Fix GetKeyPressed and GetCharPressed for SDL (#3604) 2023-12-05 10:02:48 +01:00
Ray
731b210f51 REVIEWED: WARNING: LoadFontData() avoid fallback glyphs
This is a redesign on font loading, missing glyphs are skipped instead of falling back to font `.notdef` special character (usually "tofu" character).
It is changed because not all fonts support a fallback glyph.
One improvement could be allowing users to define a custom fallback character, for example `?` glyph.
2023-12-04 17:32:55 +01:00
Ray
a016b4ded2 REVIEWED: LoadFontData(), load image only if glyph has been found in font 2023-12-03 20:17:16 +01:00
Ray
84ae189953 Create raylib_1024x1024.png 2023-12-03 20:16:26 +01:00
Ray
26d61875ee Create raylib.icns 2023-12-03 20:16:23 +01:00
Ray
8a586249d7 Fix Wrong Makefile flag #3593 2023-12-03 20:16:19 +01:00
Ray
d0a783e362 Revert "Fix Windows Hardcoding (#3600)"
This reverts commit 4ae2af0bcc.
2023-12-03 20:08:48 +01:00
Ray
5aa84a34ea Revert "Fix warning while using external GLFW older than version 3.4.0 (#3599)"
This reverts commit f1b0d15813.
2023-12-03 20:06:34 +01:00
mr sihc
4ae2af0bcc
Fix Windows Hardcoding (#3600)
Compiles on Linux & co. now
2023-12-03 19:55:16 +01:00
Marco Maia
f1b0d15813
Fix warning while using external GLFW older than version 3.4.0 (#3599)
Co-authored-by: Marco Maia <marco.maia@iarasystems.com.br>
2023-12-03 19:53:52 +01:00
Peter0x44
8ae804ff9a
Fix cmake-built libraylib.a to properly include GLFW's object files (#3598)
I broke this in PR #3573 by accidentally removing too much
The examples still compiled fine so I didn't notice - my guess is that
cmake was still adding a separate link to glfw manually.
2023-12-03 19:53:11 +01:00
WIITD
dfb0ca43c5
Update raylib-freebasic binding (#3591) 2023-12-03 19:51:47 +01:00
ubkp
0748dc2d1e
Remove a duplicated loop for PLATFORM_DRM (#3590) 2023-12-01 14:55:48 +01:00
Peter0x44
55e7d1aad1
Expose OpenGL take 2 (#3588)
For some reason, there are actually two macros needed to control this.
Yes, I tried with only one, both are needed
2023-11-30 22:43:02 +01:00
Peter0x44
ef5069862d
Fix mistake in pr #3572 (#3587) 2023-11-30 20:07:50 +01:00
Ray
e9ddb15d9d REVIEWED: rlgl function description and comments 2023-11-30 19:04:38 +01:00
Ray
6b136fac67 ADDED: ExportMeshAsCode() 2023-11-30 13:01:19 +01:00
ubkp
e84099bfd4
Fix CheckCollisionCircleRec() (#3584) 2023-11-30 10:11:45 +01:00
ubkp
bd81bdc24a
Fix IsKeyPressedRepeat() for PLATFORM_DRM direct input (#3583) 2023-11-30 10:09:57 +01:00
Peter0x44
e7a486fa81
Hide unneeded internal symbols when building raylib as an so or dylib (#3573) 2023-11-28 20:43:45 +01:00
RadsammyT
fe53ba80dd
Fix typos in src/platforms/rcore_*.c (#3581) 2023-11-28 20:39:10 +01:00
ubkp
1906f1eddf
Fix SetMousePosition() for SDL (#3580) 2023-11-28 20:37:04 +01:00
ubkp
811abcb19f
Fix rcamera.h so mouse/keyboard and gamepad can coexist for input (#3579) 2023-11-27 16:36:09 +01:00
ubkp
c35c531551
Fix SetWindowIcon() for SDL (#3578) 2023-11-27 16:34:17 +01:00
Emmanuel Méra
fc4b0c9aec
Corrected the path of android ndk toolchains for OSX platforms (#3574) 2023-11-25 19:11:29 +01:00
BLUELOVETH
dfa64f228a
Update raylib_api.* (#3564) 2023-11-24 00:46:54 +01:00
Peter0x44
94aba23ef4
Expose glad functions when building raylib as a shared lib (#3572) 2023-11-24 00:41:44 +01:00
Danil
ada1d0fb8c
BINDINGS: Add Raylib-CSharp-Vinculum (#3571) 2023-11-23 14:41:31 +01:00
Ray
a3a73b9332 REVIEWED: textures_image_kernel #3556
Added screenshot
2023-11-21 22:55:47 +01:00
Steven Schveighoffer
b122270aa3
Fix version info in rlgl.h (#3558) 2023-11-21 22:47:52 +01:00
Chris Warren-Smith
664d22967c
Update bindings for SmallBASIC (#3562) 2023-11-21 21:59:09 +01:00
Jorge A. Gomes
b13f97575b
Updated BINDINGS -> Python raylib-py v5.0.0beta1 (#3557)
Co-authored-by: Jorge A. Gomes <jorgegomes83@gmail.com>
2023-11-21 17:02:09 +01:00
Steven Schveighoffer
d409df0b61
Update raylib-d binding (#3561) 2023-11-21 16:58:08 +01:00
Ray
4dae94821b Merge branch 'master' of https://github.com/raysan5/raylib 2023-11-21 00:15:06 +01:00
Ray
299cd9b830 Update rcore.c 2023-11-21 00:14:42 +01:00
Ray
994c4f4bdf
Update rcore_desktop_sdl.c 2023-11-20 23:21:04 +01:00
Sergey Zapunidi
ce26e26177
Added missing textures_image_kernel example in web makefile (#3555)
* Added missing textures_image_kernel example in web makefile

* Added missing --preload-file for textures_image_kernel

---------

Co-authored-by: zap <zap@physlab.ru>
2023-11-20 20:49:58 +01:00
Dmitry Matveyev
7e60227720
Update BINDINGS.md for Janet (#3553)
This PR updates the bindings https://github.com/janet-lang/jaylib/pull/54
2023-11-19 11:11:51 +01:00
Auz
ee9b44245f
Update BINDINGS.md for Raylib.nelua (#3552)
Bumped version number and updated the link for Raylib.nelua
2023-11-19 11:01:10 +01:00
Ray
a91ebb7517
Update BINDINGS.md 2023-11-18 20:12:08 +01:00
Rob Loach
eccfaa5fcf
BINDINGS: Update raylib-cpp support to raylib 5.0 (#3551)
[raylib-cpp](https://github.com/RobLoach/raylib-cpp) supports raylib 5.0.
2023-11-18 20:08:45 +01:00
Gunko Vadim
67035815aa
Update pascal binding.md (#3548) 2023-11-18 20:08:08 +01:00
MrScautHD
0137efde7a
Expanding Possibilities: Integrating Additional glTF / GLB Data Formats for Enhanced 3D Experiences (#3546)
* Add more gltf data formats

* Fix forgot to save bone ids

* Fix misstake

* Fix code format

* Removed useless formats
2023-11-18 20:07:30 +01:00
Alexandre Almeida
f6de0358e1
Disable unused miniaudio features (#3544)
* Disable unused miniaudio features

* Fix mistakes
2023-11-18 20:06:19 +01:00
Karim
21469e92b0
Image convolution function ImageKernelConvolution (#3528)
* Added image convultion ImageKernelConvolution

* comment changes

* spelling changes and change to kernel size

* removed kernel normalization inside function

* fix to formating
2023-11-18 20:05:45 +01:00
_Tradam
e41a0c9721
fix for running gles2 with sdl on desktop (#3542) 2023-11-18 20:03:13 +01:00
Jussi Viitala
25c6c12150
Added glsl 100 and 120 shaders to lightmap example. (#3543)
* Added glsl 100 and 120 shaders to lightmap example.

* Fixed lightmap example resource loading on web.
2023-11-18 20:02:33 +01:00
Dennis E. Hamilton
f607cac267
Preparing for 5.1-dev (#3550)
Adjusting raylib.h to reflect post-5.0 changes now.
2023-11-18 20:01:02 +01:00
Ray
ae50bfa2cc Updated Npp intellisense data for raylib 5.0 2023-11-15 11:30:50 +01:00
Ray
e84a420766 Update miniaudio to v0.11.21 2023-11-15 10:25:09 +01:00
2Bear
efc0fed9ce
Fix tiny spelling mistake. (#3540) 2023-11-14 14:28:45 +01:00
Ray
5ac00a3ccb Merge branch 'master' of https://github.com/raysan5/raylib 2023-11-14 12:25:58 +01:00
ubkp
db70db5f4d
Fix missing keys on PLATFORM_DESKTOP_SDL (#3539) 2023-11-14 11:49:27 +01:00
Ray
da660058eb Update HISTORY.md 2023-11-14 11:47:27 +01:00
Ray
92b7589f89 Update CHANGELOG 2023-11-14 11:47:23 +01:00
Ray
a6c33193f7 Update HISTORY.md 2023-11-13 21:40:37 +01:00
Ray
d03d6787d9 Update HISTORY.md 2023-11-13 21:21:38 +01:00
Ray
5c79c5a2ec Update rcore.c 2023-11-13 16:11:10 +01:00
ubkp
87f26c845c
Fix mouse button order for SDL (#3534) 2023-11-13 00:16:31 +01:00
Ray
4f67f5f159 REVIEWED: TakeScreenshot(), potential issues 2023-11-12 12:38:10 +01:00
JupiterRider
0873af4734
Update BINDINGS.md (#3531) 2023-11-12 12:23:00 +01:00
Le Juez Victor
9099077075
[rlgl] Fixed return type of GetCompressedFormatName (#3529)
The return type of `GetCompressedFormatName` has been corrected from `char *` to `const char *`
2023-11-12 00:09:00 +01:00
Ray
1b88f2ec03 Review #3526 2023-11-11 20:53:36 +01:00
isaacgravenortechnologies
de3072f838
Added wiki links to README (#3525)
* Added wiki link

* Added second wiki link
2023-11-11 18:11:58 +01:00
ubkp
9634c84e1c
Fix automation recording (#3523) 2023-11-11 16:06:23 +01:00
Ray
d32ebbe716
Testing contributors info 2023-11-11 16:05:02 +01:00
Ray
bdcca4510d
Update ROADMAP.md 2023-11-10 23:25:00 +01:00
Ray
107ece438a Reviewed duplicate lines 2023-11-10 19:48:47 +01:00
Ray
e7ba72ded9 Update core_automation_events.c 2023-11-10 19:36:58 +01:00
Ray
e4ea116857 Reviewing automation events on web... 2023-11-10 19:25:28 +01:00
Ray
16b79f2c70 Format tweaks 2023-11-10 19:22:22 +01:00
Miloslav Milenkov
a92c34d83c
Changed keybinds for the automation example to avoid conflict with browser shortcuts (#3519) 2023-11-10 15:04:04 +01:00
Ray
30dcbaff20 Update rlgl.h 2023-11-10 13:33:42 +01:00
Ray
737cd0be7f Updated for upcoming raylib 5.0 2023-11-10 13:27:13 +01:00
maksut
1b524bb2ec
WindowShouldClose(), reset shouldClose flag when window is inited (#3518) 2023-11-09 23:36:22 +01:00
Ray
80aafdb38f REVIEWED: BeginScissorMode() #3510 2023-11-09 23:35:24 +01:00
Ray
c471d22965 Update miniaudio.h 2023-11-09 23:22:30 +01:00
Ray
21dc42d2ad Updated examples 2023-11-09 09:53:25 +01:00
Ray
c69b89cc42 Update example: shapes_splines_drawing 2023-11-09 02:01:00 +01:00
Ray
ed2ac2ae79
Update CHANGELOG 2023-11-09 00:16:58 +01:00
Ray
4c2340aea6 Update core_2d_camera_platformer.c 2023-11-08 23:35:27 +01:00
Ray
9c2308bdc3 Examples reviews 2023-11-08 23:28:31 +01:00
Ray
022b464b0b Remove BOM 2023-11-08 20:37:35 +01:00
Ray
040b945fef Reviewed some examples and warnings 2023-11-08 20:09:32 +01:00
Ray
bee6d7f065 Update Makefile.Web 2023-11-08 19:34:44 +01:00
Ray
33580991c7 Update shell.html 2023-11-08 19:34:38 +01:00
Ray
e7114a5c2a Update rcore.c 2023-11-08 19:34:29 +01:00
Ray
9d8a11f21a Update textures_textured_curve.c 2023-11-08 18:13:25 +01:00
Ray
21354119cc REVIEWED: Makefile.Web, reorganize and add examples 2023-11-08 18:10:29 +01:00
Ray
bd3ffa7db3 REDESIGNED: Spline drawing functionality
This change allows more versatile and consistent splines drawing. It also gives more control to advance users to draw splines as individual segments.
2023-11-08 17:42:35 +01:00
Ray
bbf0c3a46d REVIEWED: Added new examples to VS2022 solution 2023-11-08 17:41:08 +01:00
Ray
fe757b6267 Update rtextures.c 2023-11-08 17:40:23 +01:00
Ray
60fab9c405
Update README.md 2023-11-08 15:14:21 +01:00
ubkp
271a72f2f2
Fix absRange for PLATFORM_DRM (#3517) 2023-11-07 22:15:23 +01:00
Ray
580fbf441c Update textures_textured_curve.c 2023-11-07 20:02:55 +01:00
Ray
4b87cc455d Update shapes_splines_drawing.c 2023-11-07 19:58:45 +01:00
Ray
f01d3db739 ADDED: GetSplinePoint*() functions for spline evaluation
RENAMED: `DrawLine<spline_type>()` to `DrawSpline<spline_type>()` for more consistent and clear naming
REVIEWED: Bezier drawing parameters order, more consistent
REVIEWED: Spline-based examples -WIP-
2023-11-07 19:25:49 +01:00
Ray
c69e1c379b Merge branch 'master' of https://github.com/raysan5/raylib 2023-11-07 19:22:21 +01:00
Ray
e8a3f9f7fa ADDED: Open-graph image alt properties 2023-11-07 19:22:12 +01:00
ubkp
9a2b735645
Fix mouse/touch/gestures for PLATFORM_DRM (#3515) 2023-11-07 19:02:24 +01:00
Ray
a57ac0b18e Update m3d.h 2023-11-07 13:52:36 +01:00
Ray
30987eaf06 Update cgltf.h 2023-11-07 13:52:33 +01:00
Ray
02aa1ee873 Updated dr audio libraries 2023-11-07 13:48:48 +01:00
Ray
11de73dfd6 Update miniaudio.h 2023-11-07 13:44:55 +01:00
mooff
3b09ef58ca
Add ES 3.0 to CMakeOptions (#3514) 2023-11-07 08:41:15 +01:00
Jeffery Myers
6cd37e57a6
Fix warnings in visual studio (#3512) 2023-11-06 20:31:07 +01:00
Ray
fc21a8e552 Update raygui.h 2023-11-06 20:14:40 +01:00
Ray
386bf890a0 Merge branch 'master' of https://github.com/raysan5/raylib 2023-11-06 20:06:46 +01:00
Ray
adaecba162 Update codeql.yml 2023-11-06 20:06:30 +01:00
Ray
9c816bbac1
Update codeql.yml 2023-11-06 19:59:30 +01:00
Ray
a810976aa6 REVIEWED: CodeQL workflow, cleaning and organization 2023-11-06 19:53:44 +01:00
Ray
0a9bd393dc REVIEWED: sinfl external library to avoid ASAN complaints #3349 2023-11-06 19:30:00 +01:00
Ray
8b2103fc77 REVIEWED: ScanDirectoryFiles*()- Paths building slashes sides #3507 2023-11-06 19:15:11 +01:00
b4yuan
b216e2fc98
Add CodeQL Workflow for Code Security Analysis (#3476)
* Add CodeQL Workflow for Code Security Analysis

Add CodeQL Workflow for Code Security Analysis

This pull request introduces a CodeQL workflow to enhance the security analysis of our repository. CodeQL is a powerful static analysis tool that helps identify and mitigate security vulnerabilities in our codebase. By integrating this workflow into our GitHub Actions, we can proactively identify and address potential issues before they become security threats.

We added a new CodeQL workflow file (.github/workflows/codeql.yml) that
- Runs on every push and pull request to the main branch.
- Excludes queries with a high false positive rate or low-severity findings.
- Does not display results for third-party code, focusing only on our own codebase.

Testing:
To validate the functionality of this workflow, we have run several test scans on the codebase and reviewed the results. The workflow successfully compiles the project, identifies issues, and provides actionable insights while reducing noise by excluding certain queries and third-party code.

Deployment:
Once this pull request is merged, the CodeQL workflow will be active and automatically run on every push and pull request to the main branch. To view the results of these code scans, please follow these steps:
1. Under the repository name, click on the Security tab.
2. In the left sidebar, click Code scanning alerts.

Additional Information:
- You can further customize the workflow to adapt to your specific needs by modifying the workflow file.
- For more information on CodeQL and how to interpret its results, refer to the GitHub documentation and the CodeQL documentation.

Signed-off-by: Brian <bayuan@purdue.edu>

* Add CodeQL Workflow for Code Security Analysis

Add CodeQL Workflow for Code Security Analysis

This pull request introduces a CodeQL workflow to enhance the security analysis of our repository. CodeQL is a powerful static analysis tool that helps identify and mitigate security vulnerabilities in our codebase. By integrating this workflow into our GitHub Actions, we can proactively identify and address potential issues before they become security threats.

We added a new CodeQL workflow file (.github/workflows/codeql.yml) that
- Runs on every pull request (functionality to run on every push to main branches is included as a comment for convenience).
- Runs daily.
- Excludes queries with a high false positive rate or low-severity findings.
- Does not display results for git submodules, focusing only on our own codebase.

Testing:
To validate the functionality of this workflow, we have run several test scans on the codebase and reviewed the results. The workflow successfully compiles the project, identifies issues, and provides actionable insights while reducing noise by excluding certain queries and third-party code.

Deployment:
Once this pull request is merged, the CodeQL workflow will be active and automatically run on every push and pull request to the main branch. To view the results of these code scans, please follow these steps:
1. Under the repository name, click on the Security tab.
2. In the left sidebar, click Code scanning alerts.

Additional Information:
- You can further customize the workflow to adapt to your specific needs by modifying the workflow file.
- For more information on CodeQL and how to interpret its results, refer to the GitHub documentation and the CodeQL documentation (https://codeql.github.com/ and https://codeql.github.com/docs/).

Signed-off-by: Brian <bayuan@purdue.edu>

* Add CodeQL Workflow for Code Security Analysis

Add CodeQL Workflow for Code Security Analysis

This pull request introduces a CodeQL workflow to enhance the security analysis of our repository. CodeQL is a powerful static analysis tool that helps identify and mitigate security vulnerabilities in our codebase. By integrating this workflow into our GitHub Actions, we can proactively identify and address potential issues before they become security threats.

We added a new CodeQL workflow file (.github/workflows/codeql.yml) that
- Runs on every pull request (functionality to run on every push to main branches is included as a comment for convenience).
- Runs daily.
- Excludes queries with a high false positive rate or low-severity findings.
- Does not display results for git submodules, focusing only on our own codebase.

Testing:
To validate the functionality of this workflow, we have run several test scans on the codebase and reviewed the results. The workflow successfully compiles the project, identifies issues, and provides actionable insights while reducing noise by excluding certain queries and third-party code.

Deployment:
Once this pull request is merged, the CodeQL workflow will be active and automatically run on every push and pull request to the main branch. To view the results of these code scans, please follow these steps:
1. Under the repository name, click on the Security tab.
2. In the left sidebar, click Code scanning alerts.

Additional Information:
- You can further customize the workflow to adapt to your specific needs by modifying the workflow file.
- For more information on CodeQL and how to interpret its results, refer to the GitHub documentation and the CodeQL documentation (https://codeql.github.com/ and https://codeql.github.com/docs/).

Signed-off-by: Brian <bayuan@purdue.edu>

* Add CodeQL Workflow for Code Security Analysis

Add CodeQL Workflow for Code Security Analysis

This pull request introduces a CodeQL workflow to enhance the security analysis of our repository. CodeQL is a powerful static analysis tool that helps identify and mitigate security vulnerabilities in our codebase. By integrating this workflow into our GitHub Actions, we can proactively identify and address potential issues before they become security threats.

We added a new CodeQL workflow file (.github/workflows/codeql.yml) that
- Runs on every pull request (functionality to run on every push to main branches is included as a comment for convenience).
- Runs daily.
- Excludes queries with a high false positive rate or low-severity findings.
- Does not display results for git submodules, focusing only on our own codebase.

Testing:
To validate the functionality of this workflow, we have run several test scans on the codebase and reviewed the results. The workflow successfully compiles the project, identifies issues, and provides actionable insights while reducing noise by excluding certain queries and third-party code.

Deployment:
Once this pull request is merged, the CodeQL workflow will be active and automatically run on every push and pull request to the main branch. To view the results of these code scans, please follow these steps:
1. Under the repository name, click on the Security tab.
2. In the left sidebar, click Code scanning alerts.

Additional Information:
- You can further customize the workflow to adapt to your specific needs by modifying the workflow file.
- For more information on CodeQL and how to interpret its results, refer to the GitHub documentation and the CodeQL documentation (https://codeql.github.com/ and https://codeql.github.com/docs/).

Signed-off-by: Brian <bayuan@purdue.edu>

* Run CodeQL Analysis weekly + incorporate build script into WF

* remove: fail_on_error.py

* update: codeql.yml

---------

Signed-off-by: Brian <bayuan@purdue.edu>
2023-11-06 19:11:41 +01:00
Ray
8739c28949 REVIEWED: Scissor mode to support RenderTexture #3510 2023-11-06 19:09:12 +01:00
gulrak
56b5a5c4f0
BeginScissorMode checks for render texture to avoid using GetWindowScaleDPI (#3510) 2023-11-06 19:03:12 +01:00
Ray
304bf2cd17 ADDED: Flag to know we are rendering to texture #3510 2023-11-06 19:02:11 +01:00
Aniket Teredesai
b9f98dd8cd
[build]: add uninstall cmake target (#3511) 2023-11-06 10:12:36 +01:00
Ray
a470cdce4c Merge branch 'master' of https://github.com/raysan5/raylib 2023-11-05 20:12:00 +01:00
Ray
2a67ac0027 REVIEWED: rlgl_standalone examples #3487
Example is intended for `PLATFORM_DESKTOP` only and OpenGL 3.3 Core profile.
2023-11-05 20:11:53 +01:00
Ray
8b3c18de54 Updated GLFW for 64bit 2023-11-05 20:11:14 +01:00
Ray
343e92322b
Update README.md 2023-11-05 19:46:25 +01:00
JupiterRider
2252f747b7
Update Makefile (#3509) 2023-11-05 19:42:56 +01:00
Ray
925978ffde Update qoa.h 2023-11-05 19:41:22 +01:00
Ray
6ebfc6023b Update rl_gputex.h 2023-11-05 19:40:00 +01:00
Ray
57f77c3858 Update qoi.h 2023-11-05 19:39:57 +01:00
Ray
127d69e887
Update README.md 2023-11-05 19:24:45 +01:00
glowiak
17a968d2ed
Jaylib is now up-to-date (#3508) 2023-11-05 15:58:48 +01:00
Ray
53451e98a7 Updated open graph for examples 2023-11-05 13:02:29 +01:00
Ray
cbf0324c34 Updating web shells open-graph info 2023-11-05 12:18:54 +01:00
freakmangd
39b539c42f
Allow raylib to be built with zig 0.11.0 and zig 0.12.0dev (master) (#3506)
* allow zig 0.11.0 and 0.12.0dev to build raylib

* update comment
2023-11-04 21:05:21 +01:00
Ray
32e4be6fb9 Update rcore.c 2023-11-03 22:23:50 +01:00
Ray
2d1b211920 ADDED: LoadRandomSequence()/UnloadRandomSequence() 2023-11-03 20:21:43 +01:00
AndreaBoroni
5da0074fed
Fixed Issue 3504 (#3505) 2023-11-03 19:12:42 +01:00
Ray
301d1b85ab Update raylib version to **raylib 5.0** 2023-11-02 18:18:27 +01:00
Ray
3c3e311190 Remove unneeded line on web platform 2023-11-02 18:18:05 +01:00
Ray
807516a991 Support OpenGL ES 3.0 building on Web
For some reason, the equivalent requested context (WebGL 2.0) is not provided, despite being properly requested.
2023-11-02 18:13:37 +01:00
Ray
b40f93b9e3 Comments tweaks 2023-11-02 18:12:22 +01:00
Ray
01bbd42519 Update rprand.h 2023-11-02 18:11:13 +01:00
ubkp
fe34fc7c6b
Partial fix the gesture system for DRM (#3502) 2023-11-02 17:35:11 +01:00
Caleb Barger
ba75a7a23b
build.zig updates for 0.11.0 release. (#3501) 2023-11-02 09:14:34 +01:00
ubkp
de1ceae4b0
[core] Fix gestures for PLATFORM_DESKTOP_SDL (#3499)
* Fix gestures for SDL

* Review the gesture handling for SDL

* Review 2
2023-11-02 09:13:41 +01:00
Ray
35d27fb11b REVIEWED: Pointers exposing not required for ES3 2023-11-02 09:04:05 +01:00
Ray
d77c918d51 Update rcore_web.c 2023-11-01 16:24:06 +01:00
Ray
c563490cf8 Update rcore_web.c 2023-11-01 15:28:31 +01:00
Ray
64d64cc181 REVIEWED: Potential code issues reported by CodeQL #3476 2023-11-01 15:28:18 +01:00
ubkp
ba21b8d274
Moves keymapUS[] and fixes GetCharPressed for DRM (#3498) 2023-11-01 12:20:33 +01:00
Jeffery Myers
38205d67da
Remove unused structures from lighting fragment shaders (#3497) 2023-11-01 12:16:14 +01:00
Techuuu
d4c0d3bebe
Update README.md (#3495)
* Update README.md

Fixed docs and improved.

* Update README.md

Done fixed it!

* Update README.md

Fixed!
2023-11-01 12:15:47 +01:00
Ray
df0f7ba61e Update shaders_deferred_render.c 2023-10-31 20:59:08 +01:00
Ray
aca854ccbf Update shaders_deferred_render.c 2023-10-31 20:46:10 +01:00
Ray
1407f6eb46 ADDED: rlBlitFramebuffer(), required for deferred render 2023-10-31 20:46:06 +01:00
Ray
15142a30f5 Update rmodels.c 2023-10-31 20:20:11 +01:00
Ray
43f36b9b05 REDESIGNED: LoadOBJ(), fix #3398
- Now triangulated  meshes are properly supported
 - Simplified code to consider issue situation
 - Removed mesh split per material, just define separate mesh if multiple materials are required
2023-10-31 20:15:45 +01:00
Justin
3645244f9f
examples/shaders: Add an example for deferred shading (#3496)
* add example for deferred rendering/shading

* adapt convention

---------

Co-authored-by: 27justin <me@justin.cx>
2023-10-31 20:13:12 +01:00
Ray
de7beef05d Remove trailing spaces 2023-10-31 15:54:52 +01:00
Ray
f88604e6d5 Reviewed QOA seek PR 2023-10-31 15:54:38 +01:00
Ray
0a3567439d Comments tweaks 2023-10-31 15:49:42 +01:00
veins1
6842012748
Fix QOA seeking (#3494) 2023-10-31 15:48:24 +01:00
Ray
0d186a0557 REVIEWED: LoadModel(), removed cube fallback mechanism #3459 2023-10-31 11:32:07 +01:00
ubkp
ab61bad168
Fix relative mouse mode for DRM (#3492) 2023-10-31 10:16:12 +01:00
ubkp
d8acceca14
Fix example core_3d_camera_free (#3488) 2023-10-31 10:10:43 +01:00
Jett
ff04d52f12
Added rlEnablePointMode (#3490)
for rendering meshes with points.
similar to wire mode.
(NOTE) they still backface cull, so disable that if you want to show the entire mesh.
2023-10-31 08:43:32 +01:00
Ray
7677e4b928 REVIEWED: GetModelBoundingBox() #3485 2023-10-30 20:41:33 +01:00
Ray
b8fce54c0f Minor tweaks 2023-10-30 13:29:14 +01:00
Ray
abdebc244d Update rcore.c 2023-10-30 13:14:15 +01:00
Ray
9642fffbbb REVIEWED: GetRender*() issue on macOS highDPI #3367 2023-10-30 13:13:31 +01:00
ubkp
15632876f7
Fix examples Makefile for SDL (#3486) 2023-10-30 12:02:35 +01:00
Ray
ec91b44fb6 Merge branch 'master' of https://github.com/raysan5/raylib 2023-10-29 21:11:40 +01:00
Ray
fc7dcff4a7 ADDED: Pseudo-random numbers generator! 2023-10-29 21:11:30 +01:00
ubkp
049a6d475d
Fix drm hang up on exit and mouse input issues (#3484) 2023-10-29 20:55:02 +01:00
Ray
09075d515a Some notes and comments 2023-10-29 20:44:32 +01:00
Ray
4625c41431 ADDED: Support for SDL building on Makefile 2023-10-29 20:44:18 +01:00
Ray
601e391b06 Remove physac library from raylib building
At this moment, physac is an external unmaintained library, better move out of raylib.
2023-10-29 20:43:52 +01:00
Ray
21243c8234 Update rcore_desktop_sdl.c 2023-10-29 20:42:29 +01:00
JaanDev
1fd61a00e4
Fix compressed DDS texture loading issues (#3483) 2023-10-29 20:21:00 +01:00
ubkp
12f3bc10c2
[core] Move rcore.h content to inside rcore.c (#3479)
* Move rcore.h content inside rcore.c

* Remove extern CoreData CORE
2023-10-29 20:20:19 +01:00
Ray
2da8cc383c Update Makefile.Web 2023-10-29 19:46:34 +01:00
Khalid Abdullah
e3363e9ad0
Typo fixed in HISTORY.md (#3481)
* [Typo fixed]  in CHANGELOG

* [Typo fixed] in HISTORY.md
2023-10-29 19:34:50 +01:00
Josh Colclough
975d4154e6
Fix the Julia set shader example (#3467)
* Simplify POI selection

* Improve mouse logic

* Add colour cycles to the shader to show finer details. Works well with high iteration numbers

* Testing things...

* Actually fix zoom. Also allow user to reset camera with 'R'

* Reset max iterations

* Tidying & comments

* Revert to original if statement

* Make mouse logic more readable

* Style conventions

* Coding conventions - f postifx on floating points

* Missed a few f postfixes
2023-10-29 16:41:02 +01:00
Ray
b4865588f8 REVIEWED: GetCurrentMonitor() #3472 2023-10-29 16:36:46 +01:00
ubkp
01c264123d
Remove rcore.h include from SDL (#3475) 2023-10-29 16:23:38 +01:00
Khalid Abdullah
effa3ee249
[Typo fixed] in CHANGELOG (#3477) 2023-10-29 16:22:59 +01:00
SuperUserNameMan
b46505b13d
Update tinyobj_loader_c.h (#3474)
temporary quickfix for issue #3473
2023-10-27 17:13:10 +02:00
Alexandre Almeida
2db7c727b6
GetCurrentMonitor() - use closest monitor (#3472) 2023-10-27 17:01:05 +02:00
Ray
3afd0a55b9 Update miniaudio to latest dev #3471 2023-10-27 16:55:27 +02:00
Ray
f721429f25 ADDED: SetAutomationEventBaseFrame(int frame) 2023-10-27 01:19:10 +02:00
Ray
98fcbe3fe2 Update core_automation_events.c 2023-10-27 00:50:02 +02:00
Ray
654b4e6257 Update core_automation_events.c 2023-10-27 00:45:00 +02:00
Ray
99dac5451c ADDED: Automation Events System, exposed to users
Added new API to record and play events
Added examples illustrating functionality
2023-10-26 23:59:19 +02:00
Ray
067dbe8657 ADDED: Drop files support to PLATFORM_DESKTOP_SDL 2023-10-26 23:57:07 +02:00
Ray
d0141bd105 Remove trail spaces 2023-10-26 23:56:38 +02:00
Ray
e4547eb422 Remove trail spaces 2023-10-26 23:56:03 +02:00
Ray
1cef62cf05 REVIEWED: glfwGetError() not availbale on PLATFORM_WEB fix #3470 2023-10-26 11:10:41 +02:00
Ray
77730c80d9 Updated to miniaudio v0.11.19 #3448 2023-10-26 10:34:39 +02:00
Ray
eddeafd2ed Revert "Fix IsGestureDetected parameter inconsistency in raylib.h with rgextures.h (#3464)"
This reverts commit 804f1a83eb.
2023-10-26 10:28:00 +02:00
jestarray
804f1a83eb
Fix IsGestureDetected parameter inconsistency in raylib.h with rgextures.h (#3464)
closes https://github.com/raysan5/raylib/issues/3463
2023-10-26 10:24:21 +02:00
Alexandre Almeida
2f6b2897fe
GetCurrentMonitor() - check window center instead of top-left corner (#3468) 2023-10-26 10:18:00 +02:00
2Bear
9a687e3153
Fix missing PLATFORM_DESKTOP_SDL checks. (#3469) 2023-10-26 10:15:25 +02:00
ubkp
cb1c2ffda1
Fix gamepad names for PLATFORM_DESKTOP/GLFW (#3462) 2023-10-25 19:13:51 +02:00
ubkp
b0c0f2e560
Fix OpenURL on SDL (#3460) 2023-10-25 12:17:54 +02:00
Ray
7e5eff8a29 Revert "Fix #3461"
This reverts commit 8fbd42d592.
2023-10-25 10:15:19 +02:00
Ray
8fbd42d592 Fix #3461 2023-10-25 10:14:17 +02:00
Ray
803b1a910e REVIEWED: Check OpenGL version required, fix #3457 2023-10-23 19:59:29 +02:00
Ray
a0f0034352 REVIEWED: InitPlatform() organization and code-gardening 2023-10-23 19:15:40 +02:00
Ray
3ff6026917 REVIEWED: Move screen capture logic to rcore.c, available for all platforms 2023-10-23 18:32:24 +02:00
Lukas
daf227a185
Fixes a memory leak as a result of creating an AudioBuffer* with the old source.frameCount. This internally allocates memory to the structs data pointer which is then later overridden by the correct sound data of the source sound. (#3458)
Additionally added a volume assignment from old to new as currently there is no way to get the volume of a sound and the AudioBuffer struct is not reachable from user code due to opaque definition.
2023-10-23 18:16:28 +02:00
Jeffery Myers
4ed776368a
When the frame counter gets to 0, reset the FPS average counter. This allows the window to be closed and reopened with clean FPS stats. (#3445) 2023-10-23 10:11:50 +02:00
ubkp
8f517b7651
Fix compilation for PLATFORM_WEB examples (#3454) 2023-10-23 10:05:40 +02:00
Peter0x44
b3028e4891
Review prerequisites of rcore.c (#3453)
rcore_desktop_sdl.c was not present in the list of prerequisites this
patch changes them to use a wildcard, so any other platforms added in
future will be tracked properly
2023-10-22 19:45:49 +02:00
Peter0x44
e33e9da277
Add DrawCircleLinesV for consistency (#3452)
ImageDrawCircleLinesV already existed, so I'm not sure why this was
missing. It is trivial to implement, anyway
2023-10-22 17:13:49 +02:00
Ray
f0124df0e8 Update CHANGELOG 2023-10-22 15:34:24 +02:00
Ray
cdb394fac6 Update CHANGELOG for **raylib 5.0** -WIP- 2023-10-22 15:21:25 +02:00
Ray
0e029f719b Revert "REVIEWED: sinfl, fix #3349"
This reverts commit c4fb6c8517.
2023-10-22 15:17:35 +02:00
Ray
9127ee2ff9 Merge branch 'master' of https://github.com/raysan5/raylib 2023-10-22 15:16:08 +02:00
Ray
2b90b5600c Revert "Update sinfl.h"
This reverts commit da9bc564d2.
2023-10-22 15:15:56 +02:00
Keith Stellyes
ea325c54e8
fix examples Makefile to use Makefile.Web when building for web (#3449)
Co-authored-by: Keith Stellyes <keith@keithstellyes.com>
2023-10-22 14:58:35 +02:00
Ray
da9bc564d2 Update sinfl.h 2023-10-22 10:31:35 +02:00
Ray
c4fb6c8517 REVIEWED: sinfl, fix #3349 2023-10-22 10:27:22 +02:00
Ray
1aad6a2fc0 REVIEWED: New platform backend template comments 2023-10-22 10:09:03 +02:00
Ray
bcfa7c6718 Update rcore_desktop.c 2023-10-22 10:08:39 +02:00
ubkp
8cda4273ec
[core] Complement implementations for SDL (3) (#3450)
* Fix SetWindowMinSize and SetWindowMaxSize

* Fix window resizes to update the viewport

* Fix window resizes to update the viewport 2
2023-10-22 09:45:04 +02:00
ubkp
e5993c4a4b
[core] Complement implementations for SDL (2) (#3447)
* Add note and todo to GetWindowScaleDPI

* Complement ToggleFullscreen and change ToggleBorderlessWindowed

* Complement SetWindowState and ClearWindowState
2023-10-21 12:11:54 +02:00
ubkp
c66eb49199
[core] Complement implementations for SDL (#3444)
* Complement SetWindowMonitor SDL implementation

* Complement SetWindowMonitor SDL implementation 2

* Complement SetWindowMonitor SDL implementation 3

* Complement GetMonitorPosition SDL implementation

* Small tweaks to various SDL implementation

* Small tweaks to various SDL implementation 2
2023-10-20 17:38:14 +02:00
Ray
081fffd46e REVIEWED: Issue with functions definitions 2023-10-19 13:57:31 +02:00
Ray
b674e344a8 REVIEWED: Issue with symbols exposure 2023-10-19 13:46:02 +02:00
Ray
65dd0afb60 Update Makefile 2023-10-19 13:41:09 +02:00
Ray
982641228c REDESIGNED: Move platforms to separate directory #3313 2023-10-19 13:36:10 +02:00
ubkp
a64d606cb3
Fix GetMonitorPhysical* dpi (#3442) 2023-10-19 13:09:27 +02:00
Ray
f09840dcdc Merge branch 'master' of https://github.com/raysan5/raylib 2023-10-19 13:05:54 +02:00
Ray
19ff0e5fb1 REVIEWED: rlLoadTexture() #3440 2023-10-19 13:05:50 +02:00
Le Juez Victor
d7a098ebd3
[core] Add more missing implementations to SDL (#3439)
* [core] Add more missing implementations to SDL

Add functions: `SetWindowState`, `ClearWindowState`, `SetWindowIcon`

* Completing `SetWIndowState` and `ClearWindowState`

* Add VSync support for SDL

* Fix `CORE.Window.display` size issue

* Fix getting monitor size

We now get the size of the monitor where the window is located

* Add `ToggleBorderlessWindowed`

* Add `ToggleFullscreen`

* Add `GetMonitorPosition`

* Add `SetWindowMonitor`

NOTE: The function is implemented but incomplete

* Replace `TraceLog` by `TRACELOG`

* Fixed mouse delta issue in relative mode

Fixed a delta retrieval issue with `GetMouseDelta` when the mouse is in relative mode. Solution by @ubkp

* Fix `IsKeyPressed` issue

An issue caused `IsKeyPressed` to continuously return true for most keys when pressed

* Fix `SetGamepadMappings` returning
2023-10-19 00:09:00 +02:00
ubkp
d0a265cee8
[core] Add more missing implementations to SDL (#3436)
* Add more missing implementations 1

* Add more missing implementations 2

* Add more missing implementations 3

* Add more missing implementations 4

* Add more missing implementations 5

* Add more missing implementations 6
2023-10-18 08:05:35 +02:00
Ray
fc6152613f REVIEWED: raylib 5.0-dev version for a future release 2023-10-18 00:33:05 +02:00
Ray
53cd60bb29 REVIEWED: Move InitWindow()/CloseWindow() to rcore.c #3313 2023-10-18 00:03:47 +02:00
Michael Scherbakow
9534f48425
fix build.zig (#3433)
for zig master (2023-10-17)
2023-10-17 23:36:42 +02:00
Alexey Kutepov
d7d04a07a2
[raudio] Implement GetMasterVolume() (#3434)
It feels a little unfinished when you can SetMasterVolume but can't
really Get it. So to finish the symmetry here is the GetMasterVolume
implementation.
2023-10-17 23:35:38 +02:00
Le Juez Victor
80432fde62
Fix SDL keyboard issue (#3435)
* Fix SDL keyboard issue

We have added a mapping table between raylib keys and SDL scancodes.

* Change `ScancodeToKey` array type
2023-10-17 23:29:28 +02:00
ubkp
f353cd1c3a
[core] Add some missing implementations to SDL (#3432)
* Add missing implementations

* Add missing implementations 2

* Add missing implementations 3

* Add missing implementations 4

* Add missing implementations 5
2023-10-17 12:01:01 +02:00
Ray
99ede0f747 Added some notes for alternative implementations #3362 2023-10-17 11:09:56 +02:00
Ray
7290ea9bfb Update models_mesh_generation.c 2023-10-17 10:59:25 +02:00
Dor Shapira
af83764f4f
Implement GetCurrentMonitor in rcore_desktop_sdl (#3431)
* Implemented GetCurrentMonitor

* remove traceloog in GetCurrentMonitor
2023-10-17 09:53:53 +02:00
ubkp
fab99b8309
Remove rcore.h include from android (#3429) 2023-10-16 14:59:08 +02:00
Peter0x44
859c67792a
Make sure rcore.o gets compiled in more situations (#3423)
Currently doing the following:
```
make
touch rcore_desktop.c
make
```

Will not result in rcore.o getting compiled again, despite that
rcore_desktop.c has changed

This commit resolves that
2023-10-16 14:08:55 +02:00
neyrox
c4296b166a
Fix GenMeshPlane when resX != resZ (#3425)
Co-authored-by: Stanislav Yablonskiy <s.yablonskiy@pixonic.com>
2023-10-16 14:06:12 +02:00
ubkp
73363f829b
[core] Fix some mouse issues on SDL (#3428)
* Fix mouse wheel getting stucked scrolling up or down

* Fix mouse movement on 3D

* Fix mouse button presses
2023-10-16 09:43:20 +02:00
Ray
84818c96f2 ADDED: NEW PLATFORM: SDL (DESKTOP) rcore_desktop_sdl #3313 2023-10-16 00:51:44 +02:00
Johnathan Corkery
a75251f0a9
Inclusion of Matte to BINDINGS.md (#3427) 2023-10-16 00:25:39 +02:00
MichaelFiber
18bedbd095
[core] Change axisCount to be an array (#3421)
* Update `PLATFORM_DRM` implementation of `GetGamepadAxisCount`

* Update

* Update `PLATFORM_DRM` implementation of `GetGamepadName`

* Add example to test gamepad info functions
Fix typo

* Update new gamepad info example

* Move axis count update out of GamepadThread - race condition

* Remove pointless if statement

* Start integrating stuff from the mikesinput lib

* Add more logging

* Add semicolon

* Add forgotten static

* More fixes

* Update axisCount to be array

* More debugging

* Add forgotten index to ready check

* Add path logging

* Missing parenthesis

* Add missing slash

* Fix axis count being reset to 0

* Fix missing paren

* Test polling joystick button events

* Major updates

* Fix missing array index

* Fix another missing array index

* Update example

* dumb logging

* Wrong constant for ev.code handling

* More dumb logging

* Remove some logging

* Add FPS to gamepad info example and try for max FPS

* tweak

* Revert example

* Add fps back

* Clean up after merge

* Switch axisCount to be an array
2023-10-14 22:51:35 +02:00
ubkp
781f717530
Remove the rcore.h include from drm, web, template (#3420) 2023-10-14 22:47:35 +02:00
Le Juez Victor
6d7112fde7
Fix some omissions (#3418)
Changes the return type of `InitGraphicsDevice()` from `bool` to `int`.
Adds a return at the end of `InitPlatform()`.
2023-10-14 22:46:46 +02:00
Ray
37e3ffcaac REVIEWED: SetMouseCursor() #3416 2023-10-14 22:45:56 +02:00
BeardedBread
b79e381092
Fix SetMouseCursor implementation for PLATFORM_WEB (#3416)
* Fix SetMouseCursor implementation for PLATFORM_WEB

- Restrict function to only set the cursor inside the canvas

* Set the CORE input mouse
2023-10-14 22:42:03 +02:00
Blue
bf639f02a8
Fix raygui.c leftover from zig build (#3417) 2023-10-14 22:38:36 +02:00
Le Juez Victor
2498170b95
Fix screen size check in InitPlatform() (#3415) 2023-10-14 15:11:56 +02:00
BeardedBread
d31b439e04
Implement SetMouseCursor for PLATFORM_WEB (#3414) 2023-10-14 15:10:33 +02:00
Ray
54950f9a3d Make sure CORE.Window.ready is set 2023-10-14 12:55:31 +02:00
Ray
b34c2ecbcb WARNING: REDESIGN: InitPlatform() to initialize all platform data #3313
`InitGraphicsDevice()` could be confusing because the function actually initialized many things: window, graphics, inputs, callbacks, timming, storage... restructured it.
2023-10-14 12:49:54 +02:00
Ray
4521a142c3 tweaks 2023-10-14 11:48:20 +02:00
Ray
005ba155c0 Minor tweaks 2023-10-14 10:56:09 +02:00
Daniil Kisel
2f08f435b9
Add Raylib.lean to BINDINGS.md (#3409) 2023-10-13 20:54:15 +02:00
Purple4pur
4981acb241
fix zig syntax errors in examples, and make it install executables correctly (#3395) 2023-10-13 19:55:52 +02:00
Daniil Kisel
5a0d9c8d43
Fix UpdateSound parameter name (#3405) 2023-10-13 19:54:43 +02:00
Le Juez Victor
36abc48cf8
Normalize gestureEvent.position coordinates (#3406)
Fixed the fact that coordinates were not normalized on Android, preventing detection of `GESTURE_DOUBLE_TAP`
2023-10-13 19:54:00 +02:00
ubkp
f3c27ec157
Fix android, drm compilation issue on InitWindow (#3407)
* Fix drm compilation issue on InitWindow

* Fix android compilation issue on InitWindow
2023-10-13 19:53:31 +02:00
Babak
0f4a8cf7cb
Ported to stb_image_resize2.h (#3403) 2023-10-13 16:37:35 +02:00
Le Juez Victor
0daa5ce1e7
Fix GetMouseDelta() issue for Android (#3404) 2023-10-13 16:36:42 +02:00
Ray
2e65bc675c Moved some platforms functions to generic rcore #3313
Reviewed `InitWindow()` to clearly note platform specific code
2023-10-13 14:14:16 +02:00
Ray
876e6b3a0d REVIEWED: TextFormat(), added "..." for truncation #3366
It seems more standard than [TRUN]
2023-10-11 20:25:09 +02:00
ubkp
6ed8acde67
Fix windowMin/Max to screenMin/Max for android, drm, template (#3400) 2023-10-11 19:29:21 +02:00
Ray
61af8e7631 REVIEWED: #3399, Fix #3366 2023-10-11 12:20:03 +02:00
Murlocohol
28fb58f0ea
[rtext] TextFormat() warn user if buffer overflow occured. (#3399)
* [rtext] TextFormat now alerts user to truncation.

* Update rtext.c

* Update rcore.c

* Update rtext.c
2023-10-11 12:15:40 +02:00
Ray
da9c2894fe Reorganized some functions, WaitTime() is common to all platforms 2023-10-11 12:10:38 +02:00
Ray
a2c5f01059 Reordered one function 2023-10-11 11:55:12 +02:00
Ray
0d175a69ae REVIEWED: Mouse and Touch functions generic to all platforms #3313 2023-10-11 11:36:44 +02:00
Ray
6ebfec99c5 Added gamepad functions as generic for all platforms 2023-10-11 11:14:03 +02:00
Ray
ddca525132 RENAMED: rcore_custom to rcore_template 2023-10-11 11:11:09 +02:00
MichaelFiber
daba1a2794
Split drm update input (#3397)
* Update `PLATFORM_DRM` implementation of `GetGamepadAxisCount`

* Update

* Update `PLATFORM_DRM` implementation of `GetGamepadName`

* Add example to test gamepad info functions
Fix typo

* Update new gamepad info example

* Move axis count update out of GamepadThread - race condition

* Remove pointless if statement
2023-10-11 10:30:51 +02:00
Ray
101a9b0445 Added comments and review some functions #3313 2023-10-10 11:59:41 +02:00
Ray
b94e6290a4 Added some comments and tweaks #3313 2023-10-10 10:50:09 +02:00
Ray
67a1e1ffae Update rtextures.c 2023-10-10 10:48:46 +02:00
Ray
cb57165956 REVIEWED: Fix #3387 2023-10-10 10:48:30 +02:00
Murlocohol
9702a17152
[raymath] Hotfix for Vector2Angle() and Vector2LineAngle() (#3396)
* Hotfix for Vector2LineAngle(), should probably be reviewed along with the rest of raylib angle functions to determine what coordinate system we want.

* Hotfix for Vector2LineAngle(), should probably be reviewed along with the rest of raylib angle functions to determine what coordinate system we want.

* [raymath] Hotfix for Vector2Angle and corresponding example

* [raymath] Hotfix for Vector2Angle and corresponding example

---------

Co-authored-by: Ray <raysan5@gmail.com>
2023-10-10 10:42:11 +02:00
Murlocohol
f0d949f931
Hotfix for Vector2LineAngle(), should probably be reviewed along with the rest of raylib angle functions to determine what coordinate system we want. (#3394) 2023-10-10 08:59:09 +02:00
Ray
0d8a6cfbfa Revert "Update zig build system to zig version 0.11.0 (#3393)"
This reverts commit 540ad99442.
2023-10-10 08:48:55 +02:00
Purple4pur
540ad99442
Update zig build system to zig version 0.11.0 (#3393)
* update build.zig for zig 0.11.0

* fix build.zig in examples to install executable correctly

* discard build.zig, only use src/build.zig, to avoid annoying zig-out path problem

* update zig version note
2023-10-09 13:05:19 +02:00
Ray
cfffa74f96 REVIEWED: Libs include order 2023-10-09 11:17:22 +02:00
Ray
f93d0ff9bc Update raudio.c 2023-10-09 11:17:09 +02:00
Ray
b55cf40b91 Format tweaks 2023-10-09 11:07:02 +02:00
Ray
a38afcf053 Merge branch 'master' of https://github.com/raysan5/raylib 2023-10-09 10:51:41 +02:00
Ray
f86f4159e6 Avoid references to PLATFORM_ flags #3313 2023-10-09 10:51:37 +02:00
SuperUserNameMan
dfb0326d00
Update rcore.c (#3326) 2023-10-09 09:54:43 +02:00
Ray
33c84b3c00 Update rmodels.c 2023-10-09 09:53:52 +02:00
Dennis E. Hamilton
7ab911b9a4
Ensure m3d faces in non-decreasing materialid sequence (#3385)
This modification replaces the expensive qsort protection with an
insertion sort that is near-instantaneous in the expected ordered case.
2023-10-09 09:49:58 +02:00
Masoud Naservand
d309b1eaa7
Call nsvgDeleteRasterizer() on created rasterizer (#3392)
the `NSVGrasterizer *rast` needs to be passed
to nsvgDeleteRasterizer() when we are done with it.
2023-10-09 09:47:54 +02:00
Ray
ea9de852bd ADDED: Custom platform template! #3313 2023-10-09 09:46:57 +02:00
Ray
682992e868 REVIEWED: Reorganize functions
`TakeScreenshot()` moved to `rcore.c`
2023-10-09 09:45:57 +02:00
Ray
5ed7717f0d REVIEWED: WaitTime(), added validation #3377 2023-10-09 01:21:46 +02:00
Ray
a0b30b0363 REVIEWED: SetupViewport() macOS #3313 2023-10-09 01:02:19 +02:00
Ray
df8d3a5afb REVIEWED: Some warnings #3313 2023-10-09 00:47:22 +02:00
Ray
d445fdaa19 WARNING: REDESIGN: Move platform specific data to platform submodules #3313
REVIEWED: Defines, macros, types and tweaks
2023-10-09 00:41:06 +02:00
Ray
bbbaae5562 Reviewed #3313 2023-10-08 23:38:52 +02:00
Ray
fecf56e15a
WARNING: rcore module split per-platform **BIG CHANGE** (#3388)
* Submodules (#3311)

* Check in current state

* Add submodules to Makefile and clean up some imports

* Start moving InitGraphicsDeivce

* Move android_main and CloseWindow() out of rcore

* Move WindowShouldClose out of rcore

* Move IsWindowHidden out of rcore

* Move IsWindowMinimized out of rcore

* Move IsWindowMaximized, IsWindowFocused and IsWindowResized out of rcore

* Move ToggleFullscreen out of rcore

* Move MaximizeWindow, MinimizeWindow and RestoreWindow out of rcore

* Move 13 functions out of rcore:
ToggleBorderlessWindowed
SetWindowState
ClearWindowState
SetWindowIcon
SetWindowIcons
SetWindowTitle
SetWindowPosition
SetWindowMonitor
SetWindowMinSize
SetWindowMaxSize
SetWindowSize
SetWindowOpacity
SetWindowFocused

* Minor clean up, revert makefile change, include submodules directly in rcore

* Fix makefile comment

* Remove rcore.h from Makefile

* Remove debug include

* Move 18 functions from rcore to submodules
GetWindowHandle
GetMonitorCount
GetCurrentMonitor
GetMonitorPosition
GetMonitorWidth
GetMonitorHeight
GetMonitorPhysicalHeight
GetMonitorRefreshRate
GetWindowPosition
GetWindowScaleDPI
GetMonitorName
SetClipboardText
GetClipboardText
ShowCursor
HideCursor
EnableCursor
DisableCursor
GetTime

* Move TakeScreenshot, OpenURL, GetGamepadName out of rcore into submodules

* remove debugging #defines

* Move GetMonitorPhysicalWidth from rcore to submodule

* Move GetGamepadAxisCount from rcore

* Move SetGamepadMappings out of rcore

* Move GetMouseX, GetMouseY, GetMousePosition out of rcore

* Move SetMousePosition out of rcore

* Move GetMouseWheelMove out of rcore

* Move the last functions out of rcore

* Move shared function defs and some global var to rcore.h

* Clean up rcore.c and rcore.h a little more

* Remove unnecessary #define

---------

Co-authored-by: MichaelFiber <michael@cubeofb.org>

* REVIEWED: `PLATFORM_DESKTOP` Windows building

* Revert "REVIEWED: `PLATFORM_DESKTOP` Windows building"

This reverts commit 71a12171f7.

* Reviewed Windows building

* [split] Fix compilation for web (and desktop) (#3329)

* Fix compilation for web

* Remove EM_ASM_INT from core_input_gestures_web example

* Fix raymath undefined symbols for desktop and web

* Remove raylib_opengl_interop from examples Makefile

* Revert previous commit (8651c78)

* Fix TraceLog for web and desktop

* [split] `rcore`, `rcore_web` and `rcore_desktop` changes (batch 2) (#3334)

* Fix formatting

* Reapply commit 9d230d7 (#3305) that was missing

* Reapplies commits 719365f (#3309) and 8a1779b (#3312) that were missing

* Reapply commit 5c9cc3f (#3323) that was missing

* Reapply commit a2b3b1e that was missing

* Revert commit cef25c6 to fix macro redefined warning

* Move rcore.h #include to after config.h to fix macro redefinitions warnings

* [split] `rcore`, `web`, `desktop`, `android` changes (batch 3) (#3338)

* First pass to remove unneeded platform macros for web

* Second pass to remove unneeded platform macros for web

* Move GetTouchX, GetTouchY, GetTouchPosition from rcore to web, desktop, android

* Move SetMouseCursor from rcore to android, desktop, web

* [split] `rcore`, `web`, `desktop`, `android` changes (batch 4) (#3343)

* Fix ToggleBorderlessWindowed duplicated glfwSetWindowSize calls

* First pass to remove unneeded platform macros for android

* Second pass to remove unneeded platform macros for android

* Remove unneeded platform macros for desktop

* Relocate GetGamepadName and update SetGamepadMappings on android, desktop, web

* Add missing comment to web

* [split] `rcore`, `web`, `desktop`, `android` changes (batch 5) (#3345)

* Move SetExitKey from core to android, desktop, web

* Move some callbacks from core to desktop and web

* Relocate emscripten callbacks on web

* Relocate android callbacks on android

* Revert "Relocate android callbacks on android"

This reverts commit bbdbecc01e.

* Updates UnloadVrStereoConfig on rcore

* Update SetClipboardText on android

* Fix screenMin/Max default values for android

* [split] `rcore`, `drm` changes (#3347)

* Tweak makefiles for PLATFORM_DRM and move rcore_drm's dependencies to rcore.h

* Move drm functions to rcore_drm.c

* Fix a typo in rcore.c

* Add SetExitKey to rcore_drm.c

---------

Co-authored-by: MichaelFiber <michael@cubeofb.org>

* Fix compilation for android (#3360)

* Fix android include (#3364)

* Reviewed platform split #3313

 - Added file headers info
 - Added TRACELOG message for unimplemented functions
 - Reviewed code formatting and organization
 - Several code tweaks

* REVIEWED: `GetDirectoryPath()`

---------

Co-authored-by: MichaelFiber <42419558+michaelfiber@users.noreply.github.com>
Co-authored-by: MichaelFiber <michael@cubeofb.org>
Co-authored-by: ubkp <118854183+ubkp@users.noreply.github.com>
2023-10-08 18:36:07 +02:00
Ray
1327b570e3
Update raylib_parser.c 2023-10-08 18:11:55 +02:00
Ray
be8eea9eda Format tweaks 2023-10-08 18:10:05 +02:00
BLUELOVETH
97c2744a16
Update raylib_api.* (#3379) 2023-10-07 21:10:27 +02:00
Ray
52ba44c474 REVIEWED: #3363 2023-10-07 21:07:50 +02:00
DaveH355
da5407b776
Optimize m3d mesh creation (#3363)
* Optimize m3d mesh creation

* Avoid qsort() in rmodels.c

* Revert "Avoid qsort() in rmodels.c"

This reverts commit dc1bd559fd.

* Add comment
2023-10-07 21:02:05 +02:00
Luís Almeida
bc15c19518
Texture Tiling Example - luis605 (#3353)
* Texture Tiling Example - luis605

* Removed SetTraceLogLevel(LOG_WARNING);
2023-10-01 23:01:59 +02:00
Brian E
7351240218
[rcore] reveiwed GetWorldToScreenEx (#3351)
* reveiwed GetWorldToScreenEx
Used the inputted "width" instead of global CORE.window.
Used Vector3Transform instead of quaternion.

* reverted accidental unrelated change

* reverted Vector3Transform back

* fixed mistyped result

---------

Co-authored-by: Brian-E <brian@intra.fo>
2023-10-01 23:00:25 +02:00
BLUELOVETH
c3a1c8c8eb
Update BINDINGS.md with raylib-pkpy-bindings (#3361) 2023-10-01 22:56:43 +02:00
Ray
73b54c862e Update raylib.h 2023-09-29 00:28:16 +02:00
Ray
411d0ee437 Update raylib_parser.c 2023-09-29 00:28:03 +02:00
Jeffery Myers
8d5a90ea3c
Expose rcamera functions to the dll so they can be picked up by dll users and bindings that need the dll (#3355) 2023-09-27 23:47:18 +02:00
XXIV
9ff47fc807
fix BINDINGS.md (#3358) 2023-09-27 20:57:47 +02:00
WraithGlade
115ba2b079
Factor's Raylib bindings mention being at v4.5 (#3350)
I looked at the linked Factor binding page for Raylib and found that the file [summary.txt](https://github.com/factor/factor/blob/master/extra/raylib/summary.txt) has the following text in it:

```
Bindings for Raylib 4.5
```

The bindings have also been updated within the last week.

This implies that Factor's Raylib bindings are either already up to date with v4.5 or will be soon.

Thus, I have submitted this likely correction to Raylib's bindings table.

(PS: There are other Factor Raylib bindings on the internet that are less up-to-date, so don't confuse those with this.)
2023-09-26 18:59:40 +02:00
Ray
f2389a1e55 Remove trail spaces 2023-09-26 12:54:24 +02:00
Ray
f7c3035b8c Update raygui.h 2023-09-24 23:51:23 +02:00
Ray
c8a6093d52
Update examples creation requirements 2023-09-23 11:13:11 +02:00
Ray
557aeff253 REVIEWED: glInternalFormat is unsigned and actually, rlGetGlTextureFormats() returns 0 if fails 2023-09-22 11:59:52 +02:00
Ray
a3a5aa7c63 REVIEWED: LoadFileData() potential issues with dataSize 2023-09-22 11:58:53 +02:00
Ray
83d82b6697 Update rmodels.c 2023-09-22 11:58:24 +02:00
Ray
f27ea1f0c8 REVIEWED: IsGestureDetected() parameter type 2023-09-22 11:58:14 +02:00
Ray
7eb49d1c7b EXTERNAL: msf_gif.h, reviewed some warnings 2023-09-22 11:57:49 +02:00
Ray
477f5e5436 Update miniaudio v0.11.16 --> v0.11.18 2023-09-21 23:54:59 +02:00
Brian E
577a8de7c0
[raymath] Added macros for EPSILON on each function it's used in (#3330)
* Added macros for EPSILON
This is so the functions can be easily copied and used.

* used `#if !defined()` instead of `#ifndef`

---------

Co-authored-by: Brian-E <brian@intra.fo>
2023-09-21 23:48:48 +02:00
Ray
a2b3b1ebe4 REVIEWED: CompressData(), possible stack overflow
`struct sdefl` is almost 1MB, in some platforms it could generated a stack overflow, for example WebAssembly, where by default stack is only 65KB!
2023-09-20 21:23:43 +02:00
Ray
36e99860ee Added note about WebGL warning 2023-09-20 21:22:04 +02:00
Ray
c9020ece5d Update linux.yml 2023-09-19 18:52:40 +02:00
Ray
b335927665 Reviewed PR #3321 2023-09-18 19:43:10 +02:00
Christopher Odom
eb461512a7
Added UBSAN complaint fix to rLoadTexture #1891 (#3321) 2023-09-18 19:39:12 +02:00
Le Juez Victor
4d2906b0a5
Move mutex initialization before ma_device_start() (#3325) 2023-09-18 18:50:22 +02:00
Ray
5c9cc3f9f7 Reviewed #3323 2023-09-18 12:07:40 +02:00
Ray
b9acbbbc66 Fix #3323 2023-09-18 11:50:37 +02:00
Tobias Mock
421ae5bbd8
Update raylib-ocaml bindings to 4.5 version (#3322) 2023-09-17 22:52:34 +02:00
Ray
97c4333803 REVIEWED: UnloadRenderTexture(), additional check 2023-09-17 20:42:45 +02:00
Brian E
acf211a5fa
general syntax fixes (#3319)
* Prettified a comment

* fixed broken indentation caused by another commit.
the commit renamed a bool to int and broke indentation: 233cf3970c

* Changed 0.001 and 0.00001 to EPSILON
This commit is untested.
I don't know what consequences this has.
Since the commits that added these numbers were before epsilon was added,
I have assumed that epsilon could replace them.

* Prettied up indentation in a few places

* removed spacing around *, standardizing it.

* I may have gotten overboard with indentation

* removed a few useless parenthesis

* Added fortran-raylib

* Fix examples/others/rlgl_standalone.c compilation issue (#3242)

* Update BINDINGS.md

* Ignore unused return value of GetCodepointNext in GetCodepointCount (#3241)

* Ignore unused return value of GetCodepointNext in GetCodepointCount

Removes the last warning from non-external libraries when compiling with
the default build configuration on x64 Linux.

* Remove unnecessary void cast in GetCodepointCount

* Fix #3246

* Revert "Fix #3246"

This reverts commit e4dcbd5180.

* Fix text_unicode.c example crashing (#3250)

* Fix text_unicode.c example crashing

* Adjust the text_unicode.c example crashing fix

* tweaks

* add build.zig options for individual modules (#3254)

* Add `IsKeyPressedRepeat` (desktop only) (#3245)

Since the key pressed are handle by comparing current vs previous
state (ie frame), a special way is needed to handle key repeats.

* Reviewed `IsKeyPressedRepeat()` #3248

* Update rcore.c (#3255)

* Match CMakeOptions.txt options default values (#3258)

* Fix SetClipboardText for web (#3257)

* [Image] Validate that ImageDrawRectangleRec is drawing entirely inside the image (#3264)

* Add a function to clone a sound and share data with another sound.

* rename items based on feedback

* PR Feedback, use custom unload for sound alias, not variant of normal sound unloading

* sound_multi example

* Validate that image rect drawing is inside the image so we don't overflow a buffer

* remove files that should not have been added.

* remove changes that should not have been

* revert

* adsfasdfsdfsdf

* Add Vector3 Projecting and Rejection to Raymath (#3263)

* Update raymath.h

* formatting

* [Feature] IsKey... safety checks and more (#3256)

* [Feature] Add GetKeyRepeat

* Update rcore.c

* Simpler design, only one repeat per frame

* Update config.h

* Update rcore.c

* Add KEYBOARD_KEYS_MASK

* Update config.h

* reversions

* Update rcore.c

* Update rcore.c

* change docs

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Update raylib.h

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Fix bug where default shaders was not linking. (#3261)

* Formating review

* Add missing cmake options (#3267)

* Fix CMake extraneous -lglfw (#3266)

Closes #3265.

The problem: LIBS_PRIVATE is a list of library names (used by pkg-config), but the shared library of the same name doesn't always exist.

* Fix example/models/models_loading_gltf.c controls (#3268)

* Fix example/models/models_loading_m3d.c controls (#3269)

* Remove e from secondes (#3270)

* Fix example/audio/audio_module_player.c help instructions and small bug (#3272)

* Fix example/audio/audio_module_player.c help instructions and small bug

* Update example/audio/audio_module_player.png screenshot

* Use type name instead of valid specifier

long long --> long long int

* REVIEWED: `GetFileLength()`, added comment #3262

* Update examples/models/models_loading_gltf.png;m3d.png screenshots (#3273)

* Remove a duplicated screenshot and add missing one (#3275)

* Add examples/shaders/shaders_lightmap.c to Makefiles (#3276)

* Fix examples/others/easings_testbed.c help instructions and small tweak (#3277)

* Fix examples/shaders/shaders_texture_outline.c help instructions (#3278)

* Fix examples/shapes/shapes_collision_area.c help instructions (#3279)

* RENAMED: LoadFont*() parameter names for consistency and coherence

* Fix uninitialized thread-locals in stbi #3282 (#3283)

* REVIEWED: Added `SetTextLineSpacing()` to multiline examples

* REVIEWED: Data size type consistency between functions #3168

* Some tweaks

* Use internal default allocators, instead of user-exposed ones

* Added rudimentary SVG support. (#2738)

* Added rudimentary SVG support. Added 2 functions ImageLoadSvg and ImageLoadSvgWithSize.

* Added an example on how to use ImageLoadSvgWithSize and adjusted Makefiles accordingly.

* Added actual correct example file.

* Reviewed the code to keep the raylib coding conventions in mind.
Moved the LoadImageSvg() code into LoadImage() guarded by SUPPORT_FILEFORMAT_SVG.
Renamed LoadImageSvgWithSize() to LoadImageSvg().
Added a LoadImageSvgFromString() function to parse the loaded SVG into an actual image. This does the bulk of the work.

* Fixed typo.

---------

Co-authored-by: Ray <raysan5@gmail.com>

* REVIEWED: `LoadImageSvg()`

* REVIEWED: `LoadImageSvg()`

* Add SUPPORT_FILEFORMAT_SVG to cmake (#3284)

* Fix examples/textures/textures_fog_of_war.c help instructions (#3285)

* Fix examples/textures/textures_image_rotate.c help instructions (#3286)

* Update rtextures.c

* Fix #3247

* Update config.h

* Fix #3293

* Disable UBSAN in zig builds. (#3292)

Zig debug builds automatically enable ubsan.
As the fix for #1891 had to be reverted, debug builds using zig will crash like so:

```
Illegal instruction at address 0x3237d2
raylib/src/rlgl.h:3690:91: 0x3237d2 in rlDrawVertexArrayElements (/home/rcorre/src/raylib-zig-template/raylib/src/rcore.c)
    glDrawElements(GL_TRIANGLES, count, GL_UNSIGNED_SHORT, (const unsigned short *)buffer + offset);
```

This disables UBSAN when using zig to build raylib.

* Update README.md (#3290)

specially -> especially

* Update cmake SUPPORT_FILEFORMAT_SVG default value (#3291)

* Mouse offset and scaling must be considered also on web!

* Update rcore.c

* Update Makefile : clean raygui.c & physac.c (#3296)

* Remove PLATFORM_RPI (#3232)

* Remove PLATFORM_RPI

* remove build artifacts

---------

Co-authored-by: MichaelFiber <michael@cubeofb.org>
Co-authored-by: Ray <raysan5@gmail.com>

* Review to avoid UBSAN complaining #1891

* added raylib-raku to bindings (#3299)

* examples: core: adds 2D camera two player split screen (#3298)

* Reviewed examples for consistency

* Update rtext.c

* Some code restructuring for input functions, consistency review

* Remove unneeded #if (#3301)

Co-authored-by: MichaelFiber <michael@cubeofb.org>

* Revert "Disable UBSAN in zig builds. (#3292)" (#3303)

This reverts commit a316f9e7fc.

Issue #1891 was fixed again, so this is no longer needed.

* rtextures: Fix ImageDraw() source clipping when drawing beyond top left (#3306)

* REVIEWED: `TextToPascal()` issue when first char is uppercase

* Implement FLAG_WINDOW_RESIZABLE for web (#3305)

Fixes #3231

* Update BINDINGS.md (#3307)

Fix Kaylib binding. Reroute to a new repository.
Binding renamed.

* Update webassembly.yml

* Add claw-raylib to BINDINGS.md (#3310)

* Add SetWindowMaxSize for desktop and web (#3309)

* Add SetWindowMaxSize for desktop and web

* Remove SizeInt and respective adjustments

* Update rtextures.c

* Reviewed parameters for consistency

* Rename windowM* to screenM* (#3312)

* Update BINDINGS.md (#3317)

Update TurboRaylib bindings

* Update rmodels.c

* Update BINDINGS.md with vaiorabbit/raylib-bindings (#3318)

* fixed spelling mistake

* put back parenthesis

* reverted major allignment changes

* reverted parser output changes

* reverted one more indentation change

---------

Co-authored-by: Brian-E <brian@intra.fo>
Co-authored-by: Ray <raysan5@gmail.com>
Co-authored-by: ubkp <118854183+ubkp@users.noreply.github.com>
Co-authored-by: ashn <60763262+ashn-dot-dev@users.noreply.github.com>
Co-authored-by: actondev (Christos) <chris.actondev@gmail.com>
Co-authored-by: vitopigno <103512727+VitusVeit@users.noreply.github.com>
Co-authored-by: Asdqwe <asdqwe@asdqwe.com>
Co-authored-by: Jeffery Myers <jeffm2501@gmail.com>
Co-authored-by: Ethan Simpson <ethansimpson@xtra.co.nz>
Co-authored-by: Nickolas McDonald <43690021+n77y@users.noreply.github.com>
Co-authored-by: Branimir Ričko <rickobranimir@gmail.com>
Co-authored-by: iacore <74560659+iacore@users.noreply.github.com>
Co-authored-by: Ethan Conneely <Econn50@outlook.com>
Co-authored-by: Johannes Barthelmes <615914+jbarthelmes@users.noreply.github.com>
Co-authored-by: bXi <bluepunk@gmail.com>
Co-authored-by: Ryan Roden-Corrent <ryan@rcorre.net>
Co-authored-by: Ikko Eltociear Ashimine <eltociear@gmail.com>
Co-authored-by: SuperUserNameMan <yoann@terminajones.com>
Co-authored-by: MichaelFiber <42419558+michaelfiber@users.noreply.github.com>
Co-authored-by: MichaelFiber <michael@cubeofb.org>
Co-authored-by: Dan Vu <danvu.hustle@gmail.com>
Co-authored-by: Gabriel dos Santos Sanches <gabrielssanches@gmail.com>
Co-authored-by: Rob Loach <robloach@gmail.com>
Co-authored-by: Peter0x44 <peter0x44@disroot.org>
Co-authored-by: Kenta <106167071+Its-Kenta@users.noreply.github.com>
Co-authored-by: bohonghuang <1281299809@qq.com>
Co-authored-by: turborium <45082001+turborium@users.noreply.github.com>
Co-authored-by: Wilson Silva <wilson.dsigns@gmail.com>
2023-09-17 20:16:14 +02:00
Ray
33cc18ed51
Update BINDINGS.md 2023-09-17 13:32:44 +02:00
Wilson Silva
f9c6ca468a
Update BINDINGS.md with vaiorabbit/raylib-bindings (#3318) 2023-09-16 19:56:38 +02:00
Ray
06986f36b3 Update rmodels.c 2023-09-15 17:04:07 +02:00
turborium
18b22523cc
Update BINDINGS.md (#3317)
Update TurboRaylib bindings
2023-09-15 12:32:50 +02:00
ubkp
8a1779b2ad
Rename windowM* to screenM* (#3312) 2023-09-14 11:57:23 +02:00
Ray
97ef81914c Reviewed parameters for consistency 2023-09-13 17:05:38 +02:00
Ray
528b879955 Update rtextures.c 2023-09-13 17:05:22 +02:00
ubkp
719365f209
Add SetWindowMaxSize for desktop and web (#3309)
* Add SetWindowMaxSize for desktop and web

* Remove SizeInt and respective adjustments
2023-09-13 16:37:11 +02:00
bohonghuang
2b1849e57d
Add claw-raylib to BINDINGS.md (#3310) 2023-09-13 16:35:37 +02:00
Ray
2e7a7877a5 Update webassembly.yml 2023-09-12 15:11:16 +02:00
Kenta
3ab7f70e31
Update BINDINGS.md (#3307)
Fix Kaylib binding. Reroute to a new repository.
Binding renamed.
2023-09-11 23:19:43 +02:00
Peter0x44
9d230d753b
Implement FLAG_WINDOW_RESIZABLE for web (#3305)
Fixes #3231
2023-09-11 19:03:33 +02:00
Ray
e75f85ce58 REVIEWED: TextToPascal() issue when first char is uppercase 2023-09-11 19:01:24 +02:00
Rob Loach
30f8dd6e37
rtextures: Fix ImageDraw() source clipping when drawing beyond top left (#3306) 2023-09-11 19:00:30 +02:00
Ryan Roden-Corrent
b8cd10264b
Revert "Disable UBSAN in zig builds. (#3292)" (#3303)
This reverts commit a316f9e7fc.

Issue #1891 was fixed again, so this is no longer needed.
2023-09-09 17:32:28 +02:00
MichaelFiber
37f60e75e7
Remove unneeded #if (#3301)
Co-authored-by: MichaelFiber <michael@cubeofb.org>
2023-09-09 09:47:07 +02:00
Ray
b68d0850b1 Some code restructuring for input functions, consistency review 2023-09-08 20:01:52 +02:00
Ray
10e4aa32f8 Update rtext.c 2023-09-08 20:01:19 +02:00
Ray
1896268775 Reviewed examples for consistency 2023-09-08 13:27:13 +02:00
Gabriel dos Santos Sanches
2d5d0c2999
examples: core: adds 2D camera two player split screen (#3298) 2023-09-08 12:22:12 +02:00
Dan Vu
ecc80bbcea
added raylib-raku to bindings (#3299) 2023-09-08 11:13:00 +02:00
Ray
30a9a24db9 Review to avoid UBSAN complaining #1891 2023-09-07 18:00:10 +02:00
MichaelFiber
18e9784c6d
Remove PLATFORM_RPI (#3232)
* Remove PLATFORM_RPI

* remove build artifacts

---------

Co-authored-by: MichaelFiber <michael@cubeofb.org>
Co-authored-by: Ray <raysan5@gmail.com>
2023-09-07 17:42:28 +02:00
SuperUserNameMan
8cf76ec113
Update Makefile : clean raygui.c & physac.c (#3296) 2023-09-07 17:35:02 +02:00
Ray
b0c6972e5c Update rcore.c 2023-09-06 23:33:29 +02:00
Ray
d7debba222 Mouse offset and scaling must be considered also on web! 2023-09-06 23:16:31 +02:00
Ray
d55527953a Merge branch 'master' of https://github.com/raysan5/raylib 2023-09-05 20:04:30 +02:00
Ray
9cce5a93ff Fix #3293 2023-09-05 20:04:21 +02:00
Asdqwe
76fe16259d
Update cmake SUPPORT_FILEFORMAT_SVG default value (#3291) 2023-09-05 11:03:59 +02:00
Ikko Eltociear Ashimine
97a8fe1e15
Update README.md (#3290)
specially -> especially
2023-09-05 11:03:32 +02:00
Ryan Roden-Corrent
a316f9e7fc
Disable UBSAN in zig builds. (#3292)
Zig debug builds automatically enable ubsan.
As the fix for #1891 had to be reverted, debug builds using zig will crash like so:

```
Illegal instruction at address 0x3237d2
raylib/src/rlgl.h:3690:91: 0x3237d2 in rlDrawVertexArrayElements (/home/rcorre/src/raylib-zig-template/raylib/src/rcore.c)
    glDrawElements(GL_TRIANGLES, count, GL_UNSIGNED_SHORT, (const unsigned short *)buffer + offset);
```

This disables UBSAN when using zig to build raylib.
2023-09-05 11:02:25 +02:00
Ray
c104a97590 Update config.h 2023-09-04 18:51:44 +02:00
Ray
bdda1efd44 Fix #3247 2023-09-04 18:43:25 +02:00
Ray
8a82e17a79 Update rtextures.c 2023-09-04 18:43:03 +02:00
Asdqwe
c147ab51c9
Fix examples/textures/textures_image_rotate.c help instructions (#3286) 2023-09-03 11:03:00 +02:00
Asdqwe
a69d401433
Fix examples/textures/textures_fog_of_war.c help instructions (#3285) 2023-09-02 22:50:59 +02:00
Asdqwe
8bd6bb622c
Add SUPPORT_FILEFORMAT_SVG to cmake (#3284) 2023-09-02 22:38:10 +02:00
Ray
67a693fc5b REVIEWED: LoadImageSvg() 2023-09-02 19:20:56 +02:00
Ray
d6f3891009 REVIEWED: LoadImageSvg() 2023-09-02 13:16:44 +02:00
bXi
c03ab03627
Added rudimentary SVG support. (#2738)
* Added rudimentary SVG support. Added 2 functions ImageLoadSvg and ImageLoadSvgWithSize.

* Added an example on how to use ImageLoadSvgWithSize and adjusted Makefiles accordingly.

* Added actual correct example file.

* Reviewed the code to keep the raylib coding conventions in mind.
Moved the LoadImageSvg() code into LoadImage() guarded by SUPPORT_FILEFORMAT_SVG.
Renamed LoadImageSvgWithSize() to LoadImageSvg().
Added a LoadImageSvgFromString() function to parse the loaded SVG into an actual image. This does the bulk of the work.

* Fixed typo.

---------

Co-authored-by: Ray <raysan5@gmail.com>
2023-09-02 13:00:18 +02:00
Ray
75e5cd86d7 Use internal default allocators, instead of user-exposed ones 2023-09-02 12:58:47 +02:00
Ray
6e18d96e7a Some tweaks 2023-09-02 12:54:36 +02:00
Ray
0f447f1fb6 REVIEWED: Data size type consistency between functions #3168 2023-09-02 12:05:34 +02:00
Ray
d41e3141f1 REVIEWED: Added SetTextLineSpacing() to multiline examples 2023-09-02 11:48:19 +02:00
Johannes Barthelmes
0f39051562
Fix uninitialized thread-locals in stbi #3282 (#3283) 2023-09-02 11:41:33 +02:00
Ray
ec6d3bb688 RENAMED: LoadFont*() parameter names for consistency and coherence 2023-09-01 23:23:01 +02:00
Asdqwe
927a030bbf
Fix examples/shapes/shapes_collision_area.c help instructions (#3279) 2023-08-30 22:43:19 +02:00
Asdqwe
3d0d54e070
Fix examples/shaders/shaders_texture_outline.c help instructions (#3278) 2023-08-30 22:42:01 +02:00
Asdqwe
fefe8fcda9
Fix examples/others/easings_testbed.c help instructions and small tweak (#3277) 2023-08-30 22:40:49 +02:00
Asdqwe
46bac461ce
Add examples/shaders/shaders_lightmap.c to Makefiles (#3276) 2023-08-30 22:40:24 +02:00
Asdqwe
1d2b43402e
Remove a duplicated screenshot and add missing one (#3275) 2023-08-30 22:39:44 +02:00
Asdqwe
752baac00c
Update examples/models/models_loading_gltf.png;m3d.png screenshots (#3273) 2023-08-29 19:28:03 +02:00
Ray
8157d4283e REVIEWED: GetFileLength(), added comment #3262 2023-08-29 19:26:15 +02:00
Ray
150663f78a Use type name instead of valid specifier
long long --> long long int
2023-08-29 19:25:44 +02:00
Asdqwe
d047597244
Fix example/audio/audio_module_player.c help instructions and small bug (#3272)
* Fix example/audio/audio_module_player.c help instructions and small bug

* Update example/audio/audio_module_player.png screenshot
2023-08-29 19:04:27 +02:00
Ethan Conneely
fc0d132566
Remove e from secondes (#3270) 2023-08-28 22:49:45 +02:00
Asdqwe
de3dc94d5b
Fix example/models/models_loading_m3d.c controls (#3269) 2023-08-27 21:15:02 +02:00
Asdqwe
9393500bff
Fix example/models/models_loading_gltf.c controls (#3268) 2023-08-27 21:14:20 +02:00
iacore
76adf883fd
Fix CMake extraneous -lglfw (#3266)
Closes #3265.

The problem: LIBS_PRIVATE is a list of library names (used by pkg-config), but the shared library of the same name doesn't always exist.
2023-08-27 15:43:39 +02:00
Asdqwe
71a8d09a63
Add missing cmake options (#3267) 2023-08-27 15:42:45 +02:00
Ray
9646497216 Formating review 2023-08-27 00:30:56 +02:00
Branimir Ričko
b27e98a428
Fix bug where default shaders was not linking. (#3261) 2023-08-26 18:55:57 +02:00
Nickolas McDonald
9c9fba6a6c
[Feature] IsKey... safety checks and more (#3256)
* [Feature] Add GetKeyRepeat

* Update rcore.c

* Simpler design, only one repeat per frame

* Update config.h

* Update rcore.c

* Add KEYBOARD_KEYS_MASK

* Update config.h

* reversions

* Update rcore.c

* Update rcore.c

* change docs

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Update raylib.h

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Update rcore.c
2023-08-26 14:48:28 +02:00
Ethan Simpson
828d273698
Add Vector3 Projecting and Rejection to Raymath (#3263)
* Update raymath.h

* formatting
2023-08-26 14:44:52 +02:00
Jeffery Myers
21f5482e0d
[Image] Validate that ImageDrawRectangleRec is drawing entirely inside the image (#3264)
* Add a function to clone a sound and share data with another sound.

* rename items based on feedback

* PR Feedback, use custom unload for sound alias, not variant of normal sound unloading

* sound_multi example

* Validate that image rect drawing is inside the image so we don't overflow a buffer

* remove files that should not have been added.

* remove changes that should not have been

* revert

* adsfasdfsdfsdf
2023-08-26 14:43:14 +02:00
ubkp
4fa66f2635
Fix SetClipboardText for web (#3257) 2023-08-26 14:40:30 +02:00
Asdqwe
8f228626a2
Match CMakeOptions.txt options default values (#3258) 2023-08-26 14:35:53 +02:00
vitopigno
5ed83dfa29
Update rcore.c (#3255) 2023-08-21 00:36:00 +02:00
Ray
dfd0436428 Reviewed IsKeyPressedRepeat() #3248 2023-08-21 00:34:35 +02:00
actondev (Christos)
b3f82a148a
Add IsKeyPressedRepeat (desktop only) (#3245)
Since the key pressed are handle by comparing current vs previous
state (ie frame), a special way is needed to handle key repeats.
2023-08-20 23:53:20 +02:00
Ray
83628933f0 Merge branch 'master' of https://github.com/raysan5/raylib 2023-08-20 21:36:50 +02:00
Ray
8189bddefb tweaks 2023-08-20 21:36:36 +02:00
actondev (Christos)
820343e7ac
add build.zig options for individual modules (#3254) 2023-08-20 21:27:39 +02:00
Ray
f95dc2d565 Merge branch 'master' of https://github.com/raysan5/raylib 2023-08-19 20:09:53 +02:00
Ray
5a33f19964 Revert "Fix #3246"
This reverts commit e4dcbd5180.
2023-08-19 20:09:43 +02:00
ubkp
016b7d0a3a
Fix text_unicode.c example crashing (#3250)
* Fix text_unicode.c example crashing

* Adjust the text_unicode.c example crashing fix
2023-08-19 13:43:00 +02:00
Ray
e4dcbd5180 Fix #3246 2023-08-17 15:05:52 +02:00
ashn
a86c93ebc0
Ignore unused return value of GetCodepointNext in GetCodepointCount (#3241)
* Ignore unused return value of GetCodepointNext in GetCodepointCount

Removes the last warning from non-external libraries when compiling with
the default build configuration on x64 Linux.

* Remove unnecessary void cast in GetCodepointCount
2023-08-15 00:09:27 +02:00
Ray
e2d4463886
Update BINDINGS.md 2023-08-15 00:04:07 +02:00
ubkp
e0afb8942e
Fix examples/others/rlgl_standalone.c compilation issue (#3242) 2023-08-14 21:55:13 +02:00
Ray
7a1c0d2547
Added fortran-raylib 2023-08-14 21:10:24 +02:00
Ray
bf705a63de REVIEWED: DrawLineCatmullRom() 2023-08-12 19:31:29 +02:00
Ray
d873d0f173 ISSUE: DrawLineCatmullRom(), needs review 2023-08-12 18:45:59 +02:00
Ray
9161c55d59 REVIEWED: Code formatting 2023-08-12 18:40:18 +02:00
Ray
fc88518067 ADDED: Spline drawing functions ->
- `DrawLineBSpline()`
 - `DrawLineCatmullRom()`
2023-08-12 14:00:50 +02:00
ubkp
c25b52b1b3
Fix rcamera.h issues (#3240) 2023-08-11 10:19:50 +02:00
Ray
93f59a6f59 Review tabs and trail-spaces 2023-08-10 22:47:17 +02:00
Ray
f1c31bee27 Fix #3177 #3109 2023-08-10 22:45:25 +02:00
RadsammyT
0959f6ebf6
fix typos in rmodels, rshapes, rtext modules (#3236) 2023-08-10 00:21:14 +02:00
ashn
90f1749965
Ignore unused function warnings from external headers when compiling with GCC and Clang (#3235) 2023-08-09 19:17:12 +02:00
Ray
42cfabc670 REVIEWED: Old pragma formating 2023-08-09 10:00:26 +02:00
RadsammyT
03ecf2202e
Fix typos in rcore.c comments (#3234)
* Fix typos in rcore.c comments

thought i corrected "dettach"
Fix typos in rcore.c comments

* 'fordward' > forward
2023-08-08 20:10:40 +02:00
Nikolas
bef818e210
Fix build for OpenGL 2.1, where half floats are part of an extension (#3233) 2023-08-08 20:09:22 +02:00
mohad12211
db55bed72b
fix: check if ctrl modifier is among the currently set modifiers (#3230) 2023-08-07 19:51:36 +02:00
Le Juez Victor
c9864d8ac1
Fixed Android app black screen issue when reopening after incomplete closing (#3227)
* Fixed black screen issue when resuming the app on Android

Partly explained here: https://github.com/raysan5/raylib/issues/3127

* Fix APP_CMD_TERM_WINDOW for Android
2023-08-06 22:04:20 +02:00
yujiri8
b82217eaaa
Tweak build.zig to work with cross-compiling (#3225) 2023-08-06 09:25:37 +02:00
Nikolas
dc621ca388
Support 16-Bit HDR textures (#3220)
* Support 16-Bit HDR textures

* Fix build on emscripten

* Move helper functions
2023-08-05 23:16:26 +02:00
Ray
6094869e3e Fix material loading #3126 2023-08-04 18:14:47 +02:00
Jeffery Myers
62f5382d56
[AUDIO] Add an example of how to use LoadSoundAlias (#3223)
* Add a function to clone a sound and share data with another sound.

* rename items based on feedback

* PR Feedback, use custom unload for sound alias, not variant of normal sound unloading

* sound_multi example
2023-08-04 17:14:04 +02:00
Jeffery Myers
601cadbae6
[AUDIO] Add a function to make an alias of a sound and share it's sample data (#3219)
* Add a function to clone a sound and share data with another sound.

* rename items based on feedback

* PR Feedback, use custom unload for sound alias, not variant of normal sound unloading
2023-08-04 16:40:10 +02:00
vitopigno
d3058fe589
[CORE] Support for SetWindowTitle and InitWindow for web (#3222)
* Update raylib.h

Changed SetWindowTitle's description

* Update rcore.c

SetWindowTitle now works on web

* Update rcore.c

InitWindow title now works with web platform too.
2023-08-04 12:04:19 +02:00
ubkp
5b4aaf4eb1
Adds CMake option for SUPPORT_CUSTOM_FRAME_CONTROL (#3221) 2023-08-03 10:29:45 +02:00
ubkp
464e714a2e
Adds BORDERLESS_WINDOWED_MODE for PLATFORM_DESKTOP (#3216) 2023-08-02 19:16:35 +02:00
Jeffery Myers
04678bc585
int math done with floats causes warnings. (#3218) 2023-08-02 19:12:38 +02:00
Joseph Montanez
b60c691816
Update BINDINGS.md (#3217)
Updated Raylib-PHP to support Raylib 4.5
2023-08-02 09:05:02 +02:00
Matheus C. França
e7664d5684
build change (#3214)
ref.: https://github.com/ziglang/zig/pull/16446
2023-08-01 10:46:40 +02:00
ubkp
4fd40f0333
Fixes GetCurrentMonitor() detection inconsistency issue (#3215) 2023-08-01 10:42:50 +02:00
Alexander Klingenbeck
d3ea649832
Update BINDINGS.md to include rayjs (#3212) 2023-07-30 19:08:59 +02:00
ndytts
44659b7ba8
Fix android soname in src/Makefile (#3211) 2023-07-29 13:46:04 +02:00
ubkp
962030e70a
Changes SetWindowMonitor() to no longer force fullscreen (#3209)
* Changes SetWindowMonitor() to no longer force fullscreen

* Readds fullscreen support
2023-07-28 20:08:41 +02:00
Nikolas
5d28bad0ad
Fix LoadTextureCubemap for manual layouts (#3204) 2023-07-27 22:41:43 +02:00
ashn
ac6f889dfc
Fix misleading indentation in src/Makefile (#3202) 2023-07-26 17:50:07 +02:00
bohonghuang
298f93ef50
Fix DrawBillboardPro to allow source of negative size (#3197) (#3203) 2023-07-26 17:46:57 +02:00
Ray
32b54be5cb
Update FAQ.md 2023-07-24 12:32:22 +02:00
ubkp
090b857912
Fix mouse wheel not working in PLATFORM_RPI or PLATFORM_DRM (#3193) 2023-07-23 20:35:41 +02:00
ubkp
295e8c2a2f
Optimize and simplify the gesture system (#3190)
* Optimize and simplify the gesture system

* Decouples GESTURE_SWIPE_* from GESTURE_DRAG
2023-07-22 20:50:04 +02:00
Jakub Václav Flasar
ad2338b994
build.zig: Support for building with PLAFORM_DRM (#3191)
- Adds an option -Dplatform_drm when using zig build
- When building for linux, checks whether -Dplatform_drm is present and configures the build accordingly.
2023-07-21 14:08:35 +02:00
smalltimewizard
1310617a92
Optimization of ImageDrawRectangleRec() (#3185)
A significant performance increase can be had by copying the first row to all other rows.
2023-07-20 13:50:56 +02:00
Alberto González Palomo
5635e4214c
Add note about sample format to AttachAudioStreamProcessor() (#3188) 2023-07-20 13:41:35 +02:00
Danil
055fd752c2
Fixed GetMonitorName description (#3184) (#3189) 2023-07-20 10:56:35 +02:00
Alberto González Palomo
7124a14a60
Document buffer format for audio processors. (#3186) 2023-07-19 23:11:29 +02:00
Rokas Puzonas
d6f16b7664
Update usage of 'sinf()' and 'cosf()' to be correct (#3181)
* Update usage of 'sinf()' and 'cosf()' to be correct

* Update formatting of arithmetic operations
2023-07-19 13:46:14 +02:00
ubkp
954c60100f
Fix GESTURE_DRAG and GESTURE_SWIPE_* issues (mostly) for web (#3183) 2023-07-19 11:33:10 +02:00
Ray
a9ff13a367 Update CMakeOptions.txt 2023-07-18 18:07:49 +02:00
Ray
52541b4a1f ADDED: SUPPORT_FONT_ATLAS_WHITE_REC
Support creating a 3x3 pixels white rectangle at the bottom-right corner of the generated font atlas image, useful for shapes+text drawing in a single draw call!
2023-07-18 17:57:10 +02:00
Ray
e0c80f5ddd Revert "Makefile change for cross compiling. (#3176)"
This reverts commit 70286c7cdc.
2023-07-16 20:18:38 +02:00
Ray
86f95d7150 Reviewed C compilation issues and formatting 2023-07-16 13:24:49 +02:00
Michael Anghelone
70286c7cdc
Makefile change for cross compiling. (#3176)
Working from wsl and compiling for windows this change makes it much easier to compile a static library for windows on arm.
To compile a static library for windows on arm:

```
make PLATFORM=PLATFORM_DESKTOP TARGET_OS=WINDOWS CROSS_CC=/llvm/bin/aarch64-w64-mingw32-gcc CROSS_AR=/llvm/bin/aarch64-w64-mingw32-ar
```

This does not work to compile a shared library yet, only static.
2023-07-16 13:08:55 +02:00
ubkp
b980268ba7
[example] Core Input Gestures for Web (#3172)
* [example] Core Input Gestures for Web

* Fix Doubletap for web

* Changes TAP_TIMEOUT and rgGetCurrentTime to seconds
2023-07-16 13:07:29 +02:00
Roy Qu
22895ba14f
fix: cmake option "OPENGL_VERSION" doesn't work (#3170) 2023-07-13 21:20:06 +02:00
Ray
bc9c063254 Update external sdefl and sinfl 2023-07-12 15:49:38 +02:00
ubkp
8096f142ec
Add a new task the issue template about checking the wiki (#3169) 2023-07-12 12:02:33 +02:00
Ray
290ec11e7c Merge branch 'master' of https://github.com/raysan5/raylib 2023-07-12 10:37:17 +02:00
Ray
7f21cf1dcf Revert "UPDATED: sdefl and sinfl compression libraries"
This reverts commit e190b7eee9.
2023-07-12 10:37:10 +02:00
Anand Swaroop
e8181a5ddf
Update latest h-raylib version (#3166) 2023-07-11 15:21:49 +02:00
Ray
2061bfc5e8 Reviewed parameter names to avoid issues #3159 2023-07-10 19:29:10 +02:00
Ray
bc40012ca3 Added missing structure on standalone mode #3160 2023-07-10 19:15:55 +02:00
Ray
b807c590cb Merge branch 'master' of https://github.com/raysan5/raylib 2023-07-10 19:13:53 +02:00
Ray
0b9fae3c53 Reviewed rcamera/rgestures file-macros for consistency #3161 2023-07-10 19:13:44 +02:00
ubkp
4b6cbd2340
Fix Touch pointCount for web (#3163) 2023-07-10 18:58:56 +02:00
Evan Pratten
91e4eea52d
Add raylib-ffi to bindings list (#3164) 2023-07-10 18:58:10 +02:00
o3o
334e96d470
update bindbd-raylib3 to raylib 4.5 (#3157) 2023-07-06 12:32:02 +02:00
Ray
685d47938b Reverted MeasureTextEx() change #3105 2023-07-06 12:31:01 +02:00
Ray
668b37e111 REVIEWED: GenImageFontAtlas(), make atlas size less conservative 2023-07-06 12:29:28 +02:00
Ray
4f9235f6eb Merge branch 'master' of https://github.com/raysan5/raylib 2023-07-05 18:36:59 +02:00
Ray
58bd10edb2 Update rtext.c 2023-07-05 18:36:54 +02:00
ubkp
13a26a0fa2
Fix degrees of swipe gestures for web (#3155) 2023-07-05 16:43:00 +02:00
Wytek01
3c4ce9c99b
Update examples_template.c to raylib 4.5 (#3156) 2023-07-05 16:39:38 +02:00
Ray
225b4fb3e2 REVIEWED: Vector2Angle() 2023-07-04 16:58:43 +02:00
ubkp
dd2d64e058
Fix pinch gestures for web (#3153) 2023-07-04 11:08:58 +02:00
ubkp
ffe4d36e0a
Fix swipe gestures for web (#3151) 2023-07-03 09:29:26 +02:00
Ray
fdc28fce80 Reviewed vector2angle example 2023-07-02 20:05:15 +02:00
Ray
e8af875756 Minor format tweak, another issue introduced... 2023-07-02 18:54:50 +02:00
Gisteron
64bb2fe3ec
fix vector angle example mode 0 circle segment drawing (#3150) 2023-07-02 18:51:27 +02:00
Ray
d1ab031a27 ADDED: SetWindowFocused() #3142 2023-07-02 17:48:00 +02:00
Ray
5361d498c3 WARNING: REDESIGN: Vector2Angle()<-->Vector2LineAngle() #2887 2023-07-02 17:27:38 +02:00
Ray
4fc5e82e30 REVIEWED: TextToUpper(), TextToLower(), TextToPascal() 2023-07-02 11:10:42 +02:00
Ray
3e4e4b32fd WARNING: BREAKING: ADDED: SetTextLineSpacing() 2023-07-02 10:52:20 +02:00
Ray
48e2663d03 REVIEWED: Issue #3105 2023-07-02 10:51:39 +02:00
Ray
df90da0b37 Update rcore.c 2023-07-02 10:50:40 +02:00
Ray
e190b7eee9 UPDATED: sdefl and sinfl compression libraries 2023-06-30 09:47:16 +02:00
Ray
ceafbcf9d2 REVIEWED: SetShapesTexture(), allow reseting 2023-06-28 00:37:24 +02:00
Kenta
5834e970eb
Update BINDINGS.md (#3138)
Change C3 to Zlib
Update Raylib-nelua's name as Raylib.nelua to reflect repo change.
Update Raylib.nelua licence to Zlib
2023-06-27 22:03:42 +02:00
Jeffery Myers
0c126af717
casting warnings in rtextures (#3134) 2023-06-24 23:38:09 +02:00
Ray
2d518bfbcd REVIEWED: ProcessMaterialsOBJ() #3125 2023-06-24 13:32:13 +02:00
Ray
77d025ebda Merge branch 'master' of https://github.com/raysan5/raylib 2023-06-24 13:27:07 +02:00
Ray
974460b072 REVIEWED: rlLoadShaderBuffer() #3104 2023-06-24 13:26:43 +02:00
Ian Rash
fa698fb05e
Update BINDINGS.md for Crystal (#3132)
Just updated
2023-06-24 13:22:23 +02:00
Le Juez Victor
5e1a81555c
Review android_main() in rcore.c (#3121) 2023-06-20 11:01:57 +02:00
Dante Catalfamo
3a90acf08e
Add options to zig compile (#3115)
* Add options to zig compile options

Support for compiling with raygui, raymath, and physac.
Also outputs the required headers.

Raygui should be located `../raygui` relative to the repo root
Physac should be located `../physac` relative to the repo root

This behavior matches options in the Makefile

* Move Options struct

* Remove physac, explicit raymath, always copy rlgl.h and raymath.h

* Remove unused options from build.zig

* Add srcdir as include path for raygui.h
2023-06-18 11:48:50 +02:00
Ray
830e328df0 Remove trailing spaces 2023-06-17 16:48:18 +02:00
lesleyrs
2209e5b0ca
fix window flags order (#3114) 2023-06-16 18:08:10 +02:00
Ray
a0a18384cb Fix typo 2023-06-16 16:34:47 +02:00
iacore
7392c4b0c5
Better examples/core_input_gamepad (#3110)
* examples/core_input_gamepad: Add visuals for LT,RT

* examples/core_input_gamepad: arrows left/right to choose gamepad

* Style change
2023-06-14 20:46:10 +02:00
Chema Guerra
f385d0ce1c
Continuation of support for ES3/WebGL2 (#3107)
* Continuation of support for ES3/WebGL2

* GetTouchPointState()

* Amends to the WebGL2 PR

---------

Co-authored-by: root <root@DESKTOP-GLOV9QV>
Co-authored-by: chemguerra <online@chemaguerra.com>
2023-06-12 08:18:31 +02:00
Charles
2e00d16f3d
GLTF: fix segfault in animNormals memcpy when mesh.normals == NULL (#3103) 2023-06-10 22:15:24 +02:00
Ray
6aada7d5ec Updated examples to raygui 4.0-dev 2023-06-09 18:07:25 +02:00
Le Juez Victor
753c0b3853
Addition of support for vox files in version 200. (#3097) 2023-06-05 01:13:08 +02:00
Ray
f8b352f6d9 ADDED: ExportImageToMemory()
Only PNG supported for now
2023-06-03 19:51:16 +02:00
Ray
ba802fdd5e tweaks 2023-06-03 19:50:46 +02:00
Pixel Phobic
b1b6ae3905
Full Movement Added to Right Analog Stick (#3095)
I Added Analog Stick Support to the rcamera module, However this code only allowed for 4 Directions of Movement, This Changed adds the full range of Movement to the Right Analog Stick.
2023-06-02 10:29:45 +02:00
Peter0x44
2dec56e7b7
Add error if raylib.h is included in a C++98 program (#3093)
The color macros don't work properly in C++98, because they require
aggregate initialzation, which is a C++11 feature. So, explicitly state
how to fix this issue, instead of letting the compiler give a more vague
error message like:

main.cpp:8:23: error: expected '(' for function-style cast or type construction
      ClearBackground(BLACK);
                      ^~~~~
/opt/homebrew/Cellar/raylib/4.5.0/include/raylib.h:179:35: note: expanded from macro 'BLACK'
 #define BLACK      CLITERAL(Color){ 0, 0, 0, 255 }         // Black

NOTE: Don't use this check with MSVC because by default, it reports
199711L  regardless of any C++ version passed on command line
Only passing `/Zc:__cplusplus` will make MSVC set this correctly

see: https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus
2023-06-01 09:47:52 +02:00
Ray
e497603678 ADDED: Experimental support for OpenGL ES 3.0 -WIP-
Just added the required flags to request the OpenGL ES 3.0 context but it has not been tested...
2023-05-31 18:36:33 +02:00
A Billy
a18667c2e9
cross compilation for PLATFORM_DRM (#3091)
* added cross compilation options for DRM

* fixed identation
2023-05-30 21:34:08 +02:00
yujiri8
45c00ab9d4
build.zig: Fix cross-compiling from Linux (#3090) 2023-05-30 21:33:01 +02:00
Ray
924bb7226b UPDATED: sdefl and sinfl DEFLATE compression libraries 2023-05-30 21:12:03 +02:00
RayIT
15cbf313bb
Enhanced cmake part for OpenBSD (#3086)
* Fixed compile on OpenBSD

* Changed to not use seperate UNIX for cmake
2023-05-28 14:49:33 +02:00
RayIT
4a371a5197
Fixed compile on OpenBSD (#3085) 2023-05-28 11:33:14 +02:00
Nikita K
aad51d4704
BINDINGS.md: Janet bindings supported version update (#3083) 2023-05-27 13:11:33 +02:00
Jason Liang
20860e2ba0
Fix a link in the FAQ (#3082) 2023-05-27 09:27:44 +02:00
Ray
5ef50ae139 REVIEWED: ImageRotate() formatting 2023-05-26 14:01:19 +02:00
LuraMoth
144ae120ab
Add new file formats to FAQ (#3079)
I noticed some file formats from the new release of raylib were missing so I decided to help out and update it!
2023-05-25 09:15:53 +02:00
Dane Madsen
e465ed0850
Added ImageRotate (#3078)
* Added ImageRotate

* Quick rename of the example

* Update ImageRotate by changing doubles to floats and checking code convention

* Update API
2023-05-24 09:22:51 +02:00
Ray
bf69b38056 Added security check to file reading (memory allocations) 2023-05-22 16:08:14 +02:00
Ray
2937f2010c Review coding conventions 2023-05-22 16:06:03 +02:00
Dane Madsen
a4a6d4da8a
Add GenImageGradientSquare (#3077)
* Add GenImageGradientSquare to allow square gradients

* Fix GenImageGradientSquare and add to textures_image_generation example

* Remove params from GenImageGradientSquare
2023-05-22 15:20:28 +02:00
Ray
84ae26cdc0 Update raylib.h 2023-05-21 11:35:25 +02:00
Dane Madsen
e96dc46d38
Replaced GenImageGradientH and GenImageGradientV with GenImageLinearGradient (#3074)
* Replaced GenImageGradientH and GenImageGradientV with GenImageLinearGradient

* renamed GenImageLinearGradient to GenImageGradientLinear
2023-05-21 11:33:47 +02:00
Ray
1b4634702c Minor tweak 2023-05-21 11:20:42 +02:00
Ray
3a841ac130 REVIEWED: GenImagePerlinNoise(), clamp values #3071 2023-05-21 10:28:04 +02:00
Ray
f31df7521a REVIEWED: GenImagePerlinNoise(), no change 2023-05-21 00:14:09 +02:00
Ray
51387dfbfb tweak 2023-05-18 16:14:18 +02:00
Ray
a3e78c5453
Update README.md 2023-05-18 12:00:51 +02:00
Ray
fe6973a4f6
Update README.md 2023-05-18 11:59:35 +02:00
Ray
76e39e502c Update rtextures.c 2023-05-17 23:14:14 +02:00
Ray
3a3e672804 UPDATE: miniaudio v0.11.12 --> v0.11.16 2023-05-17 11:54:32 +02:00
Ray
c3f049fd74 review formatting 2023-05-16 11:02:00 +02:00
Le Juez Victor
675efbda3b
Fix Android app freeze after calling CloseWindow() (#3067)
Fixed that the Android application was not closed properly after calling `CloseWindow()` and continued to run.
2023-05-16 11:00:44 +02:00
Ray
e17cf9ecd7 REVIEWED: Formating 2023-05-15 11:30:31 +02:00
Pixel Phobic
3f8ef4e05f
Updated (rcamera) To Add Analog Stick Cam Controls (#3066)
I Noticed While Writing Some code for My Game im Making that there Isn't an Easy way to control the Camera With The Analog Sticks on Controller.

I Added  a Couple Lines to the UpdateCamera Function :)
2023-05-15 11:25:44 +02:00
Crynux
3438325e7d
Update rmodels.c; free fileData for LoadModelAnimationsGLTF (#3065)
fileData wasn't freed for LoadModelAnimationsGLTF causing a memory leak. Added UnloadFileData line, freeing it.
2023-05-15 11:24:37 +02:00
Gamer-Kold
6b92d71ea1
Reverted commits that deprecated the build.zig files, and added a note to all of them stating version of zig they were using (#3060)
* Revert "Fixed broken build.zig files. Now works with latest stable compiler (as of commit, latest is 0.10.1) (#3045)"

This reverts commit de748dfffe so that zig
build script works with master branch of zig.

* Added a note to build.zig files that denotes what version of zig they have been tested with.

* Standardised the note in the build.zig files
2023-05-15 11:23:36 +02:00
hamyy
26a3536958
GetCurrentMonitor() bugfix (#3058)
* GetCurrentMonitor() bugfix

* GetCurrentMonitor() bugfix
2023-05-14 21:20:43 +02:00
lesleyrs
818312683e
update cmake example project (#3062)
* update cmake example project

* off is the correct one
2023-05-14 21:15:32 +02:00
Michael Scherbakow
cc17a7656c
Update build.zig be be able to build with current zig master (#3064) 2023-05-14 21:14:16 +02:00
JupiterRider
5978358e58
Update BINDINGS.md (#3053) 2023-05-11 19:48:53 +02:00
Ray
452e3b494c REVIEWED: GetCollisionRec() 2023-05-10 19:25:12 +02:00
manuel5975p
af4b97a301
Update GetCollisionRec (#3052)
* Update rshapes.c

Add a much more efficient GetCollisionRec implementation

* Update GetCollisionRec

Replace macros with ternary operators
2023-05-10 19:19:59 +02:00
Ray
152262dbfc Update cgltf.h 2023-05-10 12:48:17 +02:00
Ray
fe595d60f7 Remove trailing spaces 2023-05-08 18:57:36 +02:00
Kenta
81e2c97095
Update BINDINGS.md (#3050)
Update C3 binding to use Raylib version 4.5
2023-05-08 16:00:21 +02:00
Shoozza
204c6765bd
Fix vs code project (#3048)
* Modify remove trailing whitespace

* Fix invalid SetCameraMode call and missing argument to UpdateCamera for VSCode project
2023-05-07 20:22:37 +02:00
Scott Helvick
05e71f990c
Version bump for CL bindings (#3049) 2023-05-07 20:21:47 +02:00
Alfred Reinold Baudisch
53b7b26c45
Added ModelAnimation.name, initially with GLTF animation names loaded (#3044) 2023-05-07 10:33:14 +02:00
Gamer-Kold
de748dfffe
Fixed broken build.zig files. Now works with latest stable compiler (as of commit, latest is 0.10.1) (#3045)
Co-authored-by: Talha Qamar <qamartalha@proton.me>
2023-05-06 12:04:40 +02:00
Ray
5573f0f1c7 REVIEWED: Ligthmap example 2023-05-04 20:35:20 +02:00
Jussi Viitala
abcbd9817e
Lightmap example. (#3043) 2023-05-04 20:21:35 +02:00
Ray
a48bb6e1ed ADDED: Comment to clarify raymath semantics 2023-05-02 20:51:54 +02:00
Ray
fc56940055 REVIEWED: ExportDataAsCode() 2023-05-02 20:40:45 +02:00
Ray
3a21301724 ADDED: Comment about Matrix conventions 2023-05-02 19:29:14 +02:00
Ray
7d68aa6869 REVIEWED: Modules description layout 2023-05-01 14:04:22 +02:00
Ray
a4a5a798bd Update rlgl_compute_shader.c 2023-05-01 14:03:32 +02:00
star-tek-mb
ed2caa1277
fix for latest zig master (#3037) 2023-05-01 11:02:34 +02:00
Ray
59596e4266 Update rcore.c 2023-04-29 20:39:36 +02:00
Thiago P
66f0de2807
WingBGI now leads to the correct website! (#3033)
The old link led to an unregistered site (http://www.codecutter.net/tools/winbgim/). The actual domain has changed to (https://winbgim.codecutter.org/). 
I checked the wayback machine, it's the same site, take a look: https://web.archive.org/web/20190421035959/http://www.codecutter.net/tools/winbgim/.
2023-04-29 20:34:14 +02:00
Le Juez Victor
662dfad670
Correction of values ​​used only once in GenMeshCubicmap (#3032)
* Correction of values ​​used only once in GenMeshCubicmap

The mapWidth and mapHeight values ​​were only used as a limit in the for loop when they could be used throughout the function.

* mapWidth and mapHeight removed from GenMeshCubicmap

mapWidth and mapHeight have been removed from GenMeshCubicmap in favor of using cubicmap.width and cubicmap.height
2023-04-29 17:03:19 +02:00
kolunmi
98cb7a19a1
ensure distance is greater than 0 in CameraMoveToTarget (#3031) 2023-04-27 22:17:57 +02:00
Ray
e2996f167e Update rtextures.c 2023-04-25 20:01:26 +02:00
Ray
64f2f86d32 Update rtextures.c 2023-04-25 15:15:57 +02:00
Ray
6472928cf1 REVIEWED: ImageDrawRectangleRec() #3027 2023-04-25 14:16:48 +02:00
Ray
ac2e9cd00f REVIEWED: Update CORE.Input.Touch.pointCount #3024 2023-04-23 11:48:01 +02:00
Chris
b9b045cdd8
Update BINDINGS.md (#3026) 2023-04-23 11:41:34 +02:00
Ray
838fc7e303 REVIEWED: Some old TODOs 2023-04-22 21:17:53 +02:00
Dor Shapira
05af08080e
Update BINDINGS.md (#3023)
update raypyc version to 4.6-dev
2023-04-22 19:38:56 +02:00
Dan Bechard
2d04dd8b88
Fix off-by-one error in CheckCollisionPointRec (#3022)
Checking `<= x + w` causes off-by-one error where `CheckCollisionPointRec` will return true at the same time for two rectangles rendered right next to each, but which don't overlap (e.g. when making a 2D tile editor). This is clearly not what was intended.
2023-04-22 10:15:19 +02:00
Mingjie Shen
7b7c0c83ef
Fix offset used before range check (#3021)
This use of offset 'i' should follow the range check.
2023-04-22 10:13:11 +02:00
Soutaisei
535680668b
Update BINDINGS.md (#3017)
Update Kaylib to Raylib version 4.5
2023-04-19 21:25:25 +02:00
Ray
771957458d Avoid shader attribute not found log 2023-04-17 17:50:46 +02:00
Ray
9d38363e09 Remove trailing spaces 2023-04-17 12:18:06 +02:00
RadsammyT
e2da32e2da
[raudio] Rewritten ExportWaveAsCode() file saving to be more like rtextures ExportImageAsCode() (#3013)
* Update raudio.c

Review `raudio.c`: rewritten `ExportWaveAsCode()` to be more like rtextures.c `ExportImageAsCode()'

* no tab november

accidentally inserted a tab somewhere. corrected it.
2023-04-15 10:58:00 +02:00
Benjamin Thomas
70d7f67bd8
CMake project example: fix a couple of typos (#3014) 2023-04-15 10:55:40 +02:00
Ray
709b14180a Make assets loading extension case insensitive #3008 2023-04-13 23:08:32 +02:00
Ray
9aa71f04f2 Avoid tracelog about not found uniforms #3003 2023-04-10 11:02:00 +02:00
eternalStudent
8f741d894a
Minor fix in DrawLineBezier* (#3006)
When `i` starts with `0`, `t` is also `0`, which results in `previous == startPos == current`, this segment is not only redundant, but it also causes division-by-zero since `sqrtf(dx*dx + dy*dy)` is zero.
2023-04-09 22:43:06 +02:00
Jeffery Myers
e57ee9c0e8
Fix warnings in raylib for MSVC (#3004) 2023-04-09 22:42:15 +02:00
fubark
06c17ab7f1
Update BINDINGS.md (#3002) 2023-04-08 19:05:41 +02:00
Ray
d8c7b01a3c REVIEWED: GetGlyphIndex() #3000 2023-04-06 12:49:59 +02:00
chocolate42
8367abad1a
[rtext] Fix GetCodepointNext() to return default value on invalid input with size=0 (#2997)
* Fix GetCodepointNext to return default value with size=0 on invalid input. Modify LoadCodepoints to work when GetCodepointNext returns a size of 0. All internal use of GetCodepointNext and GetCodepointPrev checked. This fix may break external code dealing with invalid input as the old code erroneously never returned a size of 0, external code that doesn't properly check for size=0 may endlessly loop or overflow a buffer on invalid input.

* Change default behaviour of GetCodepointNext to return a size of 1 instead of 0. This matches existing prod behaviour and guarantees size 1..4 is returned. Simplify internal code that uses GetCodepointNext that previously had to account for size=0.

* Simplified progressing through a UTF-8 string in ImageTextEx and MeasureTextEx. This change matches existing precedent in DrawTextEx

* GetCodepointNext: Add 10xxxxxx checks to multibyte encodings.

---------

Co-authored-by: anon <anon>
2023-04-06 12:34:37 +02:00
Jorge A. Gomes
17c443ee6d
Update BINDINGS.md (raylib-py -> 4.5) (#2992)
Co-authored-by: Ray <raysan5@gmail.com>
2023-03-29 13:52:33 +02:00
Astie Teddy
1a110dcbd7
Update BINDINGS.md (raylib-lua -> 4.5) (#2989) 2023-03-25 23:26:38 +01:00
Ray
02bd709043
Update BINDINGS.md 2023-03-25 10:38:21 +01:00
Steven Schveighoffer
1fc8f1bdbf
Update raylib-d binding version to 4.5 (#2988) 2023-03-25 10:32:46 +01:00
WIITD
57082d6600
update raylib-freebasic to 4.5 (#2986) 2023-03-23 22:26:55 +01:00
Ray
6287f68c0b Lazy loading of default font for image loading (no InitWindow) 2023-03-22 20:11:36 +01:00
Ray
0925851f89 Update rl_gputex.h 2023-03-22 20:11:03 +01:00
Ray
770e239f73 Minor tweaks to raylib events automation system 2023-03-22 19:47:42 +01:00
Ray
0d4db7ad7f
Update CMakeLists.txt 2023-03-22 12:43:18 +01:00
Ray
19892a3c3a Update resource arch for 64bit #2978 2023-03-22 11:15:00 +01:00
Ray
ecb6a6af32 Review format 2023-03-22 11:08:46 +01:00
Rico P
8b8eddc8e2
slightly optimize Vector3Normalize (#2982) 2023-03-22 11:01:05 +01:00
Hanaxar
e55bdd5d8a
Fix packing logic error in ``GenImageFontAtlas`` (#2979)
Basic packing algorithm currently follows this order: Copy pixel data -> Move offsetX for current glyph -> Check remaining space for current glyph...
Since X offset already moved according current glyph, remaining space should be checked for next glyph. Because of this, occasionally, current logic causes glyphs wrapping around texture.
Proposed fix accomplishes that by moving offsetX check to the beginning of the loop.
2023-03-22 11:00:13 +01:00
Hanaxar
02a8a49961
Calculate exact image size in GenImageFontAtlas (#2963)
* Calculate exact image size in GenImageFontAtlas

Calculate exact image size with a method based on total glyph width and glyph row count
Current method seemed a little bit overkill with square root, log and power functions and only approximates image size which can be wonky with some weird fonts like cursive fonts.
Proposed method calculates image size directly with a simpler method and results exact image size needed.

* Update rtext.c

* Update rtext.c

Changed do-while to while loop, and also added an extra step to calculate maximum glyph width and excluding it from image width for extra safety.
2023-03-22 10:59:28 +01:00
Jarrod Davis
7565e274b1
Update BINDINGS.md (#2983)
Adding raylib for Pascal
2023-03-22 08:55:58 +01:00
gingerBill
d61303b1b0
Update BINDINGS.md for raylib Odin 4.5 (#2981) 2023-03-21 22:46:20 +01:00
Gunko Vadim
04229c5854
Update BINDINGS.md (#2980)
update ray4laz to raylib 4.5
2023-03-21 20:03:38 +01:00
Ray
a139ba9c48
Update README.md 2023-03-21 12:04:03 +01:00
Mansour Quddus
4f43ceb0d2
add missing space in one of the cameraDescriptions (#2977) 2023-03-21 08:31:29 +01:00
Ray
9f7a49bec3 Updated version to avoid confusion with 4.5 release 2023-03-20 18:03:37 +01:00
Ikko Eltociear Ashimine
ace7aef0e6
Fix typo in rmodels.c (#2976)
Upate -> Update
2023-03-20 16:43:22 +01:00
Rob Loach
e450c75f6f
BINDINGS: Update various versions to 4.5 (#2974) 2023-03-20 16:41:16 +01:00
Webfra
08670ecea1
Add const qualifier to char * path argument in qoaplay_open() (#2972)
* Add const qualifier to char * path argument
in qoa_open()

* Remove unnecessary cast
2023-03-19 20:34:22 +01:00
Michael Scherbakow
03e19c7f43
Update raylib.zig version to 4.5 (#2971) 2023-03-19 18:27:21 +01:00
Anand Swaroop
3c02f0c75b
Update h-raylib version (#2970) 2023-03-19 15:38:30 +01:00
Ray
2e02474b7a Update core_loading_thread.c 2023-03-19 11:25:29 +01:00
Rob Loach
c14c7f0b69
raudio: Fix warning on discarded const qualifier (#2967)
The `qoaplay_open()` function expects a `char *`, but we are passing in a `const char *`. While this works just fine, it does issue a compiler warning when strict:

```
src/raudio.c: In function ‘LoadMusicStream’:
src/raudio.c:1290:45: warning: passing argument 1 of ‘qoaplay_open’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 1290 |         qoaplay_desc *ctxQoa = qoaplay_open(fileName);
      |                                             ^~~~~~~~
In file included from src/raudio.c:233:
src/external/qoaplay.c:86:34: note: expected ‘char *’ but argument is of type ‘const char *’
   86 | qoaplay_desc *qoaplay_open(char *path)
      |                            ~~~~~~^~~~
```

This change casts the argument to a `char *` to fix the warning.
2023-03-19 11:16:52 +01:00
Niels Martignène
76b5959bb5
Fix missing symbol when rglfw.c on BSD platforms (#2968) 2023-03-19 09:43:51 +01:00
481 changed files with 93370 additions and 35177 deletions

8
.github/FUNDING.yml vendored
View file

@ -1,8 +0,0 @@
# These are supported funding model platforms
github: raysan5
patreon: # raylib
open_collective: # Replace with a single Open Collective username
ko_fi: # raysan
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
custom: # Replace with a single custom sponsorship URL

View file

@ -1 +0,0 @@
blank_issues_enabled: false

View file

@ -1,40 +0,0 @@
---
name: new issue template
about: generic template for new issues
title: "[module] Short description of the issue/bug/feature"
labels: ''
assignees: ''
---
**WARNING: Please, read this note carefully before submitting a new issue:**
It is important to realise that **this is NOT A SUPPORT FORUM**, this is for reproducible BUGS with raylib ONLY.
There are lots of generous and helpful people ready to help you out on [raylib Discord forum](https://discord.gg/raylib) or [raylib reddit](https://www.reddit.com/r/raylib/).
Remember that asking for support questions here actively takes developer time away from improving raylib.
---
Please, before submitting a new issue verify and check:
- [ ] I tested it on latest raylib version from master branch
- [ ] I checked there is no similar issue already reported
- [ ] My code has no errors or misuse of raylib
### Issue description
*Briefly describe the issue you are experiencing (or the feature you want to see added to raylib). Tell us what you were trying to do and what happened instead. Remember, this is not the best place to ask questions. For questions, go to [raylib Discord server](https://discord.gg/raylib).*
### Environment
*Provide your Platform, Operating System, OpenGL version, GPU details where you experienced the issue.*
### Issue Screenshot
*If possible, provide a screenshot that illustrates the issue. Usually an image is better than a thousand words.*
### Code Example
*Provide minimal reproduction code to test the issue. Please, format the code properly and try to keep it as simple as possible, just focusing on the experienced issue.*

View file

@ -1,100 +0,0 @@
name: Android
on:
workflow_dispatch:
push:
paths:
- 'src/**'
- 'examples/**'
- '.github/workflows/android.yml'
pull_request:
paths:
- 'src/**'
- 'examples/**'
- '.github/workflows/android.yml'
release:
types: [published]
permissions:
contents: read
jobs:
build:
permissions:
contents: write # for actions/upload-release-asset to upload release asset
runs-on: windows-latest
strategy:
fail-fast: false
max-parallel: 1
matrix:
ARCH: ["arm64", "x86_64"]
env:
RELEASE_NAME: raylib-dev_android_api29_${{ matrix.ARCH }}
steps:
- name: Checkout
uses: actions/checkout@master
- name: Setup Release Version
run: |
echo "RELEASE_NAME=raylib-${{ github.event.release.tag_name }}_android_api29_${{ matrix.ARCH }}" >> $GITHUB_ENV
shell: bash
if: github.event_name == 'release' && github.event.action == 'published'
- name: Setup Android NDK
id: setup-ndk
uses: nttld/setup-ndk@v1
with:
ndk-version: r25
add-to-path: false
env:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
- name: Setup Environment
run: |
mkdir build
cd build
mkdir ${{ env.RELEASE_NAME }}
cd ${{ env.RELEASE_NAME }}
mkdir include
mkdir lib
cd ../..
# Generating static + shared library for 64bit arquitectures and API version 29
- name: Build Library
run: |
cd src
make PLATFORM=PLATFORM_ANDROID ANDROID_ARCH=${{ matrix.ARCH }} ANDROID_API_VERSION=29 ANDROID_NDK=${{ env.ANDROID_NDK_HOME }} RAYLIB_LIBTYPE=STATIC RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib"
make PLATFORM=PLATFORM_ANDROID ANDROID_ARCH=${{ matrix.ARCH }} ANDROID_API_VERSION=29 ANDROID_NDK=${{ env.ANDROID_NDK_HOME }} RAYLIB_LIBTYPE=SHARED RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" -B
cd ..
shell: cmd
- name: Generate Artifacts
run: |
cp -v ./src/raylib.h ./build/${{ env.RELEASE_NAME }}/include
cp -v ./src/raymath.h ./build/${{ env.RELEASE_NAME }}/include
cp -v ./src/rlgl.h ./build/${{ env.RELEASE_NAME }}/include
cp -v ./CHANGELOG ./build/${{ env.RELEASE_NAME }}/CHANGELOG
cp -v ./README.md ./build/${{ env.RELEASE_NAME }}/README.md
cp -v ./LICENSE ./build/${{ env.RELEASE_NAME }}/LICENSE
cd build
tar -czvf ${{ env.RELEASE_NAME }}.tar.gz ${{ env.RELEASE_NAME }}
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ env.RELEASE_NAME }}.tar.gz
path: ./build/${{ env.RELEASE_NAME }}.tar.gz
- name: Upload Artifact to Release
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./build/${{ env.RELEASE_NAME }}.tar.gz
asset_name: ${{ env.RELEASE_NAME }}.tar.gz
asset_content_type: application/gzip
if: github.event_name == 'release' && github.event.action == 'published'

View file

@ -1,111 +0,0 @@
name: CMakeBuilds
on:
workflow_dispatch:
push:
paths:
- 'src/**'
- 'examples/**'
- '.github/workflows/cmake.yml'
- 'CMakeList.txt'
- 'CMakeOptions.txt'
- 'cmake/**'
pull_request:
paths:
- 'src/**'
- 'examples/**'
- '.github/workflows/cmake.yml'
- 'CMakeList.txt'
- 'CMakeOptions.txt'
- 'cmake/**'
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
permissions:
contents: read
jobs:
build_windows:
name: Windows Build
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Create Build Environment
# Some projects don't allow in-source building, so create a separate build directory
# We'll use this as our working directory for all subsequent commands
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake
# Use a bash shell so we can use the same syntax for environment variable
# access regardless of the host operating system
shell: powershell
working-directory: ${{github.workspace}}/build
# Note the current convention is to use the -S and -B options here to specify source
# and build directories, but this is only available with CMake 3.13 and higher.
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
run: cmake $env:GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$env:BUILD_TYPE -DPLATFORM=Desktop
- name: Build
working-directory: ${{github.workspace}}/build
shell: powershell
# Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build . --config $env:BUILD_TYPE
- name: Test
working-directory: ${{github.workspace}}/build
shell: powershell
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -C $env:BUILD_TYPE
build_linux:
name: Linux Build
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Create Build Environment
# Some projects don't allow in-source building, so create a separate build directory
# We'll use this as our working directory for all subsequent commands
run: cmake -E make_directory ${{github.workspace}}/build
- name: Setup Environment
run: |
sudo apt-get update -qq
sudo apt-get install gcc-multilib
sudo apt-get install -y --no-install-recommends libglfw3 libglfw3-dev libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libxext-dev libxfixes-dev
- name: Configure CMake
# Use a bash shell so we can use the same syntax for environment variable
# access regardless of the host operating system
shell: bash
working-directory: ${{github.workspace}}/build
# Note the current convention is to use the -S and -B options here to specify source
# and build directories, but this is only available with CMake 3.13 and higher.
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DPLATFORM=Desktop
- name: Build
working-directory: ${{github.workspace}}/build
shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build . --config $BUILD_TYPE
- name: Test
working-directory: ${{github.workspace}}/build
shell: bash
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -C $BUILD_TYPE

View file

@ -1,111 +0,0 @@
name: Linux
on:
workflow_dispatch:
push:
paths:
- 'src/**'
- 'examples/**'
- '.github/workflows/linux.yml'
pull_request:
paths:
- 'src/**'
- 'examples/**'
- '.github/workflows/linux.yml'
release:
types: [published]
permissions:
contents: read
jobs:
build:
permissions:
contents: write # for actions/upload-release-asset to upload release asset
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 1
matrix:
bits: [32, 64]
include:
- bits: 32
ARCH: "i386"
ARCH_NAME: "i386"
COMPILER_PATH: "/user/bin"
- bits: 64
ARCH: "x86_64"
ARCH_NAME: "amd64"
COMPILER_PATH: "/user/bin"
env:
RELEASE_NAME: raylib-dev_linux_${{ matrix.ARCH_NAME }}
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Setup Release Version
run: |
echo "RELEASE_NAME=raylib-${{ github.event.release.tag_name }}_linux_${{ matrix.ARCH_NAME }}" >> $GITHUB_ENV
shell: bash
if: github.event_name == 'release' && github.event.action == 'published'
- name: Setup Environment
run: |
sudo apt-get update -qq
sudo apt-get install gcc-multilib
sudo apt-get install -y --no-install-recommends libglfw3 libglfw3-dev libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libxext-dev libxfixes-dev
mkdir build
cd build
mkdir ${{ env.RELEASE_NAME }}
cd ${{ env.RELEASE_NAME }}
mkdir include
mkdir lib
cd ../../../raylib
# ${{ matrix.ARCH }}-linux-gnu-gcc -v
# TODO: Support 32bit (i386) static/shared library building
- name: Build Library
run: |
cd src
make PLATFORM=PLATFORM_DESKTOP CC=gcc RAYLIB_LIBTYPE=STATIC RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" CUSTOM_CFLAGS="-m32" -B
# make PLATFORM=PLATFORM_DESKTOP CC=gcc RAYLIB_LIBTYPE=SHARED RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" -B
cd ..
if: matrix.bits == 32
- name: Build Library
run: |
cd src
make PLATFORM=PLATFORM_DESKTOP CC=gcc RAYLIB_LIBTYPE=STATIC RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" -B
make PLATFORM=PLATFORM_DESKTOP CC=gcc RAYLIB_LIBTYPE=SHARED RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" -B
cd ..
if: matrix.bits == 64
- name: Generate Artifacts
run: |
cp -v ./src/raylib.h ./build/${{ env.RELEASE_NAME }}/include
cp -v ./src/raymath.h ./build/${{ env.RELEASE_NAME }}/include
cp -v ./src/rlgl.h ./build/${{ env.RELEASE_NAME }}/include
cp -v ./CHANGELOG ./build/${{ env.RELEASE_NAME }}/CHANGELOG
cp -v ./README.md ./build/${{ env.RELEASE_NAME }}/README.md
cp -v ./LICENSE ./build/${{ env.RELEASE_NAME }}/LICENSE
cd build
tar -czvf ${{ env.RELEASE_NAME }}.tar.gz ${{ env.RELEASE_NAME }}
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ env.RELEASE_NAME }}.tar.gz
path: ./build/${{ env.RELEASE_NAME }}.tar.gz
- name: Upload Artifact to Release
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./build/${{ env.RELEASE_NAME }}.tar.gz
asset_name: ${{ env.RELEASE_NAME }}.tar.gz
asset_content_type: application/gzip
if: github.event_name == 'release' && github.event.action == 'published'

View file

@ -1,42 +0,0 @@
name: Linux Examples
on:
workflow_dispatch:
push:
paths:
- 'src/**'
- 'examples/**'
- '.github/workflows/linux_examples.yml'
pull_request:
branches: [ master ]
paths:
- 'src/**'
- 'examples/**'
- '.github/workflows/linux_examples.yml'
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Environment
run: |
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends libglfw3 libglfw3-dev libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libxext-dev libxfixes-dev
- name: Build Library
run: |
cd src
make PLATFORM=PLATFORM_DESKTOP CC=gcc RAYLIB_LIBTYPE=STATIC
cd ..
- name: Build Examples
run: |
cd examples
make PLATFORM=PLATFORM_DESKTOP -B
cd ..

View file

@ -1,116 +0,0 @@
name: macOS
on:
workflow_dispatch:
push:
paths:
- 'src/**'
- 'examples/**'
- '.github/workflows/macos.yml'
pull_request:
paths:
- 'src/**'
- 'examples/**'
- '.github/workflows/macos.yml'
release:
types: [published]
permissions:
contents: read
jobs:
build:
permissions:
contents: write # for actions/upload-release-asset to upload release asset
runs-on: macos-latest
env:
RELEASE_NAME: raylib-dev_macos
steps:
- name: Checkout
uses: actions/checkout@master
- name: Setup Release Version
run: |
echo "RELEASE_NAME=raylib-${{ github.event.release.tag_name }}_macos" >> $GITHUB_ENV
shell: bash
if: github.event_name == 'release' && github.event.action == 'published'
- name: Setup Environment
run: |
mkdir build
cd build
mkdir ${{ env.RELEASE_NAME }}
cd ${{ env.RELEASE_NAME }}
mkdir include
mkdir lib
cd ../..
# Generating static + shared library, note that i386 architecture is deprecated
# Defining GL_SILENCE_DEPRECATION because OpenGL is deprecated on macOS
- name: Build Library
run: |
cd src
clang --version
# Extract version numbers from Makefile
brew install grep
RAYLIB_API_VERSION=`ggrep -Po 'RAYLIB_API_VERSION\s*=\s\K(.*)' Makefile`
RAYLIB_VERSION=`ggrep -Po 'RAYLIB_VERSION\s*=\s\K(.*)' Makefile`
# Build raylib x86_64 static
make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=STATIC CUSTOM_CFLAGS="-target x86_64-apple-macos10.12 -DGL_SILENCE_DEPRECATION"
mv libraylib.a /tmp/libraylib_x86_64.a
make clean
# Build raylib arm64 static
make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=STATIC CUSTOM_CFLAGS="-target arm64-apple-macos11 -DGL_SILENCE_DEPRECATION" -B
mv libraylib.a /tmp/libraylib_arm64.a
make clean
# Join x86_64 and arm64 static
lipo -create -output ../build/${{ env.RELEASE_NAME }}/lib/libraylib.a /tmp/libraylib_x86_64.a /tmp/libraylib_arm64.a
# Build raylib x86_64 dynamic
make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=SHARED CUSTOM_CFLAGS="-target x86_64-apple-macos10.12 -DGL_SILENCE_DEPRECATION" CUSTOM_LDFLAGS="-target x86_64-apple-macos10.12" -B
mv libraylib.${RAYLIB_VERSION}.dylib /tmp/libraylib_x86_64.${RAYLIB_VERSION}.dylib
make clean
# Build raylib arm64 dynamic
make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=SHARED CUSTOM_CFLAGS="-target arm64-apple-macos11 -DGL_SILENCE_DEPRECATION" CUSTOM_LDFLAGS="-target arm64-apple-macos11" -B
mv libraylib.${RAYLIB_VERSION}.dylib /tmp/libraylib_arm64.${RAYLIB_VERSION}.dylib
# Join x86_64 and arm64 dynamic
lipo -create -output ../build/${{ env.RELEASE_NAME }}/lib/libraylib.${RAYLIB_VERSION}.dylib /tmp/libraylib_x86_64.${RAYLIB_VERSION}.dylib /tmp/libraylib_arm64.${RAYLIB_VERSION}.dylib
ln -sv libraylib.${RAYLIB_VERSION}.dylib ../build/${{ env.RELEASE_NAME }}/lib/libraylib.dylib
ln -sv libraylib.${RAYLIB_VERSION}.dylib ../build/${{ env.RELEASE_NAME }}/lib/libraylib.${RAYLIB_API_VERSION}.dylib
cd ..
- name: Generate Artifacts
run: |
cp -v ./src/raylib.h ./build/${{ env.RELEASE_NAME }}/include
cp -v ./src/raymath.h ./build/${{ env.RELEASE_NAME }}/include
cp -v ./src/rlgl.h ./build/${{ env.RELEASE_NAME }}/include
cp -v ./CHANGELOG ./build/${{ env.RELEASE_NAME }}/CHANGELOG
cp -v ./README.md ./build/${{ env.RELEASE_NAME }}/README.md
cp -v ./LICENSE ./build/${{ env.RELEASE_NAME }}/LICENSE
cd build
tar -czvf ${{ env.RELEASE_NAME }}.tar.gz ${{ env.RELEASE_NAME }}
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ env.RELEASE_NAME }}.tar.gz
path: ./build/${{ env.RELEASE_NAME }}.tar.gz
- name: Upload Artifact to Release
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./build/${{ env.RELEASE_NAME }}.tar.gz
asset_name: ${{ env.RELEASE_NAME }}.tar.gz
asset_content_type: application/gzip
if: github.event_name == 'release' && github.event.action == 'published'

View file

@ -1,86 +0,0 @@
name: WebAssembly
on:
workflow_dispatch:
push:
paths:
- 'src/**'
- 'examples/**'
- '.github/workflows/webassembly.yml'
pull_request:
paths:
- 'src/**'
- 'examples/**'
- '.github/workflows/webassembly.yml'
release:
types: [published]
jobs:
build:
runs-on: windows-latest
env:
RELEASE_NAME: raylib-dev_webassembly
steps:
- name: Checkout
uses: actions/checkout@master
- name: Setup emsdk
uses: mymindstorm/setup-emsdk@v11
with:
version: 3.1.30
actions-cache-folder: 'emsdk-cache'
- name: Setup Release Version
run: |
echo "RELEASE_NAME=raylib-${{ github.event.release.tag_name }}_webassembly" >> $GITHUB_ENV
shell: bash
if: github.event_name == 'release' && github.event.action == 'published'
- name: Setup Environment
run: |
mkdir build
cd build
mkdir ${{ env.RELEASE_NAME }}
cd ${{ env.RELEASE_NAME }}
mkdir include
mkdir lib
cd ../..
- name: Build Library
run: |
cd src
emcc -v
make PLATFORM=PLATFORM_WEB EMSDK_PATH="D:/a/raylib/raylib/emsdk-cache/emsdk-main" RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" -B
cd ..
- name: Generate Artifacts
run: |
copy /Y .\src\raylib.h .\build\${{ env.RELEASE_NAME }}\include\raylib.h
copy /Y .\src\raymath.h .\build\${{ env.RELEASE_NAME }}\include\raymath.h
copy /Y .\src\rlgl.h .\build\${{ env.RELEASE_NAME }}\include\rlgl.h
copy /Y .\CHANGELOG .\build/${{ env.RELEASE_NAME }}\CHANGELOG
copy /Y .\README.md .\build\${{ env.RELEASE_NAME }}\README.md
copy /Y .\LICENSE .\build\${{ env.RELEASE_NAME }}\LICENSE
cd build
7z a ./${{ env.RELEASE_NAME }}.zip ./${{ env.RELEASE_NAME }}
dir
shell: cmd
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ env.RELEASE_NAME }}.zip
path: ./build/${{ env.RELEASE_NAME }}.zip
- name: Upload Artifact to Release
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./build/${{ env.RELEASE_NAME }}.zip
asset_name: ${{ env.RELEASE_NAME }}.zip
asset_content_type: application/zip
if: github.event_name == 'release' && github.event.action == 'published'

View file

@ -1,150 +0,0 @@
name: Windows
on:
workflow_dispatch:
push:
paths:
- 'src/**'
- 'examples/**'
- '.github/workflows/windows.yml'
pull_request:
paths:
- 'src/**'
- 'examples/**'
- '.github/workflows/windows.yml'
release:
types: [published]
permissions:
contents: read
jobs:
build:
permissions:
contents: write # for actions/upload-release-asset to upload release asset
runs-on: windows-latest
strategy:
fail-fast: false
max-parallel: 1
matrix:
compiler: [mingw-w64, msvc16]
bits: [32, 64]
include:
- compiler: mingw-w64
bits: 32
ARCH: "i686"
WINDRES_ARCH: pe-i386
- compiler: mingw-w64
bits: 64
ARCH: "x86_64"
WINDRES_ARCH: pe-x86-64
- compiler: msvc16
bits: 32
ARCH: "x86"
VSARCHPATH: "Win32"
- compiler: msvc16
bits: 64
ARCH: "x64"
VSARCHPATH: "x64"
env:
RELEASE_NAME: raylib-dev_win${{ matrix.bits }}_${{ matrix.compiler }}
GNUTARGET: default
steps:
- name: Checkout
uses: actions/checkout@master
- name: Setup Release Version
run: |
echo "RELEASE_NAME=raylib-${{ github.event.release.tag_name }}_win${{ matrix.bits }}_${{ matrix.compiler }}" >> $GITHUB_ENV
shell: bash
if: github.event_name == 'release' && github.event.action == 'published'
- name: Setup Environment
run: |
dir
mkdir build
cd build
mkdir ${{ env.RELEASE_NAME }}
cd ${{ env.RELEASE_NAME }}
mkdir include
mkdir lib
cd ../../../raylib
# Setup MSBuild.exe path if required
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1.1
if: matrix.compiler == 'msvc16'
- name: Build Library (MinGW-w64 32bit)
run: |
cd src
x86_64-w64-mingw32-gcc.exe --version
windres.exe --version
dir C:\msys64\mingw64\bin
make PLATFORM=PLATFORM_DESKTOP CC=x86_64-w64-mingw32-gcc.exe RAYLIB_LIBTYPE=STATIC RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" CUSTOM_CFLAGS=-m32
//windres.exe -i raylib.dll.rc -o raylib.dll.rc.data -O coff --target=${{ matrix.WINDRES_ARCH }}
//make PLATFORM=PLATFORM_DESKTOP CC=${{ matrix.ARCH }}-w64-mingw32-gcc.exe RAYLIB_LIBTYPE=SHARED RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" -B
cd ..
shell: cmd
if: |
matrix.compiler == 'mingw-w64' &&
matrix.bits == 32
- name: Build Library (MinGW-w64 64bit)
run: |
cd src
${{ matrix.ARCH }}-w64-mingw32-gcc.exe --version
windres.exe --version
dir C:\msys64\mingw64\bin
make PLATFORM=PLATFORM_DESKTOP CC=${{ matrix.ARCH }}-w64-mingw32-gcc.exe RAYLIB_LIBTYPE=STATIC RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib"
windres.exe -i raylib.dll.rc -o raylib.dll.rc.data -O coff --target=${{ matrix.WINDRES_ARCH }}
make PLATFORM=PLATFORM_DESKTOP CC=${{ matrix.ARCH }}-w64-mingw32-gcc.exe RAYLIB_LIBTYPE=SHARED RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" -B
cd ..
shell: cmd
if: |
matrix.compiler == 'mingw-w64' &&
matrix.bits == 64
- name: Build Library (MSVC16)
run: |
cd projects/VS2022
msbuild.exe raylib.sln /target:raylib /property:Configuration=Release /property:Platform=${{ matrix.ARCH }}
copy /Y .\build\raylib\bin\${{ matrix.VSARCHPATH }}\Release\raylib.lib .\..\..\build\${{ env.RELEASE_NAME }}\lib\raylib.lib
msbuild.exe raylib.sln /target:raylib /property:Configuration=Release.DLL /property:Platform=${{ matrix.ARCH }}
copy /Y .\build\raylib\bin\${{ matrix.VSARCHPATH }}\Release.DLL\raylib.dll .\..\..\build\${{ env.RELEASE_NAME }}\lib\raylib.dll
copy /Y .\build\raylib\bin\${{ matrix.VSARCHPATH }}\Release.DLL\raylib.lib .\..\..\build\${{ env.RELEASE_NAME }}\lib\raylibdll.lib
cd ../..
shell: cmd
if: matrix.compiler == 'msvc16'
- name: Generate Artifacts
run: |
copy /Y .\src\raylib.h .\build\${{ env.RELEASE_NAME }}\include\raylib.h
copy /Y .\src\raymath.h .\build\${{ env.RELEASE_NAME }}\include\raymath.h
copy /Y .\src\rlgl.h .\build\${{ env.RELEASE_NAME }}\include\rlgl.h
copy /Y .\CHANGELOG .\build\${{ env.RELEASE_NAME }}\CHANGELOG
copy /Y .\README.md .\build\${{ env.RELEASE_NAME }}\README.md
copy /Y .\LICENSE .\build\${{ env.RELEASE_NAME }}\LICENSE
cd build
7z a ./${{ env.RELEASE_NAME }}.zip ./${{ env.RELEASE_NAME }}
dir
shell: cmd
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ env.RELEASE_NAME }}.zip
path: ./build/${{ env.RELEASE_NAME }}.zip
- name: Upload Artifact to Release
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./build/${{ env.RELEASE_NAME }}.zip
asset_name: ${{ env.RELEASE_NAME }}.zip
asset_content_type: application/zip
if: github.event_name == 'release' && github.event.action == 'published'

View file

@ -1,36 +0,0 @@
name: Windows Examples
on:
workflow_dispatch:
push:
paths:
- 'src/**'
- 'examples/**'
- '.github/workflows/windows_examples.yml'
pull_request:
branches: [ master ]
paths:
- 'src/**'
- 'examples/**'
- '.github/workflows/windows_examples.yml'
permissions:
contents: read
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1
- name: Build Library (MSVC16)
run: |
cd projects/VS2019
msbuild.exe raylib.sln /property:Configuration=Release /property:Platform=x86
cd ../..
shell: cmd

9
.gitignore vendored
View file

@ -54,6 +54,10 @@ packages/
*.bc
*.so
*.so.*
*.dll
# Emscripten
emsdk
# Ignore wasm data in examples/
examples/**/*.wasm
@ -75,6 +79,9 @@ xcschememanagement.plist
xcuserdata/
DerivedData/
# VSCode project
.vscode
# Jetbrains project
.idea/
cmake-build-*/
@ -85,6 +92,7 @@ CMakeFiles
CMakeScripts
Testing
cmake_install.cmake
cmake_uninstall.cmake
install_manifest.txt
compile_commands.json
CTestTestfile.cmake
@ -96,6 +104,7 @@ GRTAGS
GTAGS
# Zig programming language
.zig-cache/
zig-cache/
zig-out/
build/

View file

@ -1,150 +1,164 @@
# raylib bindings and wrappers
Some people ported raylib to other languages in form of bindings or wrappers to the library. Here is a list with all the ports available. Feel free to send a PR if you know of any binding/wrapper not in this list.
Some people ported raylib to other languages in the form of bindings or wrappers to the library. Here is a list with all the ports available. Feel free to send a PR if you know of any binding/wrapper not in this list.
### Language Bindings
| name | raylib version | language | license | repo |
|:------------------:|:---------------:|:---------:|:----------:|-----------------------------------------------------------|
| raylib | **4.2** | [C/C++](https://en.wikipedia.org/wiki/C_(programming_language)) | Zlib | https://github.com/raysan5/raylib |
| raylib-boo | 3.7 | [Boo](http://boo-language.github.io/)| MIT | https://github.com/Rabios/raylib-boo |
| Raylib-cs | **4.2** | [C#](https://en.wikipedia.org/wiki/C_Sharp_(programming_language)) | Zlib | https://github.com/ChrisDill/Raylib-cs |
| Raylib-CsLo | **4.2** | [C#](https://en.wikipedia.org/wiki/C_Sharp_(programming_language)) | MPL-2.0 | https://github.com/NotNotTech/Raylib-CsLo |
| cl-raylib | **4.0** | [Common Lisp](https://common-lisp.net/) | MIT | https://github.com/longlene/cl-raylib |
| claylib/wrap | **4.2** | [Common Lisp](https://common-lisp.net/) | Zlib | https://github.com/defun-games/claylib |
| chez-raylib | auto | [Chez Scheme](https://cisco.github.io/ChezScheme/) | GPLv3 | https://github.com/Yunoinsky/chez-raylib |
| raylib-cr | **4.5-dev (7e7939e)** | [Crystal](https://crystal-lang.org/) | Apache-2.0 | https://github.com/sol-vin/raylib-cr |
| ray-cyber | **4.2** | [Cyber](https://cyberscript.dev) | MIT | https://github.com/fubark/ray-cyber |
| raylib-c3 | **4.5-dev** | [C3](https://c3-lang.org/) | MIT | https://github.com/Its-Kenta/Raylib-C3 |
| dart-raylib | **4.0** | [Dart](https://dart.dev/) | MIT | https://gitlab.com/wolfenrain/dart-raylib |
| bindbc-raylib3 | **4.0** | [D](https://dlang.org/) | BSL-1.0 | https://github.com/o3o/bindbc-raylib3 |
| dray | **4.2** | [D](https://dlang.org/) | Apache-2.0 | https://github.com/redthing1/dray |
| raylib-d | **4.2** | [D](https://dlang.org/) | Zlib | https://github.com/schveiguy/raylib-d |
| dlang_raylib | **4.0** | [D](https://dlang.org) | MPL-2.0 |https://github.com/rc-05/dlang_raylib |
| rayex | 3.7 | [elixir](https://elixir-lang.org/) | Apache-2.0 | https://github.com/shiryel/rayex |
| raylib-factor | **4.0** | [Factor](https://factorcode.org/) | BSD | https://github.com/factor/factor/blob/master/extra/raylib/raylib.factor |
| raylib-freebasic | **4.2** | [FreeBASIC](https://www.freebasic.net/) | MIT | https://github.com/WIITD/raylib-freebasic |
| raylib-go | **4.2** | [Go](https://golang.org/) | Zlib | https://github.com/gen2brain/raylib-go |
| raylib-guile | auto | [Guile](https://www.gnu.org/software/guile/) | Zlib | https://github.com/petelliott/raylib-guile |
| gforth-raylib | 3.5 | [Gforth](https://gforth.org/) | MIT | https://github.com/ArnautDaniel/gforth-raylib |
| h-raylib | 4.5-dev | [Haskell](https://haskell.org/) | Apache-2.0 | https://github.com/Anut-py/h-raylib |
| raylib-hx | **4.2** | [Haxe](https://haxe.org/) | Zlib | https://github.com/foreignsasquatch/raylib-hx |
| hb-raylib | 3.5 | [Harbour](https://harbour.github.io) | MIT | https://github.com/MarcosLeonardoMendezGerencir/hb-raylib |
| jaylib | **4.2** | [Java](https://en.wikipedia.org/wiki/Java_(programming_language)) | GPLv3+CE | https://github.com/electronstudio/jaylib/ |
| raylib-j | **4.0** | [Java](https://en.wikipedia.org/wiki/Java_(programming_language)) | Zlib | https://github.com/CreedVI/Raylib-J |
| raylib.jl | **4.2** | [Julia](https://julialang.org/) | Zlib | https://github.com/irishgreencitrus/raylib.jl |
| kaylib | 3.7 | [Kotlin/native](https://kotlinlang.org) | ? | https://github.com/electronstudio/kaylib |
| kaylib | **4.5-dev**| [Kotlin/native](https://kotlinlang.org) | Zlib | https://codeberg.org/Kenta/Kaylib |
| raylib-lua | **4.2** | [Lua](http://www.lua.org/) | ISC | https://github.com/TSnake41/raylib-lua |
| raylua | **4.0** | [Lua](http://www.lua.org/) | MIT | https://github.com/Rabios/raylua |
| nelua-raylib | 4.0 | [nelua](https://nelua.io/) | MIT | https://github.com/AKDev21/nelua-raylib |
| Raylib-Nelua | **4.5-dev** | [nelua](https://nelua.io/) | MIT | https://github.com/Its-Kenta/Raylib-Nelua |
| NimraylibNow! | 4.2 | [Nim](https://nim-lang.org/) | MIT | https://github.com/greenfork/nimraylib_now |
| raylib-Forever | auto | [Nim](https://nim-lang.org/) | ? | https://github.com/Guevara-chan/Raylib-Forever |
| naylib | auto | [Nim](https://nim-lang.org/) | MIT | https://github.com/planetis-m/naylib |
| node-raylib | **4.0** | [Node.js](https://nodejs.org/en/) | Zlib | https://github.com/RobLoach/node-raylib |
| raylib_odin_bindings | 4.0-dev | [Odin](https://odin-lang.org/) | MIT | https://github.com/Deathbat2190/raylib_odin_bindings |
| raylib-odin | **4.0** | [Odin](https://odin-lang.org/) | BSD-3Clause | https://github.com/odin-lang/Odin/tree/master/vendor/raylib |
| raylib-ocaml | **4.2** | [OCaml](https://ocaml.org/) | MIT | https://github.com/tjammer/raylib-ocaml |
| TurboRaylib | **4.2** | [Object Pascal](https://en.wikipedia.org/wiki/Object_Pascal) | MIT | https://github.com/turborium/TurboRaylib |
| Ray4Laz | **4.2** | [Free Pascal](https://en.wikipedia.org/wiki/Free_Pascal)| Zlib | https://github.com/GuvaCode/Ray4Laz |
| Raylib.4.0.Pascal | **4.0** | [Free Pascal](https://en.wikipedia.org/wiki/Free_Pascal)| Zlib | https://github.com/sysrpl/Raylib.4.0.Pascal |
| pyraylib | 3.7 | [Python](https://www.python.org/) | Zlib | https://github.com/Ho011/pyraylib |
| raylib-python-cffi | **4.2** | [Python](https://www.python.org/) | EPL-2.0 | https://github.com/electronstudio/raylib-python-cffi |
| raylibpyctbg | **4.2** | [Python](https://www.python.org/) | MIT | https://github.com/overdev/raylibpyctbg |
| raylib-py | **4.2** | [Python](https://www.python.org/) | MIT | https://github.com/overdev/raylib-py |
| raylib-python-ctypes | **4.2** | [Python](https://www.python.org/) | MIT | https://github.com/sDos280/raylib-python-ctypes |
| raylib-php | 3.5 | [PHP](https://en.wikipedia.org/wiki/PHP) | Zlib | https://github.com/joseph-montanez/raylib-php |
| raylib-phpcpp | 3.5 | [PHP](https://en.wikipedia.org/wiki/PHP) | Zlib | https://github.com/oraoto/raylib-phpcpp |
| raylibr | **4.0** | [R](https://www.r-project.org) | MIT | https://github.com/jeroenjanssens/raylibr |
| raylib-rs | 3.5 | [Rust](https://www.rust-lang.org/) | Zlib | https://github.com/deltaphc/raylib-rs |
| Relib | 3.5 | [ReCT](https://github.com/RedCubeDev-ByteSpace/ReCT) | ? | https://github.com/RedCubeDev-ByteSpace/Relib |
| racket-raylib | **4.0** | [Racket](https://racket-lang.org/) | MIT/Apache-2.0 | https://github.com/eutro/racket-raylib |
| raylib-swift | **4.0** | [Swift](https://swift.org/) | MIT | https://github.com/STREGAsGate/Raylib |
| raylib-scopes | auto | [Scopes](http://scopes.rocks) | MIT | https://github.com/salotz/raylib-scopes |
| raylib-smallBasic | 4.1-dev | [SmallBASIC](https://github.com/smallbasic/SmallBASIC) | GPLv3 | https://github.com/smallbasic/smallbasic.plugins/tree/master/raylib |
| raylib-umka | **4.2** | [Umka](https://github.com/vtereshkov/umka-lang) | Zlib | https://github.com/robloach/raylib-umka |
| raylib.v | **4.2** | [V](https://vlang.io/) | Zlib | https://github.com/irishgreencitrus/raylib.v |
| raylib-vapi | **4.2** | [Vala](https://vala.dev/) | Zlib | https://github.com/lxmcf/raylib-vapi |
| raylib-wren | **4.0** | [Wren](http://wren.io/) | ISC | https://github.com/TSnake41/raylib-wren |
| raylib-zig | **4.2** | [Zig](https://ziglang.org/) | MIT | https://github.com/Not-Nik/raylib-zig |
| raylib.zig | **4.2** | [Zig](https://ziglang.org/) | MIT | https://github.com/ryupold/raylib.zig |
| hare-raylib | auto | [Hare](https://harelang.org/) | Zlib | https://git.sr.ht/~evantj/hare-raylib |
| raylib-sunder | auto | [Sunder](https://github.com/ashn-dot-dev/sunder) | 0BSD | https://github.com/ashn-dot-dev/raylib-sunder |
| rayed-bqn | auto | [BQN](https://mlochbaum.github.io/BQN/) | MIT | https://github.com/Brian-ED/rayed-bqn |
| 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-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 |
| [Raylib-CsLo](https://github.com/NotNotTech/Raylib-CsLo) | 4.2 | [C#](https://en.wikipedia.org/wiki/C_Sharp_(programming_language)) | MPL-2.0 |
| [Raylib-CSharp-Vinculum](https://github.com/ZeroElectric/Raylib-CSharp-Vinculum) | **5.0** | [C#](https://en.wikipedia.org/wiki/C_Sharp_(programming_language)) | MPL-2.0 |
| [Raylib-CSharp](https://github.com/MrScautHD/Raylib-CSharp) | **5.1-dev** | [C#](https://en.wikipedia.org/wiki/C_Sharp_(programming_language)) | MIT |
| [cl-raylib](https://github.com/longlene/cl-raylib) | 4.0 | [Common Lisp](https://common-lisp.net) | MIT |
| [claylib/wrap](https://github.com/defun-games/claylib) | 4.5 | [Common Lisp](https://common-lisp.net) | Zlib |
| [claw-raylib](https://github.com/bohonghuang/claw-raylib) | **auto** | [Common Lisp](https://common-lisp.net) | Apache-2.0 |
| [chez-raylib](https://github.com/Yunoinsky/chez-raylib) | **auto** | [Chez Scheme](https://cisco.github.io/ChezScheme) | GPLv3 |
| [raylib-cr](https://github.com/sol-vin/raylib-cr) | 4.6-dev (5e1a81) | [Crystal](https://crystal-lang.org) | Apache-2.0 |
| [ray-cyber](https://github.com/fubark/ray-cyber) | **5.0** | [Cyber](https://cyberscript.dev) | MIT |
| [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 |
| [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 |
| [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) | **???** |
| [h-raylib](https://github.com/Anut-py/h-raylib) | **5.5-dev** | [Haskell](https://haskell.org) | Apache-2.0 |
| [raylib-hx](https://github.com/foreignsasquatch/raylib-hx) | 4.2 | [Haxe](https://haxe.org) | Zlib |
| [hb-raylib](https://github.com/MarcosLeonardoMendezGerencir/hb-raylib) | 3.5 | [Harbour](https://harbour.github.io) | MIT |
| [jaylib](https://github.com/janet-lang/jaylib) | **5.0** | [Janet](https://janet-lang.org) | MIT |
| [jaylib](https://github.com/electronstudio/jaylib/) | 4.5 | [Java](https://en.wikipedia.org/wiki/Java_(programming_language)) | GPLv3+CE |
| [raylib-j](https://github.com/CreedVI/Raylib-J) | 4.0 | [Java](https://en.wikipedia.org/wiki/Java_(programming_language)) | Zlib |
| [Raylib.jl](https://github.com/chengchingwen/Raylib.jl) | 4.2 | [Julia](https://julialang.org) | Zlib |
| [kaylib](https://github.com/electronstudio/kaylib) | 3.7 | [Kotlin/native](https://kotlinlang.org) | **???** |
| [KaylibKit](https://codeberg.org/Kenta/KaylibKit) | 4.5 | [Kotlin/native](https://kotlinlang.org) | Zlib |
| [raylib-lua](https://github.com/TSnake41/raylib-lua) | 4.5 | [Lua](http://www.lua.org) | ISC |
| [raylua](https://github.com/Rabios/raylua) | 4.0 | [Lua](http://www.lua.org) | MIT |
| [raylib-matte](https://github.com/jcorks/raylib-matte) | 4.6-dev | [Matte](https://github.com/jcorks/matte) | MIT |
| [Raylib.nelua](https://github.com/AuzFox/Raylib.nelua) | **5.0** | [nelua](https://nelua.io) | Zlib |
| [raylib-bindings](https://github.com/vaiorabbit/raylib-bindings) | 4.5 | [Ruby](https://www.ruby-lang.org/en) | Zlib |
| [naylib](https://github.com/planetis-m/naylib) | **5.1-dev** | [Nim](https://nim-lang.org) | MIT |
| [node-raylib](https://github.com/RobLoach/node-raylib) | 4.5 | [Node.js](https://nodejs.org/en) | Zlib |
| [raylib-odin](https://github.com/odin-lang/Odin/tree/master/vendor/raylib) | **5.0** | [Odin](https://odin-lang.org) | BSD-3Clause |
| [raylib_odin_bindings](https://github.com/Deathbat2190/raylib_odin_bindings) | 4.0-dev | [Odin](https://odin-lang.org) | MIT |
| [raylib-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 |
| [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 |
| [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-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 |
| [raylib-phpcpp](https://github.com/oraoto/raylib-phpcpp) | 3.5 | [PHP](https://en.wikipedia.org/wiki/PHP) | Zlib |
| [raylibr](https://github.com/jeroenjanssens/raylibr) | 4.0 | [R](https://www.r-project.org) | MIT |
| [raylib-ffi](https://github.com/ewpratten/raylib-ffi) | 4.5 | [Rust](https://www.rust-lang.org) | GPLv3 |
| [raylib-rs](https://github.com/raylib-rs/raylib-rs) | **5.0** | [Rust](https://www.rust-lang.org) | Zlib |
| [Relib](https://github.com/RedCubeDev-ByteSpace/Relib) | 3.5 | [ReCT](https://github.com/RedCubeDev-ByteSpace/ReCT) | **???** |
| [racket-raylib](https://github.com/eutro/racket-raylib) | 4.0 | [Racket](https://racket-lang.org) | MIT/Apache-2.0 |
| [raylib-swift](https://github.com/STREGAsGate/Raylib) | 4.0 | [Swift](https://swift.org) | MIT |
| [raylib-scopes](https://github.com/salotz/raylib-scopes) | auto | [Scopes](http://scopes.rocks) | MIT |
| [raylib-SmallBASIC](https://github.com/smallbasic/smallbasic.plugins/tree/master/raylib) | **5.0** | [SmallBASIC](https://github.com/smallbasic/SmallBASIC) | GPLv3 |
| [raylib-umka](https://github.com/robloach/raylib-umka) | 4.5 | [Umka](https://github.com/vtereshkov/umka-lang) | Zlib |
| [raylib.v](https://github.com/irishgreencitrus/raylib.v) | 4.2 | [V](https://vlang.io) | Zlib |
| [raylib-vapi](https://github.com/lxmcf/raylib-vapi) | **5.0** | [Vala](https://vala.dev) | Zlib |
| [raylib-wren](https://github.com/TSnake41/raylib-wren) | 4.0 | [Wren](http://wren.io) | ISC |
| [raylib-zig](https://github.com/Not-Nik/raylib-zig) | **5.0** | [Zig](https://ziglang.org) | MIT |
| [raylib.zig](https://github.com/ryupold/raylib.zig) | **5.1-dev** | [Zig](https://ziglang.org) | MIT |
| [raylib-zig-bindings](https://github.com/L-Briand/raylib-zig-bindings) | **5.0** | [Zig](https://ziglang.org) | Zlib |
| [hare-raylib](https://git.sr.ht/~evantj/hare-raylib) | **auto** | [Hare](https://harelang.org) | Zlib |
| [raylib-sunder](https://github.com/ashn-dot-dev/raylib-sunder) | **auto** | [Sunder](https://github.com/ashn-dot-dev/sunder) | 0BSD |
| [raylib-bqn](https://github.com/Brian-ED/raylib-bqn) | **5.0** | [BQN](https://mlochbaum.github.io/BQN) | MIT |
| [rayjs](https://github.com/mode777/rayjs) | 4.6-dev | [QuickJS](https://bellard.org/quickjs) | MIT |
| [raylib-raku](https://github.com/vushu/raylib-raku) | **auto** | [Raku](https://www.raku.org) | Artistic License 2.0 |
| [Raylib.lean](https://github.com/KislyjKisel/Raylib.lean) | **5.5-dev** | [Lean4](https://lean-lang.org) | BSD-3-Clause |
| [raylib-cobol](https://codeberg.org/glowiak/raylib-cobol) | **auto** | [COBOL](https://gnucobol.sourceforge.io) | Public domain |
| [raylib-apl](https://github.com/Brian-ED/raylib-apl) | **5.0** | [Dyalog APL](https://www.dyalog.com/) | MIT |
### 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.
| name | raylib version | language | license | repo |
|:------------------:|:-------------: | :--------:|:-------:|:-------------------------------------------------------------|
| raylib-cpp | **4.2** | [C++](https://en.wikipedia.org/wiki/C%2B%2B) | Zlib | https://github.com/robloach/raylib-cpp |
| claylib | **4.2** | [Common Lisp](https://common-lisp.net/) | Zlib | https://github.com/defun-games/claylib |
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 |
| [claylib](https://github.com/defun-games/claylib) | 4.5 | [Common Lisp](https://common-lisp.net) | Zlib |
| [rayed-bqn](https://github.com/Brian-ED/rayed-bqn) | **5.0** | [BQN](https://mlochbaum.github.io/BQN) | MIT |
### Older or Unmaintained Language Bindings
These are older raylib bindings that are more than 2 versions old or have not been maintained.
| name | raylib version | language | repo |
|:------------------:|:-------------: | :--------:|----------------------------------------------------------------------|
| raylib-cppsharp | 2.5 | [C#](https://en.wikipedia.org/wiki/C_Sharp_(programming_language)) | https://github.com/phxvyper/raylib-cppsharp |
| RaylibFS | 2.5 | [F#](https://fsharp.org/) | https://github.com/dallinbeutler/RaylibFS |
| raylib_d | 2.5 | [D](https://dlang.org/) | https://github.com/Sepheus/raylib_d |
| bindbc-raylib | 3.0 | [D](https://dlang.org/) | https://github.com/o3o/bindbc-raylib |
| go-raylib | 3.5 | [Go](https://golang.org/) | https://github.com/chunqian/go-raylib |
| raylib-goplus | 2.6-dev | [Go](https://golang.org/) | https://github.com/Lachee/raylib-goplus |
| ray-go | 2.6-dev | [Go](https://golang.org/) | https://github.com/hecate-tech/ray-go |
| raylib-luamore | 3.0 | [Lua](http://www.lua.org/) | https://github.com/HDPLocust/raylib-luamore |
| LuaJIT-Raylib | 2.6 | [Lua](http://www.lua.org/) | https://github.com/Bambofy/LuaJIT-Raylib |
| raylib-lua-sol | 2.5 | [Lua](http://www.lua.org/) | https://github.com/RobLoach/raylib-lua-sol |
| raylib-lua-ffi | 2.0 | [Lua](http://www.lua.org/) | https://github.com/raysan5/raylib/issues/693 |
| raylib-lua | 1.7 | [Lua](http://www.lua.org/) | https://github.com/raysan5/raylib-lua |
| raylib-nelua | 3.0 | [Nelua](https://nelua.io/) | https://github.com/Andre-LA/raylib-nelua |
| raylib-nim | 2.0 | [Nim](https://nim-lang.org/) | https://github.com/Skrylar/raylib-nim |
| raylib-Nim | 1.7 | [Nim](https://nim-lang.org/) | https://gitlab.com/define-private-public/raylib-Nim |
| nim-raylib | 3.1-dev | [Nim](https://nim-lang.org/) | https://github.com/tomc1998/nim-raylib |
| raylib-haskell | 2.0 | [Haskell](https://www.haskell.org/) | https://github.com/DevJac/raylib-haskell |
| raylib-cr | 2.5-dev | [Crystal](https://crystal-lang.org/) | https://github.com/AregevDev/raylib-cr |
| raylib.cr | 2.0 | [Crystal](https://crystal-lang.org/) | https://github.com/sam0x17/raylib.cr |
| cray | 1.8 | [Crystal](https://crystal-lang.org/) | https://gitlab.com/Zatherz/cray |
| raylib-pas | 3.0 | [Pascal](https://en.wikipedia.org/wiki/Pascal_(programming_language)) | https://github.com/tazdij/raylib-pas |
| raylib-pascal | 2.0 | [Pascal](https://en.wikipedia.org/wiki/Pascal_(programming_language)) | https://github.com/drezgames/raylib-pascal |
| Graphics-Raylib | 1.4 | [Perl](https://www.perl.org/) | https://github.com/athreef/Graphics-Raylib |
| raylib-ruby | 2.6 | [Ruby](https://www.ruby-lang.org/en/) | https://github.com/a0/raylib-ruby |
| raylib-ruby-ffi | 2.0 | [Ruby](https://www.ruby-lang.org/en/) | https://github.com/D3nX/raylib-ruby-ffi |
| raylib-mruby | 2.5-dev | [mruby](https://github.com/mruby/mruby) | https://github.com/lihaochen910/raylib-mruby |
| raylib-java | 2.0 | [Java](https://en.wikipedia.org/wiki/Java_(programming_language)) | https://github.com/XoanaIO/raylib-java |
| clj-raylib | 3.0 | [Clojure](https://clojure.org/) | https://github.com/lsevero/clj-raylib |
| QuickJS-raylib | 3.0 | [QuickJS](https://bellard.org/quickjs/) | https://github.com/sntg-p/QuickJS-raylib |
| raylib-duktape | 2.6 | [JavaScript (Duktape)](https://en.wikipedia.org/wiki/JavaScript) | https://github.com/RobLoach/raylib-duktape |
| raylib-v7 | 3.5 | [JavaScript (v7)](https://en.wikipedia.org/wiki/JavaScript) | https://github.com/Rabios/raylib-v7 |
| raylib-chaiscript | 2.6 | [ChaiScript](http://chaiscript.com/) | https://github.com/RobLoach/raylib-chaiscript |
| raylib-squirrel | 2.5 | [Squirrel](http://www.squirrel-lang.org/) | https://github.com/RobLoach/raylib-squirrel |
| racket-raylib-2d | 2.5 | [Racket](https://racket-lang.org/) | https://github.com/arvyy/racket-raylib-2d |
| raylib-php-ffi | 2.4-dev | [PHP](https://en.wikipedia.org/wiki/PHP) | https://github.com/oraoto/raylib-php-ffi |
| raylib-haxe | 2.4 | [Haxe](https://haxe.org/) | https://github.com/ibilon/raylib-haxe |
| ringraylib | 2.6 | [Ring](http://ring-lang.sourceforge.net/) | https://github.com/ringpackages/ringraylib |
| raylib-scm | 2.5 | [Chicken Scheme](https://www.call-cc.org/) | https://github.com/yashrk/raylib-scm |
| raylib-chibi | 2.5 | [Chibi-Scheme](https://github.com/ashinn/chibi-scheme) | https://github.com/VincentToups/raylib-chibi |
| raylib-gambit-scheme | 3.1-dev | [Gambit Scheme](https://github.com/gambit/gambit) | https://github.com/georgjz/raylib-gambit-scheme |
| Euraylib | 3.0 | [Euphoria](https://openeuphoria.org/) | https://github.com/gAndy50/Euraylib |
| raylib-odin | 3.0 | [Odin](https://odin-lang.org/) | https://github.com/kevinw/raylib-odin |
| vraylib | 3.5 | [V](https://vlang.io/) | https://github.com/waotzi/vraylib |
| raylib-vala | 3.0 | [Vala](https://wiki.gnome.org/Projects/Vala) | https://code.guddler.uk/mart/raylibVapi |
| raylib-jai | 3.1-dev | [Jai](https://github.com/BSVino/JaiPrimer/blob/master/JaiPrimer.md) | https://github.com/kujukuju/raylib-jai |
| ray.zig | 2.5 | [Zig](https://ziglang.org/) | https://github.com/BitPuffin/zig-raylib-experiments |
| raylib-Ada | 3.0 | [Ada](https://www.adacore.com/about-ada) | https://github.com/mimo/raylib-Ada |
| jaylib | 3.0 | [Janet](https://janet-lang.org/) | https://github.com/janet-lang/jaylib |
| raykit | ? | [Kit](https://www.kitlang.org/) | https://github.com/Gamerfiend/raykit |
| ray.mod | 3.0 | [BlitzMax](https://blitzmax.org/) | https://github.com/bmx-ng/ray.mod |
| raylib-mosaic | 3.0 | [Mosaic](https://github.com/sal55/langs/tree/master/Mosaic) | https://github.com/pluckyporcupine/raylib-mosaic |
| raylib-xdpw | 2.6 | [XD Pascal](https://github.com/vtereshkov/xdpw) | https://github.com/vtereshkov/raylib-xdpw |
| raylib-carp | 3.0 | [Carp](https://github.com/carp-lang/Carp) | https://github.com/pluckyporcupine/raylib-carp |
| raylib-fb | 3.0 | [FreeBasic](https://www.freebasic.net/) | https://github.com/IchMagBier/raylib-fb |
| raylib-purebasic | 3.0 | [PureBasic](https://www.purebasic.com/) | https://github.com/D-a-n-i-l-o/raylib-purebasic |
| raylib-ats2 | 3.0 | [ATS2](http://www.ats-lang.org/) | https://github.com/mephistopheles-8/raylib-ats2 |
| raylib-beef | 3.0 | [Beef](https://www.beeflang.org/) | https://github.com/M0n7y5/raylib-beef |
| raylib-never | 3.0 | [Never](https://github.com/never-lang/never) | https://github.com/never-lang/raylib-never |
| raylib.cbl | 2.0 | [COBOL](https://en.wikipedia.org/wiki/COBOL) | *[code examples](https://github.com/Martinfx/Cobol/tree/master/OpenCobol/Games/raylib)* |
These are older raylib bindings that are more than 2 versions old or have not been maintained.
| Name | raylib Version | Language |
| ---------------------------------------------------------------------------------- | :------------: | :---------------------------------------------------------------------: |
| [raylib-cppsharp](https://github.com/phxvyper/raylib-cppsharp) | 2.5 | [C#](https://en.wikipedia.org/wiki/C_Sharp_(programming_language)) |
| [RaylibFS](https://github.com/dallinbeutler/RaylibFS) | 2.5 | [F#](https://fsharp.org) |
| [raylib\*d](https://github.com/Sepheus/raylib_d) | 2.5 | [D](https://dlang.org) |
| [bindbc-raylib](https://github.com/o3o/bindbc-raylib) | 3.0 | [D](https://dlang.org) |
| [go-raylib](https://github.com/chunqian/go-raylib) | 3.5 | [Go](https://golang.org) |
| [raylib-goplus](https://github.com/Lachee/raylib-goplus) | 2.6-dev | [Go](https://golang.org) |
| [ray-go](https://github.com/hecate-tech/ray-go) | 2.6-dev | [Go](https://golang.org) |
| [raylib-luamore](https://github.com/HDPLocust/raylib-luamore) | 3.0 | [Lua](http://www.lua.org) |
| [LuaJIT-Raylib](https://github.com/Bambofy/LuaJIT-Raylib) | 2.6 | [Lua](http://www.lua.org) |
| [raylib-lua-sol](https://github.com/RobLoach/raylib-lua-sol) | 2.5 | [Lua](http://www.lua.org) |
| [raylib-lua-ffi](https://github.com/raysan5/raylib/issues/693) | 2.0 | [Lua](http://www.lua.org) |
| [raylib-lua](https://github.com/raysan5/raylib-lua) | 1.7 | [Lua](http://www.lua.org) |
| [raylib-nelua](https://github.com/Andre-LA/raylib-nelua) | 3.0 | [Nelua](https://nelua.io) |
| [raylib-nim](https://github.com/Skrylar/raylib-nim) | 2.0 | [Nim](https://nim-lang.org) |
| [raylib-Nim](https://gitlab.com/define-private-public/raylib-Nim) | 1.7 | [Nim](https://nim-lang.org) |
| [nim-raylib](https://github.com/tomc1998/nim-raylib) | 3.1-dev | [Nim](https://nim-lang.org) |
| [raylib-Forever](https://github.com/Guevara-chan/Raylib-Forever) | auto | [Nim](https://nim-lang.org) |
| [NimraylibNow!](https://github.com/greenfork/nimraylib_now) | 4.2 | [Nim](https://nim-lang.org) |
| [raylib-haskell](https://github.com/DevJac/raylib-haskell) | 2.0 | [Haskell](https://www.haskell.org) |
| [raylib-cr](https://github.com/AregevDev/raylib-cr) | 2.5-dev | [Crystal](https://crystal-lang.org) |
| [raylib.cr](https://github.com/sam0x17/raylib.cr) | 2.0 | [Crystal](https://crystal-lang.org) |
| [cray](https://gitlab.com/Zatherz/cray) | 1.8 | [Crystal](https://crystal-lang.org) |
| [raylib-pas](https://github.com/tazdij/raylib-pas) | 3.0 | [Pascal](https://en.wikipedia.org/wiki/Pascal*(programming*language)) |
| [raylib-pascal](https://github.com/drezgames/raylib-pascal) | 2.0 | [Pascal](https://en.wikipedia.org/wiki/Pascal*(programming*language)) |
| [Graphics-Raylib](https://github.com/athreef/Graphics-Raylib) | 1.4 | [Perl](https://www.perl.org) |
| [raylib-ruby](https://github.com/a0/raylib-ruby) | 2.6 | [Ruby](https://www.ruby-lang.org/en) |
| [raylib-ruby-ffi](https://github.com/D3nX/raylib-ruby-ffi) | 2.0 | [Ruby](https://www.ruby-lang.org/en) |
| [raylib-mruby](https://github.com/lihaochen910/raylib-mruby) | 2.5-dev | [mruby](https://github.com/mruby/mruby) |
| [raylib-java](https://github.com/XoanaIO/raylib-java) | 2.0 | [Java](https://en.wikipedia.org/wiki/Java*(programming_language)) |
| [clj-raylib](https://github.com/lsevero/clj-raylib) | 3.0 | [Clojure](https://clojure.org) |
| [QuickJS-raylib](https://github.com/sntg-p/QuickJS-raylib) | 3.0 | [QuickJS](https://bellard.org/quickjs) |
| [raylib-duktape](https://github.com/RobLoach/raylib-duktape) | 2.6 | [JavaScript (Duktape)](https://en.wikipedia.org/wiki/JavaScript) |
| [raylib-v7](https://github.com/Rabios/raylib-v7) | 3.5 | [JavaScript (v7)](https://en.wikipedia.org/wiki/JavaScript) |
| [raylib-chaiscript](https://github.com/RobLoach/raylib-chaiscript) | 2.6 | [ChaiScript](http://chaiscript.com) |
| [raylib-squirrel](https://github.com/RobLoach/raylib-squirrel) | 2.5 | [Squirrel](http://www.squirrel-lang.org) |
| [racket-raylib-2d](https://github.com/arvyy/racket-raylib-2d) | 2.5 | [Racket](https://racket-lang.org) |
| [raylib-php-ffi](https://github.com/oraoto/raylib-php-ffi) | 2.4-dev | [PHP](https://en.wikipedia.org/wiki/PHP) |
| [raylib-haxe](https://github.com/ibilon/raylib-haxe) | 2.4 | [Haxe](https://haxe.org) |
| [ringraylib](https://github.com/ringpackages/ringraylib) | 2.6 | [Ring](http://ring-lang.sourceforge.net) |
| [raylib-scm](https://github.com/yashrk/raylib-scm) | 2.5 | [Chicken Scheme](https://www.call-cc.org) |
| [raylib-chibi](https://github.com/VincentToups/raylib-chibi) | 2.5 | [Chibi-Scheme](https://github.com/ashinn/chibi-scheme) |
| [raylib-gambit-scheme](https://github.com/georgjz/raylib-gambit-scheme) | 3.1-dev | [Gambit Scheme](https://github.com/gambit/gambit) |
| [Euraylib](https://github.com/gAndy50/Euraylib) | 3.0 | [Euphoria](https://openeuphoria.org) |
| [raylib-odin](https://github.com/kevinw/raylib-odin) | 3.0 | [Odin](https://odin-lang.org) |
| [vraylib](https://github.com/waotzi/vraylib) | 3.5 | [V](https://vlang.io) |
| [raylib-vala](https://code.guddler.uk/mart/raylibVapi) | 3.0 | [Vala](https://wiki.gnome.org/Projects/Vala) |
| [raylib-jai](https://github.com/kujukuju/raylib-jai) | 3.1-dev | [Jai](https://github.com/BSVino/JaiPrimer/blob/master/JaiPrimer.md) |
| [ray.zig](https://github.com/BitPuffin/zig-raylib-experiments) | 2.5 | [Zig](https://ziglang.org) |
| [raylib-Ada](https://github.com/mimo/raylib-Ada) | 3.0 | [Ada](https://www.adacore.com/about-ada) |
| [raykit](https://github.com/Gamerfiend/raykit) | **???** | [Kit](https://www.kitlang.org) |
| [ray.mod](https://github.com/bmx-ng/ray.mod) | 3.0 | [BlitzMax](https://blitzmax.org) |
| [raylib-mosaic](https://github.com/pluckyporcupine/raylib-mosaic) | 3.0 | [Mosaic](https://github.com/sal55/langs/tree/master/Mosaic) |
| [raylib-xdpw](https://github.com/vtereshkov/raylib-xdpw) | 2.6 | [XD Pascal](https://github.com/vtereshkov/xdpw) |
| [raylib-carp](https://github.com/sacredbirdman/raylib-carp) | 3.0 | [Carp](https://github.com/carp-lang/Carp) |
| [raylib-fb](https://github.com/IchMagBier/raylib-fb) | 3.0 | [FreeBasic](https://www.freebasic.net) |
| [raylib-purebasic](https://github.com/D-a-n-i-l-o/raylib-purebasic) | 3.0 | [PureBasic](https://www.purebasic.com) |
| [raylib-ats2](https://github.com/mephistopheles-8/raylib-ats2) | 3.0 | [ATS2](http://www.ats-lang.org) |
| [raylib-beef](https://github.com/M0n7y5/raylib-beef) | 3.0 | [Beef](https://www.beeflang.org) |
| [raylib-never](https://github.com/never-lang/raylib-never) | 3.0 | [Never](https://github.com/never-lang/never) |
| [raylib.cbl](https://github.com/Martinfx/Cobol/tree/master/OpenCobol/Games/raylib) | 2.0 | [COBOL](https://en.wikipedia.org/wiki/COBOL) |
Missing some language or wrapper? Feel free to create a new one! :)

723
CHANGELOG
View file

@ -1,7 +1,718 @@
changelog
---------
Current Release: raylib 4.5.0 (18 March 2023)
Current Release: raylib 5.5 (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)
-------------------------------------------------------------------------
KEY CHANGES:
- REDESIGNED: rcore module platform-split, by @ubkp, @michaelfiber, @Bigfoot71, @raysan5
- ADDED: New platform backend supported: SDL
- ADDED: New platform backend supported: Nintendo Switch (closed source)
- ADDED: New Splines drawing and evaluation API
- ADDED: New pseudo-random numbers generator: rprand
- ADDED: Automation Events System API
- UPDATED: raygui 4.0: New version of this immediate-mode gui system for tools development with raylib
Detailed changes:
[rcore] ADDED: RAYLIB_VERSION_* values to raylib.h (#2856) by @RobLoach
[rcore] ADDED: IsKeyPressedRepeat() on PLATFORM_DESKTOP (#3245) by @actondev
[rcore] ADDED: SetWindowTitle() for PLATFORM_WEB (#3222) by @VitusVeit
[rcore] ADDED: FLAG_WINDOW_RESIZABLE for web (#3305) by @Peter0x44
[rcore] ADDED: SetWindowMaxSize() for desktop and web (#3309) by @ubkp
[rcore] ADDED: SetMouseCursor() for PLATFORM_WEB (#3414) by @BeardedBread
[rcore] ADDED: LoadRandomSequence()/UnloadRandomSequence() by @raysan5
[rcore] REMOVED: PLATFORM_RPI (#3232) by @michaelfiber
[rcore] REVIEWED: GetFileLength(), added comment (#3262) by @raysan5
[rcore] REVIEWED: Default shaders precission issue on PLATFORM_WEB (#3261) by @branc116
[rcore] REVIEWED: IsKey*() key validation checks (#3256) by @n77y
[rcore] REVIEWED: SetClipboardText() for PLATFORM_WEB (#3257) by @ubkp
[rcore] REVIEWED: Check if Ctrl modifier is among the currently set modifiers (#3230) by @mohad12211
[rcore] REVIEWED: Android app black screen when reopening by @Bigfoot71
[rcore] REVIEWED: Warnings when casting int to floats (#3218) by @JeffM2501
[rcore] REVIEWED: GetCurrentMonitor() detection inconsistency issue (#3215) by @ubkp
[rcore] REVIEWED: SetWindowMonitor() to no longer force fullscreen (#3209) by @ubkp
[rcore] REVIEWED: Fix mouse wheel not working in PLATFORM_RPI or PLATFORM_DRM (#3193) by @ubkp
[rcore] REVIEWED: GetMonitorName() description (#3184) (#3189) by @danilwhale
[rcore] REVIEWED: BeginScissorMode(), identify rendering to texture (#3510) by @gulrak
[rcore] REVIEWED: Window flags order (#3114) by @lesleyrs
[rcore] REVIEWED: Full movement for right analog stick (#3095) by @PixelPhobicGames
[rcore] REVIEWED: Fix Android app freeze after calling CloseWindow() (#3067) by @Bigfoot71
[rcore] REVIEWED: Lazy loading of default font used on image drawing (no InitWindow) by @raysan5
[rcore] REVIEWED: Minor tweaks to raylib events automation system @raysan5
[rcore] REVIEWED: GetCurrentMonitor() bugfix (#3058) by @hamyyy
[rcore] REVIEWED: Update CORE.Input.Touch.pointCount (#3024) by @raysan5
[rcore] REVIEWED: Mouse offset and scaling must be considered also on web!
[rcore] REVIEWED: CompressData(), possible stack overflow
[rcore] REVIEWED: GetWorldToScreenEx() (#3351) by @Brian-ED
[rcore] REVIEWED: Fix GetMouseDelta() issue for Android (#3404) by @Bigfoot71
[rcore] REVIEWED: GetFPS(), reset FPS averages when window is inited (#3445) by @JeffM2501
[rcore] REVIEWED: GetCurrentMonitor(), check window center position by @M374LX
[rcore] REVIEWED: GetRender*() issue on macOS highDPI (#3367) by @raysan5
[rcore] REVIEWED: ScanDirectoryFiles*(), paths building slashes sides (#3507)
[rlgl] ADDED: Experimental support for OpenGL ES 3.0 by @raysan5
[rlgl] ADDED: Support 16-Bit HDR textures (#3220) by @Not-Nik
[rlgl] ADDED: rlEnablePointMode() (#3490) by @JettMonstersGoBoom
[rlgl] ADDED: rlBlitFramebuffer(), required for deferred render
[rlgl] REVIEWED: LoadModel(), removed cube fallback mechanism (#3459)
[rlgl] REVIEWED: Improved support for ES3/WebGL2 (#3107) by @chemaguerra
[rlgl] REVIEWED: OpenGL 2.1 half floats support as part of an extension by @Not-Nik
[rlgl] REVIEWED: Avoid shader attribute not found log by @raysan5
[rlgl] REVIEWED: Avoid tracelog about not found uniforms (#3003) by @raysan5
[rlgl] REVIEWED: rLoadTexture() UBSAN complaints #1891 (#3321) by @Codom
[rlgl] REVIEWED: glInternalFormat as unsigned int
[rlgl] REVIEWED: OpenGL ES 3.0 support
[rshapes] ADDED: Spline drawing functions by @raysan5
[rshapes] ADDED: GetSplinePoint*() functions for spline evaluation by @raysan5
[rshapes] ADDED: DrawCircleLinesV() for consistency (#3452) by @Peter0x44
[rshapes] REVIEWED: DrawSplineCatmullRom() by @raysan5
[rshapes] REVIEWED: Minor fix in DrawLineBezier* (#3006) by @eternalStudent
[rshapes] REVIEWED: GetCollisionRec(), more performant (#3052) by @manuel5975p
[rshapes] REVIEWED: Fix off-by-one error in CheckCollisionPointRec() (#3022) by @dbechrd
[rtextures] ADDED: Basic SVG loading support (#2738) by @bXi
[rtextures] ADDED: Support 16-Bit HDR textures (#3220) by @Not-Nik
[rtextures] ADDED: ExportImageToMemory() by @raysan5
[rtextures] ADDED: ImageRotate() (#3078) by @danemadsen
[rtextures] ADDED: GenImageGradientSquare() (#3077) by @danemadsen
[rtextures] ADDED: GenImageLinearGradient() by @danemadsen
[rtextures] REMOVED: GenImageGradientH() and GenImageGradientV() by @danemadsen
[rtextures] REVIEWED: LoadImageSvg() by @raysan5
[rtextures] REVIEWED: Uninitialized thread-locals in stbi (#3282) (#3283) by @jbarthelmes
[rtextures] REVIEWED: ImageDrawRectangleRec(), validate drawing inside bounds by @JeffM2501
[rtextures] REVIEWED: LoadTextureCubemap() for manual layouts (#3204) by @Not-Nik
[rtextures] REVIEWED: Optimization of ImageDrawRectangleRec() (#3185) by @smalltimewizard
[rtextures] REVIEWED: ImageRotate() formatting by @raysan5
[rtextures] REVIEWED: GenImagePerlinNoise(), clamp values (#3071) by @raysan5
[rtextures] REVIEWED: Packing logic error in GenImageFontAtlas() (#2979) by @hanaxar
[rtextures] REVIEWED: Calculate exact image size in GenImageFontAtlas() (#2963) by @hanaxar
[rtextures] REVIEWED: ImageDrawRectangleRec() (#3027) by @raysan5
[rtextures] REVIEWED: ImageDraw() source clipping when drawing beyond top left (#3306) by @RobLoach
[rtextures] REVIEWED: UnloadRenderTexture(), additional checks
[rtextures] REVIEWED: Fixed compressed DDS texture loading issues (#3483) by @JaanDev
[rtext] ADDED: Font altas white rectangle and flag SUPPORT_FONT_ATLAS_WHITE_REC by @raysan5
[rtext] ADDED: SetTextLineSpacing() to define line breaks text drawing spacing by @raysan5
[rtext] RENAMED: LoadFont*() parameter names for consistency and coherence by @raysan5
[rtext] REVIEWED: GetCodepointCount(), ignore unused return value of GetCodepointNext by @ashn-dot-dev
[rtext] REVIEWED: TextFormat() warn user if buffer overflow occured (#3399) by @Murlocohol
[rtext] REVIEWED: TextFormat(), added "..." for truncation (#3366) by @raysan5
[rtext] REVIEWED: GetGlyphIndex() (#3000) by @raysan5
[rtext] REVIEWED: GetCodepointNext() to return default value by @chocolate42
[rtext] REVIEWED: TextToPascal() issue when first char is uppercase
[rmodels] ADDED: ModelAnimation.name field, initially with GLTF animation names by @alfredbaudisch
[rmodels] REDESIGNED: LoadOBJ(), avoid mesh splitting by materials, fix (#3398) by @raysan5
[rmodels] REVIEWED: Support .vox model files version 200 (#3097) by @Bigfoot71
[rmodels] REVIEWED: Materials loading (#3126) @raysan5
[rmodels] REVIEWED: DrawBillboardPro() to allow source of negative size (#3197) by @bohonghuang
[rmodels] REVIEWED: glTF loading segfault in animNormals memcpy by @charles-l
[rmodels] REVIEWED: LoadModelAnimationsGLTF(), free fileData after use (#3065) by @crynux
[rmodels] REVIEWED: GenMeshCubicmap(), correction of values (#3032) by @Bigfoot71
[rmodels] REVIEWED: DrawMesh() to avoid UBSAN complaining (#1891)
[rmodels] REVIEWED: GenMeshPlane() when resX != resZ (#3425) by @neyrox, @s-yablonskiy
[rmodels] REVIEWED: GetModelBoundingBox() (#3485)
[raudio] ADDED: LoadSoundAlias() by @JeffM2501
[raudio] ADDED: Missing structure on standalone mode (#3160) by @raysan5
[raudio] ADDED: GetMasterVolume() (#3434) by @rexim
[raudio] REVIEWED: Comments about sample format to AttachAudioStreamProcessor() (#3188) by @AlbertoGP
[raudio] REVIEWED: Documented buffer format for audio processors (#3186) by @AlbertoGP
[raudio] REVIEWED: ExportWaveAsCode() file saving by @RadsammyT
[raudio] REVIEWED: Fix warning on discarded const qualifier (#2967) by @RobLoach
[raudio] REVIEWED: Move mutex initialization before ma_device_start() (#3325) by @Bigfoot71
[raudio] REVIEWED: Fix UpdateSound() parameter name (#3405) by @KislyjKisel
[raudio] REVIEWED: Fix QOA seeking (#3494) by @veins1
[rcamera] REVIEWED: File-macros for consistency (#3161) by @raysan5
[rcamera] REVIEWED: Support analog stick camera controls (#3066) by @PixelPhobicGames
[rcamera] REVIEWED: CameraMoveToTarget(), ensure distance is greater than 0 (#3031) by @kolunmi
[rcamera] REVIEWED: Exposing rcamera functions to the dll (#3355) by @JeffM2501
[raymath] ADDED: Vector3Projection() and Vector3Rejection() (#3263) by @Dial0
[raymath] ADDED: EPSILON macro to each function requiring it (#3330) by @Brian-ED
[raymath] REVIEWED: Usage of 'sinf()' and 'cosf()' to be correct (#3181) by @RokasPuzonas
[raymath] REVIEWED: Slightly optimized Vector3Normalize() (#2982) by @RicoP
[raymath] REVIEWED: Comment to clarify raymath semantics by @raysan5
[raymath] REVIEWED: Comment about Matrix conventions by @raysan5
[raymath] REVIEWED: Vector2Angle() and Vector2LineAngle() (#3396) by @Murlocohol
[rgestures] REVIEWED: Optimize and simplify the gesture system (#3190) by @ubkp
[rgestures] REVIEWED: GESTURE_DRAG and GESTURE_SWIPE_* issues (mostly) for web (#3183) by @ubkp
[rgestures] REVIEWED: Touch pointCount for web (#3163) by @ubkp
[rgestures] REVIEWED: IsGestureDetected() parameter type
[utils] ADDED: Security checks to file reading (memory allocations) by @raysan5
[utils] REVIEWED: LoadFileData() potential issues with dataSize
[examples] ADDED: shaders_lightmap (#3043) by @nullstare
[examples] ADDED: core_2d_camera_split_screen (#3298) by @gabrielssanches
[examples] ADDED: LoadSoundAlias() usage example (#3223) by @JeffM2501
[examples] ADDED: textures_tiling (#3353) by @luis605
[examples] ADDED: shader_deferred_render (#3496) by @27justin
[examples] RENAMED: 2d_camera examples for consistency
[examples] REVIEWED: Text examples SetTextLineSpacing() to multiline examples by @raysan5
[examples] REVIEWED: examples/shapes/shapes_collision_area.c help instructions (#3279) by @asdqwe
[examples] REVIEWED: examples/shaders/shaders_texture_outline.c help instructions (#3278) by @asdqwe
[examples] REVIEWED: examples/others/easings_testbed.c help instructions and small twe… by @asdqwe
[examples] REVIEWED: example/audio/audio_module_player.c help instructions and small b… by @asdqwe
[examples] REVIEWED: example/models/models_loading_m3d.c controls (#3269) by @asdqwe
[examples] REVIEWED: example/models/models_loading_gltf.c controls (#3268) by @asdqwe
[examples] REVIEWED: text_unicode.c example crashing (#3250) by @ubkp
[examples] REVIEWED: rlgl_standalone.c compilation issue (#3242) by @ubkp
[examples] REVIEWED: core_input_gestures for Web (#3172) by @ubkp
[examples] REVIEWED: core_input_gamepad (#3110) by @iacore
[examples] REVIEWED: examples using raygui to raygui 4.0 by @raysan5
[examples] REVIEWED: Julia set shader example (#3467) by @joshcol9232
[build] ADDED: CMake option for SUPPORT_CUSTOM_FRAME_CONTROL (#3221) by @ubkp
[build] ADDED: New BORDERLESS_WINDOWED_MODE for PLATFORM_DESKTOP (#3216) by @ubkp
[build] ADDED: New examples to VS2022 solution by @raysan5
[build] REVIEWED: Updated Makefile and Makefile.Web, include new examples
[build] REVIEWED: Fix CMake extraneous -lglfw (#3266) by @iacore
[build] REVIEWED: Add missing cmake options (#3267) by @asdqwe
[build] REVIEWED: Match CMakeOptions.txt options default values (#3258) by @asdqwe
[build] REVIEWED: Add build.zig options for individual modules (#3254) by @actondev
[build] REVIEWED: build.zig to work with cross-compiling (#3225) by @yujiri8
[build] REVIEWED: Makefile build on PLATFORM_ANDROID, soname (#3211) by @ndytts
[build] REVIEWED: src/Makefile, fix misleading indentation (#3202) by @ashn-dot-dev
[build] REVIEWED: build.zig: Support for building with PLAFORM_DRM (#3191) by @jakubvf
[build] REVIEWED: Update CMakeOptions.txt by @raysan5
[build] REVIEWED: fix: cmake option "OPENGL_VERSION" doesn't work (#3170) by @royqh1979
[build] REVIEWED: Add error if raylib.h is included in a C++98 program (#3093) by @Peter0x44
[build] REVIEWED: Cross compilation for PLATFORM_DRM (#3091) by @TheLastBilly
[build] REVIEWED: build.zigm fixed cross-compiling from Linux (#3090)by @yujiri8
[build] REVIEWED: Enhanced cmake part for OpenBSD (#3086) by @rayit
[build] REVIEWED: Fixed compile on OpenBSD (#3085)by @rayit
[build] REVIEWED: CMake project example: fix a couple of typos (#3014) by @benjamin-thomas
[build] REVIEWED: Fix warnings in raylib for MSVC (#3004) by @JeffM2501
[build] REVIEWED: Update cmake example project (#3062) by @lesleyrs
[build] REVIEWED: Update build.zig be be able to build with current zig master (#3064) by @ryupold
[build] REVIEWED: VSCode project template (#3048) by @Shoozza
[build] REVIEWED: Fixed broken build.zig files. Now works with latest stable compiler (… by @Gamer-Kold
[build] REVIEWED: Fix missing symbol when rglfw.c on BSD platforms (#2968) by @Koromix
[build] REVIEWED: Update Makefile comment to indicate arm64 as a supported Linux deskto… @ashn-dot-dev
[build] REVIEWED: Update Makefile : clean raygui.c & physac.c (#3296) by @SuperUserNameMan
[build] REVIEWED: Update webassembly.yml and linux.yml
[build] REVIEWED: Update zig build system to zig version 0.11.0 (#3393) by @purple4pur
[build] REVIEWED: Fix for latest zig master (#3037) by @star-tek-mb
[build] REVIEWED: Examples Makefile to use Makefile.Web when building for web (#3449) by @keithstellyes
[build] REVIEWED: build.zig updates for 0.11.0 release. (#3501) by @cabarger
[build] REVIEWED: Support OpenGL ES 3.0 building on Web platform
[build] REVIEWED: Fix warnings in Visual Studio (#3512) by @JeffM2501
[build] REVIEWED: OpenGL ES 3.0 flags on CMakeOptions (#3514) by @awfulcooking
[bindings] ADDED: fortran-raylib
[bindings] ADDED: raylib-raku to bindings (#3299) by @vushu
[bindings] ADDED: claw-raylib to BINDINGS.md (#3310) by @bohonghuang
[bindings] ADDED: vaiorabbit/raylib-bindings (#3318) by @wilsonsilva
[bindings] ADDED: TurboRaylib (#3317) by @turborium
[bindings] ADDED: raylib-ffi to bindings list (#3164) by @ewpratten
[bindings] ADDED: raylib-pkpy-bindings (#3361) by @blueloveTH
[bindings] ADDED: Raylib.lean to BINDINGS.md (#3409) by @KislyjKisel
[bindings] UPDATED: BINDINGS.md (#3217) by @joseph-montanez
[bindings] UPDATED: BINDINGS.md to include rayjs (#3212) by @mode777
[bindings] UPDATED: latest h-raylib version (#3166) by @Anut-py
[bindings] UPDATED: bindbd-raylib3 to raylib 4.5 (#3157) by @o3o
[bindings] UPDATED: Janet bindings supported version update (#3083)by @archydragon
[bindings] UPDATED: BINDINGS.md (raylib-py -> 4.5) (#2992) by @overdev
[bindings] UPDATED: BINDINGS.md (raylib-lua -> 4.5) (#2989) by @TSnake41
[bindings] UPDATED: raylib-d binding version to 4.5 (#2988) by @schveiguy
[bindings] UPDATED: raylib-freebasic to 4.5 (#2986) by @WIITD
[bindings] UPDATED: BINDINGS.md (#2983) by @jarroddavis68
[bindings] UPDATED: BINDINGS.md for raylib Odin 4.5 (#2981) by @gingerBill
[bindings] UPDATED: BINDINGS.md (#2980) by @GuvaCode
[bindings] UPDATED: BINDINGS.md (#3002) by @fubark
[bindings] UPDATED: BINDINGS.md (#3053) by @JupiterRider
[bindings] UPDATED: BINDINGS.md (#3050) by @Its-Kenta
[bindings] UPDATED: CL bindings version (#3049) by @shelvick
[bindings] UPDATED: BINDINGS.md (#3026) by @ChrisDill
[bindings] UPDATED: BINDINGS.md (#3023) by @sDos280
[bindings] UPDATED: BINDINGS.md (#3017) by @Soutaisei
[bindings] UPDATED: Various versions to 4.5 (#2974) by @RobLoach
[bindings] UPDATED: raylib.zig version to 4.5 (#2971) by @ryupold
[bindings] UPDATED: h-raylib version (#2970) by @Anut-py
[bindings] UPDATED: Factor's raylib binding to v4.5 (#3350) by @WraithGlade
[bindings] UPDATED: raylib-ocaml bindings to 4.5 version (#3322) by @tjammer
[bindings] UPDATED: Jaylib binding (#3508) by @glowiak
[external] UPDATED: sdefl and sinfl DEFLATE compression libraries by @raysan5
[external] UPDATED: miniaudio v0.11.12 --> v0.11.19 by @raysan5
[external] UPDATED: rl_gputex.h compressed images loading library by @raysan5
[external] UPDATED: Replaced stb_image_resize.c by stb_image_resize2.h (#3403) by @BabakSamimi
[external] UPDATED: qoi and qoa libraries
[external] UPDATED: stb libraries (required ones)
[external] UPDATED: cgltf and m3d libraries
[external] REVIEWED: msf_gif.h, some warnings
[external] REVIEWED: sinfl external library to avoid ASAN complaints (#3349) by @raysan5
[misc] ADDED: New task point to issue template about checking the wiki (#3169) by @ubkp
[misc] ADDED: CodeQL for static code analysis (#3476) by @b4yuan
[misc] REVIEWED: Update FAQ.md by @raysan5
[misc] REVIEWED: Potential code issues reported by CodeQL (#3476)
[misc] REVIEWED: Fix a link in the FAQ (#3082)by @jasonliang-dev
[misc] REVIEWED: New file formats to FAQ (#3079) by @Luramoth
[misc] REVIEWED: Make assets loading extension case insensitive #3008 by @raysan5
[misc] REVIEWED: Updated web shells open-graph info by @raysan5
-------------------------------------------------------------------------
Release: raylib 4.5 (18 March 2023)
@ -402,7 +1113,7 @@ Release: raylib 4.0 - 8th Anniversary Edition (05 November 2021)
KEY CHANGES:
- Naming consistency and coherency: Complete review of the library: syntax, naming, comments, decriptions, logs...
- Event Automation System: Support for input events recording and automatic re-playing, useful for automated testing and more!
- Custom game-loop control: Intended for advance users that want to control the events polling and the timming mechanisms
- Custom game-loop control: Intended for advanced users that want to control the events polling and the timming mechanisms
- rlgl 4.0: Completely decoupling from platform layer and raylib, intended for standalone usage as single-file header-only
- raymath 1.5: Complete review following new conventions, to make it more portable and self-contained
- raygui 3.0: Complete review and official new release, more portable and self-contained, intended for tools development
@ -445,7 +1156,7 @@ Detailed changes:
[raymath] REVIEWED: QuaternionFromAxisAngle() (#1892)
[raymath] REVIEWED: QuaternionToMatrix() returning transposed result. (#1793) by @object71
[shapes] ADDED: RenderPolyLinesEx() (#1758) by @lambertwang
[shapes] ADDED: DrawLineBezierCubic() (#2021) by @SAOMDVN
[shapes] ADDED: DrawSplineBezierCubic() (#2021) by @SAOMDVN
[textures] ADDED: GetImageColor() #2024
[textures] REMOVED: GenImagePerlinNoise()
[textures] RENAMED: GetTextureData() to LoadImageFromTexture()
@ -583,7 +1294,7 @@ Detailed changes:
[rlgl] REDESIGNED: rlLoadExtensions(), more details exposed
[raymath] REVIEWED: QuaternionFromEuler() (#1651)
[raymath] REVIEWED: MatrixRotateZYX() (#1642)
[shapes] ADDED: DrawLineBezierQuad() (#1468) by @epsilon-phase
[shapes] ADDED: DrawSplineBezierQuad() (#1468) by @epsilon-phase
[shapes] ADDED: CheckCollisionLines()
[shapes] ADDED: CheckCollisionPointLine() by @mkupiec1
[shapes] REVIEWED: CheckCollisionPointTriangle() by @mkupiec1
@ -1665,9 +2376,9 @@ other changes:
[models] Added function DrawCubeTexture()
[models] Added function DrawQuad()
[models] Added function DrawRay()
[models] Simplified funtion DrawPlane()
[models] Simplified function DrawPlane()
[models] Removed function DrawPlaneEx()
[models] Simplified funtion DrawGizmo()
[models] Simplified function DrawGizmo()
[models] Removed function DrawGizmoEx()
[models] Added function LoadModelEx()
[models] Review of function LoadCubicMap()

View file

@ -1,8 +1,8 @@
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.5)
project(raylib)
# Avoid excessive expansion of variables in conditionals. In particular, if
# "PLATFORM" is "DRM" than:
# "PLATFORM" is "DRM" then:
#
# if (${PLATFORM} MATCHES "DRM")
#
@ -13,9 +13,14 @@ project(raylib)
# See https://cmake.org/cmake/help/latest/policy/CMP0054.html
cmake_policy(SET CMP0054 NEW)
# Makes a hidden visibility preset on a static lib respected
# This is used to hide glfw's symbols from the library exports when building an so/dylib
# See https://cmake.org/cmake/help/latest/policy/CMP0063.html
cmake_policy(SET CMP0063 NEW)
# Directory for easier includes
# Anywhere you see include(...) you can check <root>/cmake for that file
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
# RAYLIB_IS_MAIN determines whether the project is being used from root
# or if it is added as a dependency (through add_subdirectory for example).
@ -31,12 +36,26 @@ include(CompilerFlags)
# Registers build options that are exposed to cmake
include(CMakeOptions.txt)
# Enforces a few environment and compiler configurations
include(BuildOptions)
if (UNIX AND NOT APPLE)
if (NOT GLFW_BUILD_WAYLAND AND NOT GLFW_BUILD_X11)
MESSAGE(FATAL_ERROR "Cannot disable both Wayland and X11")
endif()
endif()
# Main sources directory (the second parameter sets the output directory name to raylib)
add_subdirectory(src raylib)
# Uninstall target
if(NOT TARGET uninstall)
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/Uninstall.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
IMMEDIATE @ONLY)
add_custom_target(uninstall
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
endif()
if (${BUILD_EXAMPLES})
MESSAGE(STATUS "Building examples is enabled")
add_subdirectory(examples)

View file

@ -2,94 +2,39 @@
include(CMakeDependentOption)
include(EnumOption)
enum_option(PLATFORM "Desktop;Web;Android;Raspberry Pi;DRM" "Platform to build for.")
enum_option(PLATFORM "Desktop;Web;Android;Raspberry Pi;DRM;SDL" "Platform to build for.")
enum_option(OPENGL_VERSION "OFF;4.3;3.3;2.1;1.1;ES 2.0" "Force a specific OpenGL Version?")
enum_option(OPENGL_VERSION "OFF;4.3;3.3;2.1;1.1;ES 2.0;ES 3.0" "Force a specific OpenGL Version?")
# Configuration options
option(BUILD_EXAMPLES "Build the examples." ${RAYLIB_IS_MAIN})
option(CUSTOMIZE_BUILD "Show options for customizing your Raylib library build." OFF)
option(ENABLE_ASAN "Enable AddressSanitizer (ASAN) for debugging (degrades performance)" OFF)
option(ENABLE_ASAN "Enable AddressSanitizer (ASAN) for debugging (degrades performance)" OFF)
option(ENABLE_UBSAN "Enable UndefinedBehaviorSanitizer (UBSan) for debugging" OFF)
option(ENABLE_MSAN "Enable MemorySanitizer (MSan) for debugging (not recommended to run with ASAN)" OFF)
# Shared library is always PIC. Static library should be PIC too if linked into a shared library
option(WITH_PIC "Compile static library as position-independent code" OFF)
option(BUILD_SHARED_LIBS "Build raylib as a shared library" OFF)
option(MACOS_FATLIB "Build fat library for both i386 and x86_64 on macOS" OFF)
cmake_dependent_option(USE_AUDIO "Build raylib with audio module" ON CUSTOMIZE_BUILD ON)
enum_option(USE_EXTERNAL_GLFW "OFF;IF_POSSIBLE;ON" "Link raylib against system GLFW instead of embedded one")
if(UNIX AND NOT APPLE)
option(USE_WAYLAND "Use Wayland for window creation" OFF)
endif()
# GLFW build options
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)
set(OFF ${INCLUDE_EVERYTHING} CACHE INTERNAL "Replace any OFF by default with \${OFF} to have it covered by this option")
# raylib modules included
cmake_dependent_option(SUPPORT_MODULE_RSHAPES "Include module: rshapes" ON CUSTOMIZE_BUILD ON)
cmake_dependent_option(SUPPORT_MODULE_RTEXTURES "Include module: rtextures" ON CUSTOMIZE_BUILD ON)
cmake_dependent_option(SUPPORT_MODULE_RTEXT "Include module: rtext" ON CUSTOMIZE_BUILD ON)
cmake_dependent_option(SUPPORT_MODULE_RMODELS "Include module: rmodels" ON CUSTOMIZE_BUILD ON)
cmake_dependent_option(SUPPORT_MODULE_RAUDIO "Include module: raudio" ON CUSTOMIZE_BUILD ON)
# DRM build options
option(ENABLE_WAYLAND_DRM_LEASING "Enables DRM leasing in the DRM backend via the Wayland desktop" OFF)
option(DISABLE_EVDEV_INPUT "Disable evdev input in the DRM backend" OFF)
option(SUPPORT_SSH_KEYBOARD_RPI "Support using keyboard input from stdin" ON)
# rcore.c
cmake_dependent_option(SUPPORT_CAMERA_SYSTEM "Provide camera module (rcamera.h) with multiple predefined cameras: free, 1st/3rd person, orbital" ON CUSTOMIZE_BUILD ON)
cmake_dependent_option(SUPPORT_GESTURES_SYSTEM "Gestures module is included (rgestures.h) to support gestures detection: tap, hold, swipe, drag" ON CUSTOMIZE_BUILD ON)
cmake_dependent_option(SUPPORT_MOUSE_GESTURES "Mouse gestures are directly mapped like touches and processed by gestures system" ON CUSTOMIZE_BUILD ON)
cmake_dependent_option(SUPPORT_SSH_KEYBOARD_RPI "Reconfigure standard input to receive key inputs, works with SSH connection" OFF CUSTOMIZE_BUILD OFF)
cmake_dependent_option(SUPPORT_DEFAULT_FONT "Default font is loaded on window initialization to be available for the user to render simple text. If enabled, uses external module functions to load default raylib font (module: text)" ON CUSTOMIZE_BUILD ON)
cmake_dependent_option(SUPPORT_SCREEN_CAPTURE "Allow automatic screen capture of current screen pressing F12, defined in KeyCallback()" ON CUSTOMIZE_BUILD ON)
cmake_dependent_option(SUPPORT_GIF_RECORDING "Allow automatic gif recording of current screen pressing CTRL+F12, defined in KeyCallback()" ON CUSTOMIZE_BUILD ON)
cmake_dependent_option(SUPPORT_BUSY_WAIT_LOOP "Use busy wait loop for timing sync instead of a high-resolution timer" OFF CUSTOMIZE_BUILD OFF)
cmake_dependent_option(SUPPORT_EVENTS_WAITING "Wait for events passively (sleeping while no events) instead of polling them actively every frame" OFF CUSTOMIZE_BUILD OFF)
cmake_dependent_option(SUPPORT_WINMM_HIGHRES_TIMER "Setting a higher resolution can improve the accuracy of time-out intervals in wait functions" OFF CUSTOMIZE_BUILD OFF)
cmake_dependent_option(SUPPORT_COMPRESSION_API "Support for compression API" ON CUSTOMIZE_BUILD ON)
include(ParseConfigHeader)
# rshapes.c
cmake_dependent_option(SUPPORT_QUADS_DRAW_MODE "Use QUADS instead of TRIANGLES for drawing when possible. Some lines-based shapes could still use lines" ON CUSTOMIZE_BUILD ON)
# rtextures.c
cmake_dependent_option(SUPPORT_IMAGE_EXPORT "Support image exporting to file" ON CUSTOMIZE_BUILD ON)
cmake_dependent_option(SUPPORT_IMAGE_GENERATION "Support procedural image generation functionality (gradient, spot, perlin-noise, cellular)" ON CUSTOMIZE_BUILD ON)
cmake_dependent_option(SUPPORT_IMAGE_MANIPULATION "Support multiple image editing functions to scale, adjust colors, flip, draw on images, crop... If not defined only three image editing functions supported: ImageFormat(), ImageAlphaMask(), ImageToPOT()" ON CUSTOMIZE_BUILD ON)
cmake_dependent_option(SUPPORT_FILEFORMAT_PNG "Support loading PNG as textures" ON CUSTOMIZE_BUILD ON)
cmake_dependent_option(SUPPORT_FILEFORMAT_DDS "Support loading DDS as textures" ON CUSTOMIZE_BUILD ON)
cmake_dependent_option(SUPPORT_FILEFORMAT_HDR "Support loading HDR as textures" ON CUSTOMIZE_BUILD ON)
cmake_dependent_option(SUPPORT_FILEFORMAT_PNM "Support loading PNM as textures" ON CUSTOMIZE_BUILD ON)
cmake_dependent_option(SUPPORT_FILEFORMAT_KTX "Support loading KTX as textures" ON CUSTOMIZE_BUILD ON)
cmake_dependent_option(SUPPORT_FILEFORMAT_ASTC "Support loading ASTC as textures" ON CUSTOMIZE_BUILD ON)
cmake_dependent_option(SUPPORT_FILEFORMAT_BMP "Support loading BMP as textures" ${OFF} CUSTOMIZE_BUILD OFF)
cmake_dependent_option(SUPPORT_FILEFORMAT_TGA "Support loading TGA as textures" ${OFF} CUSTOMIZE_BUILD OFF)
cmake_dependent_option(SUPPORT_FILEFORMAT_JPG "Support loading JPG as textures" ${OFF} CUSTOMIZE_BUILD OFF)
cmake_dependent_option(SUPPORT_FILEFORMAT_GIF "Support loading GIF as textures" ${OFF} CUSTOMIZE_BUILD OFF)
cmake_dependent_option(SUPPORT_FILEFORMAT_QOI "Support loading QOI as textures" ${OFF} CUSTOMIZE_BUILD OFF)
cmake_dependent_option(SUPPORT_FILEFORMAT_PSD "Support loading PSD as textures" ${OFF} CUSTOMIZE_BUILD OFF)
cmake_dependent_option(SUPPORT_FILEFORMAT_PKM "Support loading PKM as textures" ${OFF} CUSTOMIZE_BUILD OFF)
cmake_dependent_option(SUPPORT_FILEFORMAT_PVR "Support loading PVR as textures" ${OFF} CUSTOMIZE_BUILD OFF)
# rtext.c
cmake_dependent_option(SUPPORT_FILEFORMAT_FNT "Support loading fonts in FNT format" ON CUSTOMIZE_BUILD ON)
cmake_dependent_option(SUPPORT_FILEFORMAT_TTF "Support loading font in TTF/OTF format" ON CUSTOMIZE_BUILD ON)
cmake_dependent_option(SUPPORT_TEXT_MANIPULATION "Support text manipulation functions" ON CUSTOMIZE_BUILD ON)
# rmodels.c
cmake_dependent_option(SUPPORT_MESH_GENERATION "Support procedural mesh generation functions, uses external par_shapes.h library. NOTE: Some generated meshes DO NOT include generated texture coordinates" ON CUSTOMIZE_BUILD ON)
cmake_dependent_option(SUPPORT_FILEFORMAT_OBJ "Support loading OBJ file format" ON CUSTOMIZE_BUILD ON)
cmake_dependent_option(SUPPORT_FILEFORMAT_MTL "Support loading MTL file format" ON CUSTOMIZE_BUILD ON)
cmake_dependent_option(SUPPORT_FILEFORMAT_IQM "Support loading IQM file format" ON CUSTOMIZE_BUILD ON)
cmake_dependent_option(SUPPORT_FILEFORMAT_GLTF "Support loading GLTF file format" ON CUSTOMIZE_BUILD ON)
cmake_dependent_option(SUPPORT_FILEFORMAT_VOX "Support loading VOX file format" ON CUSTOMIZE_BUILD ON)
# raudio.c
cmake_dependent_option(SUPPORT_FILEFORMAT_WAV "Support loading WAV for sound" ON CUSTOMIZE_BUILD ON)
cmake_dependent_option(SUPPORT_FILEFORMAT_OGG "Support loading OGG for sound" ON CUSTOMIZE_BUILD ON)
cmake_dependent_option(SUPPORT_FILEFORMAT_XM "Support loading XM for sound" ON CUSTOMIZE_BUILD ON)
cmake_dependent_option(SUPPORT_FILEFORMAT_MOD "Support loading MOD for sound" ON CUSTOMIZE_BUILD ON)
cmake_dependent_option(SUPPORT_FILEFORMAT_MP3 "Support loading MP3 for sound" ON CUSTOMIZE_BUILD ON)
cmake_dependent_option(SUPPORT_FILEFORMAT_FLAC "Support loading FLAC for sound" ${OFF} CUSTOMIZE_BUILD OFF)
# utils.c
cmake_dependent_option(SUPPORT_STANDARD_FILEIO "Support standard file io library (stdio.h)" ON CUSTOMIZE_BUILD ON)
cmake_dependent_option(SUPPORT_TRACELOG "Show TraceLog() output messages. NOTE: By default LOG_DEBUG traces not shown" ON CUSTOMIZE_BUILD ON)
foreach(FLAG IN LISTS CONFIG_HEADER_FLAGS)
string(REGEX MATCH "([^=]+)=(.+)" _ ${FLAG})
cmake_dependent_option(${CMAKE_MATCH_1} "" ${CMAKE_MATCH_2} CUSTOMIZE_BUILD ${CMAKE_MATCH_2})
endforeach()

View file

@ -5,13 +5,13 @@ 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?
This document contains a set of guidelines to contribute to the project. These are mostly guidelines, not rules.
Use your best judgement, and feel free to propose changes to this document in a pull request.
Use your best judgment, and feel free to propose changes to this document in a pull request.
### raylib philosophy
@ -28,14 +28,14 @@ Use your best judgement, and feel free to propose changes to this document in a
- [raylib license](LICENSE)
- [raylib roadmap](ROADMAP.md)
[raylib Wiki](https://github.com/raysan5/raylib/wiki) contains some information about the library and is open to anyone for edit.
[raylib Wiki](https://github.com/raysan5/raylib/wiki) contains some information about the library and is open to anyone to edit.
Feel free to review it if required, just take care not to break something.
### raylib C coding conventions
Despite being written in C, raylib does not follow the standard Hungarian notation for C,
it [follows Pascal-case/camel-case notation](https://github.com/raysan5/raylib/wiki/raylib-coding-conventions),
more common on C# language. All code formatting decisions have been carefully taken
more common in C# language. All code formatting decisions have been carefully taken
to make it easier for students/users to read, write and understand code.
Source code is extensively commented for that purpose, raylib primary learning method is:
@ -46,12 +46,12 @@ For detailed information on building raylib and examples, please check [raylib W
### Opening new Issues
To open new issue for raylib (bug, enhancement, discussion...), just try to follow these rules:
To open new issues for raylib (bug, enhancement, discussion...), just try to follow these rules:
- Make sure the issue has not already been reported before by searching on GitHub under Issues.
- If you're unable to find an open issue addressing the problem, open a new one. Be sure to include a
title and clear description, as much relevant information as possible, and a code sample demonstrating the unexpected behavior.
- If applies, attach some screenshot of the issue and a .zip file with the code sample and required resources.
- If applicable, attach some screenshot of the issue and a .zip file with the code sample and required resources.
- On issue description, add a brackets tag about the raylib module that relates to this issue.
If don't know which module, just report the issue, I will review it.
- You can check other issues to see how is being done!
@ -60,7 +60,7 @@ To open new issue for raylib (bug, enhancement, discussion...), just try to foll
- Make sure the PR description clearly describes the problem and solution. Include the relevant issue number if applicable.
- Don't send big pull requests (lots of changelists), they are difficult to review. It's better to send small pull requests, one at a time.
- Verify that changes don't break the build (at least on Windows platform). As many platforms where you can test it, the better, but don't worry
- Verify that changes don't break the build (at least on Windows platform). The more platforms where you can test it, the better, but don't worry
if you cannot test all the platforms.
### Contact information

View file

@ -1,6 +1,6 @@
## C Coding Style Conventions
Here it is a list with some of the code conventions used by raylib:
Here is a list with some of the code conventions used by raylib:
Code element | Convention | Example
--- | :---: | ---
@ -79,7 +79,7 @@ _NOTE: Avoid any space or special character in the files/dir naming!_
- Data files should be organized by context and usage in the game, think about the loading requirements for data and put all the resources that need to be loaded at the same time together.
- Use descriptive names for the files, it would be perfect if just reading the name of the file, it was possible to know what is that file and where fits in the game.
- Here it is an example, note that some resources require to be loaded all at once while other require to be loaded only at initialization (gui, font).
- Here is an example, note that some resources require to be loaded all at once while other require to be loaded only at initialization (gui, font).
```
resources/audio/fx/long_jump.wav

27
FAQ.md
View file

@ -14,12 +14,13 @@
- [What does raylib provide that other engines or libraries don't?](#what-does-raylib-provide-that-other-engines-or-libraries-dont)
- [How does raylib compare to Unity/Unreal/Godot?](#how-does-raylib-compare-to-unityunrealgodot)
- [What development tools are required for raylib?](#what-development-tools-are-required-for-raylib)
- [Which are raylib external dependencies?](#which-are-raylib-external-dependencies)
- [What are raylib's external dependencies?](#what-are-raylibs-external-dependencies)
- [Can I use raylib with other technologies or libraries?](#can-i-use-raylib-with-other-technologies-or-libraries)
- [What file formats are supported by raylib?](#what-file-formats-are-supported-by-raylib)
- [Does raylib support the Vulkan API?](#does-raylib-support-the-vulkan-api)
- [What could I expect to see in raylib in the future?](#what-could-i-expect-to-see-in-raylib-in-the-future)
- [Who are the raylib developers?](#who-are-the-raylib-developers)
- [MORE QUESTIONS...](https://github.com/raysan5/raylib/wiki/Frequently-Asked-Questions)
### What is raylib?
@ -39,13 +40,13 @@ Yes, raylib can be used to create any kind of application, not just videogames.
### How can I learn to use raylib? Is there some official documentation or tutorials?
raylib does not provide a "standard" API reference documentation like other libraries, all of the raylib functionality is exposed in a simple [cheatsheet](https://www.raylib.com/cheatsheet/cheatsheet.html). Most of the functions are self-explanatory and the required parameters are very intuitive. It's also highly recommended to take a look to [`raylib.h`](https://github.com/raysan5/raylib/blob/master/src/raylib.h) header file or even the source code, that is very clean and organized, intended for teaching.
raylib does not provide a "standard" API reference documentation like other libraries, all of the raylib functionality is exposed in a simple [cheatsheet](https://www.raylib.com/cheatsheet/cheatsheet.html). Most of the functions are self-explanatory and the required parameters are very intuitive. It's also highly recommended to take a look at [`raylib.h`](https://github.com/raysan5/raylib/blob/master/src/raylib.h) header file or even the source code, that is very clean and organized, intended for teaching.
raylib also provides a big [collection of examples](https://www.raylib.com/examples.html), to showcase the multiple functionality usage (+120 examples). Examples are categorized by the internal module functionality and also define an estimated level of difficulty to guide the users checking them.
There is also a [FAQ on the raylib Wiki](https://github.com/raysan5/raylib/wiki/Frequently-Asked-Questions) with common technical questions.
There are also many tutorials on the internet and YouTube created by the growing raylib community along the years.
There are also many tutorials on the internet and YouTube created by the growing raylib community over the years.
[raylib Discord Community](https://discord.gg/raylib) is also a great place to join and ask questions, the community is very friendly and always ready to help.
@ -55,7 +56,7 @@ raylib is [free and open source](https://github.com/raysan5/raylib). Anyone can
### What is the raylib license?
raylib source code is licensed under an unmodified zlib/libpng license, which is an OSI-certified, BSD-like license that allows static linking with closed source software. Check [LICENSE](https://github.com/raysan5/raylib/blob/master/LICENSE) for further details.
raylib source code is licensed under an unmodified zlib/libpng license, which is an OSI-certified, BSD-like license that allows static linking with closed-source software. Check [LICENSE](https://github.com/raysan5/raylib/blob/master/LICENSE) for further details.
### What platforms are supported by raylib?
@ -89,25 +90,25 @@ I personally consider raylib a graphics library with some high-level features ra
### What does raylib provide that other engines or libraries don't?
I would say "simplicity" and "enjoyment" at a really low-level of coding but actually is up to the user to discover it, to try it and to see if it fits their needs. raylib is not good for everyone but it's worth a try.
I would say "simplicity" and "enjoyment" at a really low level of coding but actually is up to the user to discover it, to try it and to see if it fits their needs. raylib is not good for everyone but it's worth a try.
### How does raylib compare to Unity/Unreal/Godot?
Those engines are usually big and complex to use, providing lot of functionality. They require some time to learn and test, they usually abstract many parts of the game development process and they usually provide a set of tools to assist users on their creations (like a GUI editor).
raylib is a simple programming library, with no integrated tools or editors. It gives full control to users at a very low-level to create graphics applications in a more handmade way.
raylib is a simple programming library, with no integrated tools or editors. It gives full control to users at a very low level to create graphics applications in a more handmade way.
### What development tools are required for raylib?
To develop raylib programs you only need a text editor (with recommended code syntax highlighting) and a compiler.
A [raylib Windows Installer](https://raysan5.itch.io/raylib) package is distributed including the Notepad++ editor and MinGW (GCC) compiler pre-configured for Windows for new users as an starter-pack but for more advance configurations with other editors/compilers, [raylib Wiki](https://github.com/raysan5/raylib/wiki) provides plenty of configuration tutorials.
A [raylib Windows Installer](https://raysan5.itch.io/raylib) package is distributed including the Notepad++ editor and MinGW (GCC) compiler pre-configured for Windows for new users as an starter-pack but for more advanced configurations with other editors/compilers, [raylib Wiki](https://github.com/raysan5/raylib/wiki) provides plenty of configuration tutorials.
### What are raylib's external dependencies?
raylib is self-contained, it has no external dependencies to build it. But internally raylib uses several libraries from other developers, mostly used to load specific file-formats.
raylib is self-contained, it has no external dependencies to build it. But internally raylib uses several libraries from other developers, mostly used to load specific file formats.
A detailed list of raylib dependencies could be found on the [raylib Wiki](https://github.com/raysan5/raylib/wiki/raylib-dependencies).
A detailed list of raylib dependencies can be found on the [raylib Wiki](https://github.com/raysan5/raylib/wiki/raylib-dependencies).
### Can I use raylib with other technologies or libraries?
@ -119,8 +120,8 @@ raylib can load data from multiple standard file formats:
- Image/Textures: PNG, BMP, TGA, JPG, GIF, QOI, PSD, DDS, HDR, KTX, ASTC, PKM, PVR
- Fonts: FNT (sprite font), TTF, OTF
- Models/Meshes: OBJ, IQM, GLTF, VOX
- Audio: WAV, OGG, MP3, FLAC, XM, MOD
- Models/Meshes: OBJ, IQM, GLTF, VOX, M3D
- Audio: WAV, OGG, MP3, FLAC, XM, MOD, QOA
### Does raylib support the Vulkan API?
@ -128,10 +129,10 @@ No, raylib is built on top of OpenGL API, and there are currently no plans to su
### What could I expect to see in raylib in the future?
The main focus of the library is simplicity. Most of the efforts are invested in maintainability and bug-fixing. Despite new small features are regularly added, it's not the objective for raylib to become a full-featured engine. Personally I prefer to keep it small and enjoyable.
The main focus of the library is simplicity. Most of the efforts are invested in maintainability and bug-fixing. Despite new small features being regularly added, it's not the objective for raylib to become a full-featured engine. Personally I prefer to keep it small and enjoyable.
### Who are the raylib developers?
The main raylib developer and maintainer is [Ramon Santamaria](https://www.linkedin.com/in/raysan/) but there's 360+ contributors that have helped by adding new features, testing the library and solving issues in the 9+ years life of raylib.
The main raylib developer and maintainer is [Ramon Santamaria](https://www.linkedin.com/in/raysan/) but there are 360+ contributors that have helped by adding new features, testing the library and solving issues in the 9+ years life of raylib.
The full list of raylib contributors can be seen [on GitHub](https://github.com/raysan5/raylib/graphs/contributors).

View file

@ -3,13 +3,13 @@
introduction
------------
I started developing videogames in 2006 and some years later I started teaching videogames development to young people with artistic profile, most of students had never written a single line of code.
I started developing videogames in 2006 and some years later I started teaching videogames development to young people with artistic profiles, most of students had never written a single line of code.
I decided to start with C language basis and, after searching for the most simple and easy-to-use library to teach videogames programming, I found [WinBGI](http://www.codecutter.net/tools/winbgim/); it was great and it worked very well with students, in just a couple of weeks, those students that had never written a single line of code were able to program (and understand) a simple PONG game, some of them even a BREAKOUT!
I decided to start with C language basis and, after searching for the most simple and easy-to-use library to teach videogames programming, I found [WinBGI](https://winbgim.codecutter.org/); it was great and it worked very well with students, in just a couple of weeks, those students that had never written a single line of code were able to program (and understand) a simple PONG game, some of them even a BREAKOUT!
But WinBGI was not the clearer and most organized library for my taste. There were lots of things I found confusing and some function names were not clear enough for most of the students; not to mention the lack of transparencies support and no hardware acceleration.
But WinBGI was not the clearest and most organized library for my taste. There were lots of things I found confusing and some function names were not clear enough for most of the students; not to mention the lack of transparencies support and no hardware acceleration.
So, I decided to create my own library, hardware accelerated, clear function names, quite organized, well structured, plain C coding and, the most important, primarily intended to learn videogames programming.
So, I decided to create my own library, hardware accelerated, clear function names, quite organized, well structured, plain C coding and, most importantly, primarily intended to learn videogames programming.
My previous videogames development experience was mostly in C# and [XNA](https://en.wikipedia.org/wiki/Microsoft_XNA) and I really loved it, so, I decided to use C# language style notation and XNA naming conventions. That way, students were able to move from raylib to XNA, MonoGame or similar libs extremely easily.
@ -20,28 +20,28 @@ Enjoy it.
notes on raylib 1.1
-------------------
On April 2014, after 6 month of first raylib release, raylib 1.1 has been released. This new version presents a complete internal redesign of the library to support OpenGL 1.1, OpenGL 3.3+ and OpenGL ES 2.0.
On April 2014, after 6 months of first raylib release, raylib 1.1 was released. This new version presents a complete internal redesign of the library to support OpenGL 1.1, OpenGL 3.3+ and OpenGL ES 2.0.
- A new module named [rlgl](https://github.com/raysan5/raylib/blob/master/src/rlgl.h) has been added to the library. This new module translates raylib-OpenGL-style immediate mode functions (i.e. rlVertex3f(), rlBegin(), ...) to different versions of OpenGL (1.1, 3.3+, ES2), selectable by one define.
- [rlgl](https://github.com/raysan5/raylib/blob/master/src/rlgl.h) also comes with a second new module named [raymath](https://github.com/raysan5/raylib/blob/master/src/raymath.h), which includes a bunch of useful functions for 3d-math with vectors, matrices and quaternions.
Some other big changes of this new version have been the support for OGG files loading and stream playing, and the support of DDS texture files (compressed and uncompressed) along with mipmaps support.
Some other big changes of this new version have been the support for OGG file loading and stream playing, and the support of DDS texture files (compressed and uncompressed) along with mipmaps support.
Lots of code changes and lot of testing have concluded in this amazing new raylib 1.1.
Lots of code changes and a lot of testing have concluded in this amazing new raylib 1.1.
notes on raylib 1.2
-------------------
On September 2014, after 5 month of raylib 1.1 release, it comes raylib 1.2. Again, this version presents a complete internal redesign of [core](https://github.com/raysan5/raylib/blob/master/src/rcore.c) module to support two new platforms: [Android](http://www.android.com/) and [Raspberry Pi](http://www.raspberrypi.org/).
On September 2014, after 5 months of raylib 1.1 release, it comes raylib 1.2. Again, this version presents a complete internal redesign of [core](https://github.com/raysan5/raylib/blob/master/src/rcore.c) module to support two new platforms: [Android](http://www.android.com/) and [Raspberry Pi](http://www.raspberrypi.org/).
It's been some month of really hard work to accomodate raylib to those new platforms while keeping it easy for the users. On Android, raylib manages internally the activity cicle, as well as the inputs; on Raspberry Pi, a complete raw input system has been written from scratch.
It's been some months of really hard work to accommodate raylib to those new platforms while keeping it easy for the users. On Android, raylib manages internally the activity cycle, as well as the inputs; on Raspberry Pi, a complete raw input system has been written from scratch.
- A new display initialization system has been created to support multiple resolutions, adding black bars if required; user only defines desired screen size and it gets properly displayed.
- A new display initialization system has been created to support multiple resolutions, adding black bars if required; the user only defines the desired screen size and it gets properly displayed.
- Now raylib can easily deploy games to Android devices and Raspberry Pi (console mode).
Lots of code changes and lot of testing have concluded in this amazing new raylib 1.2.
Lots of code changes and a lot of testing have concluded in this amazing new raylib 1.2.
In December 2014, new raylib 1.2.2 was published with support to compile directly for web (html5) using [emscripten](http://kripken.github.io/emscripten-site/) and [asm.js](http://asmjs.org/).
@ -50,26 +50,26 @@ notes on raylib 1.3
On September 2015, after 1 year of raylib 1.2 release, arrives raylib 1.3. This version adds shaders functionality, improves tremendously textures module and also provides some new modules (camera system, gestures system, immediate-mode gui).
- Shaders support is the biggest addition to raylib 1.3, with support for easy shaders loading and use. Loaded shaders can be attached to 3d models or used as fullscreen postrocessing effects. A bunch of postprocessing shaders are also included in this release, check raylib/shaders folder.
- Shaders support is the biggest addition to raylib 1.3, with support for easy shaders loading and use. Loaded shaders can be attached to 3d models or used as fullscreen post-processing effects. A bunch of postprocessing shaders are also included in this release, check raylib/shaders folder.
- Textures module has grown to support most of the internal texture formats available in OpenGL (RGB565, RGB888, RGBA5551, RGBA4444, etc.), including compressed texture formats (DXT, ETC1, ETC2, ASTC, PVRT); raylib 1.3 can load .dds, .pkm, .ktx, .astc and .pvr files.
- A brand new [camera](https://github.com/raysan5/raylib/blob/master/src/rcamera.c) module offers to the user multiple preconfigured ready-to-use camera systems (free camera, 1st person, 3rd person). Camera modes are very easy to use, just check examples: [core_3d_camera_free.c](https://github.com/raysan5/raylib/blob/master/examples/core_3d_camera_free.c) and [core_3d_camera_first_person.c](https://github.com/raysan5/raylib/blob/master/examples/core_3d_camera_first_person.c).
- A brand new [camera](https://github.com/raysan5/raylib/blob/master/src/rcamera.h) module offers to the user multiple preconfigured ready-to-use camera systems (free camera, 1st person, 3rd person). Camera modes are very easy to use, just check examples: [core_3d_camera_free.c](https://github.com/raysan5/raylib/blob/master/examples/core/core_3d_camera_free.c) and [core_3d_camera_first_person.c](https://github.com/raysan5/raylib/blob/master/examples/core/core_3d_camera_first_person.c).
- New [gestures](https://github.com/raysan5/raylib/blob/master/src/rgestures.h) module simplifies gestures detection on Android and HTML5 programs.
- [raygui](https://github.com/raysan5/raylib/blob/master/src/raygui.h), the new immediate-mode GUI module offers a set of functions to create simple user interfaces, primary intended for tools development. It's still in experimental state but already fully functional.
- [raygui](https://github.com/raysan5/raylib/blob/master/examples/shapes/raygui.h), the new immediate-mode GUI module offers a set of functions to create simple user interfaces, primarily intended for tools development. It's still in an experimental state but already fully functional.
Most of the examples have been completely rewritten and +10 new examples have been added to show the new raylib features.
Lots of code changes and lot of testing have concluded in this amazing new raylib 1.3.
Lots of code changes and a lot of testing have concluded in this amazing new raylib 1.3.
notes on raylib 1.4
-------------------
On February 2016, after 4 months of raylib 1.3 release, it comes raylib 1.4. For this new version, lots of parts of the library have been reviewed, lots of bugs have been solved and some interesting features have been added.
- First big addition is a set of [Image manipulation functions](https://github.com/raysan5/raylib/blob/master/src/raylib.h#L673) have been added to crop, resize, colorize, flip, dither and even draw image-to-image or text-to-image. Now a basic image processing can be done before converting the image to texture for usage.
- First big addition is a set of [Image manipulation functions](https://github.com/raysan5/raylib/blob/master/src/raylib.h#L1331) that have been added to crop, resize, colorize, flip, dither and even draw image-to-image or text-to-image. Now basic image processing can be done before converting the image to texture for usage.
- SpriteFonts system has been improved, adding support for AngelCode fonts (.fnt) and TrueType Fonts (using [stb_truetype](https://github.com/nothings/stb/blob/master/stb_truetype.h) helper library). Now raylib can read standard .fnt font data and also generate at loading a SpriteFont from a TTF file.
@ -77,12 +77,12 @@ On February 2016, after 4 months of raylib 1.3 release, it comes raylib 1.4. For
- [raymath](https://github.com/raysan5/raylib/blob/master/src/raymath.h) module has been reviewed; some bugs have been solved and the module has been converted to a header-only file for easier portability, optionally, functions can also be used as inline.
- [gestures](https://github.com/raysan5/raylib/blob/master/src/rgestures.c) module has redesigned and simplified, now it can process touch events from any source, including mouse. This way, gestures system can be used on any platform providing an unified way to work with inputs and allowing the user to create multiplatform games with only one source code.
- [gestures](https://github.com/raysan5/raylib/blob/master/src/rgestures.h) module has been redesigned and simplified, now it can process touch events from any source, including the mouse. This way, gestures system can be used on any platform providing a unified way to work with inputs and allowing the user to create multiplatform games with only one source code.
- Raspberry Pi input system has been redesigned to better read raw inputs using generic Linux event handlers (keyboard:`stdin`, mouse:`/dev/input/mouse0`, gamepad:`/dev/input/js0`). Gamepad support has also been added (experimental).
Other important improvements are the functional raycast system for 3D picking, including some ray collision-detection functions,
and the addition of two simple functions for persistent data storage. Now raylib user can save and load game data in a file (only some platforms supported). A simple [easings](https://github.com/raysan5/raylib/blob/master/src/easings.h) module has also been added for values animation.
and the addition of two simple functions for persistent data storage. Now raylib users can save and load game data in a file (only some platforms are supported). A simple [easings](https://github.com/raysan5/raylib/blob/master/examples/shapes/reasings.h) module has also been added for values animation.
Up to 8 new code examples have been added to show the new raylib features and +10 complete game samples have been provided to learn
how to create some classic games like Arkanoid, Asteroids, Missile Commander, Snake or Tetris.
@ -94,36 +94,36 @@ notes on raylib 1.5
On July 2016, after 5 months of raylib 1.4 release, arrives raylib 1.5. This new version is the biggest boost of the library until now, lots of parts of the library have been redesigned, lots of bugs have been solved and some **AMAZING** new features have been added.
- VR support: raylib supports **Oculus Rift CV1**, one of the most anticipated VR devices in the market. Additionally, raylib supports simulated VR stereo rendering, independent of the VR device; it means, raylib can generate stereo renders with custom head-mounted-display device parameteres, that way, any VR device in the market can be **simulated in any platform** just configuring device parameters (and consequently, lens distortion). To enable VR is [extremely easy](https://github.com/raysan5/raylib/blob/master/examples/core_oculus_rift.c).
- VR support: raylib supports **Oculus Rift CV1**, one of the most anticipated VR devices in the market. Additionally, raylib supports simulated VR stereo rendering, independent of the VR device; it means, raylib can generate stereo renders with custom head-mounted-display device parameters, that way, any VR device in the market can be **simulated in any platform** just configuring device parameters (and consequently, lens distortion). To enable VR is [extremely easy](https://github.com/raysan5/raylib/blob/master/examples/core_oculus_rift.c).
- New materials system: now raylib supports standard material properties for 3D models, including diffuse-ambient-specular colors and diffuse-normal-specular textures. Just assign values to standard material and everything is processed internally.
- New lighting system: added support for up to 8 configurable lights and 3 light types: **point**, **directional** and **spot** lights. Just create a light, configure its parameters and raylib manages render internally for every 3d object using standard material.
- New lighting system: added support for up to 8 configurable lights and 3 light types: **point**, **directional** and **spot** lights. Just create a light, configure its parameters and raylib manages to render internally for every 3d object using standard material.
- Complete gamepad support on Raspberry Pi: Gamepad system has been completely redesigned. Now multiple gamepads can be easily configured and used; gamepad data is read and processed in raw mode in a second thread.
- Redesigned physics module: [physac](https://github.com/raysan5/raylib/blob/master/src/physac.h) module has been converted to header only and usage [has been simplified](https://github.com/raysan5/raylib/blob/master/examples/physics_basic_rigidbody.c). Performance has also been singnificantly improved, now physic objects are managed internally in a second thread.
- Redesigned physics module: [physac](https://github.com/raysan5/raylib/blob/master/src/physac.h) module has been converted to header only and usage [has been simplified](https://github.com/raysan5/raylib/blob/master/examples/physics_basic_rigidbody.c). Performance has also been significantly improved, now physic objects are managed internally in a second thread.
- Audio chiptunese support and mixing channels: Added support for module audio music (.xm, .mod) loading and playing. Multiple mixing channels are now also supported. All this features thanks to the amazing work of @kd7tck.
- Audio chiptunes support and mixing channels: Added support for module audio music (.xm, .mod) loading and playing. Multiple mixing channels are now also supported. All these features thanks to the amazing work of @kd7tck.
Other additions include a [2D camera system](https://github.com/raysan5/raylib/blob/master/examples/core_2d_rcamera.c), render textures for offline render (and most comprehensive [postprocessing](https://github.com/raysan5/raylib/blob/master/examples/shaders_postprocessing.c)) or support for legacy OpenGL 2.1 on desktop platforms.
Other additions include a [2D camera system](https://github.com/raysan5/raylib/blob/master/examples/core/core_2d_rcamera.c), render textures for offline render (and most comprehensive [postprocessing](https://github.com/raysan5/raylib/blob/master/examples/shaders/shaders_postprocessing.c)) or support for legacy OpenGL 2.1 on desktop platforms.
This new version is so massive that is difficult to list all the improvements, most of raylib modules have been reviewed and [rlgl](https://github.com/raysan5/raylib/blob/master/src/rlgl.c) module has been completely redesigned to accomodate to new material-lighting systems and stereo rendering. You can check [CHANGELOG](https://github.com/raysan5/raylib/blob/master/CHANGELOG) file for a more detailed list of changes.
This new version is so massive that is difficult to list all the improvements, most of the raylib modules have been reviewed and [rlgl](https://github.com/raysan5/raylib/blob/master/src/rlgl.h) module has been completely redesigned to accommodate to new material-lighting systems and stereo rendering. You can check [CHANGELOG](https://github.com/raysan5/raylib/blob/master/CHANGELOG) file for a more detailed list of changes.
Up to 8 new code examples have been added to show the new raylib features and also some samples to show the usage of [rlgl](https://github.com/raysan5/raylib/blob/master/examples/rlgl_standalone.c) and [audio](https://github.com/raysan5/raylib/blob/master/examples/audio_standalone.c) raylib modules as standalone libraries.
Up to 8 new code examples have been added to show the new raylib features and also some samples to show the usage of [rlgl](https://github.com/raysan5/raylib/blob/master/examples/others/rlgl_standalone.c) and [audio](https://github.com/raysan5/raylib/blob/master/examples/audio_standalone.c) raylib modules as standalone libraries.
Lots of code changes (+400 commits) and lots of hours of hard work have concluded in this amazing new raylib 1.5.
notes on raylib 1.6
-------------------
On November 2016, only 4 months after raylib 1.5, arrives raylib 1.6. This new version represents another big review of the library and includes some interesting additions. This version conmmemorates raylib 3rd anniversary (raylib 1.0 was published on November 2013) and it is a stepping stone for raylib future. raylib roadmap has been reviewed and redefined to focus on its primary objective: create a simple and easy-to-use library to learn videogames programming. Some of the new features:
On November 2016, only 4 months after raylib 1.5, arrives raylib 1.6. This new version represents another big review of the library and includes some interesting additions. This version commemorates raylib 3rd anniversary (raylib 1.0 was published on November 2013) and it is a stepping stone for raylib future. raylib roadmap has been reviewed and redefined to focus on its primary objective: create a simple and easy-to-use library to learn videogames programming. Some of the new features:
- Complete [raylib Lua binding](https://github.com/raysan5/raylib-lua). All raylib functions plus the +60 code examples have been ported to Lua, now Lua users can enjoy coding videogames in Lua while using all the internal power of raylib. This addition also open the doors to Lua scripting support for a future raylib-based engine, being able to move game logic (Init, Update, Draw, De-Init) to Lua scripts while keep using raylib functionality.
- Completely redesigned [audio module](https://github.com/raysan5/raylib/blob/master/src/raudio.c). Based on the new direction taken in raylib 1.5, it has been further improved and more functionality added (+20 new functions) to allow raw audio processing and streaming. [FLAC file format support](https://github.com/raysan5/raylib/blob/master/src/external/dr_flac.h) has also been added. In the same line, [OpenAL Soft](https://github.com/kcat/openal-soft) backend is now provided as a static library in Windows to allow static linking and get ride of OpenAL32.dll. Now raylib Windows games are completey self-contained, no external libraries required any more!
- Completely redesigned [audio module](https://github.com/raysan5/raylib/blob/master/src/raudio.c). Based on the new direction taken in raylib 1.5, it has been further improved and more functionality added (+20 new functions) to allow raw audio processing and streaming. [FLAC file format support](https://github.com/raysan5/raylib/blob/master/src/external/dr_flac.h) has also been added. In the same line, [OpenAL Soft](https://github.com/kcat/openal-soft) backend is now provided as a static library in Windows to allow static linking and get ride of OpenAL32.dll. Now raylib Windows games are completely self-contained, no external libraries are required anymore!
- [Physac](https://github.com/victorfisac/Physac) module has been moved to its own repository and it has been improved A LOT, actually, library has been completely rewritten from scratch by [@victorfisac](https://github.com/victorfisac), multiple samples have been added together with countless new features to match current standard 2D physic libraries. Results are amazing!
- [Physac](https://github.com/victorfisac/Physac) module has been moved to its own repository and it has been improved A LOT, actually, the library has been completely rewritten from scratch by [@victorfisac](https://github.com/victorfisac), multiple samples have been added together with countless new features to match current standard 2D physic libraries. Results are amazing!
- Camera and gestures modules have been reviewed, highly simplified and ported to single-file header-only libraries for easier portability and usage flexibility. Consequently, camera system usage has been simplified in all examples.
@ -131,41 +131,41 @@ On November 2016, only 4 months after raylib 1.5, arrives raylib 1.6. This new v
- Improved textures and text functionality, adding new functions for texture filtering control and better TTF/AngelCode fonts loading and generation support.
Build system improvement. Added support for raylib dynamic library generation (raylib.dll) for users that prefer dynamic library linking. Also thinking on advance users, it has been added pre-configured [Visual Studio C++ 2015 solution](https://github.com/raysan5/raylib/tree/master/project/vs2015) with raylib project and C/C++ examples for users that prefer that professional IDE and compiler.
Build system improvement. Added support for raylib dynamic library generation (raylib.dll) for users that prefer dynamic library linking. Also thinking on advanced users, it has been added pre-configured [Visual Studio C++ 2015 solution](https://github.com/raysan5/raylib/tree/master/projects/vs2015) with raylib project and C/C++ examples for users that prefer that professional IDE and compiler.
New examples, new functions, complete code-base review, multiple bugs corrected... this is raylib 1.6. Enjoy making games.
notes on raylib 1.7
-------------------
On May 2017, around 6 month after raylib 1.6, comes another raylib instalment, raylib 1.7. This time library has been improved a lot in terms of consistency and cleanness. As stated in [this patreon article](https://www.patreon.com/posts/raylib-future-7501034), this new raylib version has focused efforts in becoming more simple and easy-to-use to learn videogames programming. Some highlights of this new version are:
On May 2017, around 6 months after raylib 1.6, comes another raylib installment, raylib 1.7. This time library has been improved a lot in terms of consistency and cleanness. As stated in [this patreon article](https://www.patreon.com/posts/raylib-future-7501034), this new raylib version has focused efforts in becoming more simple and easy-to-use to learn videogames programming. Some highlights of this new version are:
- More than 30 new functions added to the library, functions to control Window, utils to work with filenames and extensions, functions to draw lines with custom thick, mesh loading, functions for 3d ray collisions detailed detection, funtions for VR simulation and much more... Just check [CHANGELOG](CHANGELOG) for a detailed list of additions!
- More than 30 new functions added to the library, functions to control Window, utils to work with filenames and extensions, functions to draw lines with custom thick, mesh loading, functions for 3d ray collisions detailed detection, functions for VR simulation and much more... Just check [CHANGELOG](CHANGELOG) for a detailed list of additions!
- Support of [configuration flags](https://github.com/raysan5/raylib/issues/200) on every raylib module. Advance users can customize raylib just choosing desired features, defining some configuration flags on modules compilation. That way users can control library size and available functionality.
- Support of [configuration flags](https://github.com/raysan5/raylib/issues/200) on every raylib module. Advanced users can customize raylib just by choosing desired features, and defining some configuration flags on modules compilation. That way users can control library size and available functionality.
- Improved [build system](https://github.com/raysan5/raylib/blob/master/src/Makefile) for all supported platforms (Windows, Linux, OSX, RPI, Android, HTML5) with a unique Makefile to compile sources. Added support for Android compilation with a custom standalone toolchain and also multiple build compliation flags.
- Improved [build system](https://github.com/raysan5/raylib/blob/master/src/Makefile) for all supported platforms (Windows, Linux, OSX, RPI, Android, HTML5) with a unique Makefile to compile sources. Added support for Android compilation with a custom standalone toolchain and also multiple build compilation flags.
- New [examples](http://www.raylib.com/examples.html) and [sample games](http://www.raylib.com/games.html) added. All samples material has been reviewed, removing useless examples and adding more comprehensive ones; all material has been ported to latest raylib version and tested in multiple platforms. Examples folder structure has been improved and also build systems.
- New [examples](http://www.raylib.com/examples.html) and [sample games](http://www.raylib.com/games.html) added. All sample material has been reviewed, removing useless examples and adding more comprehensive ones; all material has been ported to the latest raylib version and tested on multiple platforms. Examples folder structure has been improved and also build systems.
- Improved library consistency and organization in general. Functions and parameters have been renamed, some parts of the library have been cleaned and simplyfied, some functions has been moved to examples (lighting, Oculus Rift CV1 support) towards a more generic library implementation. Lots of hours have been invested in this process...
- Improved library consistency and organization in general. Functions and parameters have been renamed, some parts of the library have been cleaned and simplified, some functions have been moved to examples (lighting, Oculus Rift CV1 support) towards a more generic library implementation. Lots of hours have been invested in this process...
Some other features: Gamepad support on HTML5, RPI touch screen support, 32bit audio support, frames timing improvements, public log system, rres file format support, automatic GIF recording...
And here it is another version of **raylib, a simple and easy-to-use library to enjoy videogames programming**. Enjoy it.
And here is another version of **raylib, a simple and easy-to-use library to enjoy videogames programming**. Enjoy it.
notes on raylib 1.8
-------------------
October 2017, around 5 months after latest raylib version, another release is published: raylib 1.8. Again, several modules of the library have been reviewed and some new functionality added. Main changes of this new release are:
- [Procedural image generation](https://github.com/raysan5/raylib/blob/master/examples/textures/textures_image_generation.c) function, a set of new functions have been added to generate gradients, checked, noise and cellular images from scratch. Image generation could be useful for certain textures or learning pourpouses.
- [Procedural image generation](https://github.com/raysan5/raylib/blob/master/examples/textures/textures_image_generation.c) function, a set of new functions have been added to generate gradients, checked, noise and cellular images from scratch. Image generation could be useful for certain textures or learning purposes.
- [Parametric mesh generation](https://github.com/raysan5/raylib/blob/master/examples/models/models_mesh_generation.c) functions, create 3d meshes from scratch just defining a set of parameters, meshes like cube, sphere, cylinder, torus, knot and more can be very useful for prototyping or for lighting and texture testing.
- PBR Materials support, a completely redesigned shaders and material system allows advance materials definition and usage, with fully customizable shaders. Some new functions have been added to generate the environment textures required for PBR shading and a a new complete [PBR material example](https://github.com/raysan5/raylib/blob/master/examples/models/models_material_pbr.c) is also provided for reference.
- PBR Materials support, a completely redesigned shaders and material system allows advanced materials definition and usage, with fully customizable shaders. Some new functions have been added to generate the environment textures required for PBR shading and a a new complete [PBR material example](https://github.com/raysan5/raylib/blob/master/examples/models/models_material_pbr.c) is also provided for reference.
- Custom Android APK build pipeline with [simple Makefile](https://github.com/raysan5/raylib/blob/master/templates/simple_game/Makefile). Actually, full code building mechanism based on plain Makefile has been completely reviewed and Android building has been added for sources and also for examples and templates building into final APK package. This way, raylib Android building has been greatly simplified and integrated seamlessly into standard build scripts.
- Custom Android APK build pipeline with [simple Makefile](https://github.com/raysan5/raylib/blob/master/templates/simple_game/Makefile). Actually, full code building mechanism based on plain Makefile has been completely reviewed and Android building has been added for sources and also for examples and templates building into the final APK package. This way, raylib Android building has been greatly simplified and integrated seamlessly into standard build scripts.
- [rlgl](https://github.com/raysan5/raylib/blob/master/src/rlgl.h) module has been completely reviewed and most of the functions renamed for consistency. This way, standalone usage of rlgl is promoted, with a [complete example provided](https://github.com/raysan5/raylib/blob/master/examples/others/rlgl_standalone.c). rlgl offers a pseudo-OpenGL 1.1 immediate-mode programming-style layer, with backends to multiple OpenGL versions.
@ -178,37 +178,37 @@ New installer provided, web updated, examples re-builded, documentation reviewed
notes on raylib 2.0
-------------------
It's been 9 month since last raylib version was published, a lots of things have changed since then... This new raylib version represents an inflexion point in the development of the library and so, we jump to a new major version... Here it is the result of almost **5 years and thousands of hours of hard work**... here it is... **raylib 2.0**
It's been 9 months since last raylib version was published, a lot of things have changed since then... This new raylib version represents an inflection point in the development of the library and so, we jump to a new major version... Here is the result of almost **5 years and thousands of hours of hard work**... here is... **raylib 2.0**
In **raylib 2.0** the full API has been carefully reviewed for better consistency, some new functionality has been added and the overall raylib experience has been greatly improved... The key features of new version are:
- **Complete removal of external dependencies.** Finally, raylib does not require external libraries to be installed and linked along with raylib, all required libraries are contained and compiled within raylib. Obviously some external libraries are required but only the strictly platform-dependant ones, the ones that come installed with the OS. So, raylib becomes a self-contained platform-independent games development library.
- **Complete removal of external dependencies.** Finally, raylib does not require external libraries to be installed and linked along with raylib, all required libraries are contained and compiled within raylib. Obviously some external libraries are required but only the strictly platform-dependent ones, the ones that come installed with the OS. So, raylib becomes a self-contained platform-independent games development library.
- **Full redesign of audio module to use the amazing miniaudio library**, along with external dependencies removal, OpenAL library has been replaced by [miniaudio](https://github.com/dr-soft/miniaudio), this brand new library offers automatic dynamic linking with default OS audio systems. Undoubtly, the perfect low-level companion for raylib audio module!
- **Full redesign of audio module to use the amazing miniaudio library**, along with external dependencies removal, OpenAL library has been replaced by [miniaudio](https://github.com/dr-soft/miniaudio), this brand new library offers automatic dynamic linking with default OS audio systems. Undoubtedly, the perfect low-level companion for raylib audio module!
- **Support for continuous integration building*** through AppVeyor and Travis CI. Consequently, raylib GitHub develop branch has been removed, simplyfing the code-base to a single master branch, always stable. Every time a new commit is deployed, library is compiled for **up-to 12 different configurations**, including multiple platforms, 32bit/64bit and multiple compiler options! All those binaries are automatically attached to any new release!
- **Support for continuous integration building*** through AppVeyor and Travis CI. Consequently, raylib GitHub develop branch has been removed, simplifying the code-base to a single master branch, always stable. Every time a new commit is deployed, library is compiled for **up-to 12 different configurations**, including multiple platforms, 32bit/64bit and multiple compiler options! All those binaries are automatically attached to any new release!
- **More platforms supported and tested**, including BSD family (FreeBSD, openBSD, NetBSD, DragonFly) and Linux-based family platforms (openSUSE, Debian, Ubuntu, Arch, NixOS...). raylib has already been added to some package managers! Oh, and last but not less important, **Android 64bit** is already supported by raylib!
- **Support for TCC compiler!** Thanks to the lack of external dependencies, raylib can now be easily compiled with a **minimal toolchain**, like the one provide by Tiny C Compiler. It opens the door to an amazing future, allowing, for example, static linkage of libtcc for **runtime compilation of raylib-based code**... and the library itself if required! Moreover, TCC is blazing fast, it can compile all raylib in a couple of seconds!
- **Support for TCC compiler!** Thanks to the lack of external dependencies, raylib can now be easily compiled with a **minimal toolchain**, like the one provided by Tiny C Compiler. It opens the door to an amazing future, allowing, for example, static linkage of libtcc for **runtime compilation of raylib-based code**... and the library itself if required! Moreover, TCC is blazing fast, it can compile all raylib in a couple of seconds!
- Refactored all raylib configuration #defines into a **centralized `config.h` header**, with more than **40 possible configuration options** to compile a totally customizable raylib version including only desired options like supported file-formats or specific functionality support. It allows generating a trully ligth-weight version of the library if desired!
- Refactored all raylib configuration #defines into a **centralized `config.h` header**, with more than **40 possible configuration options** to compile a totally customizable raylib version including only desired options like supported file formats or specific functionality support. It allows generating a trully ligth-weight version of the library if desired!
A part of that, lots of new features, like a brand **new font rendering and packaging system** for TTF fonts with **SDF support** (thanks to the amazing STB headers), new functions for **CPU image data manipulation**, new orthographic 3d camera mode, a complete review of `raymath.h` single-file header-only library for better consistency and performance, new examples and way, [way more](https://github.com/raysan5/raylib/blob/master/CHANGELOG).
Probably by now, **raylib 2.0 is the simplest and easiest-to-use library to enjoy (and learn) videogames programming**... but, undoubtly its development has exceeded any initial objective; raylib has become a simple and easy-to-use trully multiplatform portable standalone media library with thousands of possibilities... and that's just the beginning!
Probably by now, **raylib 2.0 is the simplest and easiest-to-use library to enjoy (and learn) videogames programming**... but, undoubtedly its development has exceeded any initial objective; raylib has become a simple and easy-to-use truly multiplatform portable standalone media library with thousands of possibilities... and that's just the beginning!
notes on raylib 2.5
-------------------
After almost one years since latest raylib installment, here it is **raylib 2.5**. A lot of work has been put on this new version and consequently I decided to bump versioning several digits. The complete list of changes and additions is humungous, details can be found in the [CHANGELOG](CHANGELOG), and here it is a short recap with the highlight improvements.
After almost one years since latest raylib installment, here is **raylib 2.5**. A lot of work has been put on this new version and consequently I decided to bump versioning several digits. The complete list of changes and additions is humungous, details can be found in the [CHANGELOG](CHANGELOG), and here is a short recap with the highlight improvements.
- New **window management and file system functions** to query monitor information, deal with clipboard, check directory files info and even launch a URL with default system web browser. Experimental **High-DPI monitor support** has also been added through a compile flag.
- **Redesigned Gamepad mechanism**, now generic for all platforms and gamepads, no more specific gamepad configurations.
**Redesigned UWP input system**, now raylib supports UWP seamlessly, previous implementation required a custom input system implemented in user code.
- `rlgl` module has been redesigned to **support a unique buffer for shapes drawing batching**, including LINES, TRIANGLES, QUADS in the same indexed buffer, also added support for multi-buffering if required. Additionally, `rlPushMatrix()`/`rlPopMatrix()` functionality has been reviewed to behave exactly like OpenGL 1.1, `models_rlgl_solar_system` example has been added to illustrate this behaviour.
- `rlgl` module has been redesigned to **support a unique buffer for shapes drawing batching**, including LINES, TRIANGLES, QUADS in the same indexed buffer, also added support for multi-buffering if required. Additionally, `rlPushMatrix()`/`rlPopMatrix()` functionality has been reviewed to behave exactly like OpenGL 1.1, `models_rlgl_solar_system` example has been added to illustrate this behavior.
- **VR simulator** has been reviewed to **allow custom configuration of Head-Mounted-Device parameters and distortion shader**, `core_vr_simulator` has been properly adapted to showcase this new functionality, now the VR simulator is a generic configurable stereo rendering system that allows any VR device simulation with just a few lines of code or even dynamic tweaking of HMD parameters.
@ -220,30 +220,30 @@ After almost one years since latest raylib installment, here it is **raylib 2.5*
- Experimental **cubemap support**, to automatically load multiple cubemap layouts (`LoadTextureCubemap()`). It required some internal `rlgl` redesign to allow cubemap textures.
- **Skeletal animation support for 3d models**, this addition implied a redesign of `Model` data structure to accomodate multiple mesh/multiple materials support and bones information. Multiple models functions have been reviewed and added on this process, also **glTF models loading support** has been added.
- **Skeletal animation support for 3d models**, this addition implied a redesign of `Model` data structure to accommodate multiple mesh/multiple materials support and bones information. Multiple models functions have been reviewed and added on this process, also **glTF models loading support** has been added.
This is a just a brief list with some of the changes of the new **raylib 2.5** but there is way more, about **70 new functions** have been added and several subsystems have been redesigned. More than **30 new examples** have been created to show the new functionalities and better illustrate already available ones.
This is just a brief list with some of the changes of the new **raylib 2.5** but there is way more, about **70 new functions** have been added and several subsystems have been redesigned. More than **30 new examples** have been created to show the new functionalities and better illustrate already available ones.
It has been a long year of hard work to make raylib a solid technology to develop new products over it.
notes on raylib 3.0
-------------------
After **10 months of intense development**, new raylib version is ready. Despite primary intended as a minor release, the [CHANGELIST](CHANGELOG) has grown so big and the library has changed so much internally that it finally became a major release. Library **internal ABI** has reveived a big redesign and review, targeting portability, integration with other platforms and making it a perfect option for other progamming [language bindings](BINDINGS.md).
After **10 months of intense development**, new raylib version is ready. Despite primary intended as a minor release, the [CHANGELIST](CHANGELOG) has grown so big and the library has changed so much internally that it finally became a major release. Library **internal ABI** has received a big redesign and review, targeting portability, integration with other platforms and making it a perfect option for other programming [language bindings](BINDINGS.md).
- All **global variables** from the multiple raylib modules have been moved to a **global context state**, it has several benefits, first, better code readability with more comprehensive variables naming and categorization (organized by types, i.e. `CORE.Window.display.width`, `CORE.Input.Keyboard.currentKeyState` or `RLGL.State.modelview`). Second, it allows better memory management to load global context state dynamically when required (not at the moment), making it easy to implement a **hot-reloading mechanism** if desired.
- All **global variables** from the multiple raylib modules have been moved to a **global context state**, it has several benefits, first, better code readability with more comprehensive variable naming and categorization (organized by types, i.e. `CORE.Window.display.width`, `CORE.Input.Keyboard.currentKeyState` or `RLGL.State.modelview`). Second, it allows better memory management to load global context state dynamically when required (not at the moment), making it easy to implement a **hot-reloading mechanism** if desired.
- All **memory allocations** on raylib and its dependencies now use `RL_MALLOC`, `RL_FREE` and similar macros. Now users can easely hook their own memory allocations mechanism if desired, having more control over memory allocated internally by the library. Additionally, it makes it easier to port the library to embedded devices where memory control is critical. For more info check raylib issue #1074.
- All **memory allocations** on raylib and its dependencies now use `RL_MALLOC`, `RL_FREE` and similar macros. Now users can easily hook their own memory allocation mechanism if desired, having more control over memory allocated internally by the library. Additionally, it makes it easier to port the library to embedded devices where memory control is critical. For more info check raylib issue #1074.
- All **I/O file accesses** from raylib are being moved to **memory data access**, now all I/O file access is centralized into just four functions: `LoadFileData()`, `SaveFileData()`, `LoadFileText()`, `SaveFileText()`. Users can just update those functions to any I/O file system. This change makes it easier to integrate raylib with **Virtual File Systems** or custom I/O file implementations.
- All **raylib data structures** have been reviewed and optimized for pass-by-value usage. One of raylib distinctive design decisions is that most of its functions receive and return data by value. This design makes raylib really simple for newcomers, avoiding pointers and allowing complete access to all structures data in a simple way. The downside is that data is copied on stack every function call and that copy could be costly so, all raylib data structures have been optimized to **stay under 64 bytes** for fast copy and retrieve.
- All **raylib tracelog messages** have been reviewd and categorized for a more comprehensive output information when developing raylib applications, now all display, input, timer, platform, auxiliar libraries, file-accesses, data loading/unloading issues are properly reported with more detailed and visual messages.
- All **raylib tracelog messages** have been reviewed and categorized for a more comprehensive output information when developing raylib applications, now all display, input, timer, platform, auxiliar libraries, file-accesses, data loading/unloading issues are properly reported with more detailed and visual messages.
- `raudio` module has been internally reviewed to accomodate the new `Music` structure (converted from previous pointer format) and the module has been adapted to the **highly improved** [`miniaudio v0.10`](https://github.com/dr-soft/miniaudio).
- `raudio` module has been internally reviewed to accommodate the new `Music` structure (converted from previous pointer format) and the module has been adapted to the **highly improved** [`miniaudio v0.10`](https://github.com/dr-soft/miniaudio).
- `text` module reviewed to **improve fonts generation** and text management functions, `Font` structure has been redesigned to better accomodate characters data, decoupling individual characters as `Image` glyphs from the font atlas parameters. Several improvements have been made to better support Unicode strings with UTF-8 encoding.
- `text` module reviewed to **improve fonts generation** and text management functions, `Font` structure has been redesigned to better accommodate characters data, decoupling individual characters as `Image` glyphs from the font atlas parameters. Several improvements have been made to better support Unicode strings with UTF-8 encoding.
- **Multiple new examples added** (most of them contributed by raylib users) and all examples reviewed for correct execution on most of the supported platforms, specially Web and Raspberry Pi. A detailed categorized table has been created on github for easy examples navigation and code access.
@ -274,19 +274,19 @@ Here the list with some highlights for `raylib 3.5`.
- NEW **configuration options** exposed: For custom raylib builds, `config.h` now exposes **more than 150 flags and defines** to build raylib with only the desired features, for example, it allows to build a minimal raylib library in just some KB removing all external data filetypes supported, very useful to generate **small executables or embedded devices**.
- NEW **automatic GIF recording** feature: Actually, automatic GIF recording (**CTRL+F12**) for any raylib application has been available for some versions but this feature was really slow and low-performant using an old gif library with many file-accesses. It has been replaced by a **high-performant alternative** (`msf_gif.h`) that operates directly on memory... and actually works very well! Try it out!
- NEW **automatic GIF recording** feature: Actually, automatic GIF recording (**CTRL+F12**) for any raylib application has been available for some versions but this feature was really slow and low-performant using an old gif library with many file accesses. It has been replaced by a **high-performant alternative** (`msf_gif.h`) that operates directly on memory... and actually works very well! Try it out!
- NEW **RenderBatch** system: `rlgl` module has been redesigned to support custom **render batches** to allow grouping draw calls as desired, previous implementation just had one default render batch. This feature has not been exposed to raylib API yet but it can be used by advance users dealing with `rlgl` directly. For example, multiple `RenderBatch` can be created for 2D sprites and 3D geometry independently.
- NEW **RenderBatch** system: `rlgl` module has been redesigned to support custom **render batches** to allow grouping draw calls as desired, previous implementation just had one default render batch. This feature has not been exposed to raylib API yet but it can be used by advanced users dealing with `rlgl` directly. For example, multiple `RenderBatch` can be created for 2D sprites and 3D geometry independently.
- NEW **Framebuffer** system: `rlgl` module now exposes an API for custom **Framebuffer attachments** (including cubemaps!). raylib `RenderTexture` is a basic use-case, just allowing color and depth textures, but this new API allows the creation of more advance Framebuffers with multiple attachments, like the **G-Buffers**. `GenTexture*()` functions have been redesigned to use this new API.
- NEW **Framebuffer** system: `rlgl` module now exposes an API for custom **Framebuffer attachments** (including cubemaps!). raylib `RenderTexture` is a basic use-case, just allowing color and depth textures, but this new API allows the creation of more advanced Framebuffers with multiple attachments, like the **G-Buffers**. `GenTexture*()` functions have been redesigned to use this new API.
- Improved **software rendering**: raylib `Image*()` API is intended for software rendering, for those cases when **no GPU or no Window is available**. Those functions operate directly with **multi-format** pixel data on RAM and they have been completely redesigned to be way faster, specially for small resolutions and retro-gaming. Low-end embedded devices like **microcontrollers with custom displays** could benefit of this raylib functionality!
- File **loading from memory**: Multiple functions have been redesigned to load data from memory buffers **instead of directly accessing the files**, now all raylib file loading/saving goes through a couple of functions that load data into memory. This feature allows **custom virtual-file-systems** and it gives more control to the user to access data already loaded in memory (i.e. images, fonts, sounds...).
- NEW **Window states** management system: raylib `core` module has been redesigned to support Window **state check and setup more easily** and also **before/after Window initialization**, `SetConfigFlags()` has been reviewed and `SetWindowState()` has been added to control Window minification, maximization, hidding, focusing, topmost and more.
- NEW **Window states** management system: raylib `core` module has been redesigned to support Window **state check and setup more easily** and also **before/after Window initialization**, `SetConfigFlags()` has been reviewed and `SetWindowState()` has been added to control Window minification, maximization, hiding, focusing, topmost and more.
- NEW **GitHub Actions** CI/CD system: Previous CI implementation has been reviewed and improved a lot to support **multiple build configurations** (platforms, compilers, static/shared build) and also an **automatic deploy system** has been implemented to automatically attach the diferent generated artifacts to every new release. As the system seems to work very good, previous CI platforms (AppVeyor/TravisCI) have been removed.
- NEW **GitHub Actions** CI/CD system: Previous CI implementation has been reviewed and improved a lot to support **multiple build configurations** (platforms, compilers, static/shared build) and also an **automatic deploy system** has been implemented to automatically attach the different generated artifacts to every new release. As the system seems to work very good, previous CI platforms (AppVeyor/TravisCI) have been removed.
A part of those changes, many new functions have been added, some redundant functions removed and many functions have been reviewed for consistency with the full API (function name, parameters name and order, code formatting...). Again, this release represents is a **great improvement for raylib and marks the way forward** for the library. Make sure to check [CHANGELOG](CHANGELOG) for details! Hope you enjoy it!
@ -295,7 +295,7 @@ Happy holidays! :)
notes on raylib 3.7
-------------------
April 2021, it's been about 4 months since last raylib release and here it is already a new one, this time with a bunch of internal redesigns and improvements. Surprisingly, on April the 8th I was awarded for a second time with the [Google Open Source Peer Bonus Award](https://opensource.googleblog.com/2021/04/announcing-first-group-of-google-open-source-peer-bonus-winners.html) for my contribution to open source world with raylib and it seems the library is getting some traction, what a better moment for a new release? Let's see what can be found in this new version:
April 2021, it's been about 4 months since the last raylib release and here is already a new one, this time with a bunch of internal redesigns and improvements. Surprisingly, on April 8th I was awarded for a second time with the [Google Open Source Peer Bonus Award](https://opensource.googleblog.com/2021/04/announcing-first-group-of-google-open-source-peer-bonus-winners.html) for my contribution to open source world with raylib and it seems the library is getting some traction, what a better moment for a new release? Let's see what can be found in this new version:
Let's start with some numbers:
@ -315,18 +315,18 @@ Highlights for `raylib 3.7`:
- **ADDED: glTF animations support**. glTF is the preferred models file format to be used with raylib and along the addition of a models animation API on latest raylib versions, now animations support for glTF format has come to raylib, thanks for this great contribution to [Hristo Stamenov](@object71)
- **ADDED: Music streaming support from memory**. raylib has been adding the `Load*FromMemory()` option to all its supported file formats but **music streaming** was not supported yet... until now. Thanks to this great contribution by [Agnis "NeZvērs" Aldiņš](@nezvers), now raylib supports music streamming from memory data for all supported file formats: WAV, OGG, MP3, FLAC, XM and MOD.
- **ADDED: Music streaming support from memory**. raylib has been adding the `Load*FromMemory()` option to all its supported file formats but **music streaming** was not supported yet... until now. Thanks to this great contribution by [Agnis "NeZvērs" Aldiņš](@nezvers), now raylib supports music streaming from memory data for all supported file formats: WAV, OGG, MP3, FLAC, XM and MOD.
- **RENAMED: enums values for consistency**. Most raylib enums names and values names have been renamed for consistency, now all value names start with the type of data they represent. It increases clarity and readability when using those values and also **improves overall library consistency**.
Beside those key changes, many functions have been reviewed with improvements and bug fixes, many of them contributed by the community! Thanks! And again, this release sets a **new milestone for raylib library**. Make sure to check [CHANGELOG](CHANGELOG) for detailed list of changes! Hope you enjoy this new raylib installment!
Besides those key changes, many functions have been reviewed with improvements and bug fixes, many of them contributed by the community! Thanks! And again, this release sets a **new milestone for raylib library**. Make sure to check [CHANGELOG](CHANGELOG) for detailed list of changes! Hope you enjoy this new raylib installment!
Happy **gamedev/tools/graphics** programming! :)
notes on raylib 4.0 - 8th Anniversary Edition
---------------------------------------------
It's been about 6 months since last raylib release and it's been **8 years since I started with this project**, what an adventure! It's time for a new release: `raylib 4.0`, **the biggest release ever** and an inflexion point for the library. Many hours have been put in this release to make it special, **many library details have been polished**: syntax, naming conventions, code comments, functions descriptions, log outputs... Almost all the issues have been closed (only 3 remain open at the moment of this writing) and some amazing new features have been added. I expect this **`raylib 4.0`** to be a long term version (LTS), stable and complete enough for any new graphic/game/tool application development.
It's been about 6 months since last raylib release and it's been **8 years since I started with this project**, what an adventure! It's time for a new release: `raylib 4.0`, **the biggest release ever** and an inflection point for the library. Many hours have been put in this release to make it special, **many library details have been polished**: syntax, naming conventions, code comments, functions descriptions, log outputs... Almost all the issues have been closed (only 3 remain open at the moment of this writing) and some amazing new features have been added. I expect this **`raylib 4.0`** to be a long-term version (LTS), stable and complete enough for any new graphic/game/tool application development.
Let's start with some numbers:
@ -339,11 +339,11 @@ Let's start with some numbers:
Highlights for `raylib 4.0`:
- **Naming consistency and coherency**: `raylib` API has been completely reviewed to be consistent on naming conventions for data structures and functions, comments and descriptions have been reviewed, also the syntax of many symbols for consistency; some functions and structs have been renamed (i.e. `struct CharInfo` to `struct GlyphInfo`). Output log messages have been also improved to show more info to the users. Several articles have been writen in this process: [raylib_syntax analysis](https://github.com/raysan5/raylib/wiki/raylib-syntax-analysis) and [raylib API usage analysis](https://gist.github.com/raysan5/7c0c9fff1b6c19af24bb4a51b7383f1e). In general, a big polishment of the library to make it more consistent and coherent.
- **Naming consistency and coherency**: `raylib` API has been completely reviewed to be consistent on naming conventions for data structures and functions, comments and descriptions have been reviewed, also the syntax of many symbols for consistency; some functions and structs have been renamed (i.e. `struct CharInfo` to `struct GlyphInfo`). Output log messages have been also improved to show more info to the users. Several articles have been written in this process: [raylib_syntax analysis](https://github.com/raysan5/raylib/wiki/raylib-syntax-analysis) and [raylib API usage analysis](https://gist.github.com/raysan5/7c0c9fff1b6c19af24bb4a51b7383f1e). In general, a big polishment of the library to make it more consistent and coherent.
- **Event Automation System**: This new _experimental_ feature has been added for future usage, it allows to **record input events and re-play them automatically**. This feature could be very useful to automatize examples testing but also for tutorials with assited game playing, in-game cinematics, speedruns, AI playing and more! Note this feature is still experimental.
- **Event Automation System**: This new _experimental_ feature has been added for future usage, it allows to **record input events and re-play them automatically**. This feature could be very useful to automatize examples testing but also for tutorials with assisted game playing, in-game cinematics, speedruns, AI playing and more! Note this feature is still experimental.
- **Custom game-loop control**: As requested by some advance users, **the game-loop control can be exposed** compiling raylib with the config flag: `SUPPORT_CUSTOM_FRAME_CONTROL`. It's intended for advance users that want to control the events polling and also the timming mechanisms of their games.
- **Custom game-loop control**: As requested by some advanced users, **the game-loop control can be exposed** compiling raylib with the config flag: `SUPPORT_CUSTOM_FRAME_CONTROL`. It's intended for advanced users that want to control the events polling and also the timing mechanisms of their games.
- [**`rlgl 4.0`**](https://github.com/raysan5/raylib/blob/master/src/rlgl.h): This module has been completely **decoupled from platform layer** and raylib, now `rlgl` single-file header-only library only depends on the multiple OpenGL backends supported, even the dependency on `raymath` has been removed. Additionally, **support for OpenGL 4.3** has been added, supporting compute shaders and Shader Storage Buffer Objects (SSBO). Now `rlgl` can be used as a complete standalone portable library to wrap several OpenGL version and providing **a simple and easy-to-use pseudo-OpenGL immediate-mode API**.
@ -361,12 +361,12 @@ Highlights for `raylib 4.0`:
Those are some of the key features for this new release but actually there is way more! **Support for `VOX` ([MagikaVoxel](https://ephtracy.github.io/)) 3d model format** has been added, **new [raylib_game_template](https://github.com/raysan5/raylib-game-template)** repo shared, **new `EncodeDataBase64()` and `DecodeDataBase64()` functions** added, **improved HiDPI support**, new `DrawTextPro()` with support for text rotations, completely **reviewed `glTF` models loading**, added **`SeekMusicStream()` for music seeking**, many new examples and +20 examples reviewed... **hundreds of improvements and bug fixes**! Make sure to check [CHANGELOG](CHANGELOG) for a detailed list of changes!
Undoubtely, **this is the best raylib ever**. Enjoy gamedev/tools/graphics programming! :)
Undoubtedly, **this is the best raylib ever**. Enjoy gamedev/tools/graphics programming! :)
notes on raylib 4.2
-------------------
**New raylib release!** Nine months after latest raylib, here it is a new version. It was supposed to be just a small update but, actually, it's a huge update with lots of changes a improvements. It has been possible thanks to the many contributors that has helped with issues and improvements, it's the **update with more contributors to date** and that's amazing!
**New raylib release!** Nine months after latest raylib, here is a new version. It was supposed to be just a small update but, actually, it's a huge update with lots of changes a improvements. It has been possible thanks to the many contributors that has helped with issues and improvements, it's the **update with more contributors to date** and that's amazing!
Some numbers to start with:
@ -379,18 +379,18 @@ Some numbers to start with:
Highlights for `raylib 4.2`:
- **raylib extra libraries cleanup**: raylib has been on diet and all the _extra_ libraries included on previous releases have been removed from raylib. Now raylib only includes the original **7** raylib modules: `rcore`, `rlgl`, `rshapes`, `rtextures`, `rtext`, `rmodels` and `raudio`. But no worries, _extra_ libraries have not been deleted, they have been moved to their own repos for better maintainability and more focus on its functionality. The libraries moved out from raylib repo are: [`raygui`](https://github.com/raysan5/raygui), [`physac`](https://github.com/raysan5/physac), [`rmem`](https://github.com/raylib-extras/rmem), [`reasings`](https://github.com/raylib-extras/reasings) and [`raudio`](https://github.com/raysan5/raudio) (standalone mode). On that same line, a new **amazing GitHub group:** [`raylib-extras`](https://github.com/raylib-extras) has been created by @JeffM2501 to contain raylib extra libraries as well as other raylib add-ons provided by the community. Jeff has done an amazing work on that line, providing multiple libraries and examples for raylib, like [custom first-person and third person camera systems](https://github.com/raylib-extras/extras-c/tree/main/cameras), [Dear ImGui raylib integration](https://github.com/raylib-extras/rlImGui), [multiple specific examples](https://github.com/raylib-extras/examples-c) and even a complete [RPG Game Example](https://github.com/raylib-extras/RPGExample)! Great work Jeff! :D
- **raylib examples review**: The +120 raylib examples have been reviewed to add clearer information about when the were first created (raylib version used) and when they were updated for the last time. But the greatest improvement for users has been the **addition of an estimated difficulty level** for every example, [web has been updated accordingly](https://www.raylib.com/examples.html) to reflect those difficulty levels. Now examples are classified with **1 to 4 stars** depending on difficulty to help users with their learning process. Personally, I think this "small" addition could be a game-changer to better guide new users on the library adoption! Additionally, this new raylib release includes 7 new examples; the most interesting one: [`text_codepoints_loading`](https://www.raylib.com/examples/text/loader.html?name=text_codepoints_loading) that illustrates how to load and draw custom codepoints from a font file, very useful for Asian languages.
- **raylib examples review**: The +120 raylib examples have been reviewed to add clearer information about when the were first created (raylib version used) and when they were updated for the last time. But the greatest improvement for users has been the **addition of an estimated difficulty level** for every example, [web has been updated accordingly](https://www.raylib.com/examples.html) to reflect those difficulty levels. Now examples are classified with **1 to 4 stars** depending on difficulty to help users with their learning process. Personally, I think this "small" addition could be a game-changer to better guide new users on the library adoption! Additionally, this new raylib release includes 7 new examples; the most interesting one: [`text_codepoints_loading`](https://www.raylib.com/examples/text/loader.html?name=text_codepoints_loading) that illustrates how to load and draw custom codepoints from a font file, very useful for Asian languages.
- [**`rres 1.0`**](https://github.com/raysan5/rres): New `rres` **resources packaging file-format**, including a [`rres-raylib`](https://github.com/raysan5/rres/blob/master/src/rres-raylib.h) library implementation and [`rrespacker`](https://raylibtech.itch.io/rrespacker) tool. `rres` file format has been [under development for +8 years](https://github.com/raysan5/rres#design-history) and it was originally created to be part of raylib. It was highly inspired by _XNA XNB_ resources file format but design has changed a lot along the years. This first release of the format specs is engine-agnostic and has been designed to be portable to any engine, including lots of professional features like data processing, compression and encryption.
- [**`raygui 3.2`**](https://github.com/raysan5/raygui): The **official raylib immediate-mode gui library** designed for tools development has been updated to a new version aligned with raylib 4.2. Multiple controls have been reviewed for library consistency, now all controls follow a similar function signature. It has been battle-tested with the development of +8 published tools in the last months. The tools can be seen and used for free in the [raylib technologies tools page](https://raylibtech.itch.io/). Worth mentioning that several of those **tools have been open sourced** for anyone to use, compile, contribute or learn how the code works.
- [**`raylib_parser`**](https://github.com/raysan5/raylib/tree/master/parser): Multiple contributors **using the tool to automatize bindings creation** have contributed with improvements of this **tool to parse `raylib.h`** (and other raylib-style headers) to tokenize its enums, structs and functions. Processed data can be exported to custom file formats (i.e XML, JSON, LUA) for bindings generation or even docs generation if required.
- **New file system API**: Current API has been redesigned to be more comprehensive and better aligned with raylib naming conventions, two new functions are provided `LoadDirectoryFiles()`/`LoadDirectoryFilesEx()` to load a `FilePathList` for provided path, supporting extension filtering and recursive directory scan. `LoadDroppedFiles()` has been renamed to better reflect its internal functionality. Now, all raylib functions that start with `Load*()` allocate memory internally and a equivalent `Unload*()` function is defined to take care of that memory internally when not required any more!
- **New audio stream processors API** (_experimental_): Now real-time audio stream data processors can be added using callbacks to played Music. It allows users to create custom effects for audio like delays of low-pass-filtering (example provided). The new API uses a callback system and it's still _ highly experimental_, it differs from the usual level of complexity that provides raylib and it is intended for advance users. It could change in the future but, actually, `raudio` module is in the spotlight for future updates; [miniaudio](https://github.com/mackron/miniaudio) implements a new higher-level API that can be useful in the future for raylib.
- **New audio stream processors API** (_experimental_): Now real-time audio stream data processors can be added using callbacks to played Music. It allows users to create custom effects for audio like delays of low-pass-filtering (example provided). The new API uses a callback system and it's still _ highly experimental_, it differs from the usual level of complexity that provides raylib and it is intended for advanced users. It could change in the future but, actually, `raudio` module is in the spotlight for future updates; [miniaudio](https://github.com/mackron/miniaudio) implements a new higher-level API that can be useful in the future for raylib.
As always, there are more improvements than the key features listed, make sure to check raylib [CHANGELOG](CHANGELOG) for the detailed list of changes; for this release a `WARNING` flag has been added to all the changes that could affect bindings or productivity code. **raylib keeps improving one more version** and a special focus on maintainability has been put on the library for the future. Specific/advance functionality will be provided through **raylib-extras** repos and raylib main repo devlelopment will be focused on what made raylib popular: being a simple and easy-to-use library to **enjoy videogames programming**.
@ -399,7 +399,7 @@ As always, there are more improvements than the key features listed, make sure t
notes on raylib 4.5
-------------------
It's been **7 months** since latest raylib release. As usual, **many parts of the library have been reviewed and improved** along those months. Many issues have been closed, staying under 10 open issues at the moment of this writting and also many PRs from contributors have been received, reviewed and merged into raylib library. Some new functions have been added and some others have been removed to improve library coherence and avoid moving too high level, giving the users the tools to implement advance functionality themselfs over raylib. Again, this is a big release with a considerable amount of changes and improvements. Here it is a small summary highlighting this new **rayib 4.5**.
It's been **7 months** since latest raylib release. As usual, **many parts of the library have been reviewed and improved** along those months. Many issues have been closed, staying under 10 open issues at the moment of this writting and also many PRs from contributors have been received, reviewed and merged into raylib library. Some new functions have been added and some others have been removed to improve library coherence and avoid moving too high level, giving the users the tools to implement advance functionality themselfs over raylib. Again, this is a big release with a considerable amount of changes and improvements. Here is a small summary highlighting this new **rayib 4.5**.
Some numbers for this release:
@ -413,22 +413,112 @@ Highlights for `raylib 4.5`:
- **`NEW` Improved ANGLE support on Desktop platforms**: Support for OpenGL ES 2.0 on Desktop platforms (Windows, Linux, macOS) has been reviewed by @wtnbgo GitHub user. Now raylib can be compiled on desktop for OpenGL ES 2.0 and linked against [`ANGLE`](https://github.com/google/angle). This _small_ addition open the door to building raylib for all **ANGLE supported backends: Direct3D 11, Vulkan and Metal**. Please note that this new feature is still experimental and requires further testing!
- **`NEW` Camera module**: A brand new implementation from scratch for `rcamera` module, contributed by @Crydsch GitHub user! **New camera system is simpler, more flexible, more granular and more extendable**. Specific camera math transformations (movement/rotation) have been moved to individual functions, exposing them to users if required. Global state has been removed from the module and standalone usage has been greatly improved; now `rcamera.h` single-file header-only library can be used externally, independently of raylib. A new `UpdateCameraPro()` function has been added to address input-dependency of `UpdateCamera()`, now advance users have **full control over camera inputs and movement/rotation speeds**!
- **`NEW` Support for M3D models and M3D/GLTF animations**: 3d models animations support has been a limited aspect of raylib for long time, some versions ago IQM animations were supported but raylib 4.5 also adds support for the brand new [M3D file format](https://bztsrc.gitlab.io/model3d/), including animations and the long expected support for **GLTF animations**! The new M3D file format is **simple, portable, feature complete, extensible and open source**. It also provides a complete set of tools to export/visualize M3D models from/to Blender! Now raylib supports up to **3 model file-formats with animations**: `IQM`, `GLTF` and `M3D`.
- **`NEW` Support QOA audio format (import/export)**: Just a couple of months ago the new [QOA file format](https://qoaformat.org/) was published, a very simple, portable and open source quite-ok-audio file format. raylib already supports it, added to `raudio` module and including audio loading from file, loading from memory, streaming from file, streaming from memory and **exporting to QOA** audio format. **Because simplicity really matters to raylib!**
- **`NEW` Module for compressed textures loading**: [`rl_gputex`](https://github.com/raysan5/raylib/blob/master/src/external/rl_gputex.h), a portable single-file header-only small library to load compressed texture file-formats (DDS, PKM, KTX, PVR, ASTC). Provided functionality is not new to raylib but it was part of the raylib `rtextures` module, now it has been moved into a separate self-contained library, **improving portability**. Note that this module is only intended to **load compressed data from files, ready to be uploaded to GPU**, no compression/decompression functionality is provided. This change is a first step towards a better modularization of raylib library.
- **Reviewed `rlgl` module for automatic limits checking**: Again, [`rlgl`](https://github.com/raysan5/raylib/blob/master/src/rlgl.h) has been reviewed to simplify usage. Now users do not need to worry about reaching the internal render-batch limits when they send their triangles to draw 2d/3d, `rlgl` manages it automatically! This change allows a **great simplification for other modules** like `rshapes`, `rtextures` and `rmodels` that do not need to worry about bufffer overflows and can just define as many vertex as desired!
- **Reviewed `rshapes` module to minimize the rlgl dependency**: Now `rshapes` 2d shapes drawing functions **only depend on 6 low-level functions**: `rlBegin()`, `rlEnd()`, `rlVertex3f()`, `rlTexCoord2f()`, `rlNormal3f()`, `rlSetTexture()`. With only those pseudo-OpenGl 1.1 minimal functionality, everything can be drawn! This improvement converts `rshapes` module in a **self-contained, portable shapes-drawing library that can be used independently of raylib**, as far as entry points for those 6 functions are provided by the user. It even allows to be used for software rendering, with the proper backend!
- **`NEW` Camera module**: A brand new implementation from scratch for `rcamera` module, contributed by @Crydsch GitHub user! **New camera system is simpler, more flexible, more granular and more extendable**. Specific camera math transformations (movement/rotation) have been moved to individual functions, exposing them to users if required. Global state has been removed from the module and standalone usage has been greatly improved; now `rcamera.h` single-file header-only library can be used externally, independently of raylib. A new `UpdateCameraPro()` function has been added to address input-dependency of `UpdateCamera()`, now advanced users have **full control over camera inputs and movement/rotation speeds**!
- **`NEW` Support for M3D models and M3D/GLTF animations**: 3d models animations support has been a limited aspect of raylib for long time, some versions ago IQM animations were supported but raylib 4.5 also adds support for the brand new [M3D file format](https://bztsrc.gitlab.io/model3d/), including animations and the long expected support for **GLTF animations**! The new M3D file format is **simple, portable, feature complete, extensible and open source**. It also provides a complete set of tools to export/visualize M3D models from/to Blender! Now raylib supports up to **3 model file-formats with animations**: `IQM`, `GLTF` and `M3D`.
- **`NEW` Support QOA audio format (import/export)**: Just a couple of months ago the new [QOA file format](https://qoaformat.org/) was published, a very simple, portable and open source quite-ok-audio file format. raylib already supports it, added to `raudio` module and including audio loading from file, loading from memory, streaming from file, streaming from memory and **exporting to QOA** audio format. **Because simplicity really matters to raylib!**
- **`NEW` Module for compressed textures loading**: [`rl_gputex`](https://github.com/raysan5/raylib/blob/master/src/external/rl_gputex.h), a portable single-file header-only small library to load compressed texture file-formats (DDS, PKM, KTX, PVR, ASTC). Provided functionality is not new to raylib but it was part of the raylib `rtextures` module, now it has been moved into a separate self-contained library, **improving portability**. Note that this module is only intended to **load compressed data from files, ready to be uploaded to GPU**, no compression/decompression functionality is provided. This change is a first step towards a better modularization of raylib library.
- **Reviewed `rlgl` module for automatic limits checking**: Again, [`rlgl`](https://github.com/raysan5/raylib/blob/master/src/rlgl.h) has been reviewed to simplify usage. Now users do not need to worry about reaching the internal render-batch limits when they send their triangles to draw 2d/3d, `rlgl` manages it automatically! This change allows a **great simplification for other modules** like `rshapes`, `rtextures` and `rmodels` that do not need to worry about bufffer overflows and can just define as many vertex as desired!
- **Reviewed `rshapes` module to minimize the rlgl dependency**: Now `rshapes` 2d shapes drawing functions **only depend on 6 low-level functions**: `rlBegin()`, `rlEnd()`, `rlVertex3f()`, `rlTexCoord2f()`, `rlNormal3f()`, `rlSetTexture()`. With only those pseudo-OpenGl 1.1 minimal functionality, everything can be drawn! This improvement converts `rshapes` module in a **self-contained, portable shapes-drawing library that can be used independently of raylib**, as far as entry points for those 6 functions are provided by the user. It even allows to be used for software rendering, with the proper backend!
- **Added data structures validation functions**: Multiple functions have been added by @RobLoach GitHub user to ease the validation of raylib data structures: `IsImageReady()`, `IsTextureReady()`, `IsSoundReady()`... Now users have a simple mechanism to **make sure data has been correctly loaded**, instead of checking internal structure values by themselves.
- **Added data structures validation functions**: Multiple functions have been added by @RobLoach GitHub user to ease the validation of raylib data structures: `IsImageReady()`, `IsTextureReady()`, `IsSoundReady()`... Now users have a simple mechanism to **make sure data has been correctly loaded**, instead of checking internal structure values by themselfs.
As usual, those are only some highlights but there is much more! New image generators, new color transformation functionality, improved blending support for color/alpha, etc... Make sure to check raylib [CHANGELOG]([CHANGELOG](https://github.com/raysan5/raylib/blob/master/CHANGELOG)) for a detailed list of changes! Please, note that all breaking changes have been flagged with a `WARNING` in the CHANGELOG, specially useful for binding creators!
**raylib keeps improving one more version** with a special focus on maintainability and sustainability. Always working towards making the library more **simple and easy-to-use**.
**raylib keeps improving one more version** with a special focus on maintainability and sustainability. Always working towards making the library more **simple and easy-to-use**.
Let's keep **enjoying games/tools/graphics programming!** :)
notes on raylib 5.0
-------------------
It's been **7 months** since latest raylib release and **10 years** since raylib 1.0 was officially released... what an adventure! In the last 10 years raylib has improved a lot, new functions have been added, many new features and improvements implemented, up to **500 contributors** have helped to shape the library as it is today. `raylib 5.0` is the final result of all this incredible amount of work and dedication. Here is the summary with the key features and additions of this NEW major version of raylib.
Some numbers for this release:
- **+200** closed issues (for a TOTAL of **+1540**!)
- **+550** commits since previous RELEASE (for a TOTAL of **+6950**!)
- **+35** functions ADDED to raylib API (for a TOTAL of **552**!)
- **+60** functions REVIEWED/REDESIGNED
- **+80** new contributors (for a TOTAL of **+500**!)
Highlights for `raylib 5.0`:
- **`rcore` module platform-split**: Probably the biggest raylib redesign in the last 10 years. raylib started as a library targeting 3 desktop platforms: `Windows`, `Linux` and `macOS` (thanks to `GLFW` underlying library) but with the years support for several new platforms has been added (`Android`, `Web`, `Rapsberry Pi`, `RPI native`...); lot of the platform code was shared so the logic was all together on `rcore.c` module, separated by compilation flags. This approach was very handy but also made it very difficult to support new platforms and specially painful for contributors not familiar with the module, navigating +8000 lines of code in a single file. A big redesign was really needed but the amount of work required was humungous and quite scary for a solo-developer like me, moreover considering that everything was working and the chances to break things were really high. Fortunately, some contributors were ready for the task (@ubkp, @michaelfiber, @Bigfoot71) and thanks to their initiative and super-hard work, the `rcore` [platform split](https://github.com/raysan5/raylib/blob/master/src/platforms) has been possible! This new raylib architecture greatly improves the platforms maintenance but also greatly simplifies the addition of new platforms. A [`platforms/rcore_template.c`](https://github.com/raysan5/raylib/blob/master/src/platforms/rcore_template.c) file is provided with the required structure and functions to be filled for the addition of new platforms, actually it has been simplified to mostly filling some pre-defined functions: `InitPlatform()`, `ClosePlatform`, `PollInputEvents`... Undoubtedly, **this redesign opens the doors to a new era for raylib**, letting the users to plug new platforms as desired.
- **`NEW` Platform backend supported: SDL**: Thanks to the new `rcore` platform-split, the addition of new platforms/backends to raylib has been greatly simplified. As a proof of concept, [`SDL2`](https://libsdl.org/) platform backend has been added to raylib as an alternative for `GLFW` library for desktop builds: [`platforms/rcore_desktop_sdl`](https://github.com/raysan5/raylib/blob/master/src/platforms/rcore_desktop_sdl.c). Lot of work has been put to provide exactly the same features as the other platforms and carefully test the new implementation. Now `SDL2` fans can use this new backend, just providing the required include libraries on compilation and linkage (not included in raylib, like `GLFW`). `SDL` backend support also **eases the process of supporting a wider range of platforms** that already support `SDL`.
- **`NEW` Platform backend supported: Nintendo Switch (closed source)**: The addition of the `SDL` backend was quite a challenge but to really verify the robustness and ease of the new platform plugin system, adding support for a console was a more demanding adventure. Surprisingly, only two days of work were required to add support for `Nintendo Switch` to raylib! Implementation result showed an outstanding level of simplicity, with a **self-contained module** (`rcore_swith.cpp`) supporting graphics and inputs. Unfortunately this module can not be open-sourced due to licensing restrictions.
- **`NEW` Splines drawing and evaluation API**: A complete set of functions has been added to [draw](https://github.com/raysan5/raylib/blob/master/src/raylib.h#L1258) and [evaluate](https://github.com/raysan5/raylib/blob/master/src/raylib.h#L1270) different types of splines: `Linear`, `Basis`, `Catmull-Rom`, `Quadratic Bezier` and `Cubic Bezier`. Splines are extremely useful for game development (describe paths, control NPC movement...) but they can also be very useful on tools development (node-conections, elements-movement, 3d modelling, animations...). This was the missing feature on the raylib [`rshapes`](https://github.com/raysan5/raylib/blob/master/src/rshapes.h) module to make it complete! Note that `rshapes` module can also be used independently of raylib just providing the **only 6 functions required for vertex definition and drawing**.
- **`NEW` Pseudo-random numbers generator: rprand**: After several years of users asking for this missing piece, a brand new pseudo-random generator module has been added to raylib. [`rprand`](https://github.com/raysan5/raylib/blob/master/src/external/rprand.h) implements the `Xoshiro128**` algorithm combined with `SplitMix64`, specially suited for **fast software pseudo-random numbers generation**. The module also implies some useful functions to generate non-repetitive random numbers sequences, functionality exposed by raylib. usage of this module can be controlled by a compilation flag, in case the default libc `rand()` function was preferred.
- **`NEW` Automation Events System API**: This new system was first added in `raylib 4.0` as an experimental feature but it was a bit clumsy and there was no API exposed to users. For the new `raylib 5.0` the system has been redesigned and [proper API](https://github.com/raysan5/raylib/blob/master/src/raylib.h#L1135) added for the users. With this new events automation system, users can **record input events for later replay**, very useful feature for testing automation, tutorials generation, assisted game playing, in-game cinematics, speedruns saving or even AI assited game playing!
- **`NEW` [`raygui 4.0`](https://github.com/raysan5/raygui)**: The **official raylib immediate-mode gui library** designed for tools development has been updated to a new version, aligned with raylib 5.0. This new version is a complete redesign of raygui to unify all controls structure and usage, now all controls have the same function signature!. `raygui` has been battle-tested with the development of +12 published tools in the last few years. The tools can be seen and used for free in the [raylib technologies tools page](https://raylibtech.itch.io/). Worth mentioning that several of those **tools have been open sourced** for anyone to use, compile, contribute or learn how the code works.
- **`NEW` raylib web examples functionality**: Beside the addition of several new examples, the web examples functionality has been improved. Examples have been organized by [complexity level](https://www.raylib.com/examples.html), marked with one star for simple examples and up to 4 stars for more complex ones. A new option has been added to web to allow to **filter examples by function-name** usage, to ease the learning process when looking for an usage example of some function. Finally, **open-graph metadata** information has been added to all examples individual webpages, improving a the visuals and information when sharing those webpages on social networks, sharing the example screenshot and details.
As always, those are only some highlights of the new `raylib 5.0` but there is many more improvements! Support for 16-bit HDR images/textures, SVG loading and scaling support, new OpenGL ES 3.0 graphic backend, new image gradient generators, sound alias loading, improved 3d models loading, multiple optimizations, new bindings, CodeQL integration and much more!
Make sure to check raylib [CHANGELOG]([CHANGELOG](https://github.com/raysan5/raylib/blob/master/CHANGELOG)) for a detailed list of changes!
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, arribes `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!** :)

View file

@ -1,4 +1,4 @@
Copyright (c) 2013-2023 Ramon Santamaria (@raysan5)
Copyright (c) 2013-2024 Ramon Santamaria (@raysan5)
This software is provided "as-is", without any express or implied warranty. In no event
will the authors be held liable for any damages arising from the use of this software.

View file

@ -1,8 +1,10 @@
<img align="left" src="https://github.com/raysan5/raylib/blob/master/logo/raylib_logo_animation.gif" width="288px">
<img align="left" style="width:260px" src="https://git.terah.dev/imterah/raylib-drm-leasing/raw/branch/master/logo/raylib_logo_animation.gif" width="288px">
**raylib is a simple and easy-to-use library to enjoy videogames programming.**
raylib is highly inspired by Borland BGI graphics lib and by XNA framework and it's specially well suited for prototyping, tooling, graphical applications, embedded systems and education.
raylib is highly inspired by Borland BGI graphics lib and by XNA framework and it's especially well suited for prototyping, tooling, graphical applications, embedded systems and education.
This is a fork of raylib designed to add DRM leasing support, which is used in [UnrealXR](https://git.terah.dev/imterah/unrealxr). Please go support the raylib developers!
*NOTE for ADVENTURERS: raylib is a programming library to enjoy videogames programming; no fancy interface, no visual helpers, no debug button... just coding in the most pure spartan-programmers way.*
@ -12,51 +14,29 @@ Ready to learn? Jump to [code examples!](https://www.raylib.com/examples.html)
<br>
[![GitHub Releases Downloads](https://img.shields.io/github/downloads/raysan5/raylib/total)](https://github.com/raysan5/raylib/releases)
[![GitHub Stars](https://img.shields.io/github/stars/raysan5/raylib?style=flat&label=stars)](https://github.com/raysan5/raylib/stargazers)
[![GitHub commits since tagged version](https://img.shields.io/github/commits-since/raysan5/raylib/4.2.0)](https://github.com/raysan5/raylib/commits/master)
[![GitHub Sponsors](https://img.shields.io/github/sponsors/raysan5?label=sponsors)](https://github.com/sponsors/raysan5)
[![Packaging Status](https://repology.org/badge/tiny-repos/raylib.svg)](https://repology.org/project/raylib/versions)
[![License](https://img.shields.io/badge/license-zlib%2Flibpng-blue.svg)](LICENSE)
[![Discord Members](https://img.shields.io/discord/426912293134270465.svg?label=Discord&logo=discord)](https://discord.gg/raylib)
[![Subreddit Subscribers](https://img.shields.io/reddit/subreddit-subscribers/raylib?label=reddit%20r%2Fraylib&logo=reddit)](https://www.reddit.com/r/raylib/)
[![Youtube Subscribers](https://img.shields.io/youtube/channel/subscribers/UC8WIBkhYb5sBNqXO1mZ7WSQ?style=flat&label=Youtube&logo=youtube)](https://www.youtube.com/c/raylib)
[![Twitch Status](https://img.shields.io/twitch/status/raysan5?style=flat&label=Twitch&logo=twitch)](https://www.twitch.tv/raysan5)
[![Windows](https://github.com/raysan5/raylib/workflows/Windows/badge.svg)](https://github.com/raysan5/raylib/actions?query=workflow%3AWindows)
[![Linux](https://github.com/raysan5/raylib/workflows/Linux/badge.svg)](https://github.com/raysan5/raylib/actions?query=workflow%3ALinux)
[![macOS](https://github.com/raysan5/raylib/workflows/macOS/badge.svg)](https://github.com/raysan5/raylib/actions?query=workflow%3AmacOS)
[![Android](https://github.com/raysan5/raylib/workflows/Android/badge.svg)](https://github.com/raysan5/raylib/actions?query=workflow%3AAndroid)
[![WebAssembly](https://github.com/raysan5/raylib/workflows/WebAssembly/badge.svg)](https://github.com/raysan5/raylib/actions?query=workflow%3AWebAssembly)
[![CMakeBuilds](https://github.com/raysan5/raylib/workflows/CMakeBuilds/badge.svg)](https://github.com/raysan5/raylib/actions?query=workflow%3ACMakeBuilds)
[![Windows Examples](https://github.com/raysan5/raylib/actions/workflows/windows_examples.yml/badge.svg)](https://github.com/raysan5/raylib/actions/workflows/windows_examples.yml)
[![Linux Examples](https://github.com/raysan5/raylib/actions/workflows/linux_examples.yml/badge.svg)](https://github.com/raysan5/raylib/actions/workflows/linux_examples.yml)
features
--------
- **NO external dependencies**, all required libraries are [bundled into raylib](https://github.com/raysan5/raylib/tree/master/src/external)
- Multiple platforms supported: **Windows, Linux, MacOS, RPI, Android, HTML5... and more!**
- Written in plain C code (C99) using PascalCase/camelCase notation
- Hardware accelerated with OpenGL (**1.1, 2.1, 3.3, 4.3 or ES 2.0**)
- Hardware accelerated with OpenGL (**1.1, 2.1, 3.3, 4.3, 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, 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!
- **Full 3D support**, including 3D Shapes, Models, Billboards, Heightmaps and more!
- Flexible Materials system, supporting classic maps and **PBR maps**
- **Animated 3D models** supported (skeletal bones animation) (IQM)
- Shaders support, including model and **postprocessing** shaders.
- **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](https://github.com/raysan5/raylib/blob/master/src/raymath.h)
- Audio loading and playing with streaming support (WAV, OGG, MP3, FLAC, XM, MOD)
- Audio loading and playing with streaming support (WAV, QOA, OGG, MP3, FLAC, XM, MOD)
- **VR stereo rendering** support with configurable HMD device parameters
- Huge examples collection with [+120 code examples](https://github.com/raysan5/raylib/tree/master/examples)!
- Bindings to [+60 programming languages](https://github.com/raysan5/raylib/blob/master/BINDINGS.md)!
- **Free and open source**.
- Huge examples collection with [+140 code examples](https://github.com/raysan5/raylib/tree/master/examples)!
- Bindings to [+70 programming languages](https://github.com/raysan5/raylib/blob/master/BINDINGS.md)!
- **Free and open source**
basic example
--------------
This is a basic raylib example, it creates a window and it draws the text `"Congrats! You created your first window!"` in the middle of the screen. Check this example [running live on web here](https://www.raylib.com/examples/core/loader.html?name=core_basic_window).
This is a basic raylib example, it creates a window and draws the text `"Congrats! You created your first window!"` in the middle of the screen. Check this example [running live on web here](https://www.raylib.com/examples/core/loader.html?name=core_basic_window).
```c
#include "raylib.h"
@ -83,7 +63,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
@ -112,9 +92,9 @@ raylib has been developed on Windows platform using [Notepad++](https://notepad-
learning and docs
------------------
raylib is designed to be learned using [the examples](https://github.com/raysan5/raylib/tree/master/examples) as the main reference. There is no standard API documentation but there is a [**cheatsheet**](https://www.raylib.com/cheatsheet/cheatsheet.html) containing all the functions available on the library a short description of each one of them, input parameters and result value names should be intuitive enough to understand how each function works.
raylib is designed to be learned using [the examples](https://github.com/raysan5/raylib/tree/master/examples) as the main reference. There is no standard API documentation but there is a [**cheatsheet**](https://www.raylib.com/cheatsheet/cheatsheet.html) containing all the functions available on the library a short description of each one of them, input parameters and result value names should be intuitive enough to understand how each function works.
Some additional documentation about raylib design can be found in raylib GitHub Wiki. Here are the relevant links:
Some additional documentation about raylib design can be found in [raylib GitHub Wiki](https://github.com/raysan5/raylib/wiki). Here are the relevant links:
- [raylib cheatsheet](https://www.raylib.com/cheatsheet/cheatsheet.html)
- [raylib architecture](https://github.com/raysan5/raylib/wiki/raylib-architecture)
@ -136,9 +116,16 @@ raylib is present in several networks and raylib community is growing everyday.
- Patreon: [https://www.patreon.com/raylib](https://www.patreon.com/raylib)
- YouTube: [https://www.youtube.com/channel/raylib](https://www.youtube.com/c/raylib)
contributors
------------
<a href="https://github.com/raysan5/raylib/graphs/contributors">
<img src="https://contrib.rocks/image?repo=raysan5/raylib&max=500&columns=20&anon=1" />
</a>
license
-------
raylib is licensed under an unmodified zlib/libpng license, which is an OSI-certified, BSD-like license that allows static linking with closed source software. Check [LICENSE](LICENSE) for further details.
raylib uses internally some libraries for window/graphics/inputs management and also to support different file formats loading, all those libraries are embedded with and are available in [src/external](https://github.com/raysan5/raylib/tree/master/src/external) directory. Check [raylib dependencies LICENSES](https://github.com/raysan5/raylib/wiki/raylib-dependencies) on raylib Wiki for details.
raylib uses internally some libraries for window/graphics/inputs management and also to support different file formats loading, all those libraries are embedded with and are available in [src/external](https://github.com/raysan5/raylib/tree/master/src/external) directory. Check [raylib dependencies LICENSES](https://github.com/raysan5/raylib/wiki/raylib-dependencies) on [raylib Wiki](https://github.com/raysan5/raylib/wiki) for details.

View file

@ -1,6 +1,6 @@
# raylib roadmap
Here it is a wishlist with features and ideas to improve the library. Note that features listed here are usually long term improvements or just describe a route to follow for the library. There are also some additional places to look for raylib improvements and ideas:
Here is a wishlist with features and ideas to improve the library. Note that features listed here are usually long term improvements or just describe a route to follow for the library. There are also some additional places to look for raylib improvements and ideas:
- [GitHub Issues](https://github.com/raysan5/raylib/issues) has several open issues for possible improvements or bugs to fix.
- [raylib source code](https://github.com/raysan5/raylib/tree/master/src) has multiple *TODO* comments around code with pending things to review or improve.
@ -11,16 +11,25 @@ Here it is a wishlist with features and ideas to improve the library. Note that
_Current version of raylib is complete and functional but there is always room for improvements._
**raylib 5.x**
- [ ] `rcore`: Support additional platforms: iOS, Xbox Series S|X
- [ ] `rcore_web`: Avoid GLFW dependency, functionality can be directly implemented using emscripten SDK
- [ ] `rlgl`: Review GLSL shaders naming conventions for consistency
- [ ] `textures`: Improve compressed textures support, loading and saving
- [ ] `rmodels`: Improve 3d objects loading, specially animations (obj, gltf)
- [ ] `raudio`: Implement miniaudio high-level provided features
- [ ] `examples`: Review all examples, add more and better code explanations
- [ ] Software renderer backend? Maybe using `Image` provided API
**raylib 4.x**
- [ ] Split core module into separate platforms?
- [ ] Basic 2d software renderer, using `Image` provided API
- [ ] Redesign gestures system, improve touch inputs management
- [ ] Redesign audio module, implement miniaudio high-level provided features
- [x] Split core module into separate platforms?
- [x] Redesign gestures system, improve touch inputs management
- [x] Redesign camera module (more flexible) ([#1143](https://github.com/raysan5/raylib/issues/1143), https://github.com/raysan5/raylib/discussions/2507)
- [x] Better documentation and improved examples, reviewed webpage with examples complexity level
- [x] Focus on HTML5 ([raylib 5k gamejam](https://itch.io/jam/raylib-5k-gamejam)) and embedded platforms (RPI and similar SOCs)
- [x] Additional support libraries: [raygui](https://github.com/raysan5/raygui), [rres](https://github.com/raysan5/rres)
**raylib 4.0**
- [x] Improved consistency and coherency in raylib API
- [x] Continuous Deployment using GitHub Actions
@ -64,7 +73,7 @@ _Current version of raylib is complete and functional but there is always room f
**raylib 1.5**
- [x] Support Oculus Rift CV1 and VR stereo rendering (simulator)
- [x] Redesign Shaders/Textures system -> New Materials system
- [x] Support lighting: Omni, Directional and Spot lights
- [x] Support lighting: Omni, Directional and Spotlights
- [x] Redesign physics module (physac)
- [x] Chiptunes audio modules support

416
build.zig
View file

@ -1,7 +1,384 @@
const std = @import("std");
const raylib = @import("src/build.zig");
const builtin = @import("builtin");
pub fn build(b: *std.Build) void {
/// Minimum supported version of Zig
const min_ver = "0.13.0";
comptime {
const order = std.SemanticVersion.order;
const parse = std.SemanticVersion.parse;
if (order(builtin.zig_version, parse(min_ver) catch unreachable) == .lt)
@compileError("Raylib requires zig version " ++ min_ver);
}
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),
.sdl => raylib.defineCMacro("PLATFORM_DESKTOP_SDL", null),
else => {},
}
}
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
@setEvalBranchQuota(1 << 20);
const config_h = @embedFile("src/config.h");
var flags: [std.mem.count(u8, config_h, "\n") + 1][]const u8 = undefined;
var i = 0;
var lines = std.mem.tokenizeScalar(u8, config_h, '\n');
while (lines.next()) |line| {
if (!std.mem.containsAtLeast(u8, line, 1, "SUPPORT")) continue;
if (std.mem.startsWith(u8, line, "//")) continue;
if (std.mem.startsWith(u8, line, "#if")) continue;
var flag = std.mem.trimLeft(u8, line, " \t"); // Trim whitespace
flag = flag["#define ".len - 1 ..]; // Remove #define
flag = std.mem.trimLeft(u8, flag, " \t"); // Trim whitespace
flag = flag[0 .. std.mem.indexOf(u8, flag, " ") orelse continue]; // Flag is only one word, so capture till space
flag = "-D" ++ flag; // Prepend with -D
flags[i] = flag;
i += 1;
}
// Uncomment this to check what flags normally get passed
//@compileLog(flags[0..i].*);
break :outer flags[0..i].*;
};
fn compileRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.builtin.OptimizeMode, options: Options) !*std.Build.Step.Compile {
var raylib_flags_arr = std.ArrayList([]const u8).init(b.allocator);
defer raylib_flags_arr.deinit();
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.shared) {
try raylib_flags_arr.appendSlice(&[_][]const u8{
"-fPIC",
"-DBUILD_LIBTYPE_SHARED",
});
}
if (options.config.len > 0) {
// Sets a flag indiciating the use of a custom `config.h`
try raylib_flags_arr.append("-DEXTERNAL_CONFIG_FLAGS");
// Splits a space-separated list of config flags into multiple flags
//
// Note: This means certain flags like `-x c++` won't be processed properly.
// `-xc++` or similar should be used when possible
var config_iter = std.mem.tokenizeScalar(u8, options.config, ' ');
// Apply config flags supplied by the user
while (config_iter.next()) |config_flag|
try raylib_flags_arr.append(config_flag);
// Apply all relevant configs from `src/config.h` *except* the user-specified ones
//
// Note: Currently using a suboptimal `O(m*n)` time algorithm where:
// `m` corresponds roughly to the number of lines in `src/config.h`
// `n` corresponds to the number of user-specified flags
outer: for (config_h_flags) |flag| {
// If a user already specified the flag, skip it
config_iter.reset();
while (config_iter.next()) |config_flag| {
// 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
if (!std.mem.startsWith(u8, config_flag, flag)) continue;
if (config_flag.len == flag.len or config_flag[flag.len] == '=') continue :outer;
}
// Otherwise, append default value from config.h to compile flags
try raylib_flags_arr.append(flag);
}
}
const raylib = if (options.shared)
b.addSharedLibrary(.{
.name = "raylib",
.target = target,
.optimize = optimize,
})
else
b.addStaticLibrary(.{
.name = "raylib",
.target = target,
.optimize = optimize,
});
raylib.linkLibC();
// No GLFW required on PLATFORM_DRM
if (options.platform != .drm) {
raylib.addIncludePath(b.path("src/external/glfw/include"));
}
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");
}
if (options.rtextures) {
try c_source_files.append("src/rtextures.c");
}
if (options.opengl_version != .auto) {
raylib.defineCMacro(options.opengl_version.toCMacroStr(), null);
}
switch (target.result.os.tag) {
.windows => {
try c_source_files.append("src/rglfw.c");
raylib.linkSystemLibrary("winmm");
raylib.linkSystemLibrary("gdi32");
raylib.linkSystemLibrary("opengl32");
setDesktopPlatform(raylib, options.platform);
},
.linux => {
if (options.platform != .drm) {
try c_source_files.append("src/rglfw.c");
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) {
_ = b.findProgram(&.{"wayland-scanner"}, &.{}) catch {
std.log.err(
\\ `wayland-scanner` may not be installed on the system.
\\ You can switch to X11 in your `build.zig` by changing `Options.linux_display_backend`
, .{});
@panic("`wayland-scanner` not found");
};
raylib.defineCMacro("_GLFW_WAYLAND", null);
raylib.linkSystemLibrary("EGL");
raylib.linkSystemLibrary("wayland-client");
raylib.linkSystemLibrary("xkbcommon");
waylandGenerate(b, raylib, "wayland.xml", "wayland-client-protocol");
waylandGenerate(b, raylib, "xdg-shell.xml", "xdg-shell-client-protocol");
waylandGenerate(b, raylib, "xdg-decoration-unstable-v1.xml", "xdg-decoration-unstable-v1-client-protocol");
waylandGenerate(b, raylib, "viewporter.xml", "viewporter-client-protocol");
waylandGenerate(b, raylib, "relative-pointer-unstable-v1.xml", "relative-pointer-unstable-v1-client-protocol");
waylandGenerate(b, raylib, "pointer-constraints-unstable-v1.xml", "pointer-constraints-unstable-v1-client-protocol");
waylandGenerate(b, raylib, "fractional-scale-v1.xml", "fractional-scale-v1-client-protocol");
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) {
raylib.linkSystemLibrary("GLESv2");
raylib.defineCMacro("GRAPHICS_API_OPENGL_ES2", null);
}
raylib.linkSystemLibrary("EGL");
raylib.linkSystemLibrary("gbm");
raylib.linkSystemLibrary2("libdrm", .{ .use_pkg_config = .force });
raylib.defineCMacro("PLATFORM_DRM", null);
raylib.defineCMacro("EGL_NO_X11", null);
raylib.defineCMacro("DEFAULT_BATCH_BUFFER_ELEMENT", "2048");
}
},
.freebsd, .openbsd, .netbsd, .dragonfly => {
try c_source_files.append("rglfw.c");
raylib.linkSystemLibrary("GL");
raylib.linkSystemLibrary("rt");
raylib.linkSystemLibrary("dl");
raylib.linkSystemLibrary("m");
raylib.linkSystemLibrary("X11");
raylib.linkSystemLibrary("Xrandr");
raylib.linkSystemLibrary("Xinerama");
raylib.linkSystemLibrary("Xi");
raylib.linkSystemLibrary("Xxf86vm");
raylib.linkSystemLibrary("Xcursor");
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("-ObjC");
raylib.root_module.addCSourceFile(.{
.file = b.path("src/rglfw.c"),
.flags = raylib_flags_arr.items,
});
_ = raylib_flags_arr.pop();
raylib.linkFramework("Foundation");
raylib.linkFramework("CoreServices");
raylib.linkFramework("CoreGraphics");
raylib.linkFramework("AppKit");
raylib.linkFramework("IOKit");
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);
}
},
else => {
@panic("Unsupported OS");
},
}
raylib.root_module.addCSourceFiles(.{
.files = c_source_files.items,
.flags = raylib_flags_arr.items,
});
return raylib;
}
pub fn addRaygui(b: *std.Build, raylib: *std.Build.Step.Compile, raygui_dep: *std.Build.Dependency) void {
var gen_step = b.addWriteFiles();
raylib.step.dependOn(&gen_step.step);
const raygui_c_path = gen_step.add("raygui.c", "#define RAYGUI_IMPLEMENTATION\n#include \"raygui.h\"\n");
raylib.addCSourceFile(.{ .file = raygui_c_path });
raylib.addIncludePath(raygui_dep.path("src"));
raylib.installHeader(raygui_dep.path("src/raygui.h"), "raygui.h");
}
pub const Options = struct {
raudio: bool = true,
rmodels: bool = true,
rshapes: bool = true,
rtext: bool = true,
rtextures: bool = true,
platform: PlatformBackend = .glfw,
shared: bool = false,
linux_display_backend: LinuxDisplayBackend = .Both,
opengl_version: OpenglVersion = .auto,
/// config should be a list of space-separated cflags, eg, "-DSUPPORT_CUSTOM_FRAME_CONTROL"
config: []const u8 = &.{},
const defaults = Options{};
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,
.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,
.rshapes = b.option(bool, "rshapes", "Compile with shapes support") orelse defaults.rshapes,
.shared = b.option(bool, "shared", "Compile as shared library") orelse defaults.shared,
.linux_display_backend = b.option(LinuxDisplayBackend, "linux_display_backend", "Linux display backend to use") orelse defaults.linux_display_backend,
.opengl_version = b.option(OpenglVersion, "opengl_version", "OpenGL version to use") orelse defaults.opengl_version,
.config = b.option([]const u8, "config", "Compile with custom define macros overriding config.h") orelse &.{},
};
}
};
pub const OpenglVersion = enum {
auto,
gl_1_1,
gl_2_1,
gl_3_3,
gl_4_3,
gles_2,
gles_3,
pub fn toCMacroStr(self: @This()) []const u8 {
switch (self) {
.auto => @panic("OpenglVersion.auto cannot be turned into a C macro string"),
.gl_1_1 => return "GRAPHICS_API_OPENGL_11",
.gl_2_1 => return "GRAPHICS_API_OPENGL_21",
.gl_3_3 => return "GRAPHICS_API_OPENGL_33",
.gl_4_3 => return "GRAPHICS_API_OPENGL_43",
.gles_2 => return "GRAPHICS_API_OPENGL_ES2",
.gles_3 => return "GRAPHICS_API_OPENGL_ES3",
}
}
};
pub const LinuxDisplayBackend = enum {
X11,
Wayland,
Both,
};
pub const PlatformBackend = enum {
glfw,
rgfw,
sdl,
drm,
};
pub fn build(b: *std.Build) !void {
// Standard target options allows the person running `zig build` to choose
// what target to build for. Here we do not override the defaults, which
// means any target is allowed, and the default is native. Other options
@ -12,7 +389,34 @@ pub fn build(b: *std.Build) void {
// set a preferred release mode, allowing the user to decide how to optimize.
const optimize = b.standardOptimizeOption(.{});
const lib = raylib.addRaylib(b, target, optimize);
lib.installHeader("src/raylib.h", "raylib.h");
lib.install();
}
const lib = try compileRaylib(b, target, optimize, Options.getOptions(b));
lib.installHeader(b.path("src/raylib.h"), "raylib.h");
lib.installHeader(b.path("src/raymath.h"), "raymath.h");
lib.installHeader(b.path("src/rlgl.h"), "rlgl.h");
b.installArtifact(lib);
}
fn waylandGenerate(
b: *std.Build,
raylib: *std.Build.Step.Compile,
comptime protocol: []const u8,
comptime basename: []const u8,
) void {
const waylandDir = "src/external/glfw/deps/wayland";
const protocolDir = b.pathJoin(&.{ waylandDir, protocol });
const clientHeader = basename ++ ".h";
const privateCode = basename ++ "-code.h";
const client_step = b.addSystemCommand(&.{ "wayland-scanner", "client-header" });
client_step.addFileArg(b.path(protocolDir));
raylib.addIncludePath(client_step.addOutputFileArg(clientHeader).dirname());
const private_step = b.addSystemCommand(&.{ "wayland-scanner", "private-code" });
private_step.addFileArg(b.path(protocolDir));
raylib.addIncludePath(private_step.addOutputFileArg(privateCode).dirname());
raylib.step.dependOn(&client_step.step);
raylib.step.dependOn(&private_step.step);
}

24
build.zig.zon Normal file
View 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",
},
}

View file

@ -1,18 +0,0 @@
if(${PLATFORM} MATCHES "Desktop" AND APPLE)
if(MACOS_FATLIB)
if (CMAKE_OSX_ARCHITECTURES)
message(FATAL_ERROR "User supplied -DCMAKE_OSX_ARCHITECTURES overrides -DMACOS_FATLIB=ON")
else()
set(CMAKE_OSX_ARCHITECTURES "x86_64;i386")
endif()
endif()
endif()
# This helps support the case where emsdk toolchain file is used
# either by setting it with -DCMAKE_TOOLCHAIN_FILE=<path_to_emsdk>/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake
# or by using "emcmake cmake -B build -S ." as described in https://emscripten.org/docs/compiling/Building-Projects.html
if(EMSCRIPTEN)
SET(PLATFORM Web CACHE STRING "Forcing PLATFORM_WEB because EMSCRIPTEN was detected")
endif()
# vim: ft=cmake

View file

@ -3,113 +3,21 @@ target_compile_definitions("raylib" PUBLIC "${PLATFORM_CPP}")
target_compile_definitions("raylib" PUBLIC "${GRAPHICS}")
function(define_if target variable)
if (${${variable}})
if(${${variable}})
message(STATUS "${variable}=${${variable}}")
target_compile_definitions(${target} PUBLIC "${variable}")
endif ()
target_compile_definitions(${target} PRIVATE "${variable}")
endif()
endfunction()
if (${CUSTOMIZE_BUILD})
target_compile_definitions("raylib" PUBLIC EXTERNAL_CONFIG_FLAGS)
define_if("raylib" USE_AUDIO)
define_if("raylib" SUPPORT_MODULE_RSHAPES)
define_if("raylib" SUPPORT_MODULE_RTEXTURES)
define_if("raylib" SUPPORT_MODULE_RTEXT)
define_if("raylib" SUPPORT_MODULE_RMODELS)
define_if("raylib" SUPPORT_MODULE_RAUDIO)
define_if("raylib" SUPPORT_CAMERA_SYSTEM)
define_if("raylib" SUPPORT_GESTURES_SYSTEM)
define_if("raylib" SUPPORT_MOUSE_GESTURES)
define_if("raylib" SUPPORT_SSH_KEYBOARD_RPI)
define_if("raylib" SUPPORT_DEFAULT_FONT)
define_if("raylib" SUPPORT_SCREEN_CAPTURE)
define_if("raylib" SUPPORT_GIF_RECORDING)
define_if("raylib" SUPPORT_BUSY_WAIT_LOOP)
define_if("raylib" SUPPORT_EVENTS_WAITING)
define_if("raylib" SUPPORT_WINMM_HIGHRES_TIMER)
define_if("raylib" SUPPORT_COMPRESSION_API)
define_if("raylib" SUPPORT_QUADS_DRAW_MODE)
define_if("raylib" SUPPORT_IMAGE_EXPORT)
define_if("raylib" SUPPORT_IMAGE_GENERATION)
define_if("raylib" SUPPORT_IMAGE_MANIPULATION)
define_if("raylib" SUPPORT_FILEFORMAT_PNG)
define_if("raylib" SUPPORT_FILEFORMAT_DDS)
define_if("raylib" SUPPORT_FILEFORMAT_HDR)
define_if("raylib" SUPPORT_FILEFORMAT_PNM)
define_if("raylib" SUPPORT_FILEFORMAT_KTX)
define_if("raylib" SUPPORT_FILEFORMAT_ASTC)
define_if("raylib" SUPPORT_FILEFORMAT_BMP)
define_if("raylib" SUPPORT_FILEFORMAT_TGA)
define_if("raylib" SUPPORT_FILEFORMAT_JPG)
define_if("raylib" SUPPORT_FILEFORMAT_GIF)
define_if("raylib" SUPPORT_FILEFORMAT_QOI)
define_if("raylib" SUPPORT_FILEFORMAT_PSD)
define_if("raylib" SUPPORT_FILEFORMAT_PKM)
define_if("raylib" SUPPORT_FILEFORMAT_PVR)
define_if("raylib" SUPPORT_FILEFORMAT_FNT)
define_if("raylib" SUPPORT_FILEFORMAT_TTF)
define_if("raylib" SUPPORT_TEXT_MANIPULATION)
define_if("raylib" SUPPORT_MESH_GENERATION)
define_if("raylib" SUPPORT_FILEFORMAT_OBJ)
define_if("raylib" SUPPORT_FILEFORMAT_MTL)
define_if("raylib" SUPPORT_FILEFORMAT_IQM)
define_if("raylib" SUPPORT_FILEFORMAT_GLTF)
define_if("raylib" SUPPORT_FILEFORMAT_VOX)
define_if("raylib" SUPPORT_FILEFORMAT_WAV)
define_if("raylib" SUPPORT_FILEFORMAT_OGG)
define_if("raylib" SUPPORT_FILEFORMAT_XM)
define_if("raylib" SUPPORT_FILEFORMAT_MOD)
define_if("raylib" SUPPORT_FILEFORMAT_MP3)
define_if("raylib" SUPPORT_FILEFORMAT_FLAC)
define_if("raylib" SUPPORT_STANDARD_FILEIO)
define_if("raylib" SUPPORT_TRACELOG)
if(${CUSTOMIZE_BUILD})
target_compile_definitions("raylib" PRIVATE EXTERNAL_CONFIG_FLAGS)
if (UNIX AND NOT APPLE)
target_compile_definitions("raylib" PUBLIC "MAX_FILEPATH_LENGTH=4096")
else ()
target_compile_definitions("raylib" PUBLIC "MAX_FILEPATH_LENGTH=512")
endif ()
target_compile_definitions("raylib" PUBLIC "MAX_GAMEPADS=4")
target_compile_definitions("raylib" PUBLIC "MAX_GAMEPAD_AXIS=8")
target_compile_definitions("raylib" PUBLIC "MAX_GAMEPAD_BUTTONS=32")
target_compile_definitions("raylib" PUBLIC "MAX_TOUCH_POINTS=10")
target_compile_definitions("raylib" PUBLIC "MAX_KEY_PRESSED_QUEUE=16")
target_compile_definitions("raylib" PUBLIC "STORAGE_DATA_FILE=\"storage.data\"")
target_compile_definitions("raylib" PUBLIC "MAX_CHAR_PRESSED_QUEUE=16")
target_compile_definitions("raylib" PUBLIC "MAX_DECOMPRESSION_SIZE=64")
if (${GRAPHICS} MATCHES "GRAPHICS_API_OPENGL_33" OR ${GRAPHICS} MATCHES "GRAPHICS_API_OPENGL_11")
target_compile_definitions("raylib" PUBLIC "DEFAULT_BATCH_BUFFER_ELEMENTS=8192")
elseif (${GRAPHICS} MATCHES "GRAPHICS_API_OPENGL_ES2")
target_compile_definitions("raylib" PUBLIC "DEFAULT_BATCH_BUFFER_ELEMENTS=2048")
endif ()
target_compile_definitions("raylib" PUBLIC "DEFAULT_BATCH_DRAWCALLS=256")
target_compile_definitions("raylib" PUBLIC "MAX_MATRIX_STACK_SIZE=32")
target_compile_definitions("raylib" PUBLIC "MAX_SHADER_LOCATIONS=32")
target_compile_definitions("raylib" PUBLIC "MAX_MATERIAL_MAPS=12")
target_compile_definitions("raylib" PUBLIC "RL_CULL_DISTANCE_NEAR=0.01")
target_compile_definitions("raylib" PUBLIC "RL_CULL_DISTANCE_FAR=1000.0")
target_compile_definitions("raylib" PUBLIC "DEFAULT_SHADER_ATTRIB_NAME_POSITION=\"vertexPosition\"")
target_compile_definitions("raylib" PUBLIC "DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD=\"vertexTexCoord\"")
target_compile_definitions("raylib" PUBLIC "DEFAULT_SHADER_ATTRIB_NAME_NORMAL=\"vertexNormal\"")
target_compile_definitions("raylib" PUBLIC "DEFAULT_SHADER_ATTRIB_NAME_COLOR=\"vertexColor\"")
target_compile_definitions("raylib" PUBLIC "DEFAULT_SHADER_ATTRIB_NAME_TANGENT=\"vertexTangent\"")
target_compile_definitions("raylib" PUBLIC "DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD2=\"vertexTexCoord2\"")
target_compile_definitions("raylib" PUBLIC "MAX_TEXT_BUFFER_LENGTH=1024")
target_compile_definitions("raylib" PUBLIC "MAX_TEXT_UNICODE_CHARS=512")
target_compile_definitions("raylib" PUBLIC "MAX_TEXTSPLIT_COUNT=128")
target_compile_definitions("raylib" PUBLIC "AUDIO_DEVICE_FORMAT=ma_format_f32")
target_compile_definitions("raylib" PUBLIC "AUDIO_DEVICE_CHANNELS=2")
target_compile_definitions("raylib" PUBLIC "AUDIO_DEVICE_SAMPLE_RATE=44100")
target_compile_definitions("raylib" PUBLIC "DEFAULT_AUDIO_BUFFER_SIZE=4096")
target_compile_definitions("raylib" PUBLIC "MAX_TRACELOG_MSG_LENGTH=128")
target_compile_definitions("raylib" PUBLIC "MAX_UWP_MESSAGES=512")
endif ()
foreach(FLAG IN LISTS CONFIG_HEADER_FLAGS)
string(REGEX MATCH "([^=]+)=(.+)" _ ${FLAG})
define_if("raylib" ${CMAKE_MATCH_1})
endforeach()
foreach(VALUE IN LISTS CONFIG_HEADER_VALUES)
target_compile_definitions("raylib" PRIVATE ${VALUE})
endforeach()
endif()

View file

@ -1,8 +1,8 @@
if(USE_EXTERNAL_GLFW STREQUAL "ON")
find_package(glfw3 3.3.3 REQUIRED)
find_package(glfw3 3.4 REQUIRED)
elseif(USE_EXTERNAL_GLFW STREQUAL "IF_POSSIBLE")
find_package(glfw3 3.3.3 QUIET)
find_package(glfw3 3.4 QUIET)
endif()
if (glfw3_FOUND)
set(LIBS_PRIVATE ${LIBS_PRIVATE} glfw)
@ -16,15 +16,15 @@ if(NOT glfw3_FOUND AND NOT USE_EXTERNAL_GLFW STREQUAL "ON" AND "${PLATFORM}" MAT
set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE)
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
set(GLFW_INSTALL OFF CACHE BOOL "" FORCE)
set(GLFW_USE_WAYLAND ${USE_WAYLAND} CACHE BOOL "" FORCE)
set(GLFW_LIBRARY_TYPE "OBJECT" CACHE STRING "" FORCE)
set(WAS_SHARED ${BUILD_SHARED_LIBS})
set(BUILD_SHARED_LIBS OFF CACHE BOOL " " FORCE)
add_subdirectory(external/glfw)
set(BUILD_SHARED_LIBS ${WAS_SHARED} CACHE BOOL " " FORCE)
unset(WAS_SHARED)
# Hide glfw's symbols when building a shared lib
if (BUILD_SHARED_LIBS)
set_property(TARGET glfw PROPERTY C_VISIBILITY_PRESET hidden)
endif()
list(APPEND raylib_sources $<TARGET_OBJECTS:glfw>)
include_directories(BEFORE SYSTEM external/glfw/include)

View file

@ -9,8 +9,7 @@ install(
# PKG_CONFIG_LIBS_PRIVATE is used in raylib.pc.in
if (NOT BUILD_SHARED_LIBS)
include(LibraryPathToLinkerFlags)
library_path_to_linker_flags(__PKG_CONFIG_LIBS_PRIVATE "${LIBS_PRIVATE}")
set(PKG_CONFIG_LIBS_PRIVATE ${__PKG_CONFIG_LIBS_PRIVATE} ${GLFW_PKG_LIBS})
set(PKG_CONFIG_LIBS_PRIVATE ${GLFW_PKG_LIBS})
string(REPLACE ";" " " PKG_CONFIG_LIBS_PRIVATE "${PKG_CONFIG_LIBS_PRIVATE}")
elseif (BUILD_SHARED_LIBS)
set(PKG_CONFIG_LIBS_EXTRA "")

View file

@ -25,7 +25,7 @@ if (${PLATFORM} MATCHES "Desktop")
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
find_package(OpenGL QUIET)
set(LIBS_PRIVATE ${OPENGL_LIBRARIES} winmm)
else ()
elseif (UNIX)
find_library(pthread NAMES pthread)
find_package(OpenGL QUIET)
if ("${OPENGL_LIBRARIES}" STREQUAL "")
@ -36,17 +36,31 @@ if (${PLATFORM} MATCHES "Desktop")
find_library(OSS_LIBRARY ossaudio)
endif ()
set(LIBS_PRIVATE m pthread ${OPENGL_LIBRARIES} ${OSS_LIBRARY})
else ()
find_library(pthread NAMES pthread)
find_package(OpenGL QUIET)
if ("${OPENGL_LIBRARIES}" STREQUAL "")
set(OPENGL_LIBRARIES "GL")
endif ()
set(LIBS_PRIVATE m atomic pthread ${OPENGL_LIBRARIES} ${OSS_LIBRARY})
if (USE_AUDIO)
if ("${CMAKE_SYSTEM_NAME}" MATCHES "(Net|Open)BSD")
find_library(OSS_LIBRARY ossaudio)
set(LIBS_PRIVATE m pthread ${OPENGL_LIBRARIES} ${OSS_LIBRARY})
endif ()
if (NOT "${CMAKE_SYSTEM_NAME}" MATCHES "(Net|Open)BSD" AND USE_AUDIO)
set(LIBS_PRIVATE ${LIBS_PRIVATE} dl)
endif ()
endif ()
elseif (${PLATFORM} MATCHES "Web")
set(PLATFORM_CPP "PLATFORM_WEB")
set(GRAPHICS "GRAPHICS_API_OPENGL_ES2")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -s USE_GLFW=3 -s ASSERTIONS=1 --profiling")
if(NOT GRAPHICS)
set(GRAPHICS "GRAPHICS_API_OPENGL_ES2")
endif()
set(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
elseif (${PLATFORM} MATCHES "Android")
@ -60,19 +74,6 @@ elseif (${PLATFORM} MATCHES "Android")
find_library(OPENGL_LIBRARY OpenGL)
set(LIBS_PRIVATE m log android EGL GLESv2 OpenSLES atomic c)
elseif (${PLATFORM} MATCHES "Raspberry Pi")
set(PLATFORM_CPP "PLATFORM_RPI")
set(GRAPHICS "GRAPHICS_API_OPENGL_ES2")
add_definitions(-D_DEFAULT_SOURCE)
find_library(GLESV2 brcmGLESv2 HINTS /opt/vc/lib)
find_library(EGL brcmEGL HINTS /opt/vc/lib)
find_library(BCMHOST bcm_host HINTS /opt/vc/lib)
include_directories(/opt/vc/include /opt/vc/include/interface/vmcs_host/linux /opt/vc/include/interface/vcos/pthreads)
link_directories(/opt/vc/lib)
set(LIBS_PRIVATE ${GLESV2} ${EGL} ${BCMHOST} pthread rt m dl)
elseif ("${PLATFORM}" MATCHES "DRM")
set(PLATFORM_CPP "PLATFORM_DRM")
set(GRAPHICS "GRAPHICS_API_OPENGL_ES2")
@ -86,17 +87,42 @@ elseif ("${PLATFORM}" MATCHES "DRM")
find_library(DRM drm)
find_library(GBM gbm)
if (NOT CMAKE_CROSSCOMPILING)
include_directories(/usr/include/libdrm)
if (NOT CMAKE_CROSSCOMPILING OR NOT CMAKE_SYSROOT)
find_package(PkgConfig QUIET)
pkg_check_modules(DRM REQUIRED libdrm)
include_directories(${DRM_INCLUDE_DIRS})
endif ()
set(LIBS_PRIVATE ${GLESV2} ${EGL} ${DRM} ${GBM} atomic pthread m dl)
if (ENABLE_WAYLAND_DRM_LEASING)
find_package(PkgConfig REQUIRED)
add_definitions(-DENABLE_WAYLAND_DRM_LEASING)
find_library(WAYLAND_CLIENT wayland-client)
pkg_check_modules(WAYLAND_CLIENT_LIB REQUIRED wayland-client)
include_directories(${WAYLAND_CLIENT_LIB})
list(APPEND LIBS_PRIVATE ${WAYLAND_CLIENT})
endif ()
if (DISABLE_EVDEV_INPUT)
add_definitions(-DDISABLE_EVDEV_INPUT)
endif ()
if (SUPPORT_SSH_KEYBOARD_RPI)
add_definitions(-DSUPPORT_SSH_KEYBOARD_RPI)
endif ()
elseif ("${PLATFORM}" MATCHES "SDL")
find_package(SDL2 REQUIRED)
set(PLATFORM_CPP "PLATFORM_DESKTOP_SDL")
set(LIBS_PRIVATE SDL2::SDL2)
endif ()
if (NOT ${OPENGL_VERSION})
set(${SUGGESTED_GRAPHICS} "${GRAPHICS}")
if (NOT ${OPENGL_VERSION} MATCHES "OFF")
set(SUGGESTED_GRAPHICS "${GRAPHICS}")
if (${OPENGL_VERSION} MATCHES "4.3")
set(GRAPHICS "GRAPHICS_API_OPENGL_43")
set(GRAPHICS "GRAPHICS_API_OPENGL_43")
elseif (${OPENGL_VERSION} MATCHES "3.3")
set(GRAPHICS "GRAPHICS_API_OPENGL_33")
elseif (${OPENGL_VERSION} MATCHES "2.1")
@ -105,9 +131,11 @@ if (NOT ${OPENGL_VERSION})
set(GRAPHICS "GRAPHICS_API_OPENGL_11")
elseif (${OPENGL_VERSION} MATCHES "ES 2.0")
set(GRAPHICS "GRAPHICS_API_OPENGL_ES2")
elseif (${OPENGL_VERSION} MATCHES "ES 3.0")
set(GRAPHICS "GRAPHICS_API_OPENGL_ES3")
endif ()
if ("${SUGGESTED_GRAPHICS}" AND NOT "${SUGGESTED_GRAPHICS}" STREQUAL "${GRAPHICS}")
message(WARNING "You are overriding the suggested GRAPHICS=${SUGGESTED_GRAPHICS} with ${GRAPHICS}! This may fail")
if (NOT "${SUGGESTED_GRAPHICS}" STREQUAL "" AND NOT "${SUGGESTED_GRAPHICS}" STREQUAL "${GRAPHICS}")
message(WARNING "You are overriding the suggested GRAPHICS=${SUGGESTED_GRAPHICS} with ${GRAPHICS}! This may fail.")
endif ()
endif ()

View file

@ -0,0 +1,17 @@
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/src/config.h" CONFIG_HEADER_CONTENT)
set(BLANK_OR_BACKSLASH_PATTERN "[ \t\r\n\\]")
set(VALID_IDENTIFIER_PATTERN "[A-Za-z_]+[A-Za-z_0-9]*")
set(VALID_VALUE_PATTERN [=["?[A-Za-z_0-9.-]+"?]=]) # not really correct but does the job since the config.h file hopefully will have been checked by a C preprocessor.
set(MACRO_REGEX "(//${BLANK_OR_BACKSLASH_PATTERN}*)?\#define${BLANK_OR_BACKSLASH_PATTERN}+(${VALID_IDENTIFIER_PATTERN})${BLANK_OR_BACKSLASH_PATTERN}+(${VALID_VALUE_PATTERN})")
string(REGEX MATCHALL ${MACRO_REGEX} MACRO_LIST ${CONFIG_HEADER_CONTENT})
set(CONFIG_HEADER_FLAGS ${MACRO_LIST})
list(FILTER CONFIG_HEADER_FLAGS INCLUDE REGEX "^.+SUPPORT_")
list(TRANSFORM CONFIG_HEADER_FLAGS REPLACE ${MACRO_REGEX} [[\2=OFF]] REGEX "^//")
list(TRANSFORM CONFIG_HEADER_FLAGS REPLACE ${MACRO_REGEX} [[\2=ON]])
set(CONFIG_HEADER_VALUES ${MACRO_LIST})
list(FILTER CONFIG_HEADER_VALUES EXCLUDE REGEX "(^.+SUPPORT_)|(^//)")
list(TRANSFORM CONFIG_HEADER_VALUES REPLACE ${MACRO_REGEX} [[\2=\3]])

21
cmake/Uninstall.cmake Normal file
View file

@ -0,0 +1,21 @@
if(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt")
message(FATAL_ERROR "Cannot find install manifest: @CMAKE_BINARY_DIR@/install_manifest.txt")
endif()
file(READ "@CMAKE_BINARY_DIR@/install_manifest.txt" files)
string(REGEX REPLACE "\n" ";" files "${files}")
foreach(file ${files})
message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
exec_program(
"@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
OUTPUT_VARIABLE rm_out
RETURN_VALUE rm_retval
)
if(NOT "${rm_retval}" STREQUAL 0)
message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")
endif()
else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
message(STATUS "File $ENV{DESTDIR}${file} does not exist.")
endif()
endforeach()

View file

@ -96,10 +96,9 @@ if (${PLATFORM} MATCHES "Android")
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/shaders/shaders_basic_lighting.c)
elseif (${PLATFORM} MATCHES "Web")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Os -s USE_GLFW=3 -s ASSERTIONS=1 -s WASM=1 -s ASYNCIFY")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Os")
# Since WASM is used, ALLOW_MEMORY_GROWTH has no extra overheads
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -s ALLOW_MEMORY_GROWTH=1 --no-heap-copy")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --shell-file ${CMAKE_SOURCE_DIR}/src/shell.html")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s WASM=1 -s ASYNCIFY -s ALLOW_MEMORY_GROWTH=1 --shell-file ${CMAKE_SOURCE_DIR}/src/shell.html")
set(CMAKE_EXECUTABLE_SUFFIX ".html")
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/others/raylib_opengl_interop.c)
@ -113,8 +112,21 @@ elseif ("${PLATFORM}" STREQUAL "DRM")
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/others/rlgl_standalone.c)
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/others/raylib_opengl_interop.c)
elseif (NOT SUPPORT_GESTURES_SYSTEM)
# Items requiring gestures system
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/textures/textures_mouse_painting.c)
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/core/core_basic_screen_manager.c)
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/core/core_input_gestures_web.c)
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/core/core_input_gestures.c)
endif ()
# The rlgl_standalone example only targets desktop, without shared libraries.
if (BUILD_SHARED_LIBS OR NOT ${PLATFORM} MATCHES "Desktop")
list(REMOVE_ITEM example_sources ${CMAKE_CURRENT_SOURCE_DIR}/others/rlgl_standalone.c)
endif()
include_directories(BEFORE SYSTEM others/external/include)
if (NOT TARGET raylib)
@ -131,6 +143,9 @@ foreach (example_source ${example_sources})
add_executable(${example_name} ${example_source})
target_link_libraries(${example_name} raylib)
if (NOT WIN32)
target_link_libraries(${example_name} m)
endif()
string(REGEX MATCH ".*/.*/" resources_dir ${example_source})
string(APPEND resources_dir "resources")

View file

@ -1,8 +1,34 @@
#**************************************************************************************************
#
# raylib makefile for Desktop platforms, Raspberry Pi, Android and HTML5
# raylib makefile for multiple platforms
#
# Copyright (c) 2013-2023 Ramon Santamaria (@raysan5)
# This file supports building raylib examples for the following platforms:
#
# > PLATFORM_DESKTOP
# - Defaults to PLATFORM_DESKTOP_GLFW
# > PLATFORM_DESKTOP_GFLW (GLFW backend):
# - Windows (Win32, Win64)
# - Linux (X11/Wayland desktop mode)
# - macOS/OSX (x64, arm64)
# - FreeBSD, OpenBSD, NetBSD, DragonFly (X11 desktop)
# > PLATFORM_DESKTOP_SDL (SDL backend):
# - Windows (Win32, Win64)
# - Linux (X11/Wayland desktop mode)
# - Others (not tested)
# > PLATFORM_DESKTOP_RGFW (RGFW backend):
# - Windows (Win32, Win64)
# - Linux (X11 desktop mode)
# - macOS/OSX (x64, arm64 (not tested))
# - Others (not tested)
# > PLATFORM_WEB:
# - HTML5 (WebAssembly)
# > PLATFORM_DRM:
# - Raspberry Pi 0-5 (DRM/KMS)
# - Linux DRM subsystem (KMS mode)
# > PLATFORM_ANDROID:
# - Android (ARM, ARM64)
#
# Copyright (c) 2013-2024 Ramon Santamaria (@raysan5)
#
# This software is provided "as-is", without any express or implied warranty. In no event
# will the authors be held liable for any damages arising from the use of this software.
@ -25,18 +51,28 @@
# Define required environment variables
#------------------------------------------------------------------------------------------------
# Define target platform: PLATFORM_DESKTOP, PLATFORM_RPI, PLATFORM_DRM, PLATFORM_ANDROID, PLATFORM_WEB
# Define target platform: PLATFORM_DESKTOP, PLATFORM_DESKTOP_SDL, PLATFORM_DRM, PLATFORM_ANDROID, PLATFORM_WEB
PLATFORM ?= PLATFORM_DESKTOP
ifeq ($(PLATFORM), PLATFORM_DESKTOP)
TARGET_PLATFORM = PLATFORM_DESKTOP_GLFW
else
TARGET_PLATFORM = $(PLATFORM)
endif
# Define required raylib variables
PROJECT_NAME ?= raylib_examples
RAYLIB_VERSION ?= 4.5.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
RAYLIB_INCLUDE_PATH ?= /usr/local/include
RAYLIB_LIB_PATH ?= /usr/local/lib
DESTDIR ?= /usr/local
RAYLIB_INCLUDE_PATH ?= $(DESTDIR)/include
RAYLIB_LIB_PATH ?= $(DESTDIR)/lib
# Library type compilation: STATIC (.a) or SHARED (.so/.dll)
RAYLIB_LIBTYPE ?= STATIC
@ -47,6 +83,13 @@ BUILD_MODE ?= RELEASE
# Use external GLFW library instead of rglfw module
USE_EXTERNAL_GLFW ?= FALSE
# PLATFORM_DESKTOP_SDL: It requires SDL library to be provided externally
# 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
USE_WAYLAND_DISPLAY ?= FALSE
@ -58,17 +101,8 @@ BUILD_WEB_HEAP_SIZE ?= 134217728
BUILD_WEB_RESOURCES ?= TRUE
BUILD_WEB_RESOURCES_PATH ?= $(dir $<)resources@resources
# Use cross-compiler for PLATFORM_RPI
ifeq ($(PLATFORM),PLATFORM_RPI)
USE_RPI_CROSS_COMPILER ?= FALSE
ifeq ($(USE_RPI_CROSS_COMPILER),TRUE)
RPI_TOOLCHAIN ?= C:/SysGCC/Raspberry
RPI_TOOLCHAIN_SYSROOT ?= $(RPI_TOOLCHAIN)/arm-linux-gnueabihf/sysroot
endif
endif
# Determine PLATFORM_OS in case PLATFORM_DESKTOP or PLATFORM_WEB selected
ifeq ($(PLATFORM),$(filter $(PLATFORM),PLATFORM_DESKTOP PLATFORM_WEB))
# Determine PLATFORM_OS when required
ifeq ($(TARGET_PLATFORM),$(filter $(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW PLATFORM_DESKTOP_SDL PLATFORM_DESKTOP_RGFW PLATFORM_WEB))
# No uname.exe on MinGW!, but OS=Windows_NT on Windows!
# ifeq ($(UNAME),Msys) -> Windows
ifeq ($(OS),Windows_NT)
@ -95,13 +129,7 @@ ifeq ($(PLATFORM),$(filter $(PLATFORM),PLATFORM_DESKTOP PLATFORM_WEB))
endif
endif
endif
ifeq ($(PLATFORM),PLATFORM_RPI)
UNAMEOS = $(shell uname)
ifeq ($(UNAMEOS),Linux)
PLATFORM_OS = LINUX
endif
endif
ifeq ($(PLATFORM),PLATFORM_DRM)
ifeq ($(TARGET_PLATFORM),PLATFORM_DRM)
UNAMEOS = $(shell uname)
ifeq ($(UNAMEOS),Linux)
PLATFORM_OS = LINUX
@ -110,7 +138,7 @@ endif
# RAYLIB_PATH adjustment for LINUX platform
# TODO: Do we really need this?
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW)
ifeq ($(PLATFORM_OS),LINUX)
RAYLIB_PREFIX ?= ..
RAYLIB_PATH = $(realpath $(RAYLIB_PREFIX))
@ -118,24 +146,21 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
endif
# Default path for raylib on Raspberry Pi
ifeq ($(PLATFORM),PLATFORM_RPI)
RAYLIB_PATH ?= /home/pi/raylib
endif
ifeq ($(PLATFORM),PLATFORM_DRM)
ifeq ($(TARGET_PLATFORM),PLATFORM_DRM)
RAYLIB_PATH ?= /home/pi/raylib
endif
# Define raylib release directory for compiled library
RAYLIB_RELEASE_PATH ?= $(RAYLIB_PATH)/src
ifeq ($(PLATFORM),PLATFORM_WEB)
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
@ -144,7 +169,7 @@ endif
#------------------------------------------------------------------------------------------------
CC = gcc
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW)
ifeq ($(PLATFORM_OS),OSX)
# OSX default compiler
CC = clang
@ -154,14 +179,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
CC = clang
endif
endif
ifeq ($(PLATFORM),PLATFORM_RPI)
ifeq ($(USE_RPI_CROSS_COMPILER),TRUE)
# Define RPI cross-compiler
#CC = armv6j-hardfloat-linux-gnueabi-gcc
CC = $(RPI_TOOLCHAIN)/bin/arm-linux-gnueabihf-gcc
endif
endif
ifeq ($(PLATFORM),PLATFORM_WEB)
ifeq ($(TARGET_PLATFORM),PLATFORM_WEB)
# HTML5 emscripten compiler
# WARNING: To compile to HTML5, code must be redesigned
# to use emscripten.h and emscripten_set_main_loop()
@ -172,16 +190,25 @@ endif
#------------------------------------------------------------------------------------------------
MAKE ?= make
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW)
ifeq ($(PLATFORM_OS),WINDOWS)
MAKE = mingw32-make
endif
endif
ifeq ($(PLATFORM),PLATFORM_ANDROID)
ifeq ($(TARGET_PLATFORM),PLATFORM_ANDROID)
MAKE = mingw32-make
endif
ifeq ($(PLATFORM),PLATFORM_WEB)
MAKE = mingw32-make
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
@ -199,11 +226,11 @@ CFLAGS = -Wall -std=c99 -D_DEFAULT_SOURCE -Wno-missing-braces -Wunused-result
ifeq ($(BUILD_MODE),DEBUG)
CFLAGS += -g -D_DEBUG
ifeq ($(PLATFORM),PLATFORM_WEB)
CFLAGS += -s ASSERTIONS=1 --profiling
ifeq ($(TARGET_PLATFORM),PLATFORM_WEB)
CFLAGS += -sASSERTIONS=1 --profiling
endif
else
ifeq ($(PLATFORM),PLATFORM_WEB)
ifeq ($(TARGET_PLATFORM),PLATFORM_WEB)
ifeq ($(BUILD_WEB_ASYNCIFY),TRUE)
CFLAGS += -O3
else
@ -220,7 +247,7 @@ endif
# -Wstrict-prototypes warn if a function is declared or defined without specifying the argument types
# -Werror=implicit-function-declaration catch function calls without prior declaration
#CFLAGS += -Wextra -Wmissing-prototypes -Wstrict-prototypes
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW)
ifeq ($(PLATFORM_OS),LINUX)
ifeq ($(RAYLIB_LIBTYPE),STATIC)
CFLAGS += -D_DEFAULT_SOURCE
@ -231,41 +258,42 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
endif
endif
endif
ifeq ($(PLATFORM),PLATFORM_RPI)
CFLAGS += -std=gnu99
endif
ifeq ($(PLATFORM),PLATFORM_DRM)
ifeq ($(TARGET_PLATFORM),PLATFORM_DRM)
CFLAGS += -std=gnu99 -DEGL_NO_X11
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 ($(PLATFORM),PLATFORM_DESKTOP)
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)
endif
endif
ifeq ($(PLATFORM),PLATFORM_RPI)
INCLUDE_PATHS += -I$(RPI_TOOLCHAIN_SYSROOT)/opt/vc/include
INCLUDE_PATHS += -I$(RPI_TOOLCHAIN_SYSROOT)/opt/vc/include/interface/vmcs_host/linux
INCLUDE_PATHS += -I$(RPI_TOOLCHAIN_SYSROOT)/opt/vc/include/interface/vcos/pthreads
ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_SDL)
INCLUDE_PATHS += -I$(SDL_INCLUDE_PATH)
endif
ifeq ($(PLATFORM),PLATFORM_DRM)
ifeq ($(TARGET_PLATFORM),PLATFORM_DRM)
INCLUDE_PATHS += -I$(RAYLIB_INCLUDE_PATH)
INCLUDE_PATHS += -I/usr/include/libdrm
endif
# Include GLFW required for examples/others/rlgl_standalone.c
ifeq ($(USE_EXTERNAL_GLFW),FALSE)
all others: INCLUDE_PATHS += -I$(RAYLIB_PATH)/src/external/glfw/include
endif
# Define library paths containing required libs: LDFLAGS
#------------------------------------------------------------------------------------------------
LDFLAGS = -L. -L$(RAYLIB_RELEASE_PATH) -L$(RAYLIB_PATH)/src
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW)
ifeq ($(PLATFORM_OS),WINDOWS)
# NOTE: The resource .rc file contains windows executable icon and properties
LDFLAGS += $(RAYLIB_PATH)/src/raylib.rc.data
@ -281,26 +309,38 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
LDFLAGS += -Lsrc -L$(RAYLIB_LIB_PATH)
endif
endif
ifeq ($(PLATFORM),PLATFORM_WEB)
ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_SDL)
ifeq ($(PLATFORM_OS),WINDOWS)
# NOTE: The resource .rc file contains windows executable icon and properties
LDFLAGS += $(RAYLIB_PATH)/src/raylib.rc.data
# -Wl,--subsystem,windows hides the console window
ifeq ($(BUILD_MODE), RELEASE)
LDFLAGS += -Wl,--subsystem,windows
endif
endif
LDFLAGS += -L$(SDL_LIBRARY_PATH)
endif
ifeq ($(TARGET_PLATFORM),PLATFORM_WEB)
# -Os # size optimization
# -O2 # optimization level 2, if used, also set --memory-init-file 0
# -s USE_GLFW=3 # Use glfw3 library (context/input management)
# -s ALLOW_MEMORY_GROWTH=1 # to allow memory resizing -> WARNING: Audio buffers could FAIL!
# -s TOTAL_MEMORY=16777216 # to specify heap memory size (default = 16MB) (67108864 = 64MB)
# -s USE_PTHREADS=1 # multithreading support
# -s WASM=0 # disable Web Assembly, emitted by default
# -s ASYNCIFY # lets synchronous C/C++ code interact with asynchronous JS
# -s FORCE_FILESYSTEM=1 # force filesystem to load/save files data
# -s ASSERTIONS=1 # enable runtime checks for common memory allocation errors (-O1 and above turn it off)
# -sUSE_GLFW=3 # Use glfw3 library (context/input management)
# -sALLOW_MEMORY_GROWTH=1 # to allow memory resizing -> WARNING: Audio buffers could FAIL!
# -sTOTAL_MEMORY=16777216 # to specify heap memory size (default = 16MB) (67108864 = 64MB)
# -sUSE_PTHREADS=1 # multithreading support
# -sWASM=0 # disable Web Assembly, emitted by default
# -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)
# -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 += -s USE_GLFW=3 -s TOTAL_MEMORY=$(BUILD_WEB_HEAP_SIZE) -s FORCE_FILESYSTEM=1
LDFLAGS += -sUSE_GLFW=3 -sTOTAL_MEMORY=$(BUILD_WEB_HEAP_SIZE) -sFORCE_FILESYSTEM=1
# Build using asyncify
ifeq ($(BUILD_WEB_ASYNCIFY),TRUE)
LDFLAGS += -s ASYNCIFY
LDFLAGS += -sASYNCIFY
endif
# Add resources building if required
@ -310,7 +350,7 @@ ifeq ($(PLATFORM),PLATFORM_WEB)
# Add debug mode flags if required
ifeq ($(BUILD_MODE),DEBUG)
LDFLAGS += -s ASSERTIONS=1 --profiling
LDFLAGS += -sASSERTIONS=1 --profiling
endif
# Define a custom shell .html and output extension
@ -323,14 +363,11 @@ ifeq ($(PLATFORM),PLATFORM_WEB)
# logic to a self contained function: UpdateDrawFrame(), check core_basic_window_web.c for reference.
endif
ifeq ($(PLATFORM),PLATFORM_RPI)
LDFLAGS += -L$(RPI_TOOLCHAIN_SYSROOT)/opt/vc/lib
endif
# Define libraries required on linking: LDLIBS
# NOTE: To link libraries (lib<name>.so or lib<name>.a), use -l<name>
#------------------------------------------------------------------------------------------------
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW)
ifeq ($(PLATFORM_OS),WINDOWS)
# Libraries for Windows desktop compilation
# NOTE: WinMM library required to set high-res timer resolution
@ -366,7 +403,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
@ -376,20 +414,71 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
LDLIBS += -lglfw
endif
endif
ifeq ($(PLATFORM),PLATFORM_RPI)
# Libraries for Raspberry Pi compiling
# NOTE: Required packages: libasound2-dev (ALSA)
LDLIBS = -lraylib -lbrcmGLESv2 -lbrcmEGL -lpthread -lrt -lm -lbcm_host -ldl -latomic
ifeq ($(USE_RPI_CROSS_COMPILER),TRUE)
LDLIBS += -lvchiq_arm -lvcos
ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_SDL)
ifeq ($(PLATFORM_OS),WINDOWS)
# Libraries for Windows desktop compilation
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 $(SDL_LIBRARIES) -lGL -lm -lpthread -ldl -lrt
# On X11 requires also below libraries
LDLIBS += -lX11
# NOTE: It seems additional libraries are not required any more, latest GLFW just dlopen them
#LDLIBS += -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor
# On Wayland windowing system, additional libraries requires
ifeq ($(USE_WAYLAND_DISPLAY),TRUE)
LDLIBS += -lwayland-client -lwayland-cursor -lwayland-egl -lxkbcommon
endif
# Explicit link to libc
ifeq ($(RAYLIB_LIBTYPE),SHARED)
LDLIBS += -lc
endif
# NOTE: On ARM 32bit arch, miniaudio requires atomics library
LDLIBS += -latomic
endif
endif
ifeq ($(PLATFORM),PLATFORM_DRM)
ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_RGFW)
ifeq ($(PLATFORM_OS),WINDOWS)
# Libraries for Windows desktop compilation
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
LDFLAGS += -L../src
LDLIBS = -lraylib -lGL -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor -lm -lpthread -ldl -lrt
# Explicit link to libc
ifeq ($(RAYLIB_LIBTYPE),SHARED)
LDLIBS += -lc
endif
# NOTE: On ARM 32bit arch, miniaudio requires atomics library
LDLIBS += -latomic
endif
ifeq ($(PLATFORM_OS),OSX)
# Libraries for Debian GNU/Linux desktop compiling
# NOTE: Required packages: libegl1-mesa-dev
LDFLAGS += -L../src
LDLIBS = -lraylib -lm
LDLIBS += -framework Foundation -framework AppKit -framework OpenGL -framework CoreVideo
endif
endif
ifeq ($(TARGET_PLATFORM),PLATFORM_DRM)
# Libraries for DRM compiling
# NOTE: Required packages: libasound2-dev (ALSA)
LDLIBS = -lraylib -lGLESv2 -lEGL -lpthread -lrt -lm -lgbm -ldrm -ldl -latomic
ifeq ($(ENABLE_WAYLAND_DRM_LEASING), yes)
LDFLAGS += $(shell pkg-config --libs wayland-client) -DENABLE_WAYLAND_DRM_LEASING
endif
endif
ifeq ($(PLATFORM),PLATFORM_WEB)
ifeq ($(TARGET_PLATFORM),PLATFORM_WEB)
# Libraries for web (HTML5) compiling
LDLIBS = $(RAYLIB_RELEASE_PATH)/libraylib.a
endif
@ -397,150 +486,184 @@ endif
# Define source code object files required
#------------------------------------------------------------------------------------------------
CORE = \
core/core_basic_window \
core/core_2d_camera \
core/core_2d_camera_mouse_zoom \
core/core_2d_camera_platformer \
core/core_2d_camera_split_screen \
core/core_3d_camera_first_person \
core/core_3d_camera_free \
core/core_3d_camera_mode \
core/core_3d_camera_split_screen \
core/core_3d_picking \
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 \
core/core_input_gamepad \
core/core_input_gamepad_info \
core/core_input_gestures \
core/core_input_gestures_web \
core/core_input_keys \
core/core_input_mouse \
core/core_input_mouse_wheel \
core/core_input_gamepad \
core/core_input_multitouch \
core/core_input_gestures \
core/core_2d_camera \
core/core_2d_camera_platformer \
core/core_2d_camera_mouse_zoom \
core/core_3d_camera_mode \
core/core_3d_camera_free \
core/core_3d_camera_first_person \
core/core_3d_picking \
core/core_world_screen \
core/core_custom_logging \
core/core_drop_files \
core/core_input_virtual_controls \
core/core_loading_thread \
core/core_random_sequence \
core/core_random_values \
core/core_scissor_test \
core/core_smooth_pixelperfect \
core/core_storage_values \
core/core_vr_simulator \
core/core_loading_thread \
core/core_window_flags \
core/core_window_letterbox \
core/core_window_should_close \
core/core_split_screen \
core/core_smooth_pixelperfect \
core/core_custom_frame_control
core/core_world_screen
SHAPES = \
shapes/shapes_basic_shapes \
shapes/shapes_bouncing_ball \
shapes/shapes_colors_palette \
shapes/shapes_logo_raylib \
shapes/shapes_logo_raylib_anim \
shapes/shapes_rectangle_scaling \
shapes/shapes_lines_bezier \
shapes/shapes_collision_area \
shapes/shapes_following_eyes \
shapes/shapes_colors_palette \
shapes/shapes_draw_circle_sector \
shapes/shapes_draw_rectangle_rounded \
shapes/shapes_draw_ring \
shapes/shapes_easings_ball_anim \
shapes/shapes_easings_box_anim \
shapes/shapes_easings_rectangle_array \
shapes/shapes_draw_ring \
shapes/shapes_draw_circle_sector \
shapes/shapes_draw_rectangle_rounded \
shapes/shapes_top_down_lights
shapes/shapes_following_eyes \
shapes/shapes_lines_bezier \
shapes/shapes_logo_raylib \
shapes/shapes_logo_raylib_anim \
shapes/shapes_rectangle_scaling \
shapes/shapes_splines_drawing \
shapes/shapes_top_down_lights \
shapes/shapes_rectangle_advanced
TEXTURES = \
textures/textures_logo_raylib \
textures/textures_mouse_painting \
textures/textures_srcrec_dstrec \
textures/textures_background_scrolling \
textures/textures_blend_modes \
textures/textures_bunnymark \
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 \
textures/textures_image_loading \
textures/textures_image_processing \
textures/textures_image_rotate \
textures/textures_image_text \
textures/textures_to_image \
textures/textures_raw_data \
textures/textures_particles_blending \
textures/textures_logo_raylib \
textures/textures_mouse_painting \
textures/textures_npatch_drawing \
textures/textures_background_scrolling \
textures/textures_particles_blending \
textures/textures_polygon \
textures/textures_raw_data \
textures/textures_sprite_anim \
textures/textures_sprite_button \
textures/textures_sprite_explosion \
textures/textures_srcrec_dstrec \
textures/textures_textured_curve \
textures/textures_bunnymark \
textures/textures_blend_modes \
textures/textures_draw_tiled \
textures/textures_polygon \
textures/textures_gif_player \
textures/textures_fog_of_war
textures/textures_to_image
TEXT = \
text/text_raylib_fonts \
text/text_font_spritefont \
text/text_font_loading \
text/text_codepoints_loading \
text/text_draw_3d \
text/text_font_filters \
text/text_font_loading \
text/text_font_sdf \
text/text_font_spritefont \
text/text_format_text \
text/text_input_box \
text/text_writing_anim \
text/text_raylib_fonts \
text/text_rectangle_bounds \
text/text_unicode \
text/text_draw_3d \
text/text_codepoints_loading
text/text_writing_anim
MODELS = \
models/models_animation \
models/models_billboard \
models/models_bone_socket \
models/models_box_collisions \
models/models_cubicmap \
models/models_draw_cube_texture \
models/models_first_person_maze \
models/models_geometric_shapes \
models/models_mesh_generation \
models/models_mesh_picking \
models/models_heightmap \
models/models_loading \
models/models_loading_vox \
models/models_loading_gltf \
models/models_loading_m3d \
models/models_loading_vox \
models/models_mesh_generation \
models/models_mesh_picking \
models/models_orthographic_projection \
models/models_point_rendering \
models/models_rlgl_solar_system \
models/models_skybox \
models/models_waving_cubes \
models/models_yaw_pitch_roll \
models/models_heightmap \
models/models_waving_cubes
models/models_gpu_skinning
SHADERS = \
shaders/shaders_model_shader \
shaders/shaders_shapes_textures \
shaders/shaders_custom_uniform \
shaders/shaders_postprocessing \
shaders/shaders_palette_switch \
shaders/shaders_raymarching \
shaders/shaders_texture_drawing \
shaders/shaders_texture_waves \
shaders/shaders_texture_outline \
shaders/shaders_julia_set \
shaders/shaders_eratosthenes \
shaders/shaders_basic_lighting \
shaders/shaders_basic_pbr \
shaders/shaders_custom_uniform \
shaders/shaders_deferred_render \
shaders/shaders_eratosthenes \
shaders/shaders_fog \
shaders/shaders_hot_reloading \
shaders/shaders_hybrid_render \
shaders/shaders_julia_set \
shaders/shaders_lightmap \
shaders/shaders_mesh_instancing \
shaders/shaders_model_shader \
shaders/shaders_multi_sample2d \
shaders/shaders_palette_switch \
shaders/shaders_postprocessing \
shaders/shaders_raymarching \
shaders/shaders_shadowmap \
shaders/shaders_shapes_textures \
shaders/shaders_simple_mask \
shaders/shaders_spotlight \
shaders/shaders_hot_reloading \
shaders/shaders_mesh_instancing \
shaders/shaders_multi_sample2d \
shaders/shaders_texture_drawing \
shaders/shaders_texture_outline \
shaders/shaders_texture_tiling \
shaders/shaders_texture_waves \
shaders/shaders_write_depth \
shaders/shaders_hybrid_render
shaders/shaders_vertex_displacement
AUDIO = \
audio/audio_mixed_processor \
audio/audio_module_playing \
audio/audio_music_stream \
audio/audio_raw_stream \
audio/audio_sound_loading \
audio/audio_stream_effects \
audio/audio_mixed_processor
audio/audio_sound_multi \
audio/audio_stream_effects
OTHERS = \
others/easings_testbed \
others/embedded_files_loading \
others/raylib_opengl_interop \
others/raymath_vector_angle \
others/rlgl_compute_shader
ifeq ($(TARGET_PLATFORM), PLATFORM_DESKTOP_GFLW)
OTHERS += others/rlgl_standalone
endif
CURRENT_MAKEFILE = $(lastword $(MAKEFILE_LIST))
# Define processes to execute
#------------------------------------------------------------------------------------------------
# Default target entry
all: $(CORE) $(SHAPES) $(TEXT) $(TEXTURES) $(MODELS) $(SHADERS) $(AUDIO)
all: $(CORE) $(SHAPES) $(TEXT) $(TEXTURES) $(MODELS) $(SHADERS) $(AUDIO) $(OTHERS)
core: $(CORE)
shapes: $(SHAPES)
@ -549,22 +672,29 @@ text: $(TEXT)
models: $(MODELS)
shaders: $(SHADERS)
audio: $(AUDIO)
others: $(OTHERS)
# Generic compilation pattern
# NOTE: Examples must be ready for Android compilation!
%: %.c
ifeq ($(PLATFORM),PLATFORM_ANDROID)
ifeq ($(TARGET_PLATFORM),PLATFORM_ANDROID)
$(MAKE) -f Makefile.Android PROJECT_NAME=$@ PROJECT_SOURCE_FILES=$<
else ifeq ($(TARGET_PLATFORM),PLATFORM_WEB)
$(MAKE) -f Makefile.Web $@
else
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) -D$(TARGET_PLATFORM)
endif
# Clean everything
clean:
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
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
@ -574,15 +704,11 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
rm -f *.o
endif
endif
ifeq ($(PLATFORM),PLATFORM_RPI)
ifeq ($(TARGET_PLATFORM),PLATFORM_DRM)
find . -type f -executable -delete
rm -fv *.o
endif
ifeq ($(PLATFORM),PLATFORM_DRM)
find . -type f -executable -delete
rm -fv *.o
endif
ifeq ($(PLATFORM),PLATFORM_WEB)
ifeq ($(TARGET_PLATFORM),PLATFORM_WEB)
ifeq ($(PLATFORM_OS),WINDOWS)
del *.wasm *.html *.js *.data
else

View file

@ -2,7 +2,7 @@
#
# raylib makefile for Android project (APK building)
#
# Copyright (c) 2017-2023 Ramon Santamaria (@raysan5)
# Copyright (c) 2017-2024 Ramon Santamaria (@raysan5)
#
# This software is provided "as-is", without any express or implied warranty. In no event
# will the authors be held liable for any damages arising from the use of this software.
@ -158,7 +158,8 @@ LDLIBS = -lm -lc -lraylib -llog -landroid -lEGL -lGLESv2 -lOpenSLES -ldl
OBJS = $(patsubst %.c, $(PROJECT_BUILD_PATH)/obj/%.o, $(PROJECT_SOURCE_FILES))
# Android APK building process... some steps required...
# NOTE: typing 'make' will invoke the default target entry called 'all',
# NOTE: typing 'make' will invoke the default target entry called 'all'
# TODO: Use apksigner for APK signing, jarsigner is not recommended
all: create_temp_project_dirs \
copy_project_required_libs \
copy_project_resources \
@ -170,8 +171,14 @@ all: create_temp_project_dirs \
compile_project_class \
compile_project_class_dex \
create_project_apk_package \
zipalign_project_apk_package \
sign_project_apk_package
sign_project_apk_package \
zipalign_project_apk_package
# WARNING: About build signing process:
# - If using apksigner, zipalign must be used before the APK file has been signed.
# - If using jarsigner (not recommended), zipalign must be used after the APK file has been signed.
# REF: https://developer.android.com/tools/zipalign
# REF: https://developer.android.com/tools/apksigner
# Create required temp directories for APK building
create_temp_project_dirs:

File diff suppressed because it is too large Load diff

View file

@ -31,29 +31,32 @@ Examples using raylib core platform functionality like window creation, inputs,
| 05 | [core_input_gamepad](core/core_input_gamepad.c) | <img src="core/core_input_gamepad.png" alt="core_input_gamepad" width="80"> | ⭐️☆☆☆ | 1.1 | **4.2** | [Ray](https://github.com/raysan5) |
| 06 | [core_input_multitouch](core/core_input_multitouch.c) | <img src="core/core_input_multitouch.png" alt="core_input_multitouch" width="80"> | ⭐️☆☆☆ | 2.1 | 2.5 | [Berni](https://github.com/Berni8k) |
| 07 | [core_input_gestures](core/core_input_gestures.c) | <img src="core/core_input_gestures.png" alt="core_input_gestures" width="80"> | ⭐️⭐️☆☆ | 1.4 | **4.2** | [Ray](https://github.com/raysan5) |
| 08 | [core_2d_camera](core/core_2d_camera.c) | <img src="core/core_2d_camera.png" alt="core_2d_camera" width="80"> | ⭐️⭐️☆☆ | 1.5 | 3.0 | [Ray](https://github.com/raysan5) |
| 09 | [core_2d_camera_mouse_zoom](core/core_2d_camera_mouse_zoom.c) | <img src="core/core_2d_camera_mouse_zoom.png" alt="core_2d_camera_mouse_zoom" width="80"> | ⭐️⭐️☆☆ | **4.2** | **4.2** | [Jeffery Myers](https://github.com/JeffM2501) |
| 10 | [core_2d_camera_platformer](core/core_2d_camera_platformer.c) | <img src="core/core_2d_camera_platformer.png" alt="core_2d_camera_platformer" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 3.0 | [avyy](https://github.com/avyy) |
| 11 | [core_3d_camera_mode](core/core_3d_camera_mode.c) | <img src="core/core_3d_camera_mode.png" alt="core_3d_camera_mode" width="80"> | ⭐️☆☆☆ | 1.0 | 1.0 | [Ray](https://github.com/raysan5) |
| 12 | [core_3d_camera_free](core/core_3d_camera_free.c) | <img src="core/core_3d_camera_free.png" alt="core_3d_camera_free" width="80"> | ⭐️☆☆☆ | 1.3 | 1.3 | [Ray](https://github.com/raysan5) |
| 13 | [core_3d_camera_first_person](core/core_3d_camera_first_person.c) | <img src="core/core_3d_camera_first_person.png" alt="core_3d_camera_first_person" width="80"> | ⭐️⭐️☆☆ | 1.3 | 1.3 | [Ray](https://github.com/raysan5) |
| 14 | [core_3d_picking](core/core_3d_picking.c) | <img src="core/core_3d_picking.png" alt="core_3d_picking" width="80"> | ⭐️⭐️☆☆ | 1.3 | **4.0** | [Ray](https://github.com/raysan5) |
| 15 | [core_world_screen](core/core_world_screen.c) | <img src="core/core_world_screen.png" alt="core_world_screen" width="80"> | ⭐️⭐️☆☆ | 1.3 | 1.4 | [Ray](https://github.com/raysan5) |
| 16 | [core_custom_logging](core/core_custom_logging.c) | <img src="core/core_custom_logging.png" alt="core_custom_logging" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 2.5 | [Pablo Marcos Oltra](https://github.com/pamarcos) |
| 17 | [core_window_flags](core/core_window_flags.c) | <img src="core/core_window_flags.png" alt="core_window_flags" width="80"> | ⭐️⭐️⭐️☆ | 3.5 | 3.5 | [Ray](https://github.com/raysan5) |
| 18 | [core_window_letterbox](core/core_window_letterbox.c) | <img src="core/core_window_letterbox.png" alt="core_window_letterbox" width="80"> | ⭐️⭐️☆☆ | 2.5 | **4.0** | [Anata](https://github.com/anatagawa) |
| 19 | [core_window_should_close](core/core_window_should_close.c) | <img src="core/core_window_should_close.png" alt="core_window_should_close" width="80"> | ⭐️☆☆☆ | **4.2** | **4.2** | [Ray](https://github.com/raysan5) |
| 20 | [core_drop_files](core/core_drop_files.c) | <img src="core/core_drop_files.png" alt="core_drop_files" width="80"> | ⭐️⭐️☆☆ | 1.3 | **4.2** | [Ray](https://github.com/raysan5) |
| 21 | [core_random_values](core/core_random_values.c) | <img src="core/core_random_values.png" alt="core_random_values" width="80"> | ⭐️☆☆☆ | 1.1 | 1.1 | [Ray](https://github.com/raysan5) |
| 22 | [core_storage_values](core/core_storage_values.c) | <img src="core/core_storage_values.png" alt="core_storage_values" width="80"> | ⭐️⭐️☆☆ | 1.4 | **4.2** | [Ray](https://github.com/raysan5) |
| 23 | [core_vr_simulator](core/core_vr_simulator.c) | <img src="core/core_vr_simulator.png" alt="core_vr_simulator" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | **4.0** | [Ray](https://github.com/raysan5) |
| 24 | [core_loading_thread](core/core_loading_thread.c) | <img src="core/core_loading_thread.png" alt="core_loading_thread" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 3.0 | [Ray](https://github.com/raysan5) |
| 25 | [core_scissor_test](core/core_scissor_test.c) | <img src="core/core_scissor_test.png" alt="core_scissor_test" width="80"> | ⭐️☆☆☆ | 2.5 | 3.0 | [Chris Dill](https://github.com/MysteriousSpace) |
| 26 | [core_basic_screen_manager](core/core_basic_screen_manager.c) | <img src="core/core_basic_screen_manager.png" alt="core_basic_screen_manager" width="80"> | ⭐️☆☆☆ | **4.0** | **4.0** | [Ray](https://github.com/raysan5) |
| 27 | [core_custom_frame_control](core/core_custom_frame_control.c) | <img src="core/core_custom_frame_control.png" alt="core_custom_frame_control" width="80"> | ⭐️⭐️⭐️⭐️ | **4.0** | **4.0** | [Ray](https://github.com/raysan5) |
| 28 | [core_smooth_pixelperfect](core/core_smooth_pixelperfect.c) | <img src="core/core_smooth_pixelperfect.png" alt="core_smooth_pixelperfect" width="80"> | ⭐️⭐️⭐️☆ | 3.7 | **4.0** | [Giancamillo Alessandroni](https://github.com/NotManyIdeasDev) |
| 29 | [core_split_screen](core/core_split_screen.c) | <img src="core/core_split_screen.png" alt="core_split_screen" width="80"> | ⭐️⭐️⭐️⭐️ | 3.7 | **4.0** | [Jeffery Myers](https://github.com/JeffM2501) |
| 30 | [core_window_should_close](core/core_window_should_close.c) | <img src="core/core_window_should_close.png" alt="core_window_should_close" width="80"> | ⭐️⭐️☆☆ | **4.2** | **4.2** | [Ray](https://github.com/raysan5) |
| 08 | [core_input_virtual_controls](core/core_input_virtual_controls.c) | <img src="core/core_input_virtual_controls.png" alt="core_input_virtual_controls" width="80"> | ⭐️⭐️☆☆ | **5.0** | **5.0** | [oblerion](https://github.com/oblerion) |
| 09 | [core_2d_camera](core/core_2d_camera.c) | <img src="core/core_2d_camera.png" alt="core_2d_camera" width="80"> | ⭐️⭐️☆☆ | 1.5 | 3.0 | [Ray](https://github.com/raysan5) |
| 10 | [core_2d_camera_mouse_zoom](core/core_2d_camera_mouse_zoom.c) | <img src="core/core_2d_camera_mouse_zoom.png" alt="core_2d_camera_mouse_zoom" width="80"> | ⭐️⭐️☆☆ | **4.2** | **4.2** | [Jeffery Myers](https://github.com/JeffM2501) |
| 11 | [core_2d_camera_platformer](core/core_2d_camera_platformer.c) | <img src="core/core_2d_camera_platformer.png" alt="core_2d_camera_platformer" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 3.0 | [avyy](https://github.com/avyy) |
| 12 | [core_2d_camera_split_screen](core/core_2d_camera_split_screen.c) | <img src="core/core_2d_camera_split_screen.png" alt="core_2d_camera_split_screen" width="80"> | ⭐️⭐️⭐️⭐️ | **4.5** | **4.5** | [Gabriel dos Santos Sanches](https://github.com/gabrielssanches) |
| 13 | [core_3d_camera_mode](core/core_3d_camera_mode.c) | <img src="core/core_3d_camera_mode.png" alt="core_3d_camera_mode" width="80"> | ⭐️☆☆☆ | 1.0 | 1.0 | [Ray](https://github.com/raysan5) |
| 14 | [core_3d_camera_free](core/core_3d_camera_free.c) | <img src="core/core_3d_camera_free.png" alt="core_3d_camera_free" width="80"> | ⭐️☆☆☆ | 1.3 | 1.3 | [Ray](https://github.com/raysan5) |
| 15 | [core_3d_camera_first_person](core/core_3d_camera_first_person.c) | <img src="core/core_3d_camera_first_person.png" alt="core_3d_camera_first_person" width="80"> | ⭐️⭐️☆☆ | 1.3 | 1.3 | [Ray](https://github.com/raysan5) |
| 16 | [core_3d_camera:split_screen](core/core_3d_camera_split_screen.c) | <img src="core/core_3d_camera_split_screen.png" alt="core_3d_camera_split_screen" width="80"> | ⭐️⭐️⭐️⭐️ | 3.7 | **4.0** | [Jeffery Myers](https://github.com/JeffM2501) |
| 17 | [core_3d_picking](core/core_3d_picking.c) | <img src="core/core_3d_picking.png" alt="core_3d_picking" width="80"> | ⭐️⭐️☆☆ | 1.3 | **4.0** | [Ray](https://github.com/raysan5) |
| 18 | [core_world_screen](core/core_world_screen.c) | <img src="core/core_world_screen.png" alt="core_world_screen" width="80"> | ⭐️⭐️☆☆ | 1.3 | 1.4 | [Ray](https://github.com/raysan5) |
| 19 | [core_custom_logging](core/core_custom_logging.c) | <img src="core/core_custom_logging.png" alt="core_custom_logging" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 2.5 | [Pablo Marcos Oltra](https://github.com/pamarcos) |
| 20 | [core_window_flags](core/core_window_flags.c) | <img src="core/core_window_flags.png" alt="core_window_flags" width="80"> | ⭐️⭐️⭐️☆ | 3.5 | 3.5 | [Ray](https://github.com/raysan5) |
| 21 | [core_window_letterbox](core/core_window_letterbox.c) | <img src="core/core_window_letterbox.png" alt="core_window_letterbox" width="80"> | ⭐️⭐️☆☆ | 2.5 | **4.0** | [Anata](https://github.com/anatagawa) |
| 22 | [core_window_should_close](core/core_window_should_close.c) | <img src="core/core_window_should_close.png" alt="core_window_should_close" width="80"> | ⭐️☆☆☆ | **4.2** | **4.2** | [Ray](https://github.com/raysan5) |
| 23 | [core_drop_files](core/core_drop_files.c) | <img src="core/core_drop_files.png" alt="core_drop_files" width="80"> | ⭐️⭐️☆☆ | 1.3 | **4.2** | [Ray](https://github.com/raysan5) |
| 24 | [core_random_values](core/core_random_values.c) | <img src="core/core_random_values.png" alt="core_random_values" width="80"> | ⭐️☆☆☆ | 1.1 | 1.1 | [Ray](https://github.com/raysan5) |
| 25 | [core_storage_values](core/core_storage_values.c) | <img src="core/core_storage_values.png" alt="core_storage_values" width="80"> | ⭐️⭐️☆☆ | 1.4 | **4.2** | [Ray](https://github.com/raysan5) |
| 26 | [core_vr_simulator](core/core_vr_simulator.c) | <img src="core/core_vr_simulator.png" alt="core_vr_simulator" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | **4.0** | [Ray](https://github.com/raysan5) |
| 27 | [core_loading_thread](core/core_loading_thread.c) | <img src="core/core_loading_thread.png" alt="core_loading_thread" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 3.0 | [Ray](https://github.com/raysan5) |
| 28 | [core_scissor_test](core/core_scissor_test.c) | <img src="core/core_scissor_test.png" alt="core_scissor_test" width="80"> | ⭐️☆☆☆ | 2.5 | 3.0 | [Chris Dill](https://github.com/MysteriousSpace) |
| 29 | [core_basic_screen_manager](core/core_basic_screen_manager.c) | <img src="core/core_basic_screen_manager.png" alt="core_basic_screen_manager" width="80"> | ⭐️☆☆☆ | **4.0** | **4.0** | [Ray](https://github.com/raysan5) |
| 30 | [core_custom_frame_control](core/core_custom_frame_control.c) | <img src="core/core_custom_frame_control.png" alt="core_custom_frame_control" width="80"> | ⭐️⭐️⭐️⭐️ | **4.0** | **4.0** | [Ray](https://github.com/raysan5) |
| 31 | [core_smooth_pixelperfect](core/core_smooth_pixelperfect.c) | <img src="core/core_smooth_pixelperfect.png" alt="core_smooth_pixelperfect" width="80"> | ⭐️⭐️⭐️☆ | 3.7 | **4.0** | [Giancamillo Alessandroni](https://github.com/NotManyIdeasDev) |
| 32 | [core_window_should_close](core/core_window_should_close.c) | <img src="core/core_window_should_close.png" alt="core_window_should_close" width="80"> | ⭐️⭐️☆☆ | **4.2** | **4.2** | [Ray](https://github.com/raysan5) |
| 33 | [core_random_sequence](core/core_random_sequence.c) | <img src="core/core_random_sequence.png" alt="core_random_sequence" width="80"> | ⭐️☆☆☆ | **5.0** | **5.0** | [REDl3east](https://github.com/REDl3east) |
### category: shapes
@ -61,22 +64,23 @@ Examples using raylib shapes drawing functionality, provided by raylib [shapes](
| ## | example | image | difficulty<br>level | version<br>created | last version<br>updated | original<br>developer |
|----|----------|--------|:-------------------:|:------------------:|:------------------:|:----------|
| 31 | [shapes_basic_shapes](shapes/shapes_basic_shapes.c) | <img src="shapes/shapes_basic_shapes.png" alt="shapes_basic_shapes" width="80"> | ⭐️☆☆☆ | 1.0 | **4.0** | [Ray](https://github.com/raysan5) |
| 32 | [shapes_bouncing_ball](shapes/shapes_bouncing_ball.c) | <img src="shapes/shapes_bouncing_ball.png" alt="shapes_bouncing_ball" width="80"> | ⭐️☆☆☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) |
| 33 | [shapes_colors_palette](shapes/shapes_colors_palette.c) | <img src="shapes/shapes_colors_palette.png" alt="shapes_colors_palette" width="80"> | ⭐️⭐️☆☆ | 1.0 | 2.5 | [Ray](https://github.com/raysan5) |
| 34 | [shapes_logo_raylib](shapes/shapes_logo_raylib.c) | <img src="shapes/shapes_logo_raylib.png" alt="shapes_logo_raylib" width="80"> | ⭐️☆☆☆ | 1.0 | 1.0 | [Ray](https://github.com/raysan5) |
| 35 | [shapes_logo_raylib_anim](shapes/shapes_logo_raylib_anim.c) | <img src="shapes/shapes_logo_raylib_anim.png" alt="shapes_logo_raylib_anim" width="80"> | ⭐️⭐️☆☆ | 2.5 | **4.0** | [Ray](https://github.com/raysan5) |
| 36 | [shapes_rectangle_scaling](shapes/shapes_rectangle_scaling.c) | <img src="shapes/shapes_rectangle_scaling.png" alt="shapes_rectangle_scaling" width="80"> | ⭐️⭐️☆☆ | 2.5 | 2.5 | [Vlad Adrian](https://github.com/demizdor) |
| 37 | [shapes_lines_bezier](shapes/shapes_lines_bezier.c) | <img src="shapes/shapes_lines_bezier.png" alt="shapes_lines_bezier" width="80"> | ⭐️☆☆☆ | 1.7 | 1.7 | [Ray](https://github.com/raysan5) |
| 38 | [shapes_collision_area](shapes/shapes_collision_area.c) | <img src="shapes/shapes_collision_area.png" alt="shapes_collision_area" width="80"> | ⭐️⭐️☆☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) |
| 39 | [shapes_following_eyes](shapes/shapes_following_eyes.c) | <img src="shapes/shapes_following_eyes.png" alt="shapes_following_eyes" width="80"> | ⭐️⭐️☆☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) |
| 40 | [shapes_easings_ball_anim](shapes/shapes_easings_ball_anim.c) | <img src="shapes/shapes_easings_ball_anim.png" alt="shapes_easings_ball_anim" width="80"> | ⭐️⭐️☆☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) |
| 41 | [shapes_easings_box_anim](shapes/shapes_easings_box_anim.c) | <img src="shapes/shapes_easings_box_anim.png" alt="shapes_easings_box_anim" width="80"> | ⭐️⭐️☆☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) |
| 42 | [shapes_easings_rectangle_array](shapes/shapes_easings_rectangle_array.c) | <img src="shapes/shapes_easings_rectangle_array.png" alt="shapes_easings_rectangle_array" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) |
| 43 | [shapes_draw_ring](shapes/shapes_draw_ring.c) | <img src="shapes/shapes_draw_ring.png" alt="shapes_draw_ring" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 2.5 | [Vlad Adrian](https://github.com/demizdor) |
| 44 | [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) |
| 45 | [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) |
| 46 | [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) |
| 34 | [shapes_basic_shapes](shapes/shapes_basic_shapes.c) | <img src="shapes/shapes_basic_shapes.png" alt="shapes_basic_shapes" width="80"> | ⭐️☆☆☆ | 1.0 | **4.0** | [Ray](https://github.com/raysan5) |
| 35 | [shapes_bouncing_ball](shapes/shapes_bouncing_ball.c) | <img src="shapes/shapes_bouncing_ball.png" alt="shapes_bouncing_ball" width="80"> | ⭐️☆☆☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) |
| 36 | [shapes_colors_palette](shapes/shapes_colors_palette.c) | <img src="shapes/shapes_colors_palette.png" alt="shapes_colors_palette" width="80"> | ⭐️⭐️☆☆ | 1.0 | 2.5 | [Ray](https://github.com/raysan5) |
| 37 | [shapes_logo_raylib](shapes/shapes_logo_raylib.c) | <img src="shapes/shapes_logo_raylib.png" alt="shapes_logo_raylib" width="80"> | ⭐️☆☆☆ | 1.0 | 1.0 | [Ray](https://github.com/raysan5) |
| 38 | [shapes_logo_raylib_anim](shapes/shapes_logo_raylib_anim.c) | <img src="shapes/shapes_logo_raylib_anim.png" alt="shapes_logo_raylib_anim" width="80"> | ⭐️⭐️☆☆ | 2.5 | **4.0** | [Ray](https://github.com/raysan5) |
| 39 | [shapes_rectangle_scaling](shapes/shapes_rectangle_scaling.c) | <img src="shapes/shapes_rectangle_scaling.png" alt="shapes_rectangle_scaling" width="80"> | ⭐️⭐️☆☆ | 2.5 | 2.5 | [Vlad Adrian](https://github.com/demizdor) |
| 40 | [shapes_lines_bezier](shapes/shapes_lines_bezier.c) | <img src="shapes/shapes_lines_bezier.png" alt="shapes_lines_bezier" width="80"> | ⭐️☆☆☆ | 1.7 | 1.7 | [Ray](https://github.com/raysan5) |
| 41 | [shapes_collision_area](shapes/shapes_collision_area.c) | <img src="shapes/shapes_collision_area.png" alt="shapes_collision_area" width="80"> | ⭐️⭐️☆☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) |
| 42 | [shapes_following_eyes](shapes/shapes_following_eyes.c) | <img src="shapes/shapes_following_eyes.png" alt="shapes_following_eyes" width="80"> | ⭐️⭐️☆☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) |
| 43 | [shapes_easings_ball_anim](shapes/shapes_easings_ball_anim.c) | <img src="shapes/shapes_easings_ball_anim.png" alt="shapes_easings_ball_anim" width="80"> | ⭐️⭐️☆☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) |
| 44 | [shapes_easings_box_anim](shapes/shapes_easings_box_anim.c) | <img src="shapes/shapes_easings_box_anim.png" alt="shapes_easings_box_anim" width="80"> | ⭐️⭐️☆☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) |
| 45 | [shapes_easings_rectangle_array](shapes/shapes_easings_rectangle_array.c) | <img src="shapes/shapes_easings_rectangle_array.png" alt="shapes_easings_rectangle_array" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) |
| 46 | [shapes_draw_ring](shapes/shapes_draw_ring.c) | <img src="shapes/shapes_draw_ring.png" alt="shapes_draw_ring" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 2.5 | [Vlad Adrian](https://github.com/demizdor) |
| 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
@ -84,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 |
|----|----------|--------|:-------------------:|:------------------:|:------------------:|:----------|
| 47 | [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) |
| 48 | [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) |
| 49 | [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) |
| 50 | [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) |
| 51 | [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) |
| 52 | [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) |
| 53 | [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) |
| 54 | [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) |
| 55 | [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) |
| 56 | [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) |
| 57 | [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) |
| 58 | [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) |
| 59 | [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) |
| 60 | [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) |
| 61 | [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) |
| 62 | [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) |
| 63 | [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) |
| 64 | [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) |
| 65 | [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) |
| 66 | [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) |
| 67 | [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) |
| 68 | [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
@ -113,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 |
|----|----------|--------|:-------------------:|:------------------:|:------------------:|:----------|
| 69 | [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) |
| 70 | [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) |
| 71 | [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) |
| 72 | [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) |
| 73 | [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) |
| 74 | [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) |
| 75 | [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) |
| 76 | [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) |
| 77 | [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) |
| 78 | [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) |
| 79 | [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) |
| 80 | [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
@ -132,24 +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 |
|----|----------|--------|:-------------------:|:------------------:|:------------------:|:----------|
| 81 | [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) |
| 82 | [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) |
| 83 | [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) |
| 84 | [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) |
| 85 | [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) |
| 86 | [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) |
| 87 | [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) |
| 88 | [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) |
| 89 | [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) |
| 90 | [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) |
| 91 | [models_loading_vox](models/models_loading_vox.c) | <img src="models/models_loading_vox.png" alt="models_loading_vox" width="80"> | ⭐️☆☆☆ | **4.0** | **4.0** | [Johann Nadalutti](https://github.com/procfxgen) |
| 92 | [models_loading_m3d](models/models_loading_m3d.c) | <img src="models/models_loading_m3d.png" alt="models_loading_m3d" width="80"> | ⭐️☆☆☆ | **4.2** | **4.2** | [bzt](https://bztsrc.gitlab.io/model3d) |
| 93 | [models_orthographic_projection](models/models_orthographic_projection.c) | <img src="models/models_orthographic_projection.png" alt="models_orthographic_projection" width="80"> | ⭐️☆☆☆ | 2.0 | 3.7 | [Max Danielsson](https://github.com/autious) |
| 94 | [models_rlgl_solar_system](models/models_rlgl_solar_system.c) | <img src="models/models_rlgl_solar_system.png" alt="models_rlgl_solar_system" width="80"> | ⭐️⭐️⭐️⭐️ | 2.5 | **4.0** | [Ray](https://github.com/raysan5) |
| 95 | [models_yaw_pitch_roll](models/models_yaw_pitch_roll.c) | <img src="models/models_yaw_pitch_roll.png" alt="models_yaw_pitch_roll" width="80"> | ⭐️⭐️☆☆ | 1.8 | **4.0** | [Berni](https://github.com/Berni8k) |
| 96 | [models_waving_cubes](models/models_waving_cubes.c) | <img src="models/models_waving_cubes.png" alt="models_waving_cubes" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 3.7 | [codecat](https://github.com/codecat) |
| 97 | [models_heightmap](models/models_heightmap.c) | <img src="models/models_heightmap.png" alt="models_heightmap" width="80"> | ⭐️☆☆☆ | 1.8 | 3.5 | [Ray](https://github.com/raysan5) |
| 98 | [models_skybox](models/models_skybox.c) | <img src="models/models_skybox.png" alt="models_skybox" width="80"> | ⭐️⭐️☆☆ | 1.8 | **4.0** | [Ray](https://github.com/raysan5) |
| 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
@ -157,24 +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 |
|----|----------|--------|:-------------------:|:------------------:|:------------------:|:----------|
| 99 | [shaders_basic_lighting](shaders/shaders_basic_lighting.c) | <img src="shaders/shaders_basic_lighting.png" alt="shaders_basic_lighting" width="80"> | ⭐️⭐️⭐️⭐️ | 3.0 | **4.2** | [Chris Camacho](https://github.com/codifies) |
| 100 | [shaders_model_shader](shaders/shaders_model_shader.c) | <img src="shaders/shaders_model_shader.png" alt="shaders_model_shader" width="80"> | ⭐️⭐️☆☆ | 1.3 | 3.7 | [Ray](https://github.com/raysan5) |
| 101 | [shaders_shapes_textures](shaders/shaders_shapes_textures.c) | <img src="shaders/shaders_shapes_textures.png" alt="shaders_shapes_textures" width="80"> | ⭐️⭐️☆☆ | 1.7 | 3.7 | [Ray](https://github.com/raysan5) |
| 102 | [shaders_custom_uniform](shaders/shaders_custom_uniform.c) | <img src="shaders/shaders_custom_uniform.png" alt="shaders_custom_uniform" width="80"> | ⭐️⭐️☆☆ | 1.3 | **4.0** | [Ray](https://github.com/raysan5) |
| 103 | [shaders_postprocessing](shaders/shaders_postprocessing.c) | <img src="shaders/shaders_postprocessing.png" alt="shaders_postprocessing" width="80"> | ⭐️⭐️⭐️☆ | 1.3 | **4.0** | [Ray](https://github.com/raysan5) |
| 104 | [shaders_palette_switch](shaders/shaders_palette_switch.c) | <img src="shaders/shaders_palette_switch.png" alt="shaders_palette_switch" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 3.7 | [Marco Lizza](https://github.com/MarcoLizza) |
| 105 | [shaders_raymarching](shaders/shaders_raymarching.c) | <img src="shaders/shaders_raymarching.png" alt="shaders_raymarching" width="80"> | ⭐️⭐️⭐️⭐️ | 2.0 | **4.2** | [Ray](https://github.com/raysan5) |
| 106 | [shaders_texture_drawing](shaders/shaders_texture_drawing.c) | <img src="shaders/shaders_texture_drawing.png" alt="shaders_texture_drawing" width="80"> | ⭐️⭐️☆☆ | 2.0 | 3.7 | [Michał Ciesielski](https://github.com/) |
| 107 | [shaders_texture_outline](shaders/shaders_texture_outline.c) | <img src="shaders/shaders_texture_outline.png" alt="shaders_texture_outline" width="80"> | ⭐️⭐️⭐️☆ | **4.0** | **4.0** | [Samuel Skiff](https://github.com/GoldenThumbs) |
| 108 | [shaders_texture_waves](shaders/shaders_texture_waves.c) | <img src="shaders/shaders_texture_waves.png" alt="shaders_texture_waves" width="80"> | ⭐️⭐️☆☆ | 2.5 | 3.7 | [Anata](https://github.com/anatagawa) |
| 109 | [shaders_julia_set](shaders/shaders_julia_set.c) | <img src="shaders/shaders_julia_set.png" alt="shaders_julia_set" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | **4.0** | [eggmund](https://github.com/eggmund) |
| 110 | [shaders_eratosthenes](shaders/shaders_eratosthenes.c) | <img src="shaders/shaders_eratosthenes.png" alt="shaders_eratosthenes" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | **4.0** | [ProfJski](https://github.com/ProfJski) |
| 111 | [shaders_fog](shaders/shaders_fog.c) | <img src="shaders/shaders_fog.png" alt="shaders_fog" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 3.7 | [Chris Camacho](https://github.com/codifies) |
| 112 | [shaders_simple_mask](shaders/shaders_simple_mask.c) | <img src="shaders/shaders_simple_mask.png" alt="shaders_simple_mask" width="80"> | ⭐️⭐️☆☆ | 2.5 | 3.7 | [Chris Camacho](https://github.com/codifies) |
| 113 | [shaders_hot_reloading](shaders/shaders_hot_reloading.c) | <img src="shaders/shaders_hot_reloading.png" alt="shaders_hot_reloading" width="80"> | ⭐️⭐️⭐️☆ | 3.0 | 3.5 | [Ray](https://github.com/raysan5) |
| 114 | [shaders_mesh_instancing](shaders/shaders_mesh_instancing.c) | <img src="shaders/shaders_mesh_instancing.png" alt="shaders_mesh_instancing" width="80"> | ⭐️⭐️⭐️⭐️ | 3.7 | **4.2** | [seanpringle](https://github.com/seanpringle) |
| 115 | [shaders_multi_sample2d](shaders/shaders_multi_sample2d.c) | <img src="shaders/shaders_multi_sample2d.png" alt="shaders_multi_sample2d" width="80"> | ⭐️⭐️☆☆ | 3.5 | 3.5 | [Ray](https://github.com/raysan5) |
| 116 | [shaders_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) |
| 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
@ -182,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 |
|----|----------|--------|:-------------------:|:------------------:|:------------------:|:----------|
| 117 | [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) |
| 118 | [audio_music_stream](audio/audio_music_stream.c) | <img src="audio/audio_music_stream.png" alt="audio_music_stream" width="80"> | ⭐️☆☆☆ | 1.3 | **4.2** | [Ray](https://github.com/raysan5) |
| 119 | [audio_raw_stream](audio/audio_raw_stream.c) | <img src="audio/audio_raw_stream.png" alt="audio_raw_stream" width="80"> | ⭐️⭐️⭐️☆ | 1.6 | **4.2** | [Ray](https://github.com/raysan5) |
| 120 | [audio_sound_loading](audio/audio_sound_loading.c) | <img src="audio/audio_sound_loading.png" alt="audio_sound_loading" width="80"> | ⭐️☆☆☆ | 1.1 | 3.5 | [Ray](https://github.com/raysan5) |
| 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
@ -193,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 |
|----|----------|--------|:-------------------:|:------------------:|:------------------:|:----------|
| 122 | [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) |
| 123 | [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) |
| 124 | [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) |
| 125 | [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) |
| 126 | [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 it is an [examples template](examples_template.c) to start with!
As always contributions are welcome, feel free to send new examples! Here is an [examples template](examples_template.c) to start with!

View file

@ -97,7 +97,7 @@ int main(void)
DrawRectangle(199, 199, 402, 34, LIGHTGRAY);
for (int i = 0; i < 400; i++)
{
DrawLine(201 + i, 232 - averageVolume[i] * 32, 201 + i, 232, MAROON);
DrawLine(201 + i, 232 - (int)(averageVolume[i] * 32), 201 + i, 232, MAROON);
}
DrawRectangleLines(199, 199, 402, 34, GRAY);

View file

@ -7,7 +7,7 @@
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software
*
* Copyright (c) 2016-2023 Ramon Santamaria (@raysan5)
* Copyright (c) 2016-2024 Ramon Santamaria (@raysan5)
*
********************************************************************************************/
@ -79,6 +79,7 @@ int main(void)
{
StopMusicStream(music);
PlayMusicStream(music);
pause = false;
}
// Pause/Resume music playing
@ -134,6 +135,14 @@ int main(void)
DrawRectangle(20, screenHeight - 20 - 12, (int)timePlayed, 12, MAROON);
DrawRectangleLines(20, screenHeight - 20 - 12, screenWidth - 40, 12, GRAY);
// Draw help instructions
DrawRectangle(20, 20, 425, 145, WHITE);
DrawRectangleLines(20, 20, 425, 145, GRAY);
DrawText("PRESS SPACE TO RESTART MUSIC", 40, 40, 20, BLACK);
DrawText("PRESS P TO PAUSE/RESUME", 40, 70, 20, BLACK);
DrawText("PRESS UP/DOWN TO CHANGE SPEED", 40, 100, 20, BLACK);
DrawText(TextFormat("SPEED: %f", pitch), 40, 130, 20, MAROON);
EndDrawing();
//----------------------------------------------------------------------------------
}
@ -148,4 +157,4 @@ int main(void)
//--------------------------------------------------------------------------------------
return 0;
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Before After
Before After

View file

@ -7,7 +7,7 @@
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software
*
* Copyright (c) 2015-2023 Ramon Santamaria (@raysan5)
* Copyright (c) 2015-2024 Ramon Santamaria (@raysan5)
*
********************************************************************************************/

View file

@ -9,7 +9,7 @@
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software
*
* Copyright (c) 2015-2023 Ramon Santamaria (@raysan5) and James Hofmann (@triplefox)
* Copyright (c) 2015-2024 Ramon Santamaria (@raysan5) and James Hofmann (@triplefox)
*
********************************************************************************************/
@ -38,8 +38,7 @@ float sineIdx = 0.0f;
void AudioInputCallback(void *buffer, unsigned int frames)
{
audioFrequency = frequency + (audioFrequency - frequency)*0.95f;
audioFrequency += 1.0f;
audioFrequency -= 1.0f;
float incr = audioFrequency/44100.0f;
short *d = (short *)buffer;

View file

@ -7,7 +7,7 @@
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software
*
* Copyright (c) 2014-2023 Ramon Santamaria (@raysan5)
* Copyright (c) 2014-2024 Ramon Santamaria (@raysan5)
*
********************************************************************************************/

View file

@ -0,0 +1,87 @@
/*******************************************************************************************
*
* raylib [audio] example - Playing sound multiple times
*
* Example originally created with raylib 4.6
*
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software
*
* Copyright (c) 2023 Jeffery Myers (@JeffM2501)
*
********************************************************************************************/
#include "raylib.h"
#define MAX_SOUNDS 10
Sound soundArray[MAX_SOUNDS] = { 0 };
int currentSound;
//------------------------------------------------------------------------------------
// Program main entry point
//------------------------------------------------------------------------------------
int main(void)
{
// Initialization
//--------------------------------------------------------------------------------------
const int screenWidth = 800;
const int screenHeight = 450;
InitWindow(screenWidth, screenHeight, "raylib [audio] example - playing sound multiple times");
InitAudioDevice(); // Initialize audio device
// load the sound list
soundArray[0] = LoadSound("resources/sound.wav"); // Load WAV audio file into the first slot as the 'source' sound
// this sound owns the sample data
for (int i = 1; i < MAX_SOUNDS; i++)
{
soundArray[i] = LoadSoundAlias(soundArray[0]); // Load an alias of the sound into slots 1-9. These do not own the sound data, but can be played
}
currentSound = 0; // set the sound list to the start
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
//--------------------------------------------------------------------------------------
// Main game loop
while (!WindowShouldClose()) // Detect window close button or ESC key
{
// Update
//----------------------------------------------------------------------------------
if (IsKeyPressed(KEY_SPACE))
{
PlaySound(soundArray[currentSound]); // play the next open sound slot
currentSound++; // increment the sound slot
if (currentSound >= MAX_SOUNDS) // if the sound slot is out of bounds, go back to 0
currentSound = 0;
// Note: a better way would be to look at the list for the first sound that is not playing and use that slot
}
//----------------------------------------------------------------------------------
// Draw
//----------------------------------------------------------------------------------
BeginDrawing();
ClearBackground(RAYWHITE);
DrawText("Press SPACE to PLAY a WAV sound!", 200, 180, 20, LIGHTGRAY);
EndDrawing();
//----------------------------------------------------------------------------------
}
// De-Initialization
//--------------------------------------------------------------------------------------
for (int i = 1; i < MAX_SOUNDS; i++)
UnloadSoundAlias(soundArray[i]); // Unload sound aliases
UnloadSound(soundArray[0]); // Unload source sound data
CloseAudioDevice(); // Close audio device
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View file

@ -2,18 +2,18 @@
*
* raylib [audio] example - Music stream processing effects
*
* Example originally created with raylib 4.2, last time updated with raylib 4.2
* Example originally created with raylib 4.2, last time updated with raylib 5.0
*
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software
*
* Copyright (c) 2022-2023 Ramon Santamaria (@raysan5)
* Copyright (c) 2022-2024 Ramon Santamaria (@raysan5)
*
********************************************************************************************/
#include "raylib.h"
#include <stdlib.h> // Required for: NULL
#include <stdlib.h> // Required for: NULL
// Required delay effect variables
static float *delayBuffer = NULL;
@ -149,13 +149,17 @@ static void AudioProcessEffectLPF(void *buffer, unsigned int frames)
static const float cutoff = 70.0f / 44100.0f; // 70 Hz lowpass filter
const float k = cutoff / (cutoff + 0.1591549431f); // RC filter formula
// Converts the buffer data before using it
float *bufferData = (float *)buffer;
for (unsigned int i = 0; i < frames*2; i += 2)
{
float l = ((float *)buffer)[i], r = ((float *)buffer)[i + 1];
const float l = bufferData[i];
const float r = bufferData[i + 1];
low[0] += k * (l - low[0]);
low[1] += k * (r - low[1]);
((float *)buffer)[i] = low[0];
((float *)buffer)[i + 1] = low[1];
bufferData[i] = low[0];
bufferData[i + 1] = low[1];
}
}
@ -176,4 +180,4 @@ static void AudioProcessEffectDelay(void *buffer, unsigned int frames)
delayBuffer[delayWriteIndex++] = ((float *)buffer)[i + 1];
if (delayWriteIndex == delayBufferSize) delayWriteIndex = 0;
}
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1,48 +1,50 @@
const std = @import("std");
const builtin = @import("builtin");
fn add_module(comptime module: []const u8, b: *std.Build, target: std.zig.CrossTarget, optimize: std.builtin.OptimizeMode) !*std.Build.Step {
if (target.getOsTag() == .emscripten) {
// This has been tested to work with zig 0.12.0
fn add_module(comptime module: []const u8, b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.builtin.OptimizeMode) !*std.Build.Step {
if (target.result.os.tag == .emscripten) {
@panic("Emscripten building via Zig unsupported");
}
const all = b.step(module, "All " ++ module ++ " examples");
const dir = try std.fs.cwd().openIterableDir(module, .{});
var dir = try std.fs.cwd().openDir(module, .{ .iterate = true });
defer if (comptime builtin.zig_version.minor >= 12) dir.close();
var iter = dir.iterate();
while (try iter.next()) |entry| {
if (entry.kind != .File) continue;
if (entry.kind != .file) continue;
const extension_idx = std.mem.lastIndexOf(u8, entry.name, ".c") orelse continue;
const name = entry.name[0..extension_idx];
const path = try std.fs.path.join(b.allocator, &.{ module, entry.name });
// zig's mingw headers do not include pthread.h
if (std.mem.eql(u8, "core_loading_thread", name) and target.getOsTag() == .windows) continue;
if (std.mem.eql(u8, "core_loading_thread", name) and target.result.os.tag == .windows) continue;
const exe = b.addExecutable(.{
.name = name,
.target = target,
.optimize = optimize,
});
exe.addCSourceFile(path, &[_][]const u8{});
exe.addCSourceFile(.{ .file = b.path(path), .flags = &.{} });
exe.linkLibC();
exe.addObjectFile(switch (target.getOsTag()) {
.windows => "../src/raylib.lib",
.linux => "../src/libraylib.a",
.macos => "../src/libraylib.a",
.emscripten => "../src/libraylib.a",
exe.addObjectFile(switch (target.result.os.tag) {
.windows => b.path("../zig-out/lib/raylib.lib"),
.linux => b.path("../zig-out/lib/libraylib.a"),
.macos => b.path("../zig-out/lib/libraylib.a"),
.emscripten => b.path("../zig-out/lib/libraylib.a"),
else => @panic("Unsupported OS"),
});
exe.addIncludePath("../src");
exe.addIncludePath("../src/external");
exe.addIncludePath("../src/external/glfw/include");
exe.addIncludePath(b.path("../src"));
exe.addIncludePath(b.path("../src/external"));
exe.addIncludePath(b.path("../src/external/glfw/include"));
switch (target.getOsTag()) {
switch (target.result.os.tag) {
.windows => {
exe.linkSystemLibrary("winmm");
exe.linkSystemLibrary("gdi32");
exe.linkSystemLibrary("opengl32");
exe.addIncludePath("external/glfw/deps/mingw");
exe.defineCMacro("PLATFORM_DESKTOP", null);
},
@ -70,13 +72,16 @@ fn add_module(comptime module: []const u8, b: *std.Build, target: std.zig.CrossT
},
}
exe.setOutputDir(module);
const install_cmd = b.addInstallArtifact(exe, .{});
var run = exe.run();
run.step.dependOn(&b.addInstallArtifact(exe).step);
run.cwd = module;
b.step(name, name).dependOn(&run.step);
all.dependOn(&exe.step);
const run_cmd = b.addRunArtifact(exe);
run_cmd.cwd = b.path(module);
run_cmd.step.dependOn(&install_cmd.step);
const run_step = b.step(name, name);
run_step.dependOn(&run_cmd.step);
all.dependOn(&install_cmd.step);
}
return all;
}

View file

@ -1,13 +1,13 @@
/*******************************************************************************************
*
* raylib [core] example - 2d camera
* raylib [core] example - 2D Camera system
*
* Example originally created with raylib 1.5, last time updated with raylib 3.0
*
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software
*
* Copyright (c) 2016-2023 Ramon Santamaria (@raysan5)
* Copyright (c) 2016-2024 Ramon Santamaria (@raysan5)
*
********************************************************************************************/

View file

@ -7,7 +7,7 @@
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software
*
* Copyright (c) 2022-2023 Jeffery Myers (@JeffM2501)
* Copyright (c) 2022-2024 Jeffery Myers (@JeffM2501)
*
********************************************************************************************/
@ -31,6 +31,8 @@ int main ()
Camera2D camera = { 0 };
camera.zoom = 1.0f;
int zoomMode = 0; // 0-Mouse Wheel, 1-Mouse Move
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
//--------------------------------------------------------------------------------------
@ -39,42 +41,69 @@ int main ()
{
// Update
//----------------------------------------------------------------------------------
if (IsKeyPressed(KEY_ONE)) zoomMode = 0;
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);
camera.target = Vector2Add(camera.target, delta);
}
// Zoom based on mouse wheel
float wheel = GetMouseWheelMove();
if (wheel != 0)
if (zoomMode == 0)
{
// Get the world point that is under the mouse
Vector2 mouseWorldPos = GetScreenToWorld2D(GetMousePosition(), camera);
// Set the offset to where the mouse is
camera.offset = GetMousePosition();
// Zoom based on mouse wheel
float wheel = GetMouseWheelMove();
if (wheel != 0)
{
// Get the world point that is under the mouse
Vector2 mouseWorldPos = GetScreenToWorld2D(GetMousePosition(), camera);
// Set the target to match, so that the camera maps the world space point
// under the cursor to the screen space point under the cursor at any zoom
camera.target = mouseWorldPos;
// Set the offset to where the mouse is
camera.offset = GetMousePosition();
// Zoom increment
const float zoomIncrement = 0.125f;
// Set the target to match, so that the camera maps the world space point
// under the cursor to the screen space point under the cursor at any zoom
camera.target = mouseWorldPos;
camera.zoom += (wheel*zoomIncrement);
if (camera.zoom < zoomIncrement) camera.zoom = zoomIncrement;
// Zoom increment
float scaleFactor = 1.0f + (0.25f*fabsf(wheel));
if (wheel < 0) scaleFactor = 1.0f/scaleFactor;
camera.zoom = Clamp(camera.zoom*scaleFactor, 0.125f, 64.0f);
}
}
else
{
// 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);
// Set the offset to where the mouse is
camera.offset = GetMousePosition();
// Set the target to match, so that the camera maps the world space point
// under the cursor to the screen space point under the cursor at any zoom
camera.target = mouseWorldPos;
}
if (IsMouseButtonDown(MOUSE_BUTTON_RIGHT))
{
// Zoom increment
float deltaX = GetMouseDelta().x;
float scaleFactor = 1.0f + (0.01f*fabsf(deltaX));
if (deltaX < 0) scaleFactor = 1.0f/scaleFactor;
camera.zoom = Clamp(camera.zoom*scaleFactor, 0.125f, 64.0f);
}
}
//----------------------------------------------------------------------------------
// Draw
//----------------------------------------------------------------------------------
BeginDrawing();
ClearBackground(BLACK);
ClearBackground(RAYWHITE);
BeginMode2D(camera);
@ -87,11 +116,19 @@ int main ()
rlPopMatrix();
// Draw a reference circle
DrawCircle(100, 100, 50, YELLOW);
DrawCircle(GetScreenWidth()/2, GetScreenHeight()/2, 50, MAROON);
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("Mouse right button drag to move, mouse wheel to zoom", 10, 10, 20, WHITE);
DrawText("[1][2] Select mouse zoom mode (Wheel or Move)", 20, 20, 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();
//----------------------------------------------------------------------------------

View file

@ -1,6 +1,6 @@
/*******************************************************************************************
*
* raylib [core] example - 2d camera platformer
* raylib [core] example - 2D Camera platformer
*
* Example originally created with raylib 2.5, last time updated with raylib 3.0
*
@ -9,7 +9,7 @@
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software
*
* Copyright (c) 2019-2023 arvyy (@arvyy)
* Copyright (c) 2019-2024 arvyy (@arvyy)
*
********************************************************************************************/
@ -90,7 +90,7 @@ int main(void)
"Follow player center",
"Follow player center, but clamp to map edges",
"Follow player center; smoothed",
"Follow player center horizontally; updateplayer center vertically after landing",
"Follow player center horizontally; update player center vertically after landing",
"Player push camera on getting too close to screen edge"
};
@ -133,8 +133,10 @@ int main(void)
for (int i = 0; i < envItemsLength; i++) DrawRectangleRec(envItems[i].rect, envItems[i].color);
Rectangle playerRect = { player.position.x - 20, player.position.y - 40, 40, 40 };
Rectangle playerRect = { player.position.x - 20, player.position.y - 40, 40.0f, 40.0f };
DrawRectangleRec(playerRect, RED);
DrawCircleV(player.position, 5.0f, GOLD);
EndMode2D();
@ -168,7 +170,7 @@ void UpdatePlayer(Player *player, EnvItem *envItems, int envItemsLength, float d
player->canJump = false;
}
int hitObstacle = 0;
bool hitObstacle = false;
for (int i = 0; i < envItemsLength; i++)
{
EnvItem *ei = envItems + i;
@ -179,9 +181,10 @@ void UpdatePlayer(Player *player, EnvItem *envItems, int envItemsLength, float d
ei->rect.y >= p->y &&
ei->rect.y <= p->y + player->speed*delta)
{
hitObstacle = 1;
hitObstacle = true;
player->speed = 0.0f;
p->y = ei->rect.y;
break;
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

View file

@ -0,0 +1,167 @@
/*******************************************************************************************
*
* raylib [core] example - 2d camera split screen
*
* Addapted from the core_3d_camera_split_screen example:
* https://github.com/raysan5/raylib/blob/master/examples/core/core_3d_camera_split_screen.c
*
* Example originally created with raylib 4.5, last time updated with raylib 4.5
*
* Example contributed by Gabriel dos Santos Sanches (@gabrielssanches) and reviewed by Ramon Santamaria (@raysan5)
*
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software
*
* Copyright (c) 2023 Gabriel dos Santos Sanches (@gabrielssanches)
*
********************************************************************************************/
#include "raylib.h"
#define PLAYER_SIZE 40
//------------------------------------------------------------------------------------
// Program main entry point
//------------------------------------------------------------------------------------
int main(void)
{
// Initialization
//--------------------------------------------------------------------------------------
const int screenWidth = 800;
const int screenHeight = 440;
InitWindow(screenWidth, screenHeight, "raylib [core] example - 2d camera split screen");
Rectangle player1 = { 200, 200, PLAYER_SIZE, PLAYER_SIZE };
Rectangle player2 = { 250, 200, PLAYER_SIZE, PLAYER_SIZE };
Camera2D camera1 = { 0 };
camera1.target = (Vector2){ player1.x, player1.y };
camera1.offset = (Vector2){ 200.0f, 200.0f };
camera1.rotation = 0.0f;
camera1.zoom = 1.0f;
Camera2D camera2 = { 0 };
camera2.target = (Vector2){ player2.x, player2.y };
camera2.offset = (Vector2){ 200.0f, 200.0f };
camera2.rotation = 0.0f;
camera2.zoom = 1.0f;
RenderTexture screenCamera1 = LoadRenderTexture(screenWidth/2, screenHeight);
RenderTexture screenCamera2 = LoadRenderTexture(screenWidth/2, screenHeight);
// Build a flipped rectangle the size of the split view to use for drawing later
Rectangle splitScreenRect = { 0.0f, 0.0f, (float)screenCamera1.texture.width, (float)-screenCamera1.texture.height };
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
//--------------------------------------------------------------------------------------
// Main game loop
while (!WindowShouldClose()) // Detect window close button or ESC key
{
// Update
//----------------------------------------------------------------------------------
if (IsKeyDown(KEY_S)) player1.y += 3.0f;
else if (IsKeyDown(KEY_W)) player1.y -= 3.0f;
if (IsKeyDown(KEY_D)) player1.x += 3.0f;
else if (IsKeyDown(KEY_A)) player1.x -= 3.0f;
if (IsKeyDown(KEY_UP)) player2.y -= 3.0f;
else if (IsKeyDown(KEY_DOWN)) player2.y += 3.0f;
if (IsKeyDown(KEY_RIGHT)) player2.x += 3.0f;
else if (IsKeyDown(KEY_LEFT)) player2.x -= 3.0f;
camera1.target = (Vector2){ player1.x, player1.y };
camera2.target = (Vector2){ player2.x, player2.y };
//----------------------------------------------------------------------------------
// Draw
//----------------------------------------------------------------------------------
BeginTextureMode(screenCamera1);
ClearBackground(RAYWHITE);
BeginMode2D(camera1);
// Draw full scene with first camera
for (int i = 0; i < screenWidth/PLAYER_SIZE + 1; i++)
{
DrawLineV((Vector2){(float)PLAYER_SIZE*i, 0}, (Vector2){ (float)PLAYER_SIZE*i, (float)screenHeight}, LIGHTGRAY);
}
for (int i = 0; i < screenHeight/PLAYER_SIZE + 1; i++)
{
DrawLineV((Vector2){0, (float)PLAYER_SIZE*i}, (Vector2){ (float)screenWidth, (float)PLAYER_SIZE*i}, LIGHTGRAY);
}
for (int i = 0; i < screenWidth/PLAYER_SIZE; i++)
{
for (int j = 0; j < screenHeight/PLAYER_SIZE; j++)
{
DrawText(TextFormat("[%i,%i]", i, j), 10 + PLAYER_SIZE*i, 15 + PLAYER_SIZE*j, 10, LIGHTGRAY);
}
}
DrawRectangleRec(player1, RED);
DrawRectangleRec(player2, BLUE);
EndMode2D();
DrawRectangle(0, 0, GetScreenWidth()/2, 30, Fade(RAYWHITE, 0.6f));
DrawText("PLAYER1: W/S/A/D to move", 10, 10, 10, MAROON);
EndTextureMode();
BeginTextureMode(screenCamera2);
ClearBackground(RAYWHITE);
BeginMode2D(camera2);
// Draw full scene with second camera
for (int i = 0; i < screenWidth/PLAYER_SIZE + 1; i++)
{
DrawLineV((Vector2){ (float)PLAYER_SIZE*i, 0}, (Vector2){ (float)PLAYER_SIZE*i, (float)screenHeight}, LIGHTGRAY);
}
for (int i = 0; i < screenHeight/PLAYER_SIZE + 1; i++)
{
DrawLineV((Vector2){0, (float)PLAYER_SIZE*i}, (Vector2){ (float)screenWidth, (float)PLAYER_SIZE*i}, LIGHTGRAY);
}
for (int i = 0; i < screenWidth/PLAYER_SIZE; i++)
{
for (int j = 0; j < screenHeight/PLAYER_SIZE; j++)
{
DrawText(TextFormat("[%i,%i]", i, j), 10 + PLAYER_SIZE*i, 15 + PLAYER_SIZE*j, 10, LIGHTGRAY);
}
}
DrawRectangleRec(player1, RED);
DrawRectangleRec(player2, BLUE);
EndMode2D();
DrawRectangle(0, 0, GetScreenWidth()/2, 30, Fade(RAYWHITE, 0.6f));
DrawText("PLAYER2: UP/DOWN/LEFT/RIGHT to move", 10, 10, 10, DARKBLUE);
EndTextureMode();
// Draw both views render textures to the screen side by side
BeginDrawing();
ClearBackground(BLACK);
DrawTextureRec(screenCamera1.texture, splitScreenRect, (Vector2){ 0, 0 }, WHITE);
DrawTextureRec(screenCamera2.texture, splitScreenRect, (Vector2){ screenWidth/2.0f, 0 }, WHITE);
DrawRectangle(GetScreenWidth()/2 - 2, 0, 4, GetScreenHeight(), LIGHTGRAY);
EndDrawing();
}
// De-Initialization
//--------------------------------------------------------------------------------------
UnloadRenderTexture(screenCamera1); // Unload render texture
UnloadRenderTexture(screenCamera2); // Unload render texture
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View file

@ -7,7 +7,7 @@
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software
*
* Copyright (c) 2015-2023 Ramon Santamaria (@raysan5)
* Copyright (c) 2015-2024 Ramon Santamaria (@raysan5)
*
********************************************************************************************/

View file

@ -7,7 +7,7 @@
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software
*
* Copyright (c) 2015-2023 Ramon Santamaria (@raysan5)
* Copyright (c) 2015-2024 Ramon Santamaria (@raysan5)
*
********************************************************************************************/
@ -47,7 +47,7 @@ int main(void)
//----------------------------------------------------------------------------------
UpdateCamera(&camera, CAMERA_FREE);
if (IsKeyDown('Z')) camera.target = (Vector3){ 0.0f, 0.0f, 0.0f };
if (IsKeyPressed('Z')) camera.target = (Vector3){ 0.0f, 0.0f, 0.0f };
//----------------------------------------------------------------------------------
// Draw
@ -65,15 +65,13 @@ int main(void)
EndMode3D();
DrawRectangle( 10, 10, 320, 133, Fade(SKYBLUE, 0.5f));
DrawRectangleLines( 10, 10, 320, 133, BLUE);
DrawRectangle( 10, 10, 320, 93, Fade(SKYBLUE, 0.5f));
DrawRectangleLines( 10, 10, 320, 93, BLUE);
DrawText("Free camera default controls:", 20, 20, 10, BLACK);
DrawText("- Mouse Wheel to Zoom in-out", 40, 40, 10, DARKGRAY);
DrawText("- Mouse Wheel Pressed to Pan", 40, 60, 10, DARKGRAY);
DrawText("- Alt + Mouse Wheel Pressed to Rotate", 40, 80, 10, DARKGRAY);
DrawText("- Alt + Ctrl + Mouse Wheel Pressed for Smooth Zoom", 40, 100, 10, DARKGRAY);
DrawText("- Z to zoom to (0, 0, 0)", 40, 120, 10, DARKGRAY);
DrawText("- Z to zoom to (0, 0, 0)", 40, 80, 10, DARKGRAY);
EndDrawing();
//----------------------------------------------------------------------------------
@ -85,4 +83,4 @@ int main(void)
//--------------------------------------------------------------------------------------
return 0;
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Before After
Before After

View file

@ -7,7 +7,7 @@
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software
*
* Copyright (c) 2014-2023 Ramon Santamaria (@raysan5)
* Copyright (c) 2014-2024 Ramon Santamaria (@raysan5)
*
********************************************************************************************/

View file

@ -1,6 +1,6 @@
/*******************************************************************************************
*
* raylib [core] example - split screen
* raylib [core] example - 3d cmaera split screen
*
* Example originally created with raylib 3.7, last time updated with raylib 4.0
*
@ -9,38 +9,12 @@
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software
*
* Copyright (c) 2021-2023 Jeffery Myers (@JeffM2501)
* Copyright (c) 2021-2024 Jeffery Myers (@JeffM2501)
*
********************************************************************************************/
#include "raylib.h"
Camera cameraPlayer1 = { 0 };
Camera cameraPlayer2 = { 0 };
// Scene drawing
void DrawScene(void)
{
int count = 5;
float spacing = 4;
// Grid of cube trees on a plane to make a "world"
DrawPlane((Vector3){ 0, 0, 0 }, (Vector2){ 50, 50 }, BEIGE); // Simple world plane
for (float x = -count*spacing; x <= count*spacing; x += spacing)
{
for (float z = -count*spacing; z <= count*spacing; z += spacing)
{
DrawCube((Vector3) { x, 1.5f, z }, 1, 1, 1, LIME);
DrawCube((Vector3) { x, 0.5f, z }, 0.25f, 1, 0.25f, BROWN);
}
}
// Draw a cube at each player's position
DrawCube(cameraPlayer1.position, 1, 1, 1, RED);
DrawCube(cameraPlayer2.position, 1, 1, 1, BLUE);
}
//------------------------------------------------------------------------------------
// Program main entry point
//------------------------------------------------------------------------------------
@ -51,9 +25,10 @@ int main(void)
const int screenWidth = 800;
const int screenHeight = 450;
InitWindow(screenWidth, screenHeight, "raylib [core] example - split screen");
InitWindow(screenWidth, screenHeight, "raylib [core] example - 3d camera split screen");
// Setup player 1 camera and screen
Camera cameraPlayer1 = { 0 };
cameraPlayer1.fovy = 45.0f;
cameraPlayer1.up.y = 1.0f;
cameraPlayer1.target.y = 1.0f;
@ -63,6 +38,7 @@ int main(void)
RenderTexture screenPlayer1 = LoadRenderTexture(screenWidth/2, screenHeight);
// Setup player two camera and screen
Camera cameraPlayer2 = { 0 };
cameraPlayer2.fovy = 45.0f;
cameraPlayer2.up.y = 1.0f;
cameraPlayer2.target.y = 3.0f;
@ -73,6 +49,10 @@ int main(void)
// Build a flipped rectangle the size of the split view to use for drawing later
Rectangle splitScreenRect = { 0.0f, 0.0f, (float)screenPlayer1.texture.width, (float)-screenPlayer1.texture.height };
// Grid data
int count = 5;
float spacing = 4;
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
//--------------------------------------------------------------------------------------
@ -116,26 +96,69 @@ int main(void)
// Draw Player1 view to the render texture
BeginTextureMode(screenPlayer1);
ClearBackground(SKYBLUE);
BeginMode3D(cameraPlayer1);
DrawScene();
// Draw scene: grid of cube trees on a plane to make a "world"
DrawPlane((Vector3){ 0, 0, 0 }, (Vector2){ 50, 50 }, BEIGE); // Simple world plane
for (float x = -count*spacing; x <= count*spacing; x += spacing)
{
for (float z = -count*spacing; z <= count*spacing; z += spacing)
{
DrawCube((Vector3) { x, 1.5f, z }, 1, 1, 1, LIME);
DrawCube((Vector3) { x, 0.5f, z }, 0.25f, 1, 0.25f, BROWN);
}
}
// Draw a cube at each player's position
DrawCube(cameraPlayer1.position, 1, 1, 1, RED);
DrawCube(cameraPlayer2.position, 1, 1, 1, BLUE);
EndMode3D();
DrawText("PLAYER1 W/S to move", 10, 10, 20, RED);
DrawRectangle(0, 0, GetScreenWidth()/2, 40, Fade(RAYWHITE, 0.8f));
DrawText("PLAYER1: W/S to move", 10, 10, 20, MAROON);
EndTextureMode();
// Draw Player2 view to the render texture
BeginTextureMode(screenPlayer2);
ClearBackground(SKYBLUE);
BeginMode3D(cameraPlayer2);
DrawScene();
// Draw scene: grid of cube trees on a plane to make a "world"
DrawPlane((Vector3){ 0, 0, 0 }, (Vector2){ 50, 50 }, BEIGE); // Simple world plane
for (float x = -count*spacing; x <= count*spacing; x += spacing)
{
for (float z = -count*spacing; z <= count*spacing; z += spacing)
{
DrawCube((Vector3) { x, 1.5f, z }, 1, 1, 1, LIME);
DrawCube((Vector3) { x, 0.5f, z }, 0.25f, 1, 0.25f, BROWN);
}
}
// Draw a cube at each player's position
DrawCube(cameraPlayer1.position, 1, 1, 1, RED);
DrawCube(cameraPlayer2.position, 1, 1, 1, BLUE);
EndMode3D();
DrawText("PLAYER2 UP/DOWN to move", 10, 10, 20, BLUE);
DrawRectangle(0, 0, GetScreenWidth()/2, 40, Fade(RAYWHITE, 0.8f));
DrawText("PLAYER2: UP/DOWN to move", 10, 10, 20, DARKBLUE);
EndTextureMode();
// Draw both views render textures to the screen side by side
BeginDrawing();
ClearBackground(BLACK);
DrawTextureRec(screenPlayer1.texture, splitScreenRect, (Vector2){ 0, 0 }, WHITE);
DrawTextureRec(screenPlayer2.texture, splitScreenRect, (Vector2){ screenWidth/2.0f, 0 }, WHITE);
DrawRectangle(GetScreenWidth()/2 - 2, 0, 4, GetScreenHeight(), LIGHTGRAY);
EndDrawing();
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View file

@ -7,7 +7,7 @@
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software
*
* Copyright (c) 2015-2023 Ramon Santamaria (@raysan5)
* Copyright (c) 2015-2024 Ramon Santamaria (@raysan5)
*
********************************************************************************************/
@ -60,7 +60,7 @@ int main(void)
{
if (!collision.hit)
{
ray = GetMouseRay(GetMousePosition(), camera);
ray = GetScreenToWorldRay(GetMousePosition(), camera);
// Check collision between ray and box
collision = GetRayCollisionBox(ray,

View file

@ -0,0 +1,336 @@
/*******************************************************************************************
*
* raylib [core] example - automation events
*
* Example originally created with raylib 5.0, last time updated with raylib 5.0
*
* Example based on 2d_camera_platformer example by arvyy (@arvyy)
*
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software
*
* Copyright (c) 2023 Ramon Santamaria (@raysan5)
*
********************************************************************************************/
#include "raylib.h"
#include "raymath.h"
#define GRAVITY 400
#define PLAYER_JUMP_SPD 350.0f
#define PLAYER_HOR_SPD 200.0f
#define MAX_ENVIRONMENT_ELEMENTS 5
typedef struct Player {
Vector2 position;
float speed;
bool canJump;
} Player;
typedef struct EnvElement {
Rectangle rect;
int blocking;
Color color;
} EnvElement;
//------------------------------------------------------------------------------------
// Program main entry point
//------------------------------------------------------------------------------------
int main(void)
{
// Initialization
//--------------------------------------------------------------------------------------
const int screenWidth = 800;
const int screenHeight = 450;
InitWindow(screenWidth, screenHeight, "raylib [core] example - automation events");
// Define player
Player player = { 0 };
player.position = (Vector2){ 400, 280 };
player.speed = 0;
player.canJump = false;
// Define environment elements (platforms)
EnvElement envElements[MAX_ENVIRONMENT_ELEMENTS] = {
{{ 0, 0, 1000, 400 }, 0, LIGHTGRAY },
{{ 0, 400, 1000, 200 }, 1, GRAY },
{{ 300, 200, 400, 10 }, 1, GRAY },
{{ 250, 300, 100, 10 }, 1, GRAY },
{{ 650, 300, 100, 10 }, 1, GRAY }
};
// Define camera
Camera2D camera = { 0 };
camera.target = player.position;
camera.offset = (Vector2){ screenWidth/2.0f, screenHeight/2.0f };
camera.rotation = 0.0f;
camera.zoom = 1.0f;
// Automation events
AutomationEventList aelist = LoadAutomationEventList(0); // Initialize list of automation events to record new events
SetAutomationEventList(&aelist);
bool eventRecording = false;
bool eventPlaying = false;
unsigned int frameCounter = 0;
unsigned int playFrameCounter = 0;
unsigned int currentPlayFrame = 0;
SetTargetFPS(60);
//--------------------------------------------------------------------------------------
// Main game loop
while (!WindowShouldClose())
{
// Update
//----------------------------------------------------------------------------------
float deltaTime = 0.015f;//GetFrameTime();
// Dropped files logic
//----------------------------------------------------------------------------------
if (IsFileDropped())
{
FilePathList droppedFiles = LoadDroppedFiles();
// Supports loading .rgs style files (text or binary) and .png style palette images
if (IsFileExtension(droppedFiles.paths[0], ".txt;.rae"))
{
UnloadAutomationEventList(aelist);
aelist = LoadAutomationEventList(droppedFiles.paths[0]);
eventRecording = false;
// Reset scene state to play
eventPlaying = true;
playFrameCounter = 0;
currentPlayFrame = 0;
player.position = (Vector2){ 400, 280 };
player.speed = 0;
player.canJump = false;
camera.target = player.position;
camera.offset = (Vector2){ screenWidth/2.0f, screenHeight/2.0f };
camera.rotation = 0.0f;
camera.zoom = 1.0f;
}
UnloadDroppedFiles(droppedFiles); // Unload filepaths from memory
}
//----------------------------------------------------------------------------------
// Update player
//----------------------------------------------------------------------------------
if (IsKeyDown(KEY_LEFT)) player.position.x -= PLAYER_HOR_SPD*deltaTime;
if (IsKeyDown(KEY_RIGHT)) player.position.x += PLAYER_HOR_SPD*deltaTime;
if (IsKeyDown(KEY_SPACE) && player.canJump)
{
player.speed = -PLAYER_JUMP_SPD;
player.canJump = false;
}
int hitObstacle = 0;
for (int i = 0; i < MAX_ENVIRONMENT_ELEMENTS; i++)
{
EnvElement *element = &envElements[i];
Vector2 *p = &(player.position);
if (element->blocking &&
element->rect.x <= p->x &&
element->rect.x + element->rect.width >= p->x &&
element->rect.y >= p->y &&
element->rect.y <= p->y + player.speed*deltaTime)
{
hitObstacle = 1;
player.speed = 0.0f;
p->y = element->rect.y;
}
}
if (!hitObstacle)
{
player.position.y += player.speed*deltaTime;
player.speed += GRAVITY*deltaTime;
player.canJump = false;
}
else player.canJump = true;
if (IsKeyPressed(KEY_R))
{
// Reset game state
player.position = (Vector2){ 400, 280 };
player.speed = 0;
player.canJump = false;
camera.target = player.position;
camera.offset = (Vector2){ screenWidth/2.0f, screenHeight/2.0f };
camera.rotation = 0.0f;
camera.zoom = 1.0f;
}
//----------------------------------------------------------------------------------
// Events playing
// NOTE: Logic must be before Camera update because it depends on mouse-wheel value,
// that can be set by the played event... but some other inputs could be affected
//----------------------------------------------------------------------------------
if (eventPlaying)
{
// NOTE: Multiple events could be executed in a single frame
while (playFrameCounter == aelist.events[currentPlayFrame].frame)
{
PlayAutomationEvent(aelist.events[currentPlayFrame]);
currentPlayFrame++;
if (currentPlayFrame == aelist.count)
{
eventPlaying = false;
currentPlayFrame = 0;
playFrameCounter = 0;
TraceLog(LOG_INFO, "FINISH PLAYING!");
break;
}
}
playFrameCounter++;
}
//----------------------------------------------------------------------------------
// Update camera
//----------------------------------------------------------------------------------
camera.target = player.position;
camera.offset = (Vector2){ screenWidth/2.0f, screenHeight/2.0f };
float minX = 1000, minY = 1000, maxX = -1000, maxY = -1000;
// WARNING: On event replay, mouse-wheel internal value is set
camera.zoom += ((float)GetMouseWheelMove()*0.05f);
if (camera.zoom > 3.0f) camera.zoom = 3.0f;
else if (camera.zoom < 0.25f) camera.zoom = 0.25f;
for (int i = 0; i < MAX_ENVIRONMENT_ELEMENTS; i++)
{
EnvElement *element = &envElements[i];
minX = fminf(element->rect.x, minX);
maxX = fmaxf(element->rect.x + element->rect.width, maxX);
minY = fminf(element->rect.y, minY);
maxY = fmaxf(element->rect.y + element->rect.height, maxY);
}
Vector2 max = GetWorldToScreen2D((Vector2){ maxX, maxY }, camera);
Vector2 min = GetWorldToScreen2D((Vector2){ minX, minY }, camera);
if (max.x < screenWidth) camera.offset.x = screenWidth - (max.x - screenWidth/2);
if (max.y < screenHeight) camera.offset.y = screenHeight - (max.y - screenHeight/2);
if (min.x > 0) camera.offset.x = screenWidth/2 - min.x;
if (min.y > 0) camera.offset.y = screenHeight/2 - min.y;
//----------------------------------------------------------------------------------
// Events management
if (IsKeyPressed(KEY_S)) // Toggle events recording
{
if (!eventPlaying)
{
if (eventRecording)
{
StopAutomationEventRecording();
eventRecording = false;
ExportAutomationEventList(aelist, "automation.rae");
TraceLog(LOG_INFO, "RECORDED FRAMES: %i", aelist.count);
}
else
{
SetAutomationEventBaseFrame(180);
StartAutomationEventRecording();
eventRecording = true;
}
}
}
else if (IsKeyPressed(KEY_A)) // Toggle events playing (WARNING: Starts next frame)
{
if (!eventRecording && (aelist.count > 0))
{
// Reset scene state to play
eventPlaying = true;
playFrameCounter = 0;
currentPlayFrame = 0;
player.position = (Vector2){ 400, 280 };
player.speed = 0;
player.canJump = false;
camera.target = player.position;
camera.offset = (Vector2){ screenWidth/2.0f, screenHeight/2.0f };
camera.rotation = 0.0f;
camera.zoom = 1.0f;
}
}
if (eventRecording || eventPlaying) frameCounter++;
else frameCounter = 0;
//----------------------------------------------------------------------------------
// Draw
//----------------------------------------------------------------------------------
BeginDrawing();
ClearBackground(LIGHTGRAY);
BeginMode2D(camera);
// Draw environment elements
for (int i = 0; i < MAX_ENVIRONMENT_ELEMENTS; i++)
{
DrawRectangleRec(envElements[i].rect, envElements[i].color);
}
// Draw player rectangle
DrawRectangleRec((Rectangle){ player.position.x - 20, player.position.y - 40, 40, 40 }, RED);
EndMode2D();
// Draw game controls
DrawRectangle(10, 10, 290, 145, Fade(SKYBLUE, 0.5f));
DrawRectangleLines(10, 10, 290, 145, Fade(BLUE, 0.8f));
DrawText("Controls:", 20, 20, 10, BLACK);
DrawText("- RIGHT | LEFT: Player movement", 30, 40, 10, DARKGRAY);
DrawText("- SPACE: Player jump", 30, 60, 10, DARKGRAY);
DrawText("- R: Reset game state", 30, 80, 10, DARKGRAY);
DrawText("- S: START/STOP RECORDING INPUT EVENTS", 30, 110, 10, BLACK);
DrawText("- A: REPLAY LAST RECORDED INPUT EVENTS", 30, 130, 10, BLACK);
// Draw automation events recording indicator
if (eventRecording)
{
DrawRectangle(10, 160, 290, 30, Fade(RED, 0.3f));
DrawRectangleLines(10, 160, 290, 30, Fade(MAROON, 0.8f));
DrawCircle(30, 175, 10, MAROON);
if (((frameCounter/15)%2) == 1) DrawText(TextFormat("RECORDING EVENTS... [%i]", aelist.count), 50, 170, 10, MAROON);
}
else if (eventPlaying)
{
DrawRectangle(10, 160, 290, 30, Fade(LIME, 0.3f));
DrawRectangleLines(10, 160, 290, 30, Fade(DARKGREEN, 0.8f));
DrawTriangle((Vector2){ 20, 155 + 10 }, (Vector2){ 20, 155 + 30 }, (Vector2){ 40, 155 + 20 }, DARKGREEN);
if (((frameCounter/15)%2) == 1) DrawText(TextFormat("PLAYING RECORDED EVENTS... [%i]", currentPlayFrame), 50, 170, 10, DARKGREEN);
}
EndDrawing();
//----------------------------------------------------------------------------------
}
// De-Initialization
//--------------------------------------------------------------------------------------
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View file

@ -9,7 +9,7 @@
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software
*
* Copyright (c) 2021-2023 Ramon Santamaria (@raysan5)
* Copyright (c) 2021-2024 Ramon Santamaria (@raysan5)
*
********************************************************************************************/

View file

@ -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
*
@ -17,7 +20,7 @@
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software
*
* Copyright (c) 2013-2023 Ramon Santamaria (@raysan5)
* Copyright (c) 2013-2024 Ramon Santamaria (@raysan5)
*
********************************************************************************************/

View file

@ -2,7 +2,7 @@
*
* raylib [core] example - Basic window (adapted for HTML5 platform)
*
* NOTE: This example is prepared to compile for PLATFORM_WEB, PLATFORM_DESKTOP and PLATFORM_RPI
* NOTE: This example is prepared to compile for PLATFORM_WEB, and PLATFORM_DESKTOP
* As you will notice, code structure is slightly diferent to the other examples...
* To compile it for PLATFORM_WEB just uncomment #define PLATFORM_WEB at beginning
*
@ -11,7 +11,7 @@
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software
*
* Copyright (c) 2015-2023 Ramon Santamaria (@raysan5)
* Copyright (c) 2015-2024 Ramon Santamaria (@raysan5)
*
********************************************************************************************/

View file

@ -2,7 +2,7 @@
*
* raylib [core] example - custom frame control
*
* NOTE: WARNING: This is an example for advance users willing to have full control over
* NOTE: WARNING: This is an example for advanced users willing to have full control over
* the frame processes. By default, EndDrawing() calls the following processes:
* 1. Draw remaining batch data: rlDrawRenderBatchActive()
* 2. SwapScreenBuffer()
@ -22,7 +22,7 @@
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software
*
* Copyright (c) 2021-2023 Ramon Santamaria (@raysan5)
* Copyright (c) 2021-2024 Ramon Santamaria (@raysan5)
*
********************************************************************************************/

View file

@ -9,7 +9,7 @@
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software
*
* Copyright (c) 2018-2023 Pablo Marcos Oltra (@pamarcos) and Ramon Santamaria (@raysan5)
* Copyright (c) 2018-2024 Pablo Marcos Oltra (@pamarcos) and Ramon Santamaria (@raysan5)
*
********************************************************************************************/

View file

@ -9,7 +9,7 @@
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software
*
* Copyright (c) 2015-2023 Ramon Santamaria (@raysan5)
* Copyright (c) 2015-2024 Ramon Santamaria (@raysan5)
*
********************************************************************************************/
@ -53,7 +53,7 @@ int main(void)
{
FilePathList droppedFiles = LoadDroppedFiles();
for (int i = 0, offset = filePathCounter; i < droppedFiles.count; i++)
for (int i = 0, offset = filePathCounter; i < (int)droppedFiles.count; i++)
{
if (filePathCounter < (MAX_FILEPATH_RECORDED - 1))
{
@ -77,7 +77,7 @@ int main(void)
{
DrawText("Dropped files:", 100, 40, 20, DARKGRAY);
for (unsigned int i = 0; i < filePathCounter; i++)
for (int i = 0; i < filePathCounter; i++)
{
if (i%2 == 0) DrawRectangle(0, 85 + 40*i, screenWidth, 40, Fade(LIGHTGRAY, 0.5f));
else DrawRectangle(0, 85 + 40*i, screenWidth, 40, Fade(LIGHTGRAY, 0.3f));

View file

@ -13,21 +13,16 @@
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software
*
* Copyright (c) 2013-2023 Ramon Santamaria (@raysan5)
* Copyright (c) 2013-2024 Ramon Santamaria (@raysan5)
*
********************************************************************************************/
#include "raylib.h"
// NOTE: Gamepad name ID depends on drivers and OS
#define XBOX360_LEGACY_NAME_ID "Xbox Controller"
#if defined(PLATFORM_RPI)
#define XBOX360_NAME_ID "Microsoft X-Box 360 pad"
#define PS3_NAME_ID "PLAYSTATION(R)3 Controller"
#else
#define XBOX360_NAME_ID "Xbox 360 Controller"
#define PS3_NAME_ID "PLAYSTATION(R)3 Controller"
#endif
#define XBOX_ALIAS_1 "xbox"
#define XBOX_ALIAS_2 "x-box"
#define PS_ALIAS "playstation"
//------------------------------------------------------------------------------------
// Program main entry point
@ -46,9 +41,19 @@ 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
//--------------------------------------------------------------------------------------
int gamepad = 0; // which gamepad to display
// Main game loop
while (!WindowShouldClose()) // Detect window close button or ESC key
{
@ -63,108 +68,190 @@ int main(void)
ClearBackground(RAYWHITE);
if (IsGamepadAvailable(0))
{
DrawText(TextFormat("GP1: %s", GetGamepadName(0)), 10, 10, 10, BLACK);
if (IsKeyPressed(KEY_LEFT) && gamepad > 0) gamepad--;
if (IsKeyPressed(KEY_RIGHT)) gamepad++;
if (TextIsEqual(GetGamepadName(0), XBOX360_NAME_ID) || TextIsEqual(GetGamepadName(0), XBOX360_LEGACY_NAME_ID))
if (IsGamepadAvailable(gamepad))
{
DrawText(TextFormat("GP%d: %s", gamepad, GetGamepadName(gamepad)), 10, 10, 10, BLACK);
// 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);
// Draw buttons: xbox home
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_MIDDLE)) DrawCircle(394, 89, 19, RED);
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_MIDDLE)) DrawCircle(394, 89, 19, RED);
// Draw buttons: basic
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_MIDDLE_RIGHT)) DrawCircle(436, 150, 9, RED);
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_MIDDLE_LEFT)) DrawCircle(352, 150, 9, RED);
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_RIGHT_FACE_LEFT)) DrawCircle(501, 151, 15, BLUE);
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_RIGHT_FACE_DOWN)) DrawCircle(536, 187, 15, LIME);
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_RIGHT_FACE_RIGHT)) DrawCircle(572, 151, 15, MAROON);
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_RIGHT_FACE_UP)) DrawCircle(536, 115, 15, GOLD);
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_MIDDLE_RIGHT)) DrawCircle(436, 150, 9, RED);
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_MIDDLE_LEFT)) DrawCircle(352, 150, 9, RED);
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_RIGHT_FACE_LEFT)) DrawCircle(501, 151, 15, BLUE);
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_RIGHT_FACE_DOWN)) DrawCircle(536, 187, 15, LIME);
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_RIGHT_FACE_RIGHT)) DrawCircle(572, 151, 15, MAROON);
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_RIGHT_FACE_UP)) DrawCircle(536, 115, 15, GOLD);
// Draw buttons: d-pad
DrawRectangle(317, 202, 19, 71, BLACK);
DrawRectangle(293, 228, 69, 19, BLACK);
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_LEFT_FACE_UP)) DrawRectangle(317, 202, 19, 26, RED);
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_LEFT_FACE_DOWN)) DrawRectangle(317, 202 + 45, 19, 26, RED);
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_LEFT_FACE_LEFT)) DrawRectangle(292, 228, 25, 19, RED);
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_LEFT_FACE_RIGHT)) DrawRectangle(292 + 44, 228, 26, 19, RED);
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_UP)) DrawRectangle(317, 202, 19, 26, RED);
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_DOWN)) DrawRectangle(317, 202 + 45, 19, 26, RED);
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_LEFT)) DrawRectangle(292, 228, 25, 19, RED);
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_RIGHT)) DrawRectangle(292 + 44, 228, 26, 19, RED);
// Draw buttons: left-right back
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_LEFT_TRIGGER_1)) DrawCircle(259, 61, 20, RED);
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_RIGHT_TRIGGER_1)) DrawCircle(536, 61, 20, RED);
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_TRIGGER_1)) DrawCircle(259, 61, 20, RED);
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(0, GAMEPAD_AXIS_LEFT_X)*20),
152 + (int)(GetGamepadAxisMovement(0, GAMEPAD_AXIS_LEFT_Y)*20), 25, BLACK);
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(0, GAMEPAD_AXIS_RIGHT_X)*20),
237 + (int)(GetGamepadAxisMovement(0, GAMEPAD_AXIS_RIGHT_Y)*20), 25, BLACK);
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(0, GAMEPAD_AXIS_LEFT_TRIGGER))/2)*70), RED);
DrawRectangle(604, 30, 15, (int)(((1 + GetGamepadAxisMovement(0, 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(0, GAMEPAD_AXIS_LEFT_TRIGGER)), 10, 40, 10, BLACK);
//DrawText(TextFormat("Xbox axis RT: %02.02f", GetGamepadAxisMovement(0, GAMEPAD_AXIS_RIGHT_TRIGGER)), 10, 60, 10, BLACK);
//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(0), PS3_NAME_ID))
else if (TextFindIndex(TextToLower(GetGamepadName(gamepad)), PS_ALIAS) > -1)
{
DrawTexture(texPs3Pad, 0, 0, DARKGRAY);
// Draw buttons: ps
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_MIDDLE)) DrawCircle(396, 222, 13, RED);
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_MIDDLE)) DrawCircle(396, 222, 13, RED);
// Draw buttons: basic
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_MIDDLE_LEFT)) DrawRectangle(328, 170, 32, 13, RED);
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_MIDDLE_RIGHT)) DrawTriangle((Vector2){ 436, 168 }, (Vector2){ 436, 185 }, (Vector2){ 464, 177 }, RED);
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_RIGHT_FACE_UP)) DrawCircle(557, 144, 13, LIME);
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_RIGHT_FACE_RIGHT)) DrawCircle(586, 173, 13, RED);
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_RIGHT_FACE_DOWN)) DrawCircle(557, 203, 13, VIOLET);
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_RIGHT_FACE_LEFT)) DrawCircle(527, 173, 13, PINK);
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_MIDDLE_LEFT)) DrawRectangle(328, 170, 32, 13, RED);
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_MIDDLE_RIGHT)) DrawTriangle((Vector2){ 436, 168 }, (Vector2){ 436, 185 }, (Vector2){ 464, 177 }, RED);
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_RIGHT_FACE_UP)) DrawCircle(557, 144, 13, LIME);
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_RIGHT_FACE_RIGHT)) DrawCircle(586, 173, 13, RED);
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_RIGHT_FACE_DOWN)) DrawCircle(557, 203, 13, VIOLET);
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_RIGHT_FACE_LEFT)) DrawCircle(527, 173, 13, PINK);
// Draw buttons: d-pad
DrawRectangle(225, 132, 24, 84, BLACK);
DrawRectangle(195, 161, 84, 25, BLACK);
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_LEFT_FACE_UP)) DrawRectangle(225, 132, 24, 29, RED);
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_LEFT_FACE_DOWN)) DrawRectangle(225, 132 + 54, 24, 30, RED);
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_LEFT_FACE_LEFT)) DrawRectangle(195, 161, 30, 25, RED);
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_LEFT_FACE_RIGHT)) DrawRectangle(195 + 54, 161, 30, 25, RED);
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_UP)) DrawRectangle(225, 132, 24, 29, RED);
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_DOWN)) DrawRectangle(225, 132 + 54, 24, 30, RED);
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_LEFT)) DrawRectangle(195, 161, 30, 25, RED);
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_RIGHT)) DrawRectangle(195 + 54, 161, 30, 25, RED);
// Draw buttons: left-right back buttons
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_LEFT_TRIGGER_1)) DrawCircle(239, 82, 20, RED);
if (IsGamepadButtonDown(0, GAMEPAD_BUTTON_RIGHT_TRIGGER_1)) DrawCircle(557, 82, 20, RED);
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_TRIGGER_1)) DrawCircle(239, 82, 20, RED);
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_RIGHT_TRIGGER_1)) DrawCircle(557, 82, 20, RED);
// Draw axis: left joystick
Color leftGamepadColor = BLACK;
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_THUMB)) leftGamepadColor = RED;
DrawCircle(319, 255, 35, BLACK);
DrawCircle(319, 255, 31, LIGHTGRAY);
DrawCircle(319 + (int)(GetGamepadAxisMovement(0, GAMEPAD_AXIS_LEFT_X) * 20),
255 + (int)(GetGamepadAxisMovement(0, GAMEPAD_AXIS_LEFT_Y) * 20), 25, BLACK);
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(0, GAMEPAD_AXIS_RIGHT_X) * 20),
255 + (int)(GetGamepadAxisMovement(0, GAMEPAD_AXIS_RIGHT_Y) * 20), 25, BLACK);
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(0, GAMEPAD_AXIS_LEFT_TRIGGER)) / 2) * 70), RED);
DrawRectangle(611, 48, 15, (int)(((1 - GetGamepadAxisMovement(0, 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);
@ -179,7 +266,7 @@ int main(void)
}
else
{
DrawText("GP1: NOT DETECTED", 10, 10, 10, GRAY);
DrawText(TextFormat("GP%d: NOT DETECTED", gamepad), 10, 10, 10, GRAY);
DrawTexture(texXboxPad, 0, 0, LIGHTGRAY);
}

View file

@ -0,0 +1,83 @@
/*******************************************************************************************
*
* raylib [core] example - Gamepad information
*
* NOTE: This example requires a Gamepad connected to the system
* Check raylib.h for buttons configuration
*
* Example originally created with raylib 4.6, last time updated with raylib 4.6
*
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software
*
* Copyright (c) 2013-2024 Ramon Santamaria (@raysan5)
*
********************************************************************************************/
#include "raylib.h"
//------------------------------------------------------------------------------------
// Program main entry point
//------------------------------------------------------------------------------------
int main(void)
{
// Initialization
//--------------------------------------------------------------------------------------
const int screenWidth = 800;
const int screenHeight = 450;
SetConfigFlags(FLAG_MSAA_4X_HINT); // Set MSAA 4X hint before windows creation
InitWindow(screenWidth, screenHeight, "raylib [core] example - gamepad information");
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
//--------------------------------------------------------------------------------------
// Main game loop
while (!WindowShouldClose()) // Detect window close button or ESC key
{
// Update
//----------------------------------------------------------------------------------
// TODO: Update your variables here
//----------------------------------------------------------------------------------
// Draw
//----------------------------------------------------------------------------------
BeginDrawing();
ClearBackground(RAYWHITE);
for (int i = 0, y = 5; i < 4; i++) // MAX_GAMEPADS = 4
{
if (IsGamepadAvailable(i))
{
DrawText(TextFormat("Gamepad name: %s", GetGamepadName(i)), 10, y, 10, BLACK);
y += 11;
DrawText(TextFormat("\tAxis count: %d", GetGamepadAxisCount(i)), 10, y, 10, BLACK);
y += 11;
for (int axis = 0; axis < GetGamepadAxisCount(i); axis++)
{
DrawText(TextFormat("\tAxis %d = %f", axis, GetGamepadAxisMovement(i, axis)), 10, y, 10, BLACK);
y += 11;
}
for (int button = 0; button < 32; button++)
{
DrawText(TextFormat("\tButton %d = %d", button, IsGamepadButtonDown(i, button)), 10, y, 10, BLACK);
y += 11;
}
}
}
DrawFPS(GetScreenWidth() - 100, 100);
EndDrawing();
//----------------------------------------------------------------------------------
}
// De-Initialization
//--------------------------------------------------------------------------------------
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
}

View file

@ -7,7 +7,7 @@
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software
*
* Copyright (c) 2016-2023 Ramon Santamaria (@raysan5)
* Copyright (c) 2016-2024 Ramon Santamaria (@raysan5)
*
********************************************************************************************/

View file

@ -0,0 +1,330 @@
/*******************************************************************************************
*
* raylib [core] example - Input Gestures for Web
*
* Example originally created with raylib 4.6-dev, last time updated with raylib 4.6-dev
*
* Example contributed by ubkp (@ubkp) and reviewed by Ramon Santamaria (@raysan5)
*
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software
*
* Copyright (c) 2023 ubkp (@ubkp)
*
********************************************************************************************/
#include "raylib.h"
#include "math.h" // Required for the protractor angle graphic drawing
#if defined(PLATFORM_WEB)
#include <emscripten/emscripten.h> // Required for the Web/HTML5
#endif
//--------------------------------------------------------------------------------------
// Global definitions and declarations
//--------------------------------------------------------------------------------------
// Common variables definitions
//--------------------------------------------------------------------------------------
int screenWidth = 800; // Update depending on web canvas
const int screenHeight = 450;
Vector2 messagePosition = { 160, 7 };
// Last gesture variables definitions
//--------------------------------------------------------------------------------------
int lastGesture = 0;
Vector2 lastGesturePosition = { 165, 130 };
// Gesture log variables definitions and functions declarations
//--------------------------------------------------------------------------------------
#define GESTURE_LOG_SIZE 20
char gestureLog[GESTURE_LOG_SIZE][12] = { "" }; // The gesture log uses an array (as an inverted circular queue) to store the performed gestures
int gestureLogIndex = GESTURE_LOG_SIZE; // The index for the inverted circular queue (moving from last to first direction, then looping around)
int previousGesture = 0;
char const *GetGestureName(int i)
{
switch (i) {
case 0: return "None"; break;
case 1: return "Tap"; break;
case 2: return "Double Tap"; break;
case 4: return "Hold"; break;
case 8: return "Drag"; break;
case 16: return "Swipe Right"; break;
case 32: return "Swipe Left"; break;
case 64: return "Swipe Up"; break;
case 128: return "Swipe Down"; break;
case 256: return "Pinch In"; break;
case 512: return "Pinch Out"; break;
default: return "Unknown"; break;
}
}
Color GetGestureColor(int i)
{
switch (i) {
case 0: return BLACK; break;
case 1: return BLUE; break;
case 2: return SKYBLUE; break;
case 4: return BLACK; break;
case 8: return LIME; break;
case 16: return RED; break;
case 32: return RED; break;
case 64: return RED; break;
case 128: return RED; break;
case 256: return VIOLET; break;
case 512: return ORANGE; break;
default: return BLACK; break;
}
}
int logMode = 1; // Log mode values: 0 shows repeated events; 1 hides repeated events; 2 shows repeated events but hide hold events; 3 hides repeated events and hide hold events
Color gestureColor = { 0, 0, 0, 255 };
Rectangle logButton1 = { 53, 7, 48, 26 };
Rectangle logButton2 = { 108, 7, 36, 26 };
Vector2 gestureLogPosition = { 10, 10 };
// Protractor variables definitions
//--------------------------------------------------------------------------------------
float angleLength = 90.0f;
float currentAngleDegrees = 0.0f;
Vector2 finalVector = { 0.0f, 0.0f };
char currentAngleStr[7] = "";
Vector2 protractorPosition = { 266.0f, 315.0f };
// Update
//--------------------------------------------------------------------------------------
void Update(void)
{
// Handle common
//--------------------------------------------------------------------------------------
int i, ii; // Iterators that will be reused by all for loops
const int currentGesture = GetGestureDetected();
const float currentDragDegrees = GetGestureDragAngle();
const float currentPitchDegrees = GetGesturePinchAngle();
const int touchCount = GetTouchPointCount();
// Handle last gesture
//--------------------------------------------------------------------------------------
if ((currentGesture != 0) && (currentGesture != 4) && (currentGesture != previousGesture)) lastGesture = currentGesture; // Filter the meaningful gestures (1, 2, 8 to 512) for the display
// Handle gesture log
//--------------------------------------------------------------------------------------
if (IsMouseButtonReleased(MOUSE_BUTTON_LEFT))
{
if (CheckCollisionPointRec(GetMousePosition(), logButton1))
{
switch (logMode)
{
case 3: logMode=2; break;
case 2: logMode=3; break;
case 1: logMode=0; break;
default: logMode=1; break;
}
}
else if (CheckCollisionPointRec(GetMousePosition(), logButton2))
{
switch (logMode)
{
case 3: logMode=1; break;
case 2: logMode=0; break;
case 1: logMode=3; break;
default: logMode=2; break;
}
}
}
int fillLog = 0; // Gate variable to be used to allow or not the gesture log to be filled
if (currentGesture !=0)
{
if (logMode == 3) // 3 hides repeated events and hide hold events
{
if (((currentGesture != 4) && (currentGesture != previousGesture)) || (currentGesture < 3)) fillLog = 1;
}
else if (logMode == 2) // 2 shows repeated events but hide hold events
{
if (currentGesture != 4) fillLog = 1;
}
else if (logMode == 1) // 1 hides repeated events
{
if (currentGesture != previousGesture) fillLog = 1;
}
else // 0 shows repeated events
{
fillLog = 1;
}
}
if (fillLog) // If one of the conditions from logMode was met, fill the gesture log
{
previousGesture = currentGesture;
gestureColor = GetGestureColor(currentGesture);
if (gestureLogIndex <= 0) gestureLogIndex = GESTURE_LOG_SIZE;
gestureLogIndex--;
// Copy the gesture respective name to the gesture log array
TextCopy(gestureLog[gestureLogIndex], GetGestureName(currentGesture));
}
// Handle protractor
//--------------------------------------------------------------------------------------
if (currentGesture > 255) // aka Pinch In and Pinch Out
{
currentAngleDegrees = currentPitchDegrees;
}
else if (currentGesture > 15) // aka Swipe Right, Swipe Left, Swipe Up and Swipe Down
{
currentAngleDegrees = currentDragDegrees;
}
else if (currentGesture > 0) // aka Tap, Doubletap, Hold and Grab
{
currentAngleDegrees = 0.0f;
}
float currentAngleRadians = ((currentAngleDegrees +90.0f)*PI/180); // Convert the current angle to Radians
finalVector = (Vector2){ (angleLength*sinf(currentAngleRadians)) + protractorPosition.x, (angleLength*cosf(currentAngleRadians)) + protractorPosition.y }; // Calculate the final vector for display
// Handle touch and mouse pointer points
//--------------------------------------------------------------------------------------
#define MAX_TOUCH_COUNT 32
Vector2 touchPosition[MAX_TOUCH_COUNT] = { 0 };
Vector2 mousePosition = {0, 0};
if (currentGesture != GESTURE_NONE)
{
if (touchCount != 0)
{
for (i = 0; i < touchCount; i++) touchPosition[i] = GetTouchPosition(i); // Fill the touch positions
}
else mousePosition = GetMousePosition();
}
// Draw
//--------------------------------------------------------------------------------------
BeginDrawing();
ClearBackground(RAYWHITE);
// Draw common
//--------------------------------------------------------------------------------------
DrawText("*", messagePosition.x + 5, messagePosition.y + 5, 10, BLACK);
DrawText("Example optimized for Web/HTML5\non Smartphones with Touch Screen.", messagePosition.x + 15, messagePosition.y + 5, 10, BLACK);
DrawText("*", messagePosition.x + 5, messagePosition.y + 35, 10, BLACK);
DrawText("While running on Desktop Web Browsers,\ninspect and turn on Touch Emulation.", messagePosition.x + 15, messagePosition.y + 35, 10, BLACK);
// Draw last gesture
//--------------------------------------------------------------------------------------
DrawText("Last gesture", lastGesturePosition.x + 33, lastGesturePosition.y - 47, 20, BLACK);
DrawText("Swipe Tap Pinch Touch", lastGesturePosition.x + 17, lastGesturePosition.y - 18, 10, BLACK);
DrawRectangle(lastGesturePosition.x + 20, lastGesturePosition.y, 20, 20, lastGesture == GESTURE_SWIPE_UP ? RED : LIGHTGRAY);
DrawRectangle(lastGesturePosition.x, lastGesturePosition.y + 20, 20, 20, lastGesture == GESTURE_SWIPE_LEFT ? RED : LIGHTGRAY);
DrawRectangle(lastGesturePosition.x + 40, lastGesturePosition.y + 20, 20, 20, lastGesture == GESTURE_SWIPE_RIGHT ? RED : LIGHTGRAY);
DrawRectangle(lastGesturePosition.x + 20, lastGesturePosition.y + 40, 20, 20, lastGesture == GESTURE_SWIPE_DOWN ? RED : LIGHTGRAY);
DrawCircle(lastGesturePosition.x + 80, lastGesturePosition.y + 16, 10, lastGesture == GESTURE_TAP ? BLUE : LIGHTGRAY);
DrawRing( (Vector2){lastGesturePosition.x + 103, lastGesturePosition.y + 16}, 6.0f, 11.0f, 0.0f, 360.0f, 0, lastGesture == GESTURE_DRAG ? LIME : LIGHTGRAY);
DrawCircle(lastGesturePosition.x + 80, lastGesturePosition.y + 43, 10, lastGesture == GESTURE_DOUBLETAP ? SKYBLUE : LIGHTGRAY);
DrawCircle(lastGesturePosition.x + 103, lastGesturePosition.y + 43, 10, lastGesture == GESTURE_DOUBLETAP ? SKYBLUE : LIGHTGRAY);
DrawTriangle((Vector2){ lastGesturePosition.x + 122, lastGesturePosition.y + 16 }, (Vector2){ lastGesturePosition.x + 137, lastGesturePosition.y + 26 }, (Vector2){ lastGesturePosition.x + 137, lastGesturePosition.y + 6 }, lastGesture == GESTURE_PINCH_OUT? ORANGE : LIGHTGRAY);
DrawTriangle((Vector2){ lastGesturePosition.x + 147, lastGesturePosition.y + 6 }, (Vector2){ lastGesturePosition.x + 147, lastGesturePosition.y + 26 }, (Vector2){ lastGesturePosition.x + 162, lastGesturePosition.y + 16 }, lastGesture == GESTURE_PINCH_OUT? ORANGE : LIGHTGRAY);
DrawTriangle((Vector2){ lastGesturePosition.x + 125, lastGesturePosition.y + 33 }, (Vector2){ lastGesturePosition.x + 125, lastGesturePosition.y + 53 }, (Vector2){ lastGesturePosition.x + 140, lastGesturePosition.y + 43 }, lastGesture == GESTURE_PINCH_IN? VIOLET : LIGHTGRAY);
DrawTriangle((Vector2){ lastGesturePosition.x + 144, lastGesturePosition.y + 43 }, (Vector2){ lastGesturePosition.x + 159, lastGesturePosition.y + 53 }, (Vector2){ lastGesturePosition.x + 159, lastGesturePosition.y + 33 }, lastGesture == GESTURE_PINCH_IN? VIOLET : LIGHTGRAY);
for (i = 0; i < 4; i++) DrawCircle(lastGesturePosition.x + 180, lastGesturePosition.y + 7 + i*15, 5, touchCount <= i? LIGHTGRAY : gestureColor);
// Draw gesture log
//--------------------------------------------------------------------------------------
DrawText("Log", gestureLogPosition.x, gestureLogPosition.y, 20, BLACK);
// Loop in both directions to print the gesture log array in the inverted order (and looping around if the index started somewhere in the middle)
for (i = 0, ii = gestureLogIndex; i < GESTURE_LOG_SIZE; i++, ii = (ii + 1) % GESTURE_LOG_SIZE) DrawText(gestureLog[ii], gestureLogPosition.x, gestureLogPosition.y + 410 - i*20, 20, (i == 0 ? gestureColor : LIGHTGRAY));
Color logButton1Color, logButton2Color;
switch (logMode)
{
case 3: logButton1Color=MAROON; logButton2Color=MAROON; break;
case 2: logButton1Color=GRAY; logButton2Color=MAROON; break;
case 1: logButton1Color=MAROON; logButton2Color=GRAY; break;
default: logButton1Color=GRAY; logButton2Color=GRAY; break;
}
DrawRectangleRec(logButton1, logButton1Color);
DrawText("Hide", logButton1.x + 7, logButton1.y + 3, 10, WHITE);
DrawText("Repeat", logButton1.x + 7, logButton1.y + 13, 10, WHITE);
DrawRectangleRec(logButton2, logButton2Color);
DrawText("Hide", logButton1.x + 62, logButton1.y + 3, 10, WHITE);
DrawText("Hold", logButton1.x + 62, logButton1.y + 13, 10, WHITE);
// Draw protractor
//--------------------------------------------------------------------------------------
DrawText("Angle", protractorPosition.x + 55, protractorPosition.y + 76, 10, BLACK);
const char *angleString = TextFormat("%f", currentAngleDegrees);
const int angleStringDot = TextFindIndex(angleString, ".");
const char *angleStringTrim = TextSubtext(angleString, 0, angleStringDot + 3);
DrawText( angleStringTrim, protractorPosition.x + 55, protractorPosition.y + 92, 20, gestureColor);
DrawCircle(protractorPosition.x, protractorPosition.y, 80.0f, WHITE);
DrawLineEx((Vector2){ protractorPosition.x - 90, protractorPosition.y }, (Vector2){ protractorPosition.x + 90, protractorPosition.y }, 3.0f, LIGHTGRAY);
DrawLineEx((Vector2){ protractorPosition.x, protractorPosition.y - 90 }, (Vector2){ protractorPosition.x, protractorPosition.y + 90 }, 3.0f, LIGHTGRAY);
DrawLineEx((Vector2){ protractorPosition.x - 80, protractorPosition.y - 45 }, (Vector2){ protractorPosition.x + 80, protractorPosition.y + 45 }, 3.0f, GREEN);
DrawLineEx((Vector2){ protractorPosition.x - 80, protractorPosition.y + 45 }, (Vector2){ protractorPosition.x + 80, protractorPosition.y - 45 }, 3.0f, GREEN);
DrawText("0", protractorPosition.x + 96, protractorPosition.y - 9, 20, BLACK);
DrawText("30", protractorPosition.x + 74, protractorPosition.y - 68, 20, BLACK);
DrawText("90", protractorPosition.x - 11, protractorPosition.y - 110, 20, BLACK);
DrawText("150", protractorPosition.x - 100, protractorPosition.y - 68, 20, BLACK);
DrawText("180", protractorPosition.x - 124, protractorPosition.y - 9, 20, BLACK);
DrawText("210", protractorPosition.x - 100, protractorPosition.y + 50, 20, BLACK);
DrawText("270", protractorPosition.x - 18, protractorPosition.y + 92, 20, BLACK);
DrawText("330", protractorPosition.x + 72, protractorPosition.y + 50, 20, BLACK);
if (currentAngleDegrees != 0.0f) DrawLineEx(protractorPosition, finalVector, 3.0f, gestureColor);
// Draw touch and mouse pointer points
//--------------------------------------------------------------------------------------
if (currentGesture != GESTURE_NONE)
{
if ( touchCount != 0 )
{
for (i = 0; i < touchCount; i++)
{
DrawCircleV(touchPosition[i], 50.0f, Fade(gestureColor, 0.5f));
DrawCircleV(touchPosition[i], 5.0f, gestureColor);
}
if (touchCount == 2) DrawLineEx(touchPosition[0], touchPosition[1], ((currentGesture == 512)? 8 : 12), gestureColor);
}
else
{
DrawCircleV(mousePosition, 35.0f, Fade(gestureColor, 0.5f));
DrawCircleV(mousePosition, 5.0f, gestureColor);
}
}
EndDrawing();
//--------------------------------------------------------------------------------------
}
//------------------------------------------------------------------------------------
// Program main entry point
//------------------------------------------------------------------------------------
int main(void)
{
// Initialization
//--------------------------------------------------------------------------------------
InitWindow(screenWidth, screenHeight, "raylib [core] example - input gestures web");
//--------------------------------------------------------------------------------------
// Main game loop
//--------------------------------------------------------------------------------------
#if defined(PLATFORM_WEB)
emscripten_set_main_loop(Update, 0, 1);
#else
SetTargetFPS(60);
while (!WindowShouldClose()) Update(); // Detect window close button or ESC key
#endif
//--------------------------------------------------------------------------------------
// De-Initialization
//--------------------------------------------------------------------------------------
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

View file

@ -7,7 +7,7 @@
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software
*
* Copyright (c) 2014-2023 Ramon Santamaria (@raysan5)
* Copyright (c) 2014-2024 Ramon Santamaria (@raysan5)
*
********************************************************************************************/

View file

@ -7,7 +7,7 @@
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software
*
* Copyright (c) 2014-2023 Ramon Santamaria (@raysan5)
* Copyright (c) 2014-2024 Ramon Santamaria (@raysan5)
*
********************************************************************************************/

View file

@ -7,7 +7,7 @@
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software
*
* Copyright (c) 2014-2023 Ramon Santamaria (@raysan5)
* Copyright (c) 2014-2024 Ramon Santamaria (@raysan5)
*
********************************************************************************************/
@ -36,7 +36,7 @@ int main(void)
{
// Update
//----------------------------------------------------------------------------------
boxPositionY -= (GetMouseWheelMove()*scrollSpeed);
boxPositionY -= (int)(GetMouseWheelMove()*scrollSpeed);
//----------------------------------------------------------------------------------
// Draw

View file

@ -9,7 +9,7 @@
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software
*
* Copyright (c) 2019-2023 Berni (@Berni8k) and Ramon Santamaria (@raysan5)
* Copyright (c) 2019-2024 Berni (@Berni8k) and Ramon Santamaria (@raysan5)
*
********************************************************************************************/

View file

@ -0,0 +1,123 @@
/*******************************************************************************************
*
* raylib [core] example - input virtual controls
*
* Example originally created with raylib 5.0, last time updated with raylib 5.0
*
* Example create by GreenSnakeLinux (@GreenSnakeLinux),
* lighter by oblerion (@oblerion) and
* reviewed by Ramon Santamaria (@raysan5)
*
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software
*
* Copyright (c) 2024 Ramon Santamaria (@raysan5)
*
********************************************************************************************/
#include "raylib.h"
#include <math.h>
//------------------------------------------------------------------------------------
// Program main entry point
//------------------------------------------------------------------------------------
int main(void)
{
// Initialization
//--------------------------------------------------------------------------------------
const int screenWidth = 800;
const int screenHeight = 450;
InitWindow(screenWidth, screenHeight, "raylib [core] example - input virtual controls");
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.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
float playerX=100;
float playerY=100;
SetTargetFPS(60);
//--------------------------------------------------------------------------------------
// Main game loop
while (!WindowShouldClose()) // Detect window close button or ESC key
{
// Update
//--------------------------------------------------------------------------
dpadKeydown = -1; //reset
int inputX = 0;
int inputY = 0;
if(GetTouchPointCount()>0)
{//use touch pos
inputX = GetTouchX();
inputY = GetTouchY();
}
else
{//use mouse pos
inputX = GetMouseX();
inputY = GetMouseY();
}
for(int i=0;i<4;i++)
{
//test distance each collider and input < radius
if( fabsf(dpadCollider[i][1]-inputY) + fabsf(dpadCollider[i][0]-inputX) < dpadRad)
{
dpadKeydown = i;
break;
}
}
// move player
switch(dpadKeydown){
case 0: playerY -= 50*GetFrameTime();
break;
case 1: playerX -= 50*GetFrameTime();
break;
case 2: playerX += 50*GetFrameTime();
break;
case 3: playerY += 50*GetFrameTime();
default:;
};
//--------------------------------------------------------------------------
// Draw
//--------------------------------------------------------------------------
BeginDrawing();
ClearBackground(RAYWHITE);
for(int i=0;i<4;i++)
{
//draw all pad
DrawCircleV((Vector2) { dpadCollider[i][0], dpadCollider[i][1] }, dpadRad, dpadColor);
if(i!=dpadKeydown)
{
//draw label
DrawText(TextSubtext(dpadLabel,i,1),
(int)dpadCollider[i][0]-7,
(int)dpadCollider[i][1]-8,20,BLACK);
}
}
DrawRectangleRec((Rectangle) { playerX - 4, playerY - 4, 75, 28 }, RED);
DrawText("Player", (int)playerX, (int)playerY, 20, WHITE);
EndDrawing();
//--------------------------------------------------------------------------
}
// De-Initialization
//--------------------------------------------------------------------------------------
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

View file

@ -9,12 +9,13 @@
*
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
*
* Copyright (c) 2014-2023 Ramon Santamaria (@raysan5)
* Copyright (c) 2014-2024 Ramon Santamaria (@raysan5)
*
********************************************************************************************/
#include "raylib.h"
// WARNING: This example does not build on Windows with MSVC compiler
#include "pthread.h" // POSIX style threads management
#include <stdatomic.h> // C11 atomic data types
@ -40,7 +41,7 @@ int main(void)
InitWindow(screenWidth, screenHeight, "raylib [core] example - loading thread");
pthread_t threadId; // Loading data thread id
pthread_t threadId = { 0 }; // Loading data thread id
enum { STATE_WAITING, STATE_LOADING, STATE_FINISHED } state = STATE_WAITING;
int framesCounter = 0;

View file

@ -0,0 +1,176 @@
/*******************************************************************************************
*
* raylib [core] example - Generates a random sequence
*
* Example originally created with raylib 5.0, last time updated with raylib 5.0
*
* Example contributed by Dalton Overmyer (@REDl3east) and reviewed by Ramon Santamaria (@raysan5)
*
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software
*
* Copyright (c) 2023 Dalton Overmyer (@REDl3east)
*
********************************************************************************************/
#include "raylib.h"
#include "raymath.h"
#include <stdlib.h> // Required for: malloc() and free()
typedef struct ColorRect{
Color c;
Rectangle r;
} ColorRect;
static Color GenerateRandomColor();
static ColorRect* GenerateRandomColorRectSequence(float rectCount, float rectWidth, float screenWidth, float screenHeight);
static void ShuffleColorRectSequence(ColorRect* rectangles, int rectCount);
static void DrawTextCenterKeyHelp(const char* key, const char* text, int posX, int posY, int fontSize, Color color);
//------------------------------------------------------------------------------------
// Program main entry point
//------------------------------------------------------------------------------------
int main(void) {
// Initialization
//--------------------------------------------------------------------------------------
const int screenWidth = 800;
const int screenHeight = 450;
InitWindow(screenWidth, screenHeight, "raylib [core] example - Generates a random sequence");
int rectCount = 20;
float rectSize = (float)screenWidth/rectCount;
ColorRect* rectangles = GenerateRandomColorRectSequence((float)rectCount, rectSize, (float)screenWidth, 0.75f * screenHeight);
SetTargetFPS(60);
//--------------------------------------------------------------------------------------
// Main game loop
while (!WindowShouldClose()) // Detect window close button or ESC key
{
// Update
//----------------------------------------------------------------------------------
if(IsKeyPressed(KEY_SPACE))
{
ShuffleColorRectSequence(rectangles, rectCount);
}
if(IsKeyPressed(KEY_UP))
{
rectCount++;
rectSize = (float)screenWidth/rectCount;
free(rectangles);
rectangles = GenerateRandomColorRectSequence((float)rectCount, rectSize, (float)screenWidth, 0.75f * screenHeight);
}
if(IsKeyPressed(KEY_DOWN))
{
if(rectCount >= 4){
rectCount--;
rectSize = (float)screenWidth/rectCount;
free(rectangles);
rectangles = GenerateRandomColorRectSequence((float)rectCount, rectSize, (float)screenWidth, 0.75f * screenHeight);
}
}
// Draw
//----------------------------------------------------------------------------------
BeginDrawing();
ClearBackground(RAYWHITE);
int fontSize = 20;
for(int x=0;x<rectCount;x++)
{
DrawRectangleRec(rectangles[x].r, rectangles[x].c);
DrawTextCenterKeyHelp("SPACE", "to shuffle the sequence.", 10, screenHeight - 96, fontSize, BLACK);
DrawTextCenterKeyHelp("UP", "to add a rectangle and generate a new sequence.", 10, screenHeight - 64, fontSize, BLACK);
DrawTextCenterKeyHelp("DOWN", "to remove a rectangle and generate a new sequence.", 10, screenHeight - 32, fontSize, BLACK);
}
const char* rectCountText = TextFormat("%d rectangles", rectCount);
int rectCountTextSize = MeasureText(rectCountText, fontSize);
DrawText(rectCountText, screenWidth - rectCountTextSize - 10, 10, fontSize, BLACK);
DrawFPS(10, 10);
EndDrawing();
//----------------------------------------------------------------------------------
}
// De-Initialization
//--------------------------------------------------------------------------------------
free(rectangles);
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;
}
static Color GenerateRandomColor()
{
return CLITERAL(Color){
GetRandomValue(0, 255),
GetRandomValue(0, 255),
GetRandomValue(0, 255),
255,
};
}
static ColorRect* GenerateRandomColorRectSequence(float rectCount, float rectWidth, float screenWidth, float screenHeight){
int *seq = LoadRandomSequence((unsigned int)rectCount, 0, (unsigned int)rectCount-1);
ColorRect* rectangles = (ColorRect *)malloc((int)rectCount*sizeof(ColorRect));
float rectSeqWidth = rectCount * rectWidth;
float startX = (screenWidth - rectSeqWidth) * 0.5f;
for(int x=0;x<rectCount;x++){
int rectHeight = (int)Remap((float)seq[x], 0, rectCount-1, 0, screenHeight);
rectangles[x].c = GenerateRandomColor();
rectangles[x].r = CLITERAL(Rectangle){
startX + x * rectWidth, screenHeight - rectHeight, rectWidth, (float)rectHeight
};
}
UnloadRandomSequence(seq);
return rectangles;
}
static void ShuffleColorRectSequence(ColorRect* rectangles, int rectCount)
{
int *seq = LoadRandomSequence(rectCount, 0, rectCount-1);
for(int i1=0;i1<rectCount;i1++){
ColorRect* r1 = &rectangles[i1];
ColorRect* r2 = &rectangles[seq[i1]];
// swap only the color and height
ColorRect tmp = *r1;
r1->c = r2->c;
r1->r.height = r2->r.height;
r1->r.y = r2->r.y;
r2->c = tmp.c;
r2->r.height = tmp.r.height;
r2->r.y = tmp.r.y;
}
UnloadRandomSequence(seq);
}
static void DrawTextCenterKeyHelp(const char* key, const char* text, int posX, int posY, int fontSize, Color color)
{
int spaceSize = MeasureText(" ", fontSize);
int pressSize = MeasureText("Press", fontSize);
int keySize = MeasureText(key, fontSize);
int textSize = MeasureText(text, fontSize);
int totalSize = pressSize + 2 * spaceSize + keySize + 2 * spaceSize + textSize;
int textSizeCurrent = 0;
DrawText("Press", posX, posY, fontSize, color);
textSizeCurrent += pressSize + 2 * spaceSize;
DrawText(key, posX + textSizeCurrent, posY, fontSize, RED);
DrawRectangle(posX + textSizeCurrent, posY + fontSize, keySize, 3, RED);
textSizeCurrent += keySize + 2 * spaceSize;
DrawText(text, posX + textSizeCurrent, posY, fontSize, color);
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

View file

@ -7,7 +7,7 @@
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software
*
* Copyright (c) 2014-2023 Ramon Santamaria (@raysan5)
* Copyright (c) 2014-2024 Ramon Santamaria (@raysan5)
*
********************************************************************************************/
@ -29,7 +29,7 @@ int main(void)
int randValue = GetRandomValue(-8, 5); // Get a random integer number between -8 and 5 (both included)
int framesCounter = 0; // Variable used to count frames
unsigned int framesCounter = 0; // Variable used to count frames
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
//--------------------------------------------------------------------------------------

View file

@ -9,7 +9,7 @@
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software
*
* Copyright (c) 2019-2023 Chris Dill (@MysteriousSpace)
* Copyright (c) 2019-2024 Chris Dill (@MysteriousSpace)
*
********************************************************************************************/

View file

@ -1,6 +1,6 @@
/*******************************************************************************************
*
* raylib [core] example - smooth pixel-perfect camera
* raylib [core] example - Smooth Pixel-perfect camera
*
* Example originally created with raylib 3.7, last time updated with raylib 4.0
*
@ -10,7 +10,7 @@
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software
*
* Copyright (c) 2021-2023 Giancamillo Alessandroni (@NotManyIdeasDev) and Ramon Santamaria (@raysan5)
* Copyright (c) 2021-2024 Giancamillo Alessandroni (@NotManyIdeasDev) and Ramon Santamaria (@raysan5)
*
********************************************************************************************/
@ -69,18 +69,18 @@ int main(void)
rotation += 60.0f*GetFrameTime(); // Rotate the rectangles, 60 degrees per second
// Make the camera move to demonstrate the effect
cameraX = (sinf(GetTime())*50.0f) - 10.0f;
cameraY = cosf(GetTime())*30.0f;
cameraX = (sinf((float)GetTime())*50.0f) - 10.0f;
cameraY = cosf((float)GetTime())*30.0f;
// Set the camera's target to the values computed above
screenSpaceCamera.target = (Vector2){ cameraX, cameraY };
// Round worldSpace coordinates, keep decimals into screenSpace coordinates
worldSpaceCamera.target.x = (int)screenSpaceCamera.target.x;
worldSpaceCamera.target.x = truncf(screenSpaceCamera.target.x);
screenSpaceCamera.target.x -= worldSpaceCamera.target.x;
screenSpaceCamera.target.x *= virtualRatio;
worldSpaceCamera.target.y = (int)screenSpaceCamera.target.y;
worldSpaceCamera.target.y = truncf(screenSpaceCamera.target.y);
screenSpaceCamera.target.y -= worldSpaceCamera.target.y;
screenSpaceCamera.target.y *= virtualRatio;
//----------------------------------------------------------------------------------

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

View file

@ -7,7 +7,7 @@
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software
*
* Copyright (c) 2015-2023 Ramon Santamaria (@raysan5)
* Copyright (c) 2015-2024 Ramon Santamaria (@raysan5)
*
********************************************************************************************/
@ -104,7 +104,7 @@ int main(void)
bool SaveStorageValue(unsigned int position, int value)
{
bool success = false;
unsigned int dataSize = 0;
int dataSize = 0;
unsigned int newDataSize = 0;
unsigned char *fileData = LoadFileData(STORAGE_DATA_FILE, &dataSize);
unsigned char *newFileData = NULL;
@ -172,12 +172,12 @@ bool SaveStorageValue(unsigned int position, int value)
int LoadStorageValue(unsigned int position)
{
int value = 0;
unsigned int dataSize = 0;
int dataSize = 0;
unsigned char *fileData = LoadFileData(STORAGE_DATA_FILE, &dataSize);
if (fileData != NULL)
{
if (dataSize < (position*4)) TraceLog(LOG_WARNING, "FILEIO: [%s] Failed to find storage position: %i", STORAGE_DATA_FILE, position);
if (dataSize < ((int)(position*4))) TraceLog(LOG_WARNING, "FILEIO: [%s] Failed to find storage position: %i", STORAGE_DATA_FILE, position);
else
{
int *dataPtr = (int *)fileData;

View file

@ -7,7 +7,7 @@
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software
*
* Copyright (c) 2017-2023 Ramon Santamaria (@raysan5)
* Copyright (c) 2017-2024 Ramon Santamaria (@raysan5)
*
********************************************************************************************/
@ -15,7 +15,7 @@
#if defined(PLATFORM_DESKTOP)
#define GLSL_VERSION 330
#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
#else // PLATFORM_ANDROID, PLATFORM_WEB
#define GLSL_VERSION 100
#endif
@ -39,7 +39,6 @@ int main(void)
.vResolution = 1200, // Vertical resolution in pixels
.hScreenSize = 0.133793f, // Horizontal size in meters
.vScreenSize = 0.0669f, // Vertical size in meters
.vScreenCenter = 0.04678f, // Screen center in meters
.eyeToScreenDistance = 0.041f, // Distance between eye and display in meters
.lensSeparationDistance = 0.07f, // Lens separation distance in meters
.interpupillaryDistance = 0.07f, // IPD (distance between pupils) in meters
@ -101,7 +100,7 @@ int main(void)
DisableCursor(); // Limit cursor to relative movement inside the window
SetTargetFPS(90); // Set our game to run at 90 frames-per-second
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
//--------------------------------------------------------------------------------------
// Main game loop

View file

@ -7,7 +7,7 @@
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software
*
* Copyright (c) 2020-2023 Ramon Santamaria (@raysan5)
* Copyright (c) 2020-2024 Ramon Santamaria (@raysan5)
*
********************************************************************************************/

View file

@ -9,7 +9,7 @@
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software
*
* Copyright (c) 2019-2023 Anata (@anatagawa) and Ramon Santamaria (@raysan5)
* Copyright (c) 2019-2024 Anata (@anatagawa) and Ramon Santamaria (@raysan5)
*
********************************************************************************************/

View file

@ -7,7 +7,7 @@
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software
*
* Copyright (c) 2013-2023 Ramon Santamaria (@raysan5)
* Copyright (c) 2013-2024 Ramon Santamaria (@raysan5)
*
********************************************************************************************/

View file

@ -7,7 +7,7 @@
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software
*
* Copyright (c) 2015-2023 Ramon Santamaria (@raysan5)
* Copyright (c) 2015-2024 Ramon Santamaria (@raysan5)
*
********************************************************************************************/

27
examples/examples.rc Normal file
View file

@ -0,0 +1,27 @@
GLFW_ICON ICON "raylib.ico"
1 VERSIONINFO
FILEVERSION 1,0,0,0
PRODUCTVERSION 1,0,0,0
BEGIN
BLOCK "StringFileInfo"
BEGIN
//BLOCK "080904E4" // English UK
BLOCK "040904E4" // English US
BEGIN
VALUE "CompanyName", "raylib technologies"
VALUE "FileDescription", "raylib example"
VALUE "FileVersion", "1.0"
VALUE "InternalName", "raylib-example"
VALUE "LegalCopyright", "(c) 2024 raylib technologies (@raylibtech)"
//VALUE "OriginalFilename", "raylib_app.exe"
VALUE "ProductName", "raylib-example"
VALUE "ProductVersion", "1.0"
END
END
BLOCK "VarFileInfo"
BEGIN
//VALUE "Translation", 0x809, 1252 // English UK
VALUE "Translation", 0x409, 1252 // English US
END
END

View file

@ -35,13 +35,30 @@
9. In case of additional information is required, just come to raylib Discord channel: example-contributions
10. Have fun!
The following files should be updated when adding a new example, it's planned to create some
script to automatize this process but not available yet.
- raylib/examples/<category>/<category>_example_name.c
- raylib/examples/<category>/<category>_example_name.png
- raylib/examples/<category>/resources/*.*
- raylib/examples/Makefile
- raylib/examples/Makefile.Web
- raylib/examples/README.md
- raylib/projects/VS2022/examples/<category>_example_name.vcxproj
- raylib/projects/VS2022/raylib.sln
- raylib.com/common/examples.js
- raylib.com/examples/<category>/<category>_example_name.html
- raylib.com/examples/<category>/<category>_example_name.data
- raylib.com/examples/<category>/<category>_example_name.wasm
- raylib.com/examples/<category>/<category>_example_name.js
*/
/*******************************************************************************************
*
* raylib [core] example - Basic window
*
* Example originally created with raylib 4.2, last time updated with raylib 4.2
* Example originally created with raylib 4.5, last time updated with raylib 4.5
*
* Example contributed by <user_name> (@<user_github>) and reviewed by Ramon Santamaria (@raysan5)
*

View file

@ -9,7 +9,7 @@
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software
*
* Copyright (c) 2019-2023 Culacant (@culacant) and Ramon Santamaria (@raysan5)
* Copyright (c) 2019-2024 Culacant (@culacant) and Ramon Santamaria (@raysan5)
*
********************************************************************************************
*
@ -48,7 +48,7 @@ int main(void)
Vector3 position = { 0.0f, 0.0f, 0.0f }; // Set model position
// Load animation data
unsigned int animsCount = 0;
int animsCount = 0;
ModelAnimation *anims = LoadModelAnimations("resources/models/iqm/guyanim.iqm", &animsCount);
int animFrameCounter = 0;

View file

@ -7,7 +7,7 @@
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software
*
* Copyright (c) 2015-2023 Ramon Santamaria (@raysan5)
* Copyright (c) 2015-2024 Ramon Santamaria (@raysan5)
*
********************************************************************************************/
@ -44,10 +44,12 @@ int main(void)
// NOTE: Billboard locked on axis-Y
Vector3 billUp = { 0.0f, 1.0f, 0.0f };
// Set the height of the rotating billboard to 1.0 with the aspect ratio fixed
Vector2 size = { source.width/source.height, 1.0f };
// Rotate around origin
// Here we choose to rotate around the image center
// NOTE: (-1, 1) is the range where origin.x, origin.y is inside the texture
Vector2 rotateOrigin = { 0.0f };
Vector2 origin = Vector2Scale(size, 0.5f);
// Distance is needed for the correct billboard draw order
// Larger distance (further away from the camera) should be drawn prior to smaller distance.
@ -84,11 +86,11 @@ int main(void)
if (distanceStatic > distanceRotating)
{
DrawBillboard(camera, bill, billPositionStatic, 2.0f, WHITE);
DrawBillboardPro(camera, bill, source, billPositionRotating, billUp, (Vector2) {1.0f, 1.0f}, rotateOrigin, rotation, WHITE);
DrawBillboardPro(camera, bill, source, billPositionRotating, billUp, size, origin, rotation, WHITE);
}
else
{
DrawBillboardPro(camera, bill, source, billPositionRotating, billUp, (Vector2) {1.0f, 1.0f}, rotateOrigin, rotation, WHITE);
DrawBillboardPro(camera, bill, source, billPositionRotating, billUp, size, origin, rotation, WHITE);
DrawBillboard(camera, bill, billPositionStatic, 2.0f, WHITE);
}
@ -108,4 +110,4 @@ int main(void)
//--------------------------------------------------------------------------------------
return 0;
}
}

View file

@ -0,0 +1,177 @@
/*******************************************************************************************
*
* raylib [core] example - Using bones as socket for calculating the positioning of something
*
* Example originally created with raylib 4.5, last time updated with raylib 4.5
*
* Example contributed by iP (@ipzaur) and reviewed by Ramon Santamaria (@raysan5)
*
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software
*
* Copyright (c) 2024 iP (@ipzaur)
*
********************************************************************************************/
#include "raylib.h"
#include "raymath.h"
#define BONE_SOCKETS 3
#define BONE_SOCKET_HAT 0
#define BONE_SOCKET_HAND_R 1
#define BONE_SOCKET_HAND_L 2
//------------------------------------------------------------------------------------
// Program main entry point
//------------------------------------------------------------------------------------
int main(void)
{
// Initialization
//--------------------------------------------------------------------------------------
const int screenWidth = 800;
const int screenHeight = 450;
InitWindow(screenWidth, screenHeight, "raylib [models] example - bone socket");
// Define the camera to look into our 3d world
Camera camera = { 0 };
camera.position = (Vector3){ 5.0f, 5.0f, 5.0f }; // Camera position
camera.target = (Vector3){ 0.0f, 2.0f, 0.0f }; // Camera looking at point
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target)
camera.fovy = 45.0f; // Camera field-of-view Y
camera.projection = CAMERA_PERSPECTIVE; // Camera projection type
// Load gltf model
Model characterModel = LoadModel("resources/models/gltf/greenman.glb"); // Load character model
Model equipModel[BONE_SOCKETS] = {
LoadModel("resources/models/gltf/greenman_hat.glb"), // Index for the hat model is the same as BONE_SOCKET_HAT
LoadModel("resources/models/gltf/greenman_sword.glb"), // Index for the sword model is the same as BONE_SOCKET_HAND_R
LoadModel("resources/models/gltf/greenman_shield.glb") // Index for the shield model is the same as BONE_SOCKET_HAND_L
};
bool showEquip[3] = { true, true, true }; // Toggle on/off equip
// Load gltf model animations
int animsCount = 0;
unsigned int animIndex = 0;
unsigned int animCurrentFrame = 0;
ModelAnimation *modelAnimations = LoadModelAnimations("resources/models/gltf/greenman.glb", &animsCount);
// indices of bones for sockets
int boneSocketIndex[BONE_SOCKETS] = { -1, -1, -1 };
// search bones for sockets
for (int i = 0; i < characterModel.boneCount; i++)
{
if (TextIsEqual(characterModel.bones[i].name, "socket_hat"))
{
boneSocketIndex[BONE_SOCKET_HAT] = i;
continue;
}
if (TextIsEqual(characterModel.bones[i].name, "socket_hand_R"))
{
boneSocketIndex[BONE_SOCKET_HAND_R] = i;
continue;
}
if (TextIsEqual(characterModel.bones[i].name, "socket_hand_L"))
{
boneSocketIndex[BONE_SOCKET_HAND_L] = i;
continue;
}
}
Vector3 position = { 0.0f, 0.0f, 0.0f }; // Set model position
unsigned short angle = 0; // Set angle for rotate character
DisableCursor(); // Limit cursor to relative movement inside the window
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
//--------------------------------------------------------------------------------------
// Main game loop
while (!WindowShouldClose()) // Detect window close button or ESC key
{
// Update
//----------------------------------------------------------------------------------
UpdateCamera(&camera, CAMERA_THIRD_PERSON);
// Rotate character
if (IsKeyDown(KEY_F)) angle = (angle + 1)%360;
else if (IsKeyDown(KEY_H)) angle = (360 + angle - 1)%360;
// Select current animation
if (IsKeyPressed(KEY_T)) animIndex = (animIndex + 1)%animsCount;
else if (IsKeyPressed(KEY_G)) animIndex = (animIndex + animsCount - 1)%animsCount;
// Toggle shown of equip
if (IsKeyPressed(KEY_ONE)) showEquip[BONE_SOCKET_HAT] = !showEquip[BONE_SOCKET_HAT];
if (IsKeyPressed(KEY_TWO)) showEquip[BONE_SOCKET_HAND_R] = !showEquip[BONE_SOCKET_HAND_R];
if (IsKeyPressed(KEY_THREE)) showEquip[BONE_SOCKET_HAND_L] = !showEquip[BONE_SOCKET_HAND_L];
// Update model animation
ModelAnimation anim = modelAnimations[animIndex];
animCurrentFrame = (animCurrentFrame + 1)%anim.frameCount;
UpdateModelAnimation(characterModel, anim, animCurrentFrame);
//----------------------------------------------------------------------------------
// Draw
//----------------------------------------------------------------------------------
BeginDrawing();
ClearBackground(RAYWHITE);
BeginMode3D(camera);
// Draw character
Quaternion characterRotate = QuaternionFromAxisAngle((Vector3){ 0.0f, 1.0f, 0.0f }, angle*DEG2RAD);
characterModel.transform = MatrixMultiply(QuaternionToMatrix(characterRotate), MatrixTranslate(position.x, position.y, position.z));
UpdateModelAnimation(characterModel, anim, animCurrentFrame);
DrawMesh(characterModel.meshes[0], characterModel.materials[1], characterModel.transform);
// Draw equipments (hat, sword, shield)
for (int i = 0; i < BONE_SOCKETS; i++)
{
if (!showEquip[i]) continue;
Transform *transform = &anim.framePoses[animCurrentFrame][boneSocketIndex[i]];
Quaternion inRotation = characterModel.bindPose[boneSocketIndex[i]].rotation;
Quaternion outRotation = transform->rotation;
// Calculate socket rotation (angle between bone in initial pose and same bone in current animation frame)
Quaternion rotate = QuaternionMultiply(outRotation, QuaternionInvert(inRotation));
Matrix matrixTransform = QuaternionToMatrix(rotate);
// Translate socket to its position in the current animation
matrixTransform = MatrixMultiply(matrixTransform, MatrixTranslate(transform->translation.x, transform->translation.y, transform->translation.z));
// Transform the socket using the transform of the character (angle and translate)
matrixTransform = MatrixMultiply(matrixTransform, characterModel.transform);
// Draw mesh at socket position with socket angle rotation
DrawMesh(equipModel[i].meshes[0], equipModel[i].materials[1], matrixTransform);
}
DrawGrid(10, 1.0f);
EndMode3D();
DrawText("Use the T/G to switch animation", 10, 10, 20, GRAY);
DrawText("Use the F/H to rotate character left/right", 10, 35, 20, GRAY);
DrawText("Use the 1,2,3 to toggle shown of hat, sword and shield", 10, 60, 20, GRAY);
EndDrawing();
//----------------------------------------------------------------------------------
}
// De-Initialization
//--------------------------------------------------------------------------------------
UnloadModelAnimations(modelAnimations, animsCount);
UnloadModel(characterModel); // Unload character model and meshes/material
// Unload equipment model and meshes/material
for (int i = 0; i < BONE_SOCKETS; i++) UnloadModel(equipModel[i]);
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;
}

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