Commit Graph

5792 Commits

Author SHA1 Message Date
Alexandre Almeida
77353e7f31 Update GLFW to 3.5.1 (#6051)
* Update GLFW to 3.5.1

* Remove cocoa_time.c from rglfw.c

* Add macos_time.c to rglfw.c

* Redo changes from pull request #3863

* Makefile: add QuartzCore framework when building for macOS

* Add QuartzCore when building for macOS to other build files

* Remove unused GLFW dependencies
2026-08-12 13:02:51 +02:00
dennis
fba8ea01f5 [rlsw] Fix #ifdef -> #if for RLSW_DOUBLE_BUFFERING in sw_default_framebuffer_free() (#6054) 2026-08-12 12:57:23 +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
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
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
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
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
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
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
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
Seweryn
14d3587858 Refactor text insertion logic in rtext.c (#6021)
Fixed nasty bug
2026-07-26 15:11:39 +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
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
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
ce40053a6c Remove trailing spaces 2026-07-20 20:36:14 +02:00
Ray
6c6a248be8 Update rcore.c 2026-07-18 17:14:03 +02:00
Ray
baa9a4df51 REVIEWED: ImageToImage(), reorganize conditionals checks optimization, align brackets 2026-07-18 16:50:28 +02:00
Ray
58e03dbc6c REVIEWED: TakeScreenshot() to support absolute paths 2026-07-18 16:45:28 +02:00
Ray
cfccb83ddd ADDED: IsPathAbsolute() to check absolute paths 2026-07-18 16:44:41 +02:00
Ray
b806e3d2ec Replaced comments text given by provided 2026-07-18 16:44:10 +02:00
Ray
0725811224 Added a note reminder 2026-07-18 16:43:04 +02:00
Mierenik
5b1445b381 FIXED: ImageFromImage() heap-buffer-overflow on compressed formats (#5991) 2026-07-17 23:22:35 +02:00
meta-legend
aa088e42d1 fix static link deps (#5990) 2026-07-17 23:12:57 +02:00
GideonSerf
7aceceb467 Fix logging format for automation event capacity warning (#5986)
Co-authored-by: gideons <gse@newspacesystems.com>
2026-07-17 20:31:26 +02:00
Ray
8eb613e50a Update rcore_desktop_glfw.c 2026-07-16 12:28:25 +02:00
largenumberhere
89b4fbd298 [rcore] fic position on mouse leave for emscripten. Issue raysan5#5945 followup (#5981) 2026-07-16 12:10:03 +02:00
GideonSerf
93e64f2210 Fix TextInsertAlloc overflow by correcting loop bounds (#5982)
Co-authored-by: gideons <gse@newspacesystems.com>
2026-07-16 12:08:41 +02:00
GideonSerf
a9a0c046f1 Fix pixel data size regressions (#5984)
Co-authored-by: gideons <gse@newspacesystems.com>
2026-07-16 12:07:19 +02:00
Tanushn
d224912bd5 Fix rlsw persistent alpha blending state (#5964) 2026-07-15 21:21:38 +02:00
Samael Heaven
39706cccbe [rshapes] Fix DrawRectangleRoundedLinesEx not scaling with transform when thick=1 (#5980) 2026-07-15 21:20:18 +02:00
Ray
4640c84920 WARNING: Not updating mouse.previousPosition when SeMousePosition() #5962
This could be a sensible change, not sure if it can break anything...
2026-07-13 19:32:30 +02:00
Thiago Mucci
7a247ff40f Fix swScissor() Y-axis clipping inversion in software renderer (#5976) 2026-07-13 19:19:02 +02:00
Commmand_Prompt
5de8c3521f fix: ImageFromImage rectangle validation use >= and <= (#5979) 2026-07-13 15:13:12 +02:00
Thiago Mucci
b631fb3d05 Fix TextSubtext() returning empty string when position is 0 (#5975) 2026-07-13 15:11:42 +02:00
Luis
fb4649a3fe [rcore][desktop] Fix clipboard image memory leak (#5968)
* [rcore][desktop] Fix clipboard image memory leak

* [delete] delete comment GetClipboardImage into  NOTE about where put SDL_free() .
2026-07-13 15:10:27 +02:00
Ray
f00317bead Added required library 2026-07-11 17:01:09 +02:00