Commit Graph

5546 Commits

Author SHA1 Message Date
Ray
0f0983c065 Remove trailing spaces 2026-03-25 16:51:02 +01:00
Krzysztof Szenk
cb05ef7f03 [rcore_desktop_rgfw] [emscripten] fix typo (#5687)
* RGFW also requires RGBA8 images as window icons, as raylib already reports in raylib.h

* LibraryConfigurations.cmake: exchanged MATCHES -> STREQUAL in platform choosing if-statements

* WebRGFW: remapping mouse/touch position to canvas pixel coordinates

* fix 'typo'

* has to be done like that because of += in case of captured mouse

* [rcore_desktop_rgfw] [emscripten] fix typo
2026-03-23 22:22:21 +01:00
Charlie Tonneslan
6cf71f565c Fix typo: dependant -> dependent in rlgl.h and rexm.c (#5685)
5 instances in src/rlgl.h comments and 1 in tools/rexm/rexm.c.
Skipped vendored raygui.h files in examples/.
2026-03-23 17:17:50 +01:00
Ray
c1dbfc87f3 REVIEWED: PR #5679 2026-03-23 11:52:01 +01:00
Ray
644e4adbe2 Update rcore.c 2026-03-23 11:51:37 +01:00
Krzysztof Szenk
1e74aba7c3 WebRGFW: remapping mouse/touch position to canvas pixel coordinates (#5679)
* RGFW also requires RGBA8 images as window icons, as raylib already reports in raylib.h

* LibraryConfigurations.cmake: exchanged MATCHES -> STREQUAL in platform choosing if-statements

* WebRGFW: remapping mouse/touch position to canvas pixel coordinates

* fix 'typo'

* has to be done like that because of += in case of captured mouse
2026-03-23 11:31:06 +01:00
Levent Kaya
83e35ba170 [rcore] refactor possible data loss on FileMove() (#5682) 2026-03-23 11:30:28 +01:00
Le Juez Victor
8a685877eb [rlsw] Remove position attribute from sw_vertex_t (#5677)
* review `sw_vertex_t`

* fix comment

* fix pop matrix
2026-03-20 12:07:50 +01:00
Ray
8783e66e21 Update rlsw.h 2026-03-19 23:42:20 +01:00
Le Juez Victor
7ae46fb2e6 [rlsw] Micro-optimizations, tighter pipeline and cleanup (#5673)
* auto generates all combinations of blending factors
This adds a macro system that generate a function for each possible combination of blending factors, resulting in 11*11 functions, hence 121.
This then allows for only one indirection and function call instead of two previously (assuming the first call was inlined).

* rename dispatch tables for consistency

* change blend funcs validity check
Simplifies the validation of blend functions.
Can allow `SW_SRC_ALPHA_SATURATE` as dst factor, but hey

* disables blending when it requires alpha and there is none

* review immediate rendering functions and attribute layout

* prevent state changes during immediate record

* reduce number of op for each vertex push + review primitive struct

* simplified draw functions

* review `sw_vertex_t`
removes `float screen[2]`; each step stores the transformed coordinates in `float coord[4]`.
This also simplifies vertex interpolation during triangle rasterization.

* reduces unnecessary interpolation costs during triangle rasterization + cleanup

* extends the simd color conversion to more cases

* affine interpolation per blocks

* long side check for each triangle line
My mistake in a previous commit

* style tweaks

* select the read function on texture load
This removes the per-pixel switch; it's slightly more efficient on my hardware, but probably a poor prediction
Should remain profitable or at worst the same

* use optionnal LUT for uint8_t -> float conversion

* sets internal the number of vertices post-clipping and the epsilon clipping + a little cleanup

* moves color conversion to math part

* prevents sampling if it's a depth texture that is bound
2026-03-19 23:39:52 +01:00
Ray
04c5dc4493 REVIEWED: PR #5674 2026-03-19 23:35:18 +01:00
Juraj Michálek
bca4f83a02 required change for ESP-IDF 6 (#5674) 2026-03-19 23:19:44 +01:00
Amine Laaboudi
da9e881092 Fix uninstall process to remove rcamera header file (#5671)
Co-authored-by: 0x00650a <Ox00650a@inter.net>
2026-03-18 21:09:27 +01:00
Ray
2a3b28b67a Reviewed some comments 2026-03-18 16:21:35 +01:00
Ray
85df4e7de5 REVIEWED: rlsw, use provided library information 2026-03-18 13:31:09 +01:00
Ray
29e4b77580 RENAMED: rl_gputex to rltexgpu 2026-03-18 13:29:36 +01:00
Ray
2c39703d13 RENAMED: rl_gputex to rltexgpu 2026-03-18 13:28:45 +01:00
Le Juez Victor
d657e86043 [rlsw] Fix typos, update build scripts, and align style (#5669)
* fix typo that appeared during re-format

* fix build scripts for `GRAPHICS_API_OPENGL_SOFTWARE`

* consistency tweak
2026-03-17 20:01:45 +01:00
Ray
0de2e8092b REVIEWED: GetTime(), make sure division is with doubles #5668 2026-03-17 19:38:29 +01:00
Ray
48a34d63ed Update rlsw.h 2026-03-17 18:35:33 +01:00
Ray
fbce5e7541 Bump rlgl version to 6.0, after the low-level shaders API redesign, aligned with raylib 6.0 2026-03-17 18:33:53 +01:00
Ray
18756bb79d REVIEWED: Software renderer flag, renamed to GRAPHICS_API_OPENGL_SOFTWARE
Dropped the `11` relative to OpenGL 1.1 because latest `rlsw 1.5` also includes support for FBOs and could potentially implemented other higher level features in the feature, discerning from OpenGL 1.1 limitations
2026-03-17 18:33:15 +01:00
Ray
6ddf9a1885 Code review, format tweaks, defined version to 1.5 2026-03-17 18:30:48 +01:00
Le Juez Victor
e7d999e3c7 [rlsw] RenderTexture support (#5655)
* review texture formats
Added support for `R3G3B2`, `R5G6B5`, `R4G4B4A4` and `R5G5B5A1`
Added depth formats

* use of textures for the framebuffer
- Framebuffers can now use all texture types that are already available.
- The 24-bit depth format has been removed as it is no longer needed.
- Framebuffer formats are still defined at compile time.
- The allocated texture size is now preserved, which avoids frequent reallocations when resizing framebuffers and will allow the use of `glTexSubImage2D`.

* review framebuffer blit/copy
This greatly simplifies the framebuffer blit/copy logic while now supporting all pixel formats. It is slightly slower in debug builds, but this path is mainly kept for compatibility anyway. The `copy_fast` version is still used for the "normal" cases when presenting to the screen.

* review pixel get/set
less ops for certain formats + fixes

* fix depth write

* texture read/write cleanup + tweaks
I made the  pointers parameters `restrict` for reading/writing textures, which resulted in a slight improvement.
And I reviewed the `static inline` statements, which could potentially bias the compiler; no difference, but it's cleaner.

* style tweaks

* review uint8_t <-> float conversion

* added a reusable object pool system
will allow management of both textures and framebuffers
added support for `glTexSubImage2D`
added handling of 'GL_OUT_OF_MEMORY' errors
removed the default internal texture (unused)

* added FBO API + refactored rasterizer dispatch logic

* fix ndc projection + review presentation
and rename rlsw's resize/copy/blit

* add `glRenderbufferStorage` binding
+ tweaks and fixes

* fix quad sorting + simplify quad rasterization part

* fix line shaking issue

* support of `GL_DRAW_FRAMEBUFFER_BINDING`

* update rlgl - support of rlsw's framebuffers

* fix pixel origin in line rasterization
my bad, an oversight in my previous fix.
This offset should have been moved here rather than per pixel during truncation.

* style tweaks

* fix vla issue with msvc - fill depth / fill color
2026-03-17 17:50:32 +01:00
Ray
1eea511070 Remove trailing spaces 2026-03-16 17:51:53 +01:00
Ray
e0d3037e15 Update raylib.h 2026-03-16 17:51:44 +01:00
Ray
19ec2588be Update Makefiles for emsdk version 5.0.x, using required node 22.16.0 and Python 3.13.3 2026-03-16 17:04:30 +01:00
Thomas Anderson
dfc3f58a06 fixed web platform resize events (#5662) 2026-03-15 23:26:29 +01:00
Thomas Anderson
26f329a5e7 fixed copy paste error in makefiles (#5660) 2026-03-15 20:40:26 +01:00
Ray
1d9e24eb58 REVIEWED: GetTime(), make it consistent between platforms, consider window initialization base time 2026-03-15 20:39:57 +01:00
Soma Mizobuchi
29280971be rcore_platform_sdl: Fix GetTime() resolution for sdl (#5653)
`SDL_GetTicks()` only has millisecond resolution so switched to
`SLD_GetPerformanceCounter()` combined with
`SDL_GetPerformanceFrequency()` which should allow more granular timing

Fix: remove intermediate  variable

Remove second cast
2026-03-15 20:31:18 +01:00
Thomas Anderson
fd017c0b2d fixed issue with mouse modes (#5659) 2026-03-15 20:25:31 +01:00
Ray
f89d38b086 Resolveed conflicts 2026-03-13 18:55:36 +01:00
ghera
38ed50c07b [rcore][android] Fix CMake shared build and improve --wrap WARNING docs (#5646) 2026-03-13 18:53:39 +01:00
Ray
6ba6df3af3 Remove trailing spaces 2026-03-13 18:50:26 +01:00
Thomas Anderson
f9ea607385 fix error in textinsert, found by github user chrg127 (#5644) 2026-03-12 11:38:06 +01:00
Thomas Anderson
7b1096dc53 [raylib.h] fix audio pan comment (#5633)
* fix audio pan comment -- found by a.b.c.d.a.b.c.d

* rlparser: update raylib_api.* by CI

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-10 09:51:12 +01:00
Ray
e40ddfabbb **WARNING: BREAKING:** REDESIGNED: rlgl shader loading API function names for more consistency #5631
ADDED: `rlUnloadShader()` to unload shaders (that function was missing and compute shaders leak memory)
RENAMED: `rlCompileShader()` to p `rlLoadShader()` to be consistent with `rlUnloadShader()`
RENAMED: `rlLoadShaderCode()` to `rlLoadShaderProgram()`, more descriptive of return
RENAMED: `rlLoadShaderProgram()` to `rlLoadShaderProgramEx()`
RENAMED: `rlLoadComputeShaderProgram()` to `rlLoadShaderProgramCompute()`
RENAMED: Some functions parameters for consistency
2026-03-09 14:23:54 +01:00
Ray
2b207be11e ADDED: rlUnloadShader() #5631 2026-03-09 13:22:29 +01:00
Ray
d604cd7f65 Update rmodels.c 2026-03-09 12:52:27 +01:00
victorberdugo1
78023ffca5 Fix memory leak in LoadGLTF when model has no bones (#5629)
Co-authored-by: Victor <victor@localhost.localdomain>
2026-03-09 12:50:19 +01:00
Ray
99cab6d3a7 Update rtext.c 2026-03-06 17:11:48 +01:00
Ray
a0ffefcb9d Update rlgl.h 2026-03-06 16:53:56 +01:00
Ray
12039ba7d0 Update raylib.h 2026-03-06 16:53:40 +01:00
JoeStrout
c8d1f3e750 Make LoadFontFromImage limit its scanning to image dimensions. (#5626) 2026-03-06 16:52:58 +01:00
Maicon Santana
3e926d65a0 add x11 libraries for raylib as glfw make private (#5625) 2026-03-05 14:51:16 +01:00
ghera
f9ee714c76 [rcore][android] Add WARNING comment for --wrap=fopen build system requirements (#5624)
Co-authored-by: Federico Gherardi <ghera@libero.it>
2026-03-05 11:50:47 +01:00
moe li
02b592cd7b [rtext] Add MeasureTextCodepoints() for direct measurement of codepoints (#5623)
* Measuring length of an array of codepoints

* Applied style changes and removed default measurement function
2026-03-05 11:49:57 +01:00
Ray
d6926eb46a Update CMakeLists.txt 2026-03-04 19:17:46 +01:00
Ray
eb1e85e400 Update rmodels.c 2026-03-04 19:17:41 +01:00