Commit Graph

464 Commits

Author SHA1 Message Date
Ray
b09da8fce8 Update dr_mp3.h 2026-03-29 21:18:56 +02:00
Ray
0b87a35e5a Update dr_flac.h 2026-03-29 21:18:28 +02:00
Ray
a1bf8d9c75 Update cgltf.h 2026-03-29 21:17:51 +02:00
Ray
0f0983c065 Remove trailing spaces 2026-03-25 16:51:02 +01:00
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
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
bca4f83a02 required change for ESP-IDF 6 (#5674) 2026-03-19 23:19:44 +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
2c39703d13 RENAMED: rl_gputex to rltexgpu 2026-03-18 13:28:45 +01:00
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
48a34d63ed Update rlsw.h 2026-03-17 18:35:33 +01:00
Ray
6ddf9a1885 Code review, format tweaks, defined version to 1.5 2026-03-17 18:30:48 +01:00
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
2eaac95df0 Check if locs is not null before try to access (#5622) 2026-03-04 19:16:22 +01:00
Ray
faf42366ec Code gardening 2026-03-04 01:14:26 +01:00
Ray
b4746469d4 Formating review, using imperative mode in comments 2026-03-03 22:40:34 +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
b57526d71e update makefile and such (#5591) 2026-02-26 00:38:37 +01:00
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
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
8e81ca0e60 Update win32_clipboard.h 2026-02-12 19:08:48 +01:00
Ray
efda35b309 Update win32_clipboard.h 2026-02-10 00:37:45 +01:00
Ray
b39cc6bce7 Update win32_clipboard.h 2026-02-09 23:28:02 +01:00
Ray
7e59e1d93d REVIEWED: Formating 2026-02-09 22:29:47 +01:00
eda915232d Update miniaudio to v0.11.24 (#5506) 2026-01-23 14:13:17 +01:00
Ray
29896a2403 REVIEWED: Some comments (Code Gardening) 2026-01-19 12:40:32 +01:00
0bcf79ce28 [#5455] Fix for: Fix window width calculation by adding wOffset (#5480) 2026-01-08 17:26:56 +01:00
Ray
416af51a93 Update year to 2026 2026-01-02 13:40:15 +01:00
e534f14419 Fix window width calculation by adding wOffset (#5457) 2025-12-31 09:05:39 +01:00
Ray
ced84333a9 Update rl_gputex.h 2025-12-24 18:02:24 +01:00
0a4583ca54 [rl_gputex.h] Possibly fixed the swizzling in rl_load_dds_from_memory() function (#5422)
* Possibly fixed the swizzling bug

* Removed examples, and generation.
2025-12-23 17:10:55 +01:00
Ray
1c7240a01d Revert "REVIEWED: Alignment with other platforms"
This reverts commit cf0d6fc664.
2025-12-16 18:18:42 +01:00
Ray
cf0d6fc664 REVIEWED: Alignment with other platforms 2025-12-15 20:44:28 +01:00
Ray
5025009860 REVIEWED: Make sure all variables are initialized on definition, prioritize one line per variable definitions 2025-12-14 19:45:28 +01:00
Ray
a568506265 REVIEWED: External libraries sdefl and sinfl to address #5367 2025-11-30 18:32:11 +01:00
Ray
bd36610f91 Some formatting 2025-11-24 15:37:28 +01:00
Ray
e1b9857b14 Some TODOs and format reviews 2025-11-23 21:40:39 +01:00
Ray
7f82da0031 Update rlsw.h 2025-11-11 17:40:21 +01:00
Ray
0b4815b8fe WARNING: REMOVED: GIT recording option, added example 2025-11-09 13:43:08 +01:00
4ff296bf0b fix clipping issue (#5342) 2025-11-08 11:28:15 +01:00
Ray
0246621210 REVIEWED: SIMD intrinsics checks and usage 2025-11-01 21:06:18 +01:00
bca54047f9 [rlsw] Review depth formats and fix depth writing (#5317)
* review depth format/writing

* adding a note
2025-10-30 19:17:18 +01:00
Ray
3389c80f49 Update rlsw.h 2025-10-29 11:33:08 +01:00
Ray
f16d5ce1dd REVIEWED: Make sure SSE is being used when compiling with MSVC
Added log info and some formatting for visibility
2025-10-29 11:12:04 +01:00
cbff0fa22c [rlsw] Fix axis aligned quad detection (#5314)
* fix `sw_quad_is_axis_aligned`

* align fix

* remove swGetColorBuffer and tweak DRM

* review alignment
2025-10-28 23:50:04 +01:00
Ray
bf5c00f7e0 RE-ADDED: swGetColorBuffer() for convenience #5312
`PLATFORM_DRM` depends on it but if there is a better approach to get the buffer, it can just be removed again and replaced by alternative.
2025-10-28 20:57:31 +01:00
Ray
a844a943b5 It seems alignas() is C11 and raylib is C99, so not fully supported #5312
Added a workaround but it has other probably undesired implications
2025-10-28 20:45:21 +01:00