Commit Graph

388 Commits

Author SHA1 Message Date
Everton Jr.
00396e3436 [rcore] Clipboard Image Support (#4459)
* [rcore] add 'GetClipboardImage' for windows

* [rcore] GetClipboardImage removed some unneeded defines

* [rcore] PLATFORM_SDL: create a compatility layer for SDL3

* external: add win32_clipboard.h header only lib

* [rcore] using win32_clipboard on platforms rlfw and rgfw

* [rcore] fix warnings in SDL3 compatibility layer

* Makefile: Allow specifying SDL_LIBRARIES to link, this helps with SDL3

* Makefile: examples makefile now compile others/rlgl_standalone only when TARGET_PLATFORM is PLATFORM_DESKTOP_GFLW

* Makefile: examples makefile now compile others/rlgl_standalone only when TARGET_PLATFORM is PLATFORM_DESKTOP_GFLW

* [rcore]: PLATFORM_SDL: improve clipboard data retrieval

* external: remove unused function from win32_clipboard.h

* Makefile: allow for extra flags necessary when compiling for SDL3

* [rcore]: fix string typo

* [rcore]: Properly handle NULL dpi passing. As is allowed in SDL2

* external: fix arch finding on win32_clipboard.h to allow compilation on msvc cmake CI

* [rcore]: PLATFORM_SDL: Treat monitor as an ID in SDL3 as opposed to an index as in SDL2

* [rcore]: typo
2024-11-09 19:40:41 +01:00
Colleague Riley
7fe5f7126b Fix MSVC errors for PLATFORM_DESKTOP_RGFW (#4441)
* (rcore_desktop_rgfw.c) fix errors when compiling with mingw

* define WideCharToMultiByte

* update RGFW

* move stdcall def to windows only

* fix raw cursor input

* Fix warnings, update RGFW, fix msvc errors (make sure windows macro _WIN32 is correct)
2024-10-26 22:59:10 +02:00
Asdqwe
7a4a84a561 [rcore] Fix #4405 (#4420)
* Fix #4405 at runtime

* Add parameter validation

* Remove default global deadzone
2024-10-23 00:59:50 +02:00
Ray
f141c75cde Removed trailing spaces 2024-10-21 17:00:52 +02:00
Anthony Carbajal
80393c0fb6 [rcore] added sha1 implementation (#4390)
* added sha1 implementation

* added missing part

* fixed issue

* fix to match other implementations
2024-10-18 01:15:19 +02:00
Ray
8cbf34ddc4 WARNING: BREAKING: Renamed several functions for data validation #3930 2024-10-16 19:26:12 +02:00
Ray
361b0e85c1 ADDED: Utility functions: ComputeCRC32() and ComputeMD5() 2024-10-16 16:49:50 +02:00
Anthony Carbajal
43b109a4e3 removed old comment (#4370) 2024-10-07 09:32:04 +02:00
Ray
13178b9373 Update rcore.c 2024-09-22 23:01:22 +02:00
Ray
291063c98f Update rcore.c 2024-09-22 22:56:21 +02:00
Ray
24a1cd8c5b Update rcore.c 2024-09-22 22:50:47 +02:00
Ray
352c450ad0 Update rcore.c 2024-09-22 22:43:35 +02:00
Ray
100f6624d6 Update rcore.c 2024-09-22 22:36:17 +02:00
Ray
55a25ac04b ADDED: MakeDirectory() 2024-09-22 22:11:08 +02:00
Daniel Holden
86ead96263 [rmodels] Optional GPU skinning (#4321)
* Added optional GPU skinning

* Added skinned bone matrices support for different file formats.

* Moved new shader locations to end of enum to avoid breaking existing examples. Added gpu skinning on drawing of instanced meshes.

* Added GPU skinning example.

* Removed variable declaration to avoid shadowing warning.
2024-09-20 17:30:37 +02:00
Ray
627e76cf7b REVIEWED: Directory filter tag #4323 2024-09-17 10:26:32 +02:00
foxblock
16e9317220 [rcore] Add filtering folders to LoadDirectoryFilesEx()/ScanDirectoryFiles() (#4302)
* Add filtering folders in ScanDirectoryFiles and ScanDirectoryFilesRecursively

Add define FILTER_FOLDER for that purpose
Fix folder names matching filter being added to result

* Move FILTER_FOLDER define to internals of rcore and document option in comment
2024-09-15 13:05:01 +02:00
base
d02fcc5262 chore: GetApplicationDirectory definition for FreeBSD (#4318) 2024-09-15 12:51:20 +02:00
Ray
4c9282b090 ADDED: isGpuReady flag, allow font loading with no GPU acceleration 2024-08-24 18:59:24 +02:00
Ray
039df36f4b REVIEWED: Automation events mouse wheel #4263 2024-08-20 19:13:18 +02:00
Lázaro Albuquerque
6e644a27fc Change some global variables to have internal linkage (#4252)
* Change some global variables to have internal linkage

* Update rcore.c

* Update rcore.c
2024-08-13 19:16:07 +02:00
Jeffery Myers
9ef678d90a Fix warnings (#4239)
* Update raylib_api.* by CI

* Fix typecast warnings

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-09 08:54:22 +02:00
maxmutant
9e39788e07 [rcore] fix gamepad axis movement and its automation event recording (#4184)
* [rcore] fix gamepad axis movement and its automation event recording

This commit fixes 2 issues:
- Automation events aren't recorded for negative axis movements on
  gamepads (e.g. stick going left/up)
- 'GetGamepadAxisMovement' drift check isn't working correctly for
  triggers. Axis values between [-0.1, 0.1] are clamped to 0.0

Behaviour change:
- 'GetGamepadAxisMovement' returns default value for each axis, even
  if gamepad isn't attached.

* [rcore] inline body of 'GetGamepadAxisMovementDefault' and remove it
2024-07-28 22:07:47 +02:00
Dave Green
e5a1fc4f20 No longer set the RL_TEXTURE_FILTER_LINEAR when high dpi flag is enabled. (#4189) 2024-07-27 20:19:05 +02:00
Ray
fde0dcd0ab ADDED: Working directory info at initialization 2024-07-21 10:28:23 +02:00
Ray
996f50393e Minor tweaks 2024-07-19 00:39:58 +02:00
Ray
d243094ede WARNING: BREAKING: Renamed PLATFORM_DESKTOP to PLATFORM_DESKTOP_GLFW
This could potentially be a breaking change, for consistency, now every possible desktop backend has the proper name assigned: GLFW, SDL, RGFW
raylib build system has been reviewed to fallback to `PLATFORM_DESKTOP_GLFW` by default when `PLATFORM_DESKTOP` defined
2024-07-01 18:28:44 +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
Ray
8cbde7f84c tweaks 2024-06-09 13:16:29 +02:00
Ray
c335c3c52c ADDED: IsFileNameValid() 2024-05-29 17:01:42 +02:00
Colleague Riley
9805fe0b1a make RGFW a custom platform (#3941)
* fix minor bugs and errors (x86) for the RGFW platform, update RGFW platform license, update makefile info for RGFW platform

* revert

* (RGFW) (winapi) fix mouse hide bug when cursor changes

* ensure PLATFORM_SHELL is defined (PLATFORM_RGFW)

---------

Co-authored-by: ColleagueRiley <ColleagueRiley@gmail.com>
2024-05-07 20:30:52 +02:00
Ray
2e77443209 WARNING: Fix breaking issue (introduced some days ago) 2024-04-23 22:55:51 +02:00
KotzaBoss
4b0e25d3af Add rlCullDistance variables/getters and rlSetClipPlanes function (#3912)
The `RL_CULL_DISTANCE_` definition remains as the initial value
of the variables.

Basic usage can be:
```c
#include <raylib.h>
#include <rlgl.h>

rlSetClipPlanes(RL_CULL_DISTANCE_NEAR, MY_CULL_DISTANCE_FAR);

if (must_reset_clip_planes)
    rlSetClipPlanes(RL_CULL_DISTANCE_NEAR, RL_CULL_DISTANCE_FAR);
```
2024-04-23 14:24:37 +02:00
Ray
3caa424ad4 Review formatting 2024-04-21 12:29:09 +02:00
Ray
e85f245ad4 REVIEWED: Remove final punctuation in code comments 2024-04-20 20:31:06 +02:00
Ray
29ce13b777 Code gardening
- Review formatting
 - Improve readability for some functions result return
 - Minimize early returns
 - Align LoadFileData() to UnloadFileData()
2024-04-20 13:53:13 +02:00
Ray
d30cfea82d REVIEWED: GetScreenToWorldRayEx() 2024-04-03 20:10:15 +02:00
Rob Loach
9070eb9a13 Fix framerate recording for .gifs (#3894) 2024-04-03 12:10:52 +02:00
Ray
646d70e93a Remove trailing spaces 2024-04-02 09:38:06 +02:00
Ray
dcb9db5fe6 Update rcore.c 2024-03-21 15:43:00 +01:00
Ray
93a828f744 REVIEWED: GetMouseRay() functions rename #3830 2024-03-07 12:33:37 +01:00
aiafrasinei
3b7be85151 Screen space related functions consistency (#3830)
* Screen/world-space related functions rename

* Update raylib_api.* by CI

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-07 12:28:11 +01:00
GideonSerf
371d25c8c9 Gamepad rumble support with SDL2 (#3819)
* Added gamepad rumble to rcore_desktop.c and rcore_desktop_sdl.c
Still need to add to the rest of the platforms.

* Add SetGamepadVibration warnings to unimplemented platforms.

* Added MAX_GAMEPAD_VIBRATION_TIME
The rumble in SDL2 will continue for MAX_GAMEPAD_VIBRATION_TIME unless the user cancels it with a call to SetGamepadVibration(0.0f,0.0f,0.0f)

* Cast float duration value to Uint 32

* Changed defines from int to float and fixed typo

---------

Co-authored-by: Gideon Serfontein <gse@newspacesystems.com>
2024-02-24 16:47:27 +01:00
Ray
e42e3188f5 Remove some unneeded line breaks 2024-02-18 11:59:40 +01:00
Ray
401c5a8638 Minor tweaks to avoid some CodeQL warnings 2024-02-13 15:58:02 +01:00
Jeffery Myers
4cd71a9750 Fix warnings in raylib (#3793) 2024-02-10 20:02:05 +01:00
Luís Almeida
9a5dddc311 Added viewport independent raycast (#3709)
* added viewport independent raycast

* Renamed GetMouseRayEx to GetViewRay
2024-02-04 11:37:10 +01:00
Ray
f033b30703 Review formating and some defines naming consistency 2024-02-04 11:33:38 +01:00
oblerion
d91e9104aa [rcore] Fix GetFileNameWithoutExt() (#3771)
* Update rcore.c

fix [rcore] GetFileNameWithoutExt

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Update rcore.c

* Update rcore.c
2024-02-04 11:28:58 +01:00
Ray
deaffb0698 Review PR #3746 formating 2024-01-29 21:16:17 +01:00