Commit Graph

5483 Commits

Author SHA1 Message Date
Ray
ea92677902 REVIEWED: TRACELOG() macro logic 2026-03-02 15:56:59 +01:00
Ray
e1113c8833 REVIEWED: Fullscreen request #5601
Tested on Windows with Edge and Chrome browsers, the other options do not work:
 - `Module.canvas.requestFullscreen(false, false)` - FAIL
 - `Module.requestFullscreen(false, false)` - FAIL
 - `Module.requestFullscreen()` - FAIL

Tested with latest Emscripten/emsdk 5.0.2
2026-03-02 13:16:43 +01:00
Ray
0b9239eca2 REVIEWED: Code formating 2026-03-02 12:24:29 +01:00
Maicon Santana
70a58a6ec6 [platform][glfw][rgfw] Implementing clipboard image linux (#5603)
* Testing linux implementation

* Add implementation for ClipboardImage on Linux

* Adding another check to make sure that only X11 include X11 libs

* Adding some comments to explain the magic numbers
2026-03-02 12:19:42 +01:00
ghera
950c064448 [rcore][android] Replace android_fopen() with linker --wrap=fopen (#5605)
* ANDROID: replace android_fopen with linker --wrap=fopen

* ANDROID: add --wrap=fopen linker flag to src/Makefile
2026-03-02 12:18:04 +01:00
moe li
f583674327 fix memory corruption in GenImageFontAtlas reallocation (#5602) 2026-02-27 08:36:46 +01:00
Maicon Santana
28e40d502a #if reduced as possible (#5600) 2026-02-27 08:19:06 +01:00
Ray
f3958cae5d Merge branch 'master' of https://github.com/raysan5/raylib 2026-02-27 00:00:17 +01:00
Ray
2b3218c3db REVIEWED: Start working on raylib 6.0 release... 2026-02-26 23:59:30 +01:00
Maicon Santana
05a34b09ea Swaping #pragma message with TRACELOG inside the clipboard_image function (#5596)
Co-authored-by: Ray <raysan5@gmail.com>
2026-02-26 23:45:34 +01:00
Thomas Anderson
d8861cc35f change defined() to 0/1 check (#5599) 2026-02-26 23:41:33 +01:00
Ray
c686e087b3 Update rtextures.c 2026-02-26 23:40:03 +01:00
Ray
92a1b80465 REVIEWED: Flags checks, fixes #5597 2026-02-26 23:38:06 +01:00
Thomas Anderson
f23a900e91 fix memory leak found by maiconpintoabreu (#5598) 2026-02-26 23:22:38 +01:00
Jeffery Myers
7a3cecc010 Fix a 64 bit to 32 bit int cast warning. (#5594) 2026-02-26 17:45:40 +01:00
Ray
5361265a7d WARNING: BREAKING: REDESIGNED: raylib build features config system #4411 #4554
Redesigned to support disabling features on compilation with `-DSUPPORT_FEATURE=0`
REMOVED: `SUPPORT_DEFAULT_FONT`, always supported
REMOVED: `SUPPORT_IMAGE_MANIPULATION `, always supported
REMOVED: `SUPPORT_TEXT_MANIPULATION`, always supported
REDESIGNED: `SUPPORT_FONT_ATLAS_WHITE_REC` to `FONT_ATLAS_CORNER_REC_SIZE`
REVIEWED: Config values (other than 0-1) are already defined on respective modules
Other config tweaks here and there
2026-02-26 08:19:28 +01:00
ghera
304e489edd ANDROID: Fix broken LoadMusicStream due to missing fopen redirect in raudio.c (#5589)
* ANDROID: Fix broken LoadMusicStream due to missing fopen macro override in raudio

* ANDROID: Add missing forward declaration before fopen macro override in raudio
2026-02-26 00:44:00 +01:00
Thomas Anderson
b57526d71e update makefile and such (#5591) 2026-02-26 00:38:37 +01:00
Thomas Anderson
006216bfcb [raylib.h] renamed SHADER_LOC_VERTEX_INSTANCETRANSFORMS (#5592)
* renamed SHADER_LOC_VERTEX_INSTANCETRANSFORMS to SHADER_LOC_VERTEX_INSTANCETRANSFORM

* rlparser: update raylib_api.* by CI

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-26 00:35:15 +01:00
Ray
ecaa1d3d18 REVIEWED: Attribute name and location, for consistency 2026-02-25 23:22:48 +01:00
Borin Ouch
ad82393bb8 Fix reversed window blur/focus logic for web (#5590) 2026-02-25 12:35:34 +01:00
Krzysztof Szenk
4ebe7d6215 win32 clipboard: fix for BI_ALPHABITFIELDS narrow support (#5586)
* win32 clipbaord: fix for BI_ALPHABITFIELDS narrow support

* Define BI_ALPHABITFIELDS even if wingdi headers are already included

since BI_ALPHABITFIELDS is not always defined there
2026-02-24 12:56:16 +01:00
Ray
406861a4a1 Update raudio.c 2026-02-24 12:32:48 +01:00
Ray
ade81248c3 REVIEWED: Right timing 2026-02-24 01:26:07 +01:00
Ray
d4dc038e2e WARNING: BREAKING: REDESIGNED: **Animation System** #4606
REVIEWED: Reorganized structures for a clearer distinction between "skeleton", "skin" and "skinning" data
ADDED: New structures: `ModelSkeleton`, `ModelAnimPose` (alias `Transform*`)
ADDED: Runtime data `currentPose` and `boneMatrices` to `Model` structure
ADDED: Support animation frames-blending, for timing control
ADDED: Support animations blending, between two animations
REVIEWED: All models animation loading functions
ADDED: `UpdateModelAnimationEx()` for two animations blending
REMOVED: `UpdateModelAnimationBones*()`, simplified API
REVIEWED: Shader attributes/uniforms names for animations, for consistency
REVIEWED: Multiple tweaks on animations loading for consistency between formats
ADDED: example: `models_animation_timing`
ADDED: example: `models_animation_blending`
REVIEWED: example: `models_animation_gpu_skinning`
REVIEWED: example: `models_animation_blend_custom`
REVIEWED: All animated models loading examples
2026-02-24 01:18:57 +01:00
Thomas Anderson
fbd83cafc7 [Backend/RGFW] Update RGFW to 2.0.0 (#5582)
* initial update

* minor changes

* added minigamepad

* updates

* updates - 2.0-dev

* update char press

* update gamepad

* update gamepad

* update (web)

* update rename, spacing, etc

* updates

* updates for mac-arm64

* moved RGFW into folder

* highdpi fixes

* update windowPos (bug remaining somewhere)

* temp stash, macos fixes for pixelratio

* highdpi resize window fixes

* remove unneeded makefiles

* fix undef oopsie

* update fullscreen/borderless

* update macos defines for older macs and newer ones

* update resizing window
2026-02-22 22:21:09 +01:00
Ray
11e3e6e0b9 REVIEWED: Formating, tested sound examples 2026-02-21 09:09:43 +01:00
David Reid
0c91f230fd Audio: Fix a glitch at the end of a sound. (#5578)
This is happening because the processing function keeps reading audio
data from the AudioBuffer even after it has been marked as stopped.

There is also an error in ReadAudioBufferFramesInInternalFormat() where
if it is called on a stopped sound, it'll still return audio frames.
This has also been addressed with this commit.
2026-02-21 08:04:32 +01:00
David Reid
005ff74eb0 Audio: Improvements to device configuration (#5577)
* Audio: Stop setting capture config options.

Since the device is being configured as a playback device, all capture
config options are unused and therefore need to not be set.

* Audio: Stop pre-silencing the miniaudio output buffer.

raylib already manually silences the output buffer prior to mixing so
there is no reason to have miniaudio also do it. It can therefore be
disabled via the device config to make data processing slightly more
efficient.

* Audio: Stop forcing fixed sized processing callbacks.

There is no requirement for raylib to have guaranteed fixed sized
audio processing. By disabling it, audio processing can be made more
efficient by not having to run the data through an internal intermediary
buffer.

* Audio: Make the period size (latency) configurable.

The default period size is 10ms, but this is inappropriate for certain
platforms so it is useful to be able to allow those platforms to
configure the period size as required.

* Audio: Fix documentation for pan.

The pan if -1..1, not 0..1.
2026-02-21 08:02:40 +01:00
Ray
0343cb6a37 Update rcore_desktop_sdl.c 2026-02-20 18:47:53 +01:00
TheKodeToad
d148d9515b Fix text input on SDL3 (#5574) 2026-02-20 18:44:34 +01:00
Ray
2454b3ed4b REVIEWED: TextReplace() and TextLength(), avoid using strcpy() 2026-02-20 16:27:08 +01:00
David Reid
0aacd330d4 [raudio] Remove usage of ma_data_converter_get_required_input_frame_count() (#5568)
* Audio: Remove use of ma_data_converter_get_required_input_frame_count().

This function is being removed from miniaudio. To make this work with
the current architecture of raylib it requires the use of a cache.

This commit implements a generic solution that works across all
AudioBuffer types (static, streams and callback based), but the static
case could be optimized to avoid the cache by incorporating the
functionality of ReadAudioBufferFramesInInternalFormat() into
ReadAudioBufferFramesInMixingFormat(). It would be unpractical to avoid
the cache with streams and callback-based AudioBuffers however so this
commit sticks with a generic solution.

* Audio: Correct usage of miniaudio's dynamic rate adjustment.

This affects pitch shifting. The output rate is being modified with
ma_data_converter_set_rate(), but then that value is being used in the
computation of the output rate the next time SetAudioBufferPitch() which
results in a cascade. The correct way to do this is to use an anchored
output rate as the basis for the calculation after pitch shifting. In
this case, it's the device's sample rate that acts as the anchor.

* Audio: Optimize memory usage for data conversion.

This reduces the per-AudioBuffer conversion cache from 256 PCM frames
down to 8.
2026-02-20 13:46:41 +01:00
Ray
ce617cd814 Update rlgl.h 2026-02-20 11:46:46 +01:00
Ray
4a3c49cdcb REVIEWED: rlLoadTextureDepth(), address inconsistencies with WebGL 2.0 for sized depth formats #5500 2026-02-19 17:55:13 +01:00
Ray
90dd9aef72 REVIEWED: GenImageFontAtlas(), no need for the conservative approach flag 2026-02-19 17:40:22 +01:00
Kirandeep-Singh-Khehra
0e6cb0993d [rmodels] Added implementation of UpdateModelAnimationBonesWithBlending() function (#4578)
* [rmodels] Added implementation of `UpdateModelAnimationBonesWithBlending()` function

Signed-off-by: Kirandeep-Singh-Khehra <kirandeepsinghkhehra@gmail.com>

* [rmodels] Added example for animation blending and fixed wrap issue for blend factor

Signed-off-by: Kirandeep-Singh-Khehra <kirandeepsinghkhehra@gmail.com>

* [rmodels] Updated build information for animation blending example

Signed-off-by: Kirandeep-Singh-Khehra <kirandeepsinghkhehra@gmail.com>

* [rmodels] Fixed typos in anmation blending example

Signed-off-by: Kirandeep-Singh-Khehra <kirandeepsinghkhehra@gmail.com>

* [rmodels] Updated blend function signature and added function to update verts from bones

Signed-off-by: Kirandeep-Singh-Khehra <kirandeepsinghkhehra@gmail.com>

* [rmodels] Updated documentation

Signed-off-by: Kirandeep-Singh-Khehra <kirandeepsinghkhehra@gmail.com>

* rlparser: update raylib_api.* by CI

* rlparser: update raylib_api.* by CI

---------

Signed-off-by: Kirandeep-Singh-Khehra <kirandeepsinghkhehra@gmail.com>
Co-authored-by: Ray <raysan5@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-19 12:57:05 +01:00
Ray
97023def48 REVIEWED: GenImageFontAtlas(), scale image to fit all characters, in case it fails size estimation #5542 2026-02-17 18:45:14 +01:00
Ray
e8ce00dc0b REVIEWED: LoadGLTF(), log warning about draco compression not supported #5567 2026-02-17 17:02:19 +01:00
Ray
872cfae7ca REVIEWED: LoadDirectoryFilesEx(), minor tweak #5569 2026-02-17 16:51:50 +01:00
Ray
5bbb2fc1df REVIEWED: Wayland checks, using compilation flags when possible #5564 2026-02-17 13:22:11 +01:00
paddy
4678a544b6 [rcore][glfw] Fix window scaling on Wayland with GLFW 3.4+ (#5564)
* Fix window scaling on Wayland with GLFW 3.4+ display scaling

GLFW 3.4 defaults GLFW_SCALE_FRAMEBUFFER to TRUE on all platforms,
causing framebuffer/window size mismatch on Wayland with display
scaling (content renders in a subset of the window, mouse coordinates
are wrong).

Three fixes:
- Disable GLFW_SCALE_FRAMEBUFFER on Wayland when FLAG_WINDOW_HIGHDPI
  is not set, restoring 1:1 window-to-framebuffer mapping
- With FLAG_WINDOW_HIGHDPI, read actual framebuffer size from GLFW
  instead of resizing the window (which double-scales on Wayland
  where GLFW_SCALE_TO_MONITOR has no effect)
- Skip mouse coordinate scaling on Wayland since GLFW already reports
  coordinates in logical (window) space

Tested on NixOS/Niri with GLFW 3.4 at 1x, 1.5x, and 2x scaling.

Fixes #5504

* Fix fullscreen and borderless windowed scaling on Wayland with HiDPI

ToggleFullscreen and ToggleBorderlessWindowed exit paths manually
scale screen size by DPI before passing to glfwSetWindowMonitor,
which double-scales on Wayland where GLFW_SCALE_FRAMEBUFFER already
handles it. Skip the manual resize on Wayland.

Also fix FramebufferSizeCallback fullscreen branch: on Wayland with
GLFW_SCALE_FRAMEBUFFER the framebuffer is still scaled in fullscreen,
so use the logical window size as screen size and derive screenScale
from the framebuffer/window ratio.

Fixes #5504

* Apply style fixes from code review: remove duplicate screenScale assignment, collapse single-statement ifs to one line, remove trailing periods from comments
2026-02-17 12:43:52 +01:00
Ray
b871a556d7 Init framebuffer using render size (should be same as currentFbo) 2026-02-17 12:13:04 +01:00
Yui Kinomoto / きのもと 結衣
6564cea6a3 Fixed doesn't property load when 1 frame animation. (#5561) 2026-02-15 20:15:25 +01:00
Ray
059ebaa6ad REVIEWED: HIghDPI content scaling on macOS 2026-02-15 15:02:04 +01:00
Ray
d01f158bd5 REVIEWED: Window initialization on HighDPI monitor (Windows) #5549 2026-02-15 13:21:08 +01:00
Ray
180c3c13ba REVIEWED: GetImageColor() #5560 2026-02-14 22:22:31 +01:00
Ray
dbca900255 Merge branch 'master' of https://github.com/raysan5/raylib 2026-02-14 22:18:03 +01:00
Ray
1061daf197 REVIEWED: Installed libraries #5550 2026-02-14 22:17:49 +01:00
Thomas Anderson
fb5bc42190 update camera pan speed (#5554) 2026-02-14 22:16:09 +01:00