Commit Graph

237 Commits

Author SHA1 Message Date
Ray
0c33c603f4 REVIEWED: EXTERNAL_CONFIG_FLAGS usage, check moved to config.h
Due to `utils` module removal, `EXTERNAL_CONFIG_FLAGS` was not working, so the system was redesigned.
This change is independent of #4411
2026-01-12 13:04:38 +01:00
Ray
dd7a1948f1 WARNING: REDESIGN: REMOVED: utils module, functionality moved to rcore module: logging and file-system #4551
[utils] was created long time ago, when [rcore] contained all the platforms code, the purpose of the file was exposing basic filesystem functionality across modules and also logging mechanism but many things have changed since then and there is no need to keep using this module.

 - Logging system has been move to [rcore] module and macros are exposed through `config.h` to other modules
 - File system functionality has also been centralized in [rcore] module that along the years it was already adding more and more file-system functions, now they are all in the same module
 - Android specific code has been moved to `rcore_android.c`, it had no sense to have specific platform code in `utils`, [rcore] is responsible of all platform code.
2026-01-10 12:13:07 +01:00
Ray
3678c2d157 REMOVE: TRACELOGD(), hardly ever used 2026-01-05 20:47:25 +01:00
Ray
416af51a93 Update year to 2026 2026-01-02 13:40:15 +01:00
Ray
909f040dc5 Remove trailing spaces 2026-01-01 16:33:34 +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
c96669e123 REVIEWED: Webpage reference comments starting with REF:, more consistent with TODO: and NOTE: comments 2025-12-13 13:03:41 +01:00
Ray
b465b4e2ea RENAMED: Variable names for consistency, textLength (length in bytes) vs textSize (measure in pixels) 2025-12-11 21:41:25 +01:00
Ray
2a566544d4 ADDED: Multiply security checks to avoid crashes on wrongly provided string data #4751
- REVIEWED: Checking `NULL` input on functions getting `const char *text`, to avoid crashes
- REVIEWED: `strcpy()` usage, prioritize `strncpy()` with limited copy to buffer size
- REPLACED: `strlen()` by `TextLength()` on [rtext] module
- REVIEWED: Replaced some early returns (but keeping others, for easier code following)
2025-12-11 12:59:55 +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
f1719480e0 Minor format tweaks 2025-11-23 13:21:31 +01:00
Ray
6c3ef8d9b4 Remove trailing spaces 2025-11-22 20:15:50 +01:00
e2233acdb0 feat: Optimize ImageClearBackground and ImageDrawRectangleRec with doubling strategy (#5363) 2025-11-19 08:58:43 +01:00
adfe2c1704 C++ compiler support v2 (#5252)
* Get C++ compilers working

* Fix Formatting
2025-10-15 19:11:44 +02:00
3da2fc1bf8 [rtextures] fix initialization align in Image to avoid issues with some platforms (#5214) 2025-09-29 17:16:51 +02:00
7729727752 Use the render size not the screen size for screenshots so we use the actual framebuffer size. (#5192) 2025-09-18 00:01:24 +02:00
Ray
ed8f1a22d1 Remove trailing spaces 2025-09-14 18:07:58 +02:00
Ray
8f32c502a7 REVIEWED: Code sections definition 2025-09-02 12:10:40 +02:00
Ray
1777da9056 REVIEWED: Avoid realloc() calls, small security improvement 2025-09-01 20:37:23 +02:00
Ray
708c1539e4 Update rtextures.c 2025-09-01 11:38:57 +02:00
Ray
12ce72c32d REVIEWED: ExportImage() 2025-09-01 11:24:53 +02:00
998a18b641 removed macro that does nothing (#5163) 2025-09-01 11:17:51 +02:00
fce888c0c0 changed function params formatting (#5160) 2025-08-31 11:34:39 +02:00
Ray
570082deba WARNING: **NEW** raylib code CONVENTION: Comments do not end with '.' 2025-08-07 18:23:20 +02:00
Ray
1fc0b4955f REVIEWED: rl_gputex.h, added some info for future improvements 2025-07-26 13:36:03 +02:00
Ray
eb7f8912f8 Minor format tweaks 2025-07-26 12:50:29 +02:00
Ray
d7893141f3 REVIEWED: rl_gputex.h library to be usable standalone 2025-07-26 11:44:36 +02:00
Ray
94d8d7133b Merge pull request #5045 from sleeptightAnsiC/fix_gputex_logging
[rl_gputex] fix: decouple logging and memory allocation from Raylib
2025-07-26 11:25:58 +02:00
Ray
82b80a6998 Review formatting, avoid variable 2025-07-17 18:49:58 +02:00
34af70866c [rtextures] Fix ImageColorReplace() alpha issue #5009 2025-07-15 23:19:39 +02:00
85bf04c7bf [rl_gputex] fix: decouple logging and memory allocation from Raylib
- make sure that src/external/rl_gputex.h uses it's own macros
    for printing warnings and allocating memory
- add few additional macros in order to decouple rl_gputex from headers
    that are being included by Raylib (e.g. *_MEMSET, *_NULL and so on)
- make sure that rl_gputex uses RL_*ALLOC, TRACELOG and RLAPI macros
    when (and only when) being included by src/rtextures.c
- replace LOG() and RL_GPUTEX_SHOW_LOG_INFO macros with: RL_GPUTEX_WARN
    and RL_GPUTEX_SHOW_WARN_INFO (this is a breaking change, but it was
    broken and unusable anyway, see:
    https://github.com/raysan5/raylib/issues/5039#issuecomment-3065732596 )
- fixes issue all issues mentioned in:
    https://github.com/raysan5/raylib/issues/5039#issuecomment-3065732596
- remove logging upon successfully saving a file; Raylib does this
    anyway and we want rl_gputex to only print WARNings upon failures;
    see: https://discord.com/channels/426912293134270465/541710686468702250/1394406734306480352
- add additional condition when saving a file; now checks for both
    fwrite() and fclose() failures; before it would warn about both,
    but only return result based on fclose()
- add some notes about the current state of compiling rl_gputex
    without depending on Raylib (spoiler: it's still broken...)
- bump rl_gputex version to 1.1 since this is a potential breaking
    change (only for people attempting to use it without Raylib)

Fixes: https://github.com/raysan5/raylib/issues/5039
Reference: https://discord.com/channels/426912293134270465/541710686468702250/1394403611852931255
2025-07-15 07:53:50 +02:00
44ebf32389 Fix HalfToFloat Mantissa hex value 2025-07-15 00:52:47 -03:00
fce3102f1c Remove excess comments 2025-07-14 00:11:17 -05:00
9f03d7c426 fixing comments 2025-07-13 23:02:02 -05:00
0c69c43c3a fix ImageDrawLineEx to be able to draw even numbered thicknesses 2025-07-13 22:37:41 -05:00
8dbacafbe6 fix overflow in cast for ImageBlurGaussian 2025-07-10 12:48:29 -04:00
205b6a0926 Merge branch 'raysan5:master' into safety-comments 2025-07-07 21:52:54 -04:00
d4f09984ac Add safety notes to 'Update_' functions 2025-07-07 21:51:27 -04:00
Ray
59bcf680aa Code gardening... 2025-06-07 20:14:24 +02:00
296e3af470 add const qualifier to ImageDrawTriangleFan and ImageDrawTriangleStrip arguments 2025-05-31 14:24:56 -07:00
Ray
5ddd13b775 REVIEWED: Hexadecimal formatting to be consistent 2025-05-28 17:18:02 +02:00
Ray
693c9c292a Formatting tweaks 2025-05-10 22:45:08 +02:00
4f5a20a634 Add missing increments of k in LoadImageDataNormalized() (#4745) 2025-02-01 21:30:21 +01:00
f6f31a9f21 [rtextures] Fix HalfToFloat() and FloatToHalf() dereferencing issues with an union (#4729)
* Fix HalfToFloat() and FloatToHalf() dereferencing issues with an union

* Remove unnecessary initialization

* Moved the union to inside the functions
2025-01-26 21:26:18 +01:00
49d37b035f [rtexture] Cubemap mipmap loading improvements (#4721)
* [rtextures] Only build cubemap mipmaps when necessary

* [rtextures] Assign correct mipmap count to cubemaps
2025-01-24 10:41:32 +01:00
10d0616d1f fix(rtextures): TCC not being able to compile due to: 'emmintrin.h' not found (#4707)
define STBIR_NO_SIMD when __TINYC__ is defined so stb_image_resize2 will
not include *mmintrin which are not supported by all compilers.

There are similar checks for __TINYC__ already elswere in raylib
and they are also mostly there to disable SIMD headers.

Additionally, move similar check for stb_image, to be a little bit
deeper. Before it was defining STBI_NO_SIMD without including stb_image
It was also clashing with note, causing said note to make no sense.

Fixes: https://github.com/raysan5/raylib/discussions/2994
Reference: https://github.com/nothings/stb/issues/1738
2025-01-19 12:06:27 +01:00
Ray
fa0eada61a Update year to 2025 2025-01-01 00:02:52 +01:00
Ray
ab83e6dd41 Image manipulation functions depend on a flag 2024-12-19 13:24:30 +01:00
Ray
6b220f2798 Review formating 2024-12-12 12:13:17 +01:00