Commit Graph

7953 Commits

Author SHA1 Message Date
Peter0x44
2492dd3d0a [build] [Makefile]: Undefine _GNU_SOURCE for rglfw.c (#4732)
Currently, a warning about _GNU_SOURCE being redefined is emitted when
compiling rglfw.c

In file included from rglfw.c:99:
external/glfw/src/posix_poll.c:27:9: warning: "_GNU_SOURCE" redefined
   27 | #define _GNU_SOURCE
      |         ^~~~~~~~~~~
<command-line>: note: this is the location of the previous definition

This can be avoided by not defining _GNU_SOURCE on the command line for
this file.

Defining feature test macros in source code is not really good practice
so this should probably reviewed in glfw itself, at least to maybe check
 #ifdef _GNU_SOURCE first. But for now this change will suffice.

Fixes #4725
2025-01-27 23:15:09 +01:00
elite0OG
5504983c91 Update CMakeLists.txt (#4727)
Cmake warn remove
2025-01-27 09:20:10 +01:00
Asdqwe
f6f31a9f21 [rtextures] Fix HalfToFloat() and FloatToHalf() dereferencing issues with an union (#4729)
* Fix HalfToFloat() and FloatToHalf() dereferencing issues with an union

* Remove unnecessary initialization

* Moved the union to inside the functions
2025-01-26 21:26:18 +01:00
Ray
53ea275b9c Merge branch 'master' of https://github.com/raysan5/raylib 2025-01-26 19:43:01 +01:00
Ray
861ebafe62 Update shaders_mesh_instancing.c 2025-01-26 19:42:52 +01:00
Asdqwe
139de05e9d [rcore] [SDL2] Fix gamepad event handling by adding joystick instance id tracking (#4724)
* Fix gamepad SDL_JOYDEVICEADDED and SDL_JOYDEVICEREMOVED event handling for PLATFORM_DESKTOP_SDL by adding joystick instance id tracking

* Fix gamepad button handling
2025-01-25 20:49:42 +01:00
Nikolas
49d37b035f [rtexture] Cubemap mipmap loading improvements (#4721)
* [rtextures] Only build cubemap mipmaps when necessary

* [rtextures] Assign correct mipmap count to cubemaps
2025-01-24 10:41:32 +01:00
Anstro Pleuton
7bfc8e8ca7 [example] Add shaders_rounded_rectangle example (#4719)
* Add shaders_rounded_rectangle example

* Minor tweaks to example template (add star, more)

* Combine shaders

* Fix changes after review

---------

Co-authored-by: Anstro Pleuton <anstropleuton@github.com>
2025-01-23 10:51:36 +01:00
Ray
87f17538d0 Reviewed warning on shared library generation for web 2025-01-21 19:23:16 +01:00
sleeptightAnsiC
322ba54c08 Fix(WEB): Makefile: throw an error when trying to build SHARED library (#4718)
When asking Makefile to create SHARED library for WEB
	$ make TARGET_PLATFORM=PLATFORM_WEB RAYLIB_LIBTYPE=SHARED
it would instead silently create STATIC library
thus not fulfilling the request as expected

This commit adds an error in this case and stops further execution.

This is not consistent with Cmake, because Cmake throws the warning and
does not stop, but Cmake can easily recover from this case and people
probably does not even notice it. However, Makefile is something that
you have to handle yourself and you have to recover from any issues so
having an error and aborting with exit code 1 is more expected.
Otherwise people may spend a lot of time debugging Makefile in order to
understand what's even going on.

Fixes: https://github.com/raysan5/raylib/issues/4717
2025-01-21 19:20:51 +01:00
Ray
2c50da9a6a REVIEWED: -sASSERTIONS usage by linker #4717 2025-01-21 19:18:23 +01:00
Ray
d48b8afbb5 Update rcore_web.c 2025-01-20 14:01:57 +01:00
Anthony Carbajal
77c509db6e removed hardcoded sleep (#4713) 2025-01-20 12:14:18 +01:00
Anstro Pleuton
773e3f5f9f Update more examples inconsistencies (#4711)
Co-authored-by: Anstro Pleuton <anstropleuton@github.com>
2025-01-19 17:17:38 +01:00
sleeptightAnsiC
10d0616d1f fix(rtextures): TCC not being able to compile due to: 'emmintrin.h' not found (#4707)
define STBIR_NO_SIMD when __TINYC__ is defined so stb_image_resize2 will
not include *mmintrin which are not supported by all compilers.

There are similar checks for __TINYC__ already elswere in raylib
and they are also mostly there to disable SIMD headers.

Additionally, move similar check for stb_image, to be a little bit
deeper. Before it was defining STBI_NO_SIMD without including stb_image
It was also clashing with note, causing said note to make no sense.

Fixes: https://github.com/raysan5/raylib/discussions/2994
Reference: https://github.com/nothings/stb/issues/1738
2025-01-19 12:06:27 +01:00
github-actions[bot]
e70f9157bc Update raylib_api.* by CI 2025-01-18 19:25:01 +00:00
Chris
09272e2e11 Updted the comment for SetShaderValueTexture to reflect the difference between SetShaderValue using sampler2d and SetShaderValueTexture is the automatic bind of the texture. (#4703) 2025-01-18 20:24:48 +01:00
Ray
a16e26a52a Merge branch 'master' of https://github.com/raysan5/raylib 2025-01-18 20:19:13 +01:00
Ray
896ff68540 REVIEWED: Text functions usage notes #4704 2025-01-18 20:19:11 +01:00
Anstro Pleuton
945f181f1d [examples] Update examples to be consistent (#4699)
* Update examples inconsistencies

* Happy new years, examples!

* Missed one inconsistency

* Update final few examples inconsistencies

---------

Co-authored-by: Anstro Pleuton <anstropleuton@github.com>
2025-01-18 19:41:56 +01:00
Ray
74256943a4 REVIEWED: MAX_GAMEPAD_NAME_LENGTH #4695 2025-01-18 19:39:50 +01:00
Auz
8575150747 Bump BINDINGS.md version number for Raylib.nelua (#4698) 2025-01-18 19:26:47 +01:00
Ray
0275d13aa8 Update README.md 2025-01-17 11:32:23 +01:00
Anthony Carbajal
27e530eb18 update examples with difficulty stars (#4694)
* update examples with difficulty stars

* manual fix script issues

* manual fix script issues
2025-01-17 10:42:30 +01:00
Ray
7c7b087efb REVIEWED: example: shaders_deferred_render -WIP-
Not working but shader compiles and example runs... not sure if deferred rendering could be supported in OpenGL ES 2.0.
2025-01-16 19:48:31 +01:00
Ray
313067d749 Update rlgl.h 2025-01-16 19:47:21 +01:00
Ray
94f261c6d7 Update rmodels.c 2025-01-16 19:47:12 +01:00
Ray
7b570bdfdd Update models_point_rendering.c 2025-01-16 19:47:06 +01:00
Colleague Riley
6bf40eee4f Update to RGFW 1.5 (#4688)
* add PLATFORM_WEB_RGFW

* fix some bugs

* fix web_rgfw gamepad

* send fake screensize

* fix gamepad bugs (linux) | add L3 + R3 (gamepad)

* fix?

* update RGFW (again)

* update raylib (merge)

* fix xinput stuff

* delete makefile added by mistake

* update RGFW

* update RGFW (rename joystick to gamepad to avoid misunderstandings

* update RGFW (fix X11 bug)

* update RGFW

* use RL_MALLOC for RGFW

* update RGFW (fixes xdnd bug)

* fix some formating

* Update RGFW

* update RGFW

* undo change

* undo change

* undo change

* undo change

* have .scroll be 0 by default

* update RGFW

* update RGFW

* update RGFW

* fix year

* fix wasm key event bug
2025-01-16 00:34:27 +01:00
Eike Decker
5c1cce28a7 Using Module provided canvas id for event binding (#4690)
This change is replacing the hardcoded "#canvas" element references in
rcore_web to allow using canvas elements that use different names
(which is necessary when using multiple canvas elements on one page).

Also adding a cursor hiding example to mouse example.
2025-01-16 00:32:58 +01:00
Michael Kearns
35a9257d20 Update BINDINGS.md for official V language binding change (#4691)
The bindings from @EmmaTheMartian were moved to official status, so the link is updated. 
The name was normalized to be consistent with other 'vendored' names in other languages.
2025-01-15 12:00:06 +01:00
Ray
cfbba79bd3 REVIEWED: example: models_textures_tiling shaders 2025-01-12 20:59:12 +01:00
Ray
fddfb58f85 REVIEWED: Potential shader issues 2025-01-12 20:39:07 +01:00
Ray
af163ba22a REVIEWED: example: shaders_julia_set 2025-01-12 20:29:46 +01:00
tea☆
1cdf3bb791 [rshapes] Allow DrawRectangleRounded() to draw rectangles with a size < 1 (#4683)
Closes #4673
2025-01-12 18:46:49 +01:00
Ray
da5a868e2a REMOVED: example: core_gamepad_info 2025-01-12 18:21:59 +01:00
Ray
2f6230e366 Formatting review and examples review 2025-01-12 18:02:36 +01:00
Ray
4bceddd4de ADDED: example: models_tesseract 2025-01-12 16:19:32 +01:00
Ray
a1896c7a90 REVIEWED: Code/Web-Makefile formatting 2025-01-12 16:19:10 +01:00
github-actions[bot]
43db59d1aa Update raylib_api.* by CI 2025-01-11 22:38:42 +00:00
Ray
e227371265 REVIEWED: TextJoin(), convert const char ** to char**
It generates multiple issues: https://c-faq.com/ansi/constmismatch.html
2025-01-11 23:38:21 +01:00
Ray
8e450e4446 Reviewed shaders formating to follow raylib coding conventions 2025-01-11 19:36:46 +01:00
Ray
49b905077d remove trailing spaces 2025-01-11 19:36:26 +01:00
Ray
62d8969a56 Reviewed shader formating 2025-01-10 22:56:25 +01:00
Ray
2b2694a89f Fix #4680 2025-01-10 22:36:11 +01:00
veins1
08b089f620 Reviewed shaders_deferred_render (#4676)
Fixed: g-buffer textures binding
Fixed: Clearing screen with white would leak onto g-buffer textures
Reviewed comments
2025-01-10 17:41:40 +01:00
Michael Kearns
34f431b422 Update xcode-frameworks dependency for latest zig (#4675)
* Update build.zig.zon for latest framework commit

* Update build.zig.zon with correct hash

* Update build.zig.zon with the 'really' correct hash
2025-01-10 17:40:48 +01:00
Hakunamawatta
43dbaf21e7 [examples] Fix broken link (#4674) 2025-01-10 17:40:13 +01:00
Le Juez Victor
eee86dd7c9 [build][CMake] Fix cmake configuration issue for Android (#4671)
* fix cmake configuration issue for Android

* review comment
2025-01-10 17:37:57 +01:00
Le Juez Victor
b554b53ede fix pixel offset issue with DrawRectangleLines (#4669) 2025-01-10 17:36:52 +01:00