Commit Graph

7527 Commits

Author SHA1 Message Date
Ray
2bc75b877a WARNING: TEST: Security check to address potential overflow cocerns 2024-07-01 13:06:15 +02:00
Ray
a1d516354e Merge branch 'master' of https://github.com/raysan5/raylib 2024-07-01 13:06:00 +02:00
Ray
61cfd1afcb Minor tweaks 2024-07-01 13:05:20 +02:00
Bruno Cabral
b5473d5ffd
[rtextures] advance k in LoadImageColors (#4120)
Some formats are not advancing k to get pixels values
2024-07-01 12:24:01 +02:00
Mike Will
9e22fddf1a
[build.zig] Make emscripten build compatible with Zig 0.13.0 (#4121) 2024-07-01 12:22:12 +02:00
Ray
c8313d9ebc Update Storage base path, use provided SDL base path 2024-07-01 11:44:20 +02:00
github-actions[bot]
4c90fc6eff Update raylib_api.* by CI 2024-06-30 09:38:16 +00:00
Ray
1e1061d5c7 REVIEWED: Formatting, follow raylib coding conventions 2024-06-30 11:37:58 +02:00
Ray
13e3092511 REVIEWED: DrawSphereEx(), added educational info 2024-06-30 11:15:45 +02:00
smalltimewizard
953df38ac4
[rmodels] DrawSphereEx() optimization (#4106)
* Optimize DrawSphereEx()

Precalculates sin/cos to eliminate unnecessary calls.

* Formatting correction to previous commit

* Bugfix to optimized DrawSphereEx()

OBO error -- added 1 additional precalculated cos/sin value to each array to complete the 360-degree wraparound. Technically the value of these last elements will always be the same as the first element due to 360-degree wraparound, but this is the simplest solution.

* Corrected missing free()

* Formatting correction

* New DrawSphereEx() algorithm
2024-06-30 11:09:21 +02:00
github-actions[bot]
d8214c916e Update raylib_api.* by CI 2024-06-30 09:07:57 +00:00
Ray
17cbc75aa7 REVIEWED: Formatting, follow raylib coding conventions 2024-06-30 11:07:38 +02:00
github-actions[bot]
a805f46f55 Update raylib_api.* by CI 2024-06-30 08:33:45 +00:00
Bruno Cabral
6e2661f92d
[rtextures] Created ImageFromChannel() (#4105)
* created ImageFromChannel

Adds the possibility to extract a specific channel from an image

* naming convention

* example window height

* removed threshold

* removed alpha channel

* channel example organization

* updated channel example image
2024-06-30 10:33:32 +02:00
VitoTringolo
5b8efd68ba
[rmodels] Return true if no need to interpolate to avoid log flooding (#4118) 2024-06-30 09:50:12 +02:00
Jeffery Myers
c1ea32655a
[EXAMPLES] Default Skybox example to not use HDR (#4115)
* Update raylib_api.* by CI

* Default to not use HDR, and note that HDR support requires that raylib be built with HDR enabled.

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-28 19:08:55 +02:00
SuperUserNameMan
a3ef381b3e
rmodels.c, LoadImageFromCgltfImage() : fix base64 padding support (#4112)
* rmodels.c, LoadImageFromCgltfImage() : fix base64 padding support

This should fix the issue related to `.gltf` embeded image in base64 format, by ignoring `=` padding and calculating the data size in bytes correctly.

* follow guidelin convention

* try to follow guideline convention as much as possible

* clarify comments

i hope it's clear ennough
2024-06-28 09:56:27 +02:00
Colleague Riley
84971d81f3
Update RGFW and replace long switch in rcore_desktop_rgfw.c with a lookup table (#4108)
* Fix Makefile issues (RGFW) (linux) (macOS)

* Do not use nanosleep on windows at all (PLATFORM_DESKTOP_RGFW)

* remove #define RGFWDEF and make the #undefs only happen for their OS

* Update RGFW.h

* fix to match the RGFW updates

* remove line that shows the cursor for no reason

* Update RGFW, replace long switch with an array, update rgfw platform for RGFW

* update RGFW (fix reported glitch with drag and drop files) (linux)

* remove u16
2024-06-28 09:55:14 +02:00
VitoTringolo
05d76c74a6
Fix GLTF animations (#4107)
Co-authored-by: Vito Tringolo <vito.tringolo@recognitionrobotics.com>
2024-06-28 09:53:29 +02:00
InKryption
5e91444e3e
[build.zig] pass the real build.zig file (#4113)
`@This()` was naively passed to `dependencyFromBuildZig` while inside
a file that is not actually the build file, causing a panic when
actually used. Passing `@import("../build.zig")` fixes this.
2024-06-27 22:25:15 +02:00
InKryption
57b5f11e2a
[build.zig] Leverage dependencyFromBuildZig (#4109) 2024-06-27 11:52:36 +02:00
jspast
37205bba84
[web] Fix undesired scrollbars on shell files (#4104) 2024-06-25 22:15:29 +02:00
Ray
0979eafa84 WARNING: REMOVED: Default font fallback 2024-06-25 21:40:41 +02:00
Ray
4239e66c55 Update rshapes.c 2024-06-25 21:39:43 +02:00
Peter0x44
dfabbd8ba8
[rtext] Don't return default font if LoadFontEx fails (#4077)
It is currently impossible to check a font loaded successfully with
IsFontReady because LoadFontEx will always return a valid font.

DrawTextEx has this check:
if (font.texture.id == 0) font = GetFontDefault();  // Security check in case of not valid font

So anyone relying on the default font as a fallback for fonts failing to
load should still be covered.
2024-06-25 21:38:55 +02:00
Ray
3e441ae98b REVIEWED: DrawLine() #4075 2024-06-25 16:37:20 +02:00
github-actions[bot]
ec95ee85a3 Update raylib_api.* by CI 2024-06-24 16:42:01 +00:00
Ray
385e60dd41 Minor tweaks 2024-06-24 18:41:33 +02:00
Jeffery Myers
e96bab7ce6
[Build] Fix warnings when building in VS 2022 (#4095)
* Update raylib_api.* by CI

* Fix warnings when building examples in MSVC 2022

* fix auto-format that sneaked in there.

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-24 17:47:32 +02:00
Peter0x44
4311db5ba5
[rmodels] Fix -Wstringop-truncation warning (#4096)
rmodels.c: In function ‘LoadBoneInfoGLTF.isra’:
rmodels.c:4874:32: warning: ‘strncpy’ specified bound 32 equals destination size [-Wstringop-truncation]
 4874 |         if (node.name != NULL) strncpy(bones[i].name, node.name, sizeof(bones[i].name));
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2024-06-24 09:29:10 +02:00
github-actions[bot]
f947f89061 Update raylib_api.* by CI 2024-06-24 07:28:17 +00:00
Le Juez Victor
c2df169847
[rtextures] Adding ImageDrawLineEx function (#4097)
* adding `ImageDrawLineEx` function
also review other functions for drawing lines in images

* fix `ImageDrawLineV`
2024-06-24 09:27:59 +02:00
github-actions[bot]
c7bda3d10f Update raylib_api.* by CI 2024-06-23 20:51:38 +00:00
Le Juez Victor
7e50270d49
[rtextures] Adding triangle drawing function for images (#4094)
* adding triangle drawing function for images

* remove unnecessary check

* fix an iteration mistake
2024-06-23 22:51:24 +02:00
SuperUserNameMan
7773254022
LoadIQM() set model.meshMaterial[] (#4092) 2024-06-23 21:14:03 +02:00
Paul Melis
d582becbc2
[rmodels] Initial work to correctly handle the node hierarchy in a glTF file (#4037)
* Initial work to correctly handle the node hierarchy in a glTF file.
Static meshes seem to work fine in my tests. Haven't tried anything
animated yet, but it's almost certainly broken.

* Fix variable naming, some comment tweaks

* Only count primitives made up of triangles in glTF meshes

* Update processing of gltf mesh animation data, to match earlier
changes to vertex/normal/tangent data
2024-06-22 19:42:11 +02:00
manuel5975p
5ba18575de
[build] CMake: pass -sFULL_ES3 instead of -sFULL_ES3=1 (#4090)
* Allow ES3 in LibraryConfigurations.cmake

* Put FULL_ES3 as linker option

* Remove =1
2024-06-22 19:20:33 +02:00
Alice Nyaa
b0d49579c1
fixed LoadCodepoints returning a freed ptr when count is 0 (#4089) 2024-06-22 19:17:31 +02:00
Peter0x44
28f88fd984
Fix mistakes in example usages in raylib_parser help text (#4084) 2024-06-22 19:16:36 +02:00
Anthony Carbajal
0d59235ade
add warning log multiple of 4 (#4080) 2024-06-22 19:15:21 +02:00
manuel5975p
e7acdd12d8
[build] CMake: support OpenGL ES3 in LibraryConfigurations.cmake (#4079)
* Allow ES3 in LibraryConfigurations.cmake

* Put FULL_ES3 as linker option
2024-06-21 09:07:01 +02:00
Anthony Carbajal
52f2a10db6
fixed issue with GetScreenWidth/GetScreenHeight (#4074) 2024-06-17 13:42:53 +02:00
Ray
dcf2f6a8e9 Added note about performace #4067 2024-06-16 11:17:34 +02:00
Lázaro Albuquerque
307c998495
[build] Making config.h fully available to CMake users (#4044)
* Create ParseConfigHeader.cmake

This script parses the config.h file to automate the process of exposing the configuration flags and configuration values found in the latter.

* Update CompileDefinitions.cmake

Makes use of the new functionality found in ParseConfigHeader.cmake to make things consistent.

* Update CMakeOptions.txt

Makes use of the new functionality found in ParseConfigHeader.cmake to make things consistent.

* Update CMakeLists.txt

Changes required to make possible building raylib for web on Windows 10.

* Update LibraryConfigurations.cmake

Removes a warning that linker-only flags were being passed to the compiler, which is in accordance to https://emscripten.org/docs/tools_reference/settings_reference.html.

* Update CMakeOptions.txt

Removed clutter.

* Update CompileDefinitions.cmake

Removed clutter.

* Update CompileDefinitions.cmake

Some applications might check for PLATFORM_WEB instead of __EMSCRIPTEN__.

* Update CompileDefinitions.cmake

Reverting

* Update CMakeLists.txt

USE_AUDIO is redundant in the presence of the already existent and more descriptive SUPPORT_MODULE_RAUDIO.

* Update CompileDefinitions.cmake

USE_AUDIO is redundant in the presence of the already existent and more descriptive SUPPORT_MODULE_RAUDIO.

* Update ParseConfigHeader.cmake

* Revert "Update CMakeLists.txt"

This reverts commit 1785fc06b5.

* Revert "Update CompileDefinitions.cmake"

This reverts commit 62f9a3a0ea.

* Revert "Update CMakeLists.txt"

This reverts commit 3e7912144e.

* Revert "Update LibraryConfigurations.cmake"

This reverts commit bcc4310c49.
2024-06-16 10:49:59 +02:00
kai-z99
a29d334734
[rmodels] Read uninitialized values in GenMeshTangents() - fix bounding case (#4066)
* fix

* assert
2024-06-16 10:44:31 +02:00
Lázaro Albuquerque
cc40a91343
[build] Fix some warnings on web builds and remove some redundant flags. (#4069)
* update

* Revert "update"

This reverts commit e8adcabd94.

* update

* remove a not stricly required flag
2024-06-16 10:42:50 +02:00
Ray
04735fa9bb Merge branch 'master' of https://github.com/raysan5/raylib 2024-06-16 10:42:02 +02:00
Ray
715633e0de REVIEWED: Spline cubic bezier example 2024-06-16 10:41:47 +02:00
github-actions[bot]
32c98717b1 Update raylib_api.* by CI 2024-06-16 08:23:57 +00:00
Ray
4119b6dd66 Update raylib.h 2024-06-16 10:23:38 +02:00