Commit Graph

7947 Commits

Author SHA1 Message Date
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
github-actions[bot]
433cc23ea4 Update raylib_api.* by CI 2025-01-10 12:06:46 +00:00
Ray
bf8962dbc7 REVIEWED: Remove some const from text buffer return values
Lately got some compilation `errors` related, it seems GCC 14 interprets some `const`-missmatch as errors instead of warnings (as previous versions).

But in any case, I don't see why an user won't be able to operate directly over of those returned buffers; `const` adds a restriction (for security reasons?) that in my opinion is useless.

From an expert on compilers (w64devkit creator), here there are some notes I agree with:

```
No const. It serves no practical role in optimization, and I cannot recall an instance where it caught, or would have caught, a mistake. I held out for awhile as prototype documentation, but on reflection I found that good parameter names were sufficient. Dropping const has made me noticeably more productive by reducing cognitive load and eliminating visual clutter. I now believe its inclusion in C was a costly mistake.

(One small exception: I still like it as a hint to place static tables in read-only memory closer to the code. I’ll cast away the const if needed. This is only of minor importance.)
```

Ref: https://nullprogram.com/blog/2023/10/08/
2025-01-10 13:06:28 +01:00
Le Juez Victor
ddd86a3387 [rshapes] Fix pixel offset issue with line drawing (#4666)
* fix pixel offset issue with `DrawRectangleRoundedLinesEx`

* improve fix - (pixel offset issue with `DrawRectangleRoundedLinesEx`)

* revert radius tweak (`DrawRectangleRoundedLines`)
2025-01-09 00:07:59 +01:00
K. Adam Christensen
5d9aed5d40 [rlgl] Optimize rlReadScreenPixels (#4667)
This optimization works in the following ways:

1. Reduces calls to malloc to 1. Instead of needing an extra array, we
can just swap the top half with the bottom half of the one array.

2. Unroll the inner for loop and remove a condition. Unrolling loops
buys some performance wins, but the real goal was to remove the if check
and just set the alpha channel to 255.

On my hidpi arm64 laptop, I saw ~60% improvement in performance in my
debug build (29 FPS vs 47 FPS). When optimized, the gains were roughly
10% (75 FPS vs 83%).

Signed-off-by: K. Adam Christensen <pope@shifteleven.com>
2025-01-08 18:53:27 +01:00
Maicon Santana
fc29bc27fd Fix Touch pointCount reduction (#4661) 2025-01-06 11:29:24 +01:00
Asdqwe
ad035edfac Fix camera initial position (#4657) 2025-01-05 12:30:43 +01:00