3 Commits

Author SHA1 Message Date
7bb0345f32 [cmake] Fix install export with vendored SDL (#6173)
* Fix install export with vendored SDL

* cmake: Clean up comment
2026-09-20 23:06:58 +02:00
0b63a64e6f [rshapes] Don't draw a circle when radius <= 0. (#6172)
A circle shouldn't be drawn if the radius is zero (and a negative radius probably doesn't make sense...)
2026-09-20 23:04:37 +02:00
49fe008c36 [examples] Fix inconsistent version metadata (#6171) 2026-09-20 18:16:35 +02:00
6 changed files with 21 additions and 15 deletions

View File

@ -149,7 +149,7 @@ Examples using raylib textures functionality, including image/textures loading/g
| [textures_sprite_button](textures/textures_sprite_button.c) | <img src="textures/textures_sprite_button.png" alt="textures_sprite_button" width="80"> | ⭐⭐☆☆ | 2.5 | 2.5 | [Ramon Santamaria](https://github.com/raysan5) | | [textures_sprite_button](textures/textures_sprite_button.c) | <img src="textures/textures_sprite_button.png" alt="textures_sprite_button" width="80"> | ⭐⭐☆☆ | 2.5 | 2.5 | [Ramon Santamaria](https://github.com/raysan5) |
| [textures_sprite_explosion](textures/textures_sprite_explosion.c) | <img src="textures/textures_sprite_explosion.png" alt="textures_sprite_explosion" width="80"> | ⭐⭐☆☆ | 2.5 | 3.5 | [Ramon Santamaria](https://github.com/raysan5) | | [textures_sprite_explosion](textures/textures_sprite_explosion.c) | <img src="textures/textures_sprite_explosion.png" alt="textures_sprite_explosion" width="80"> | ⭐⭐☆☆ | 2.5 | 3.5 | [Ramon Santamaria](https://github.com/raysan5) |
| [textures_bunnymark](textures/textures_bunnymark.c) | <img src="textures/textures_bunnymark.png" alt="textures_bunnymark" width="80"> | ⭐⭐⭐☆ | 1.6 | 2.5 | [Ramon Santamaria](https://github.com/raysan5) | | [textures_bunnymark](textures/textures_bunnymark.c) | <img src="textures/textures_bunnymark.png" alt="textures_bunnymark" width="80"> | ⭐⭐⭐☆ | 1.6 | 2.5 | [Ramon Santamaria](https://github.com/raysan5) |
| [textures_mouse_painting](textures/textures_mouse_painting.c) | <img src="textures/textures_mouse_painting.png" alt="textures_mouse_painting" width="80"> | ⭐⭐⭐☆ | 3.0 | 3.0 | [Chris Dill](https://github.com/MysteriousSpace) | | [textures_mouse_painting](textures/textures_mouse_painting.c) | <img src="textures/textures_mouse_painting.png" alt="textures_mouse_painting" width="80"> | ⭐⭐⭐☆ | 3.0 | 6.0 | [Chris Dill](https://github.com/MysteriousSpace) |
| [textures_blend_modes](textures/textures_blend_modes.c) | <img src="textures/textures_blend_modes.png" alt="textures_blend_modes" width="80"> | ⭐☆☆☆ | 3.5 | 3.5 | [Karlo Licudine](https://github.com/accidentalrebel) | | [textures_blend_modes](textures/textures_blend_modes.c) | <img src="textures/textures_blend_modes.png" alt="textures_blend_modes" width="80"> | ⭐☆☆☆ | 3.5 | 3.5 | [Karlo Licudine](https://github.com/accidentalrebel) |
| [textures_tiled_drawing](textures/textures_tiled_drawing.c) | <img src="textures/textures_tiled_drawing.png" alt="textures_tiled_drawing" width="80"> | ⭐⭐⭐☆ | 3.0 | 4.2 | [Vlad Adrian](https://github.com/demizdor) | | [textures_tiled_drawing](textures/textures_tiled_drawing.c) | <img src="textures/textures_tiled_drawing.png" alt="textures_tiled_drawing" width="80"> | ⭐⭐⭐☆ | 3.0 | 4.2 | [Vlad Adrian](https://github.com/demizdor) |
| [textures_polygon_drawing](textures/textures_polygon_drawing.c) | <img src="textures/textures_polygon_drawing.png" alt="textures_polygon_drawing" width="80"> | ⭐☆☆☆ | 3.7 | 3.7 | [Chris Camacho](https://github.com/chriscamacho) | | [textures_polygon_drawing](textures/textures_polygon_drawing.c) | <img src="textures/textures_polygon_drawing.png" alt="textures_polygon_drawing" width="80"> | ⭐☆☆☆ | 3.7 | 3.7 | [Chris Camacho](https://github.com/chriscamacho) |
@ -279,7 +279,7 @@ Examples using raylib audio functionality, including sound/music loading and pla
| [audio_mixed_processor](audio/audio_mixed_processor.c) | <img src="audio/audio_mixed_processor.png" alt="audio_mixed_processor" width="80"> | ⭐⭐⭐⭐️ | 4.2 | 4.2 | [hkc](https://github.com/hatkidchan) | | [audio_mixed_processor](audio/audio_mixed_processor.c) | <img src="audio/audio_mixed_processor.png" alt="audio_mixed_processor" width="80"> | ⭐⭐⭐⭐️ | 4.2 | 4.2 | [hkc](https://github.com/hatkidchan) |
| [audio_stream_effects](audio/audio_stream_effects.c) | <img src="audio/audio_stream_effects.png" alt="audio_stream_effects" width="80"> | ⭐⭐⭐⭐️ | 4.2 | 5.0 | [Ramon Santamaria](https://github.com/raysan5) | | [audio_stream_effects](audio/audio_stream_effects.c) | <img src="audio/audio_stream_effects.png" alt="audio_stream_effects" width="80"> | ⭐⭐⭐⭐️ | 4.2 | 5.0 | [Ramon Santamaria](https://github.com/raysan5) |
| [audio_sound_multi](audio/audio_sound_multi.c) | <img src="audio/audio_sound_multi.png" alt="audio_sound_multi" width="80"> | ⭐⭐☆☆ | 5.0 | 5.0 | [Jeffery Myers](https://github.com/JeffM2501) | | [audio_sound_multi](audio/audio_sound_multi.c) | <img src="audio/audio_sound_multi.png" alt="audio_sound_multi" width="80"> | ⭐⭐☆☆ | 5.0 | 5.0 | [Jeffery Myers](https://github.com/JeffM2501) |
| [audio_sound_positioning](audio/audio_sound_positioning.c) | <img src="audio/audio_sound_positioning.png" alt="audio_sound_positioning" width="80"> | ⭐⭐☆☆ | 5.5 | 5.5 | [Le Juez Victor](https://github.com/Bigfoot71) | | [audio_sound_positioning](audio/audio_sound_positioning.c) | <img src="audio/audio_sound_positioning.png" alt="audio_sound_positioning" width="80"> | ⭐⭐☆☆ | 5.5 | 6.0 | [Le Juez Victor](https://github.com/Bigfoot71) |
| [audio_spectrum_visualizer](audio/audio_spectrum_visualizer.c) | <img src="audio/audio_spectrum_visualizer.png" alt="audio_spectrum_visualizer" width="80"> | ⭐⭐⭐☆ | 6.0 | 6.0 | [IANN](https://github.com/meisei4) | | [audio_spectrum_visualizer](audio/audio_spectrum_visualizer.c) | <img src="audio/audio_spectrum_visualizer.png" alt="audio_spectrum_visualizer" width="80"> | ⭐⭐⭐☆ | 6.0 | 6.0 | [IANN](https://github.com/meisei4) |
| [audio_stream_callback](audio/audio_stream_callback.c) | <img src="audio/audio_stream_callback.png" alt="audio_stream_callback" width="80"> | ⭐⭐⭐☆ | 6.0 | 6.0 | [Dan Hoang](https://github.com/dan-hoang) | | [audio_stream_callback](audio/audio_stream_callback.c) | <img src="audio/audio_stream_callback.png" alt="audio_stream_callback" width="80"> | ⭐⭐⭐☆ | 6.0 | 6.0 | [Dan Hoang](https://github.com/dan-hoang) |

View File

@ -117,7 +117,7 @@ textures;textures_sprite_animation;★★☆☆;1.3;1.3;2014;2025;"Ramon Santama
textures;textures_sprite_button;★★☆☆;2.5;2.5;2019;2025;"Ramon Santamaria";@raysan5 textures;textures_sprite_button;★★☆☆;2.5;2.5;2019;2025;"Ramon Santamaria";@raysan5
textures;textures_sprite_explosion;★★☆☆;2.5;3.5;2019;2025;"Ramon Santamaria";@raysan5 textures;textures_sprite_explosion;★★☆☆;2.5;3.5;2019;2025;"Ramon Santamaria";@raysan5
textures;textures_bunnymark;★★★☆;1.6;2.5;2014;2025;"Ramon Santamaria";@raysan5 textures;textures_bunnymark;★★★☆;1.6;2.5;2014;2025;"Ramon Santamaria";@raysan5
textures;textures_mouse_painting;★★★☆;3.0;3.0;2019;2025;"Chris Dill";@MysteriousSpace textures;textures_mouse_painting;★★★☆;3.0;6.0;2019;2025;"Chris Dill";@MysteriousSpace
textures;textures_blend_modes;★☆☆☆;3.5;3.5;2020;2025;"Karlo Licudine";@accidentalrebel textures;textures_blend_modes;★☆☆☆;3.5;3.5;2020;2025;"Karlo Licudine";@accidentalrebel
textures;textures_tiled_drawing;★★★☆;3.0;4.2;2020;2025;"Vlad Adrian";@demizdor textures;textures_tiled_drawing;★★★☆;3.0;4.2;2020;2025;"Vlad Adrian";@demizdor
textures;textures_polygon_drawing;★☆☆☆;3.7;3.7;2021;2025;"Chris Camacho";@chriscamacho textures;textures_polygon_drawing;★☆☆☆;3.7;3.7;2021;2025;"Chris Camacho";@chriscamacho
@ -220,7 +220,7 @@ audio;audio_sound_loading;★☆☆☆;1.1;3.5;2014;2025;"Ramon Santamaria";@ray
audio;audio_mixed_processor;★★★★;4.2;4.2;2023;2025;"hkc";@hatkidchan audio;audio_mixed_processor;★★★★;4.2;4.2;2023;2025;"hkc";@hatkidchan
audio;audio_stream_effects;★★★★;4.2;5.0;2022;2025;"Ramon Santamaria";@raysan5 audio;audio_stream_effects;★★★★;4.2;5.0;2022;2025;"Ramon Santamaria";@raysan5
audio;audio_sound_multi;★★☆☆;5.0;5.0;2023;2025;"Jeffery Myers";@JeffM2501 audio;audio_sound_multi;★★☆☆;5.0;5.0;2023;2025;"Jeffery Myers";@JeffM2501
audio;audio_sound_positioning;★★☆☆;5.5;5.5;2025;2025;"Le Juez Victor";@Bigfoot71 audio;audio_sound_positioning;★★☆☆;5.5;6.0;2025;2025;"Le Juez Victor";@Bigfoot71
audio;audio_spectrum_visualizer;★★★☆;6.0;6.0;2025;2025;"IANN";@meisei4 audio;audio_spectrum_visualizer;★★★☆;6.0;6.0;2025;2025;"IANN";@meisei4
audio;audio_stream_callback;★★★☆;6.0;6.0;2026;2026;"Dan Hoang";@dan-hoang audio;audio_stream_callback;★★★☆;6.0;6.0;2026;2026;"Dan Hoang";@dan-hoang

View File

@ -9,6 +9,8 @@
* *
* NOTE: Shaders used in this example are #version 330 (OpenGL 3.3) * NOTE: Shaders used in this example are #version 330 (OpenGL 3.3)
* *
* Example originally created with raylib 6.0, last time updated with raylib 6.0
*
* Example contributed by Gleb A (@ggrizzly) and reviewed by Ramon Santamaria (@raysan5) * Example contributed by Gleb A (@ggrizzly) and reviewed by Ramon Santamaria (@raysan5)
* *
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified, * Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,

View File

@ -4,9 +4,9 @@
* *
* Example complexity rating: [★☆☆☆] 1/4 * Example complexity rating: [★☆☆☆] 1/4
* *
* Example originally created with raylib 5.6 * Example originally created with raylib 5.6, last time updated with raylib 6.0
* *
* Example contributed by Balamurugan R (@Bala050814]) and reviewed by Ramon Santamaria (@raysan5) * Example contributed by Balamurugan R (@Bala050814) and reviewed by Ramon Santamaria (@raysan5)
* *
* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified, * Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software * BSD-like license that allows static linking with closed source software

View File

@ -112,6 +112,10 @@ target_link_libraries(raylib PUBLIC ${LIBS_PUBLIC})
if (NOT BUILD_SHARED_LIBS) if (NOT BUILD_SHARED_LIBS)
set(raylib_install_private_libs ${LIBS_PRIVATE}) set(raylib_install_private_libs ${LIBS_PRIVATE})
# SDL is handled through LIBS_PUBLIC and find_dependencies(), so
# we avoid having them privately.
list(REMOVE_ITEM raylib_install_private_libs SDL3::SDL3 SDL2::SDL2)
if (NOT glfw3_FOUND) if (NOT glfw3_FOUND)
list(REMOVE_ITEM raylib_install_private_libs glfw) list(REMOVE_ITEM raylib_install_private_libs glfw)

View File

@ -1646,7 +1646,7 @@ void DrawCircleGradient(Vector2 center, float radius, Color inner, Color outer)
void DrawCircleSector(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color) void DrawCircleSector(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color)
{ {
if (startAngle == endAngle) return; if (startAngle == endAngle) return;
if (radius <= 0.0f) radius = 0.1f; // Avoid div by zero if (radius <= 0.0f) return; // There's nothing to draw (also avoid div by zero)
// Function expects (endAngle > startAngle) // Function expects (endAngle > startAngle)
if (endAngle < startAngle) if (endAngle < startAngle)
@ -1741,7 +1741,7 @@ void DrawCircleSector(Vector2 center, float radius, float startAngle, float endA
void DrawCircleSectorLines(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color) void DrawCircleSectorLines(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color)
{ {
if (startAngle == endAngle) return; if (startAngle == endAngle) return;
if (radius <= 0.0f) radius = 0.1f; // Avoid div by zero issue if (radius <= 0.0f) return; // There's nothing to draw (also avoid div by zero)
// Function expects (endAngle > startAngle) // Function expects (endAngle > startAngle)
if (endAngle < startAngle) if (endAngle < startAngle)
@ -1805,7 +1805,7 @@ void DrawCircleSectorLines(Vector2 center, float radius, float startAngle, float
void DrawCircleSectorLinesEx(Vector2 center, float radius, float startAngle, float endAngle, int segments, float thick, Color color) void DrawCircleSectorLinesEx(Vector2 center, float radius, float startAngle, float endAngle, int segments, float thick, Color color)
{ {
if (startAngle == endAngle) return; if (startAngle == endAngle) return;
if (radius <= 0.0f) radius = 0.1f; // Avoid div by zero issue if (radius <= 0.0f) return; // There's nothing to draw (also avoid div by zero)
// Function expects (endAngle > startAngle) // Function expects (endAngle > startAngle)
if (endAngle < startAngle) if (endAngle < startAngle)
@ -2682,10 +2682,10 @@ void DrawRing(Vector2 center, float innerRadius, float outerRadius, float startA
float tmp = outerRadius; float tmp = outerRadius;
outerRadius = innerRadius; outerRadius = innerRadius;
innerRadius = tmp; innerRadius = tmp;
if (outerRadius <= 0.0f) outerRadius = 0.1f;
} }
if (outerRadius <= 0.0f) return; // There's nothing to draw (also avoid div by zero)
// Function expects (endAngle > startAngle) // Function expects (endAngle > startAngle)
if (endAngle < startAngle) if (endAngle < startAngle)
{ {
@ -2776,10 +2776,10 @@ void DrawRingLines(Vector2 center, float innerRadius, float outerRadius, float s
float tmp = outerRadius; float tmp = outerRadius;
outerRadius = innerRadius; outerRadius = innerRadius;
innerRadius = tmp; innerRadius = tmp;
if (outerRadius <= 0.0f) outerRadius = 0.1f;
} }
if (outerRadius <= 0.0f) return; // There's nothing to draw (also avoid div by zero)
// Function expects (endAngle > startAngle) // Function expects (endAngle > startAngle)
if (endAngle < startAngle) if (endAngle < startAngle)
{ {
@ -2858,10 +2858,10 @@ void DrawRingLinesEx(Vector2 center, float innerRadius, float outerRadius, float
float tmp = outerRadius; float tmp = outerRadius;
outerRadius = innerRadius; outerRadius = innerRadius;
innerRadius = tmp; innerRadius = tmp;
if (outerRadius <= 0.0f) outerRadius = 0.1f;
} }
if (outerRadius <= 0.0f) return; // There's nothing to draw (also avoid div by zero)
// Function expects (endAngle > startAngle) // Function expects (endAngle > startAngle)
if (endAngle < startAngle) if (endAngle < startAngle)
{ {