Commit Graph

7287 Commits

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