Commit Graph

10067 Commits

Author SHA1 Message Date
yoobezxc
d46a59367f [msbuild] MSVC x64 build compatibility support (#6052) (#6053)
Change EnableEnhancedInstructionSet to NotSet for compatibility old hardware.
2026-08-11 21:14:47 +02:00
Federico Andres
868413839a Fix glTF pose sampled at the end of an animation returning a pose from the start (#6048)
GetPoseAtTimeGLTF searches for the interval containing the requested time
with (tstart <= time) && (time < tend). A time equal to the last keyframe
satisfies no interval, so the loop ends without a match and keyframe stays
at its 0 default, making the function return a pose from the beginning of
the animation.

LoadModelAnimationsGLTF samples at t = j/60 for j in [0, keyframeCount),
with keyframeCount = (int)(duration*60) + 1, so the last sample lands
exactly on the end of the animation whenever duration*60 is a whole
number. The last pose of those clips is wrong, which looks like a jerk
right before the animation ends.

Measured on a glTF with a 0.85 s clip: the delta between the last two
poses was 23x the median delta between consecutive poses; with this
change it is 0.3x, in line with every other step.
2026-08-11 21:13:19 +02:00
David Buzatto
1225932449 [examples] Add core_scissor_shape (#6032)
* [examples] Add core_scissor_shape

Clip drawing to an arbitrary shape using the stencil buffer, since
BeginScissorMode() only supports axis-aligned rectangles.

* [examples] Rename to gl_scissor_shapes.c

Rename core_scissor_shape to gl_scissor_shapes, move to others. Per @raysan5's review feedback on the PR: keep OpenGL-facing examples
under examples/others, consistent with rlgl_standalone and
raylib_opengl_interop, to avoid multi-platform/build-system issues.
2026-08-11 18:33:25 +02:00
Recoordinate
f28c2221cc Fix window Y position reading X in RGFW move callback (#6044) 2026-08-11 18:32:19 +02:00
Alexandre Almeida
4245423cc1 Update miniaudio to 0.11.25 (#6050) 2026-08-11 11:37:57 +02:00
Matthew Roush
9beca068b9 [rshapes] Fix drawing circle sectors (#6045)
* [rshapes] Fix drawing circle sectors

Functions that draw a sector of a circle would keep drawing segments past a full rotation, which looked bad.

* [rshapes] Change `DrawCircleSectorLines()` and `DrawRingLines()`

`DrawCircleSectorLines()` and `DrawRingLines()` drew the cap lines even when drawing a full circle, which seems undesirable.
2026-08-10 14:51:59 +02:00
Ray
079cc2df09 Update shaders_shadowmap_rendering.c 2026-08-08 17:03:55 +02:00
Jeffery Myers
388806f24d [examples] shaders shadowmap rendering camera fix (#6041)
* Update the camera before sending it to the shader

* tabs to spaces (oops)
2026-08-08 16:58:39 +02:00
Vortex
b0005129c7 fix typo in fix_win32_compatibility.h (#6043)
* fix typo in fix_win32_compatibility.h

* fix another typo in fix_win32_compatibility.h

* fix yet another typo in fix_win32_compatibility.h
2026-08-08 16:57:40 +02:00
Carlos Serrano
1893226cb7 Fix crash on CloseAudioDevice: uninit device before mutex (#6039)
On Android (AAudio) the callback thread could still run when the mutex was
destroyed, causing a SIGABRT (pthread_mutex_lock on a destroyed mutex).
Uninit the device first so its callback thread stops before ma_mutex_uninit.
2026-08-07 22:44:06 +02:00
Noiseless Noise
3580240743 [examples] Several fixes and improvements (#6042)
* models_loading_iqm - actually use animIndex

* models_decals - fix button placement

* core_highdpi_testbed - unrelated TODO

* audio_sound_positioning - fix SetSoundPosition and panning

* SetSoundPan is clamped already

* remove version check

* fix 'updated with' in the header
2026-08-07 21:30:27 +02:00
Carlos Serrano
7ee0b08647 Fix Android relaunch hang after destroy while paused (#6040)
When the activity is destroyed while the app is paused, PollInputEvents
kept looping after setting CORE.Window.shouldClose: while paused,
ALooper_pollAll is called with an infinite timeout (-1), so on the next
iteration it blocked forever waiting for an event that never arrives.
main() never returned, the native thread stayed alive, and the following
launch hung inheriting that thread.
2026-08-07 18:37:57 +02:00
Matthew Roush
a55d49b754 [examples] Add shapes_outlines_thickness (#6037)
Add an example to demonstrate the new thickness behavior in `Draw*LinesEx()` functions.
2026-08-05 12:53:25 +02:00
Ray
3d671a6dd4 Merge branch 'master' of https://github.com/raysan5/raylib 2026-08-04 21:16:17 +02:00
Ray
7711de62fb Code gardening 2026-08-04 21:16:08 +02:00
Matthew Roush
37712a8fbe [rshapes] Fix Draw*LinesEx() functions' inconsistent handling of thick parameter. (#6035)
* [rshapes] Update `DrawRectangleLinesEx()`

Add support for negative `thick` values. When `thick` is negative, lines are drawn growing outside of the rectangle.

* [rshapes] Update `DrawPolyLinesEx()`

Add support for negative `thick` values. When `thick` is negative, lines are drawn growing outside of the polygon. Also refactored to explicitly use an `outerRadius` variable instead of using `radius` as the outer radius.

* [rshapes] Update `DrawRectangleRoundedLinesEx()`

Make the outline vertices easier to work with.

* [rshapes] Updated `DrawRectangleRoundedLinesEx()`.

Lines used to draw outside when `thick` was positive. Added support for negative `thick` values. When `thick` is negative, lines are drawn growing outside of the rectangle.

* [rshapes] Update `DrawRectangleRoundedLines()`.

Make the formatting of the points' x and y coordinates in DrawRectangleRoundedLines() match DrawRectangleRoundedLinesEx().
2026-08-04 18:04:56 +02:00
XXTH
99b61089c8 Added ElfScript to Bindings (#6036) 2026-08-02 23:04:22 +02:00
Andy
c5a6d94110 Update BINDINGS.md (#6034)
Added bindings of Raylib 6.0 for openEuphoria
2026-08-01 14:52:45 +02:00
Ray
912085c831 Update raygui 2026-07-31 13:48:34 +02:00
Andy
7d85ff76a6 Update BINDINGS.md (#6033) 2026-07-31 13:32:45 +02:00
Ray
3e49c80799 REVIEWED: Macros prefixes #6029 2026-07-30 10:14:27 +02:00
Bigfoot
e5aaed2a3f change prefix of all public compile time options from SW_ to RLSW_ (#6029) 2026-07-30 10:05:20 +02:00
Bigfoot
ea0dcbdb7c review inlining (#6028) 2026-07-30 10:03:35 +02:00
Ray
63f82f0ca8 REVIEWED: DrawRectangleLinesEx(), avoid early-return
NOTE: raylib data validation policy defines not to validate any data that does not suppose a crash in the program, letting user manage that layer... probably several functions should be carefully reviewed or the policy itself...
2026-07-29 10:10:26 +02:00
Ray
60b9f20469 Merge branch 'master' of https://github.com/raysan5/raylib 2026-07-29 10:04:19 +02:00
Matthew Roush
9f9c11db41 [rshapes] Fix DrawRectangleLinesEx() (#6027)
Previously DrawRectangleLinesEx() would draw lines overlapping each other when they were thick enough (which was only noticeable if the color's alpha was lower than 255.)
2026-07-29 10:03:22 +02:00
Matthew Roush
935f3da3ff [examples] Add shapes_polygon_lines (#6023)
Add an example to demonstrate/observe DrawPolyLinesEx() behavior.
2026-07-27 16:30:30 +02:00
Leonardo Gomes
de24a6c1eb fix: use rlGetPixelDataSize in rlgl.h (#6024) 2026-07-27 16:29:32 +02:00
Seweryn
3ea8b9298f Refactor text insertion logic in rtext.c (#6022)
Fixed nasty bug, text after insertion is deleted
2026-07-26 20:54:54 +02:00
Ray
86684cd246 Merge branch 'master' of https://github.com/raysan5/raylib 2026-07-26 16:58:14 +02:00
Ray
f3d7d5a3cd Update raygui 2026-07-26 16:58:01 +02:00
Seweryn
14d3587858 Refactor text insertion logic in rtext.c (#6021)
Fixed nasty bug
2026-07-26 15:11:39 +02:00
Jeffery Myers
a18051fdd9 Fix various warnings when building in VC2022 (#6020) 2026-07-26 15:10:19 +02:00
cladxv
ac06acbaee Add rayscal binding for Scala Native (#6019) 2026-07-26 15:09:14 +02:00
cladxv
ae7c58e5b9 Fix typo in 'Utility Wrapers' heading (#6017) 2026-07-26 15:08:28 +02:00
Matthew Roush
c15f3214d5 [rshapes] Correct DrawPolyLinesEx() line thickness. (#6014)
Follow up to #6004. The previous formula would produce inconsistent results for different polygons with the same `thick` parameter.
2026-07-24 21:38:50 +02:00
Ray
a408dd332e REVIEWED: IsPathAbsolute(), remove isalpha() dependency 2026-07-24 21:17:11 +02:00
Ray
f0a8201733 Update CHANGELOG for upcoming raylib 6.2 release 2026-07-23 12:15:38 +02:00
Matthew Roush
127e7441da [rshapes] Fix DrawPolyLinesEx() (#6004)
If `innerRadius` is less than 0, it causes the outline to overlap itself and even grow outside of the polygon's bounds when `thick` is greater than `radius`. Clamping `innerRadius` to 0 fixes these problems.
2026-07-23 09:50:11 +02:00
Felipe Jorge
353268b7cf [rmodels] Fix GLTF animation interpolation (#6007) 2026-07-23 09:41:20 +02:00
Jairo Correa
8eb433518d [build][Zig] Update to raygui 5.0 (#6005) 2026-07-23 09:39:38 +02:00
Jairo Correa
7d4f5f79e7 [build][Zig] Fix web examples building all the time (#6006) 2026-07-23 09:38:45 +02:00
Bigfoot
aa4cf20eae [rlsw] Variant dispatch refactor + bunch of improvements (#5996)
* rlsw config section

* use raster flags to define rasterizer variants

* simplifies the generation of dispatch tables

* single dispatch table for the lines
same logic as for the points

* internal color interp state

* check whether vertex colors should be interpolated

* vector op helper macro + pick sampler once before primitive drawing

* op order tweaks

* refactoring without gotos for triangle and quad rasterizers

* same cleaning for the lines
2026-07-21 18:22:58 +02:00
Colin James Wood
78535d2343 [rlsw] First batch of embedded optimizations and compiler requirements Pico 2 (#5994)
* pico doesn't implement time.h

* add option for RLSW to hold a back buffer, and give it a sw method to swap

* Remove unused pointer and give swSwapColorBuffers a default nop-behaviour

* Fix compilation by removing old colorBackBuffer setters

* use the correct logger

* return line

* rename RLSW_BACKBUFFER to SW_DOUBLE_BUFFERING
2026-07-21 18:20:58 +02:00
oscujic
e809face7b [rmodels] DrawSphereWires(), code optimization (#6000)
* Fix DrawSphereWires (Less aggressively) 

Summary:
- Eliminated some redundancies
- Fixed a bug(?) where the sphere would have 1 more "ring" (latitude division) than expected
- Fixed a bug where the top ring was double-covered
- Added comments denoting which code draws which lines

* DrawSphereWires + DrawSphereEx parity

Summary:
- Replaced DrawSphereWires algorithm with one based on the much faster algorithm from DrawSphereEx
- Fixed +1 ring quirk on DrawSphereEx to match the change made to DrawSphereWires
2026-07-21 17:48:07 +02:00
Matthew Roush
9fd4726c31 [rshapes] Fix DrawRectangleRoundedLines() (#5992)
In #5980 a bug was introduced for `DrawRectangleRoundedLines()`. `DrawRectangleRoundedLines()` previously assumed that `DrawRectangleRoundedLinesEx()` uses `RL_LINES` when line thickness is 1 (which is no longer true, it now uses `RL_QUADS` or `RL_TRIANGLES`.)

I copy/pasted the previous `DrawRectangleRoundedLinesEx()` implementation and trimmed it down (since now the line thickness is always 1), so now `DrawRectangleRoundedLines()` uses `RL_LINES`. This makes it consistent with all other `Draw*Lines()` functions, which use `RL_LINES`.
2026-07-21 17:46:22 +02:00
Ray
1c3a7748ea Update examples dep. raygui 5.0 2026-07-21 08:40:56 +02:00
Ray
ce40053a6c Remove trailing spaces 2026-07-20 20:36:14 +02:00
Ray
9ef6850cc4 Update build_examples_windows.yml 2026-07-18 17:52:07 +02:00
Ray
3094389a2a Update analyze_codeql.yml 2026-07-18 17:49:35 +02:00