Commit Graph

6087 Commits

Author SHA1 Message Date
Denis Pobedrya 27781a4767 Remove touch points on touch up events on Android (#2711)
Fixes #2683

Remove elements from touch point related arrays when touch up and
similar events are processed. This makes GetTouchPointCount() always
report the actual count of touch points, and all positions returned by
GetTouchPosition() correspond to positions of currently happening
touches.
2022-09-18 23:01:10 +02:00
Gunko Vadim 7e3a50b4ac Update BINDINGS.md (#2710) 2022-09-18 22:36:59 +02:00
Nikolas 42ecd72547 [rlgl] Check for extensions before enabling them (#2706)
* [rlgl] Check for extensions before enabling them

* Shift to glad on macOS

* #undef CORE_OPENGL_33

* Remove version hack and fix ASTC compression assumption

* Remove loader from glad

* Use GLAD_MALLOC/FREE instead of malloc/free

* More explicit extension checking
2022-09-18 21:08:51 +02:00
Denis Pobedrya 8f597b3cc3 Basic gamepad support for Android (#2709)
Currently assumes a single gamepad, has no code specific to gamepad
detection (gamepad is "detected" when an event related to gamepad
arrives). Also assumes that all gamepads look roughly like an xbox/ps
controller. Both assumptions are not strictly true, but an
implementation like that probably covers 85% of usecases.

Also it doesn't update previousButtonState so functions
IsGamepadButtonPressed() and IsGamepadButtonReleased() don't work, but
they didn't work previously on Android anyway, and they are flaky on
desktop as they are now, so the mechanism for these two functions
probably should be reworked anyway.

It's certainly an improvement compared to the previous android gamepad
handling code, which put gamepad events into touch related structs.
2022-09-18 19:58:52 +02:00
Denis Pobedrya ff25402f68 Fix viewport scaling bug on android after context rebind (#2703)
On android after rebinding context (which happens when you minimize and
navigate back to an app, or when you turn a screen off and back on)
there's a bug that viewport has a wrong scale and part of it is off
screen.

The change fixes it on devices I tried, but the solution feels hacky to
me. However when I attempted instead to call SetupViewport() again which
feels like a more proper solution, it didn't fix it.
2022-09-18 11:28:55 +02:00
Denis Pobedrya 8e57c8ace3 Fix touchscreen input related functions on Android (#2702)
Fix display -> screen coordinate conversion for android platform and
move it to the platform event handling code, simplifying
GetTouchPosition() function implementation.

Co-authored-by: Denis Pobedrya <denis.pobedrya@gmail.com>
2022-09-17 23:15:11 +02:00
AQuantumPotato 494a581339 Update BINDINGS.md (#2701)
Updated the list of projects that support 4.2
2022-09-17 23:14:00 +02:00
Rob Loach 4c3d577ddb CMake: Project template fix to easily target raylib version (#2700) 2022-09-17 23:12:57 +02:00
Ray c328f09efc Move compressed textures loading to a separate self-contained library 2022-09-17 19:26:23 +02:00
Ray cb9b8f73c0 ADDED: GenImagePerlinNoise() 2022-09-17 13:39:49 +02:00
murilluhenrique eaa0b9102b Fix typo (#2696) 2022-09-16 00:06:25 +02:00
Nikolas a12ddacb7b Enable DXT compression on __APPLE__ targets (#2694) 2022-09-12 12:21:41 +02:00
Ray 853c66baed REVIEWED: CheckCollisionPointPoly() 2022-09-10 23:56:52 +02:00
Ray cf76d23476 Minor format tweaks 2022-09-10 10:23:38 +02:00
Ray cf24c021a3 WARNING: BREAKING: Reviewed SSBO usage to avoid long long
raylib library tries to avoid `long long` usage. Several SSBO functions have been reviewed (including some renames for consistency) to minimize `long long` type usage.
2022-09-09 00:26:47 +02:00
Ray b478364914 REVIEWED: Removed comment, fixes #2691 2022-09-09 00:04:08 +02:00
hartmannathan c1b4881e8a examples/core/core_custom_logging.c: Fix typo (#2692) 2022-09-08 16:10:15 +02:00
Ray ac1ffbad1d REVIEWED: Data type to unsigned 2022-09-07 00:39:38 +02:00
Ray b09725fa84 REPLACED: rlVertex2i() by rlVertex2f() 2022-09-05 18:45:33 +02:00
Ray e59442bfab REMOVED: rlPushMatrix()/rlPopMatrix() from rshapes
This simplification will allow the usage of `rshapes` as STANDALONE mode in a future. Only a small set of `rlgl` functions are required and they can be "more" easely replaced if no `rlPushMatrix()`/`rlPopMatrix()` are involved.

More simplification planned for the future, maybe the textures dependencies.
2022-09-05 18:23:25 +02:00
Ray 9996e328cb WARNING: BREAKING: Removed rlCheckRenderBatchLimit() requirement
Updated version to `rlgl 4.2`
2022-09-05 13:20:09 +02:00
Ray ad5ffd78d6 REVIEWED: rlgl enums and comments 2022-09-05 11:15:28 +02:00
Ray 0917290e95 REVIEWED: M3D model loading #2688 2022-09-04 18:49:54 +02:00
Ray ac3420faac Update core_custom_frame_control.c 2022-09-04 12:32:40 +02:00
skylar ee5a87826d Fixed a bug in the 2d camera platformer example (#2687)
canJump used to alternate between true and false when on ground
2022-09-04 11:48:33 +02:00
Ray f4b4054de5 REVIEWED: CheckCollisionPointPoly() 2022-09-04 10:45:01 +02:00
Jacek aff98d7f2a Check collision point polygon (#2685)
* Update raylib.h

* CheckCollisionPointPolygon()

* typo
2022-09-04 10:39:03 +02:00
Ray 082920eb80 WARNING: RENAMED exported symbol to raylib_version #2671 2022-09-02 21:35:08 +02:00
Ray de968e3623 WARNING: RENAMED symbol raylibVersion to raylib_version
I want to note this is a special symbol exported
2022-09-02 21:32:58 +02:00
Ray 2a798d64a2 Export raylibVersion symbol. Fixes #2671 2022-09-02 21:28:19 +02:00
Stan 234576da71 Removed raylib_opengl_interop.c from PLATFORM=Web build (#2682) 2022-09-02 09:13:35 +02:00
Ray fb1037a241 ADDED: Complete support for M3D animations! #2648 2022-09-01 20:46:06 +02:00
Ray 64cca24526 ADDED: RL_TEXTURE_MIPMAP_BIAS_RATIO support to rlTextureParameters() for OpenGL 3.3 #2674 2022-09-01 11:18:22 +02:00
Ray a598754b5b Update windows.yml 2022-09-01 11:04:10 +02:00
Ray bb4d9297b5 Update windows.yml 2022-09-01 10:52:03 +02:00
Ray 4938966e76 Update windows.yml 2022-09-01 10:45:30 +02:00
Ray cabaa53302 Update windows.yml 2022-09-01 10:44:25 +02:00
Ray bfab101ac2 Update windows.yml 2022-09-01 10:42:11 +02:00
Ray 23cc39a265 Implemented latest .M3D improvements #2648 2022-09-01 10:27:16 +02:00
Ray 0c7ba773ec Fixed issue with LoadIQM() #2676 2022-09-01 10:14:45 +02:00
Ray 4b76aa09dd ADDED: lighting.fs for GLSL120 Fix #2651 2022-08-29 14:36:07 +02:00
Ray d66692149b Update README.md 2022-08-28 18:04:47 +02:00
Ray 7f5567eec0 Reviewed GLFW compilation requirements on Linux: _GNU_SOURCE
Reasons to NOT define `_GNU_SOURCE`:

 - access to lots of nonstandard GNU/Linux extension functions
 - access to traditional functions which were omitted from the POSIX standard (often for good reason, such as being replaced with better alternatives, or being tied to particular legacy implementations)
 - access to low-level functions that cannot be portable, but that you sometimes need for implementing system utilities like mount, ifconfig, etc.
 - broken behavior for lots of POSIX-specified functions, where the GNU folks disagreed with the standards committee on how the functions should behave and decided to do their own thing.
2022-08-28 15:48:12 +02:00
Ray be2328f848 Update Makefile 2022-08-28 15:39:22 +02:00
Ray 568fe42cb1 Reviewed GLFW issue with ppoll() function 2022-08-28 15:37:09 +02:00
Ray 482dbfc52e Avoid error on implicit-function-declaration 2022-08-28 15:28:57 +02:00
Ray 10ae54379a Update posix_poll.c 2022-08-28 15:25:34 +02:00
Ray 2236197d49 Update rglfw.c 2022-08-28 15:20:16 +02:00
Ray 9e0e08cba4 WARNING: UPDATED GLFW to latest master branch!
WARNING: This could be a BREAKING CHANGE for some platforms! I'm afraid something could be wrong on `rglfw.c` module.

To be able to compile on Windows I had to modify `glfw/src/platform.c` line 74. I couldn't manage to compile without that change, help is welcome!
2022-08-28 14:16:51 +02:00
Dmitry Matveyev 8508ae3d15 Update NimraylibNow! bindings version (#2667) 2022-08-28 13:35:39 +02:00