7317 Commits

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