Commit Graph

7566 Commits

Author SHA1 Message Date
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