Commit Graph

621 Commits

Author SHA1 Message Date
Ray
313067d749 Update rlgl.h 2025-01-16 19:47:21 +01:00
5d9aed5d40 [rlgl] Optimize rlReadScreenPixels (#4667)
This optimization works in the following ways:

1. Reduces calls to malloc to 1. Instead of needing an extra array, we
can just swap the top half with the bottom half of the one array.

2. Unroll the inner for loop and remove a condition. Unrolling loops
buys some performance wins, but the real goal was to remove the if check
and just set the alpha channel to 255.

On my hidpi arm64 laptop, I saw ~60% improvement in performance in my
debug build (29 FPS vs 47 FPS). When optimized, the gains were roughly
10% (75 FPS vs 83%).

Signed-off-by: K. Adam Christensen <pope@shifteleven.com>
2025-01-08 18:53:27 +01:00
05c4d8a652 [rlgl.h] Fixed typo in top comment (#4658)
"renderer" to "rendered"
2025-01-05 12:29:31 +01:00
Ray
fa0eada61a Update year to 2025 2025-01-01 00:02:52 +01:00
0212ed0a4b setting MAX_LEVEL based on actual mipcount input (#4622) 2024-12-20 14:14:13 +01:00
79facde353 fix rlActiveDrawBuffers for OpenGL ES 3 (#4605) 2024-12-16 00:51:42 +01:00
d2cd2a0152 [rlgl][rmodels] Add instranceTransform shader location index #4538 (#4579) 2024-12-08 12:48:54 +01:00
ff71e3a513 use unused variable. Fixes #4560 (#4561) 2024-12-01 23:22:46 +01:00
Ray
26548c1062 Remove trail-spaces 2024-11-19 12:33:13 +01:00
Ray
10789a4d49 Update rlgl.h 2024-11-19 12:31:14 +01:00
0e1fc33c5c Fix signed/unsigned mismatch in rlgl (#4443) 2024-10-26 22:59:50 +02:00
Ray
1f6b3384fa Reviewed formatting, remove end-line points, for consistency with comments 2024-10-26 12:26:00 +02:00
Ray
80b490c8f1 Reviewed formating to follow raylib conventions #4429 2024-10-26 12:15:06 +02:00
7fedf9e0b8 [rtextures/rlgl] Load mipmaps for cubemaps (#4429)
* [rlgl] Load cubemap mipmaps

* [rtextures] Only generate mipmaps that don't already exist

* [rtextures] ImageDraw(): Implement drawing to mipmaps

* [rtextures] Load cubemap mipmaps
2024-10-26 12:09:38 +02:00
Ray
4e3fc84050 Minor format tweaks 2024-10-26 00:52:22 +02:00
Ray
5065b85d33 Update rlgl.h 2024-10-24 12:45:12 +02:00
Ray
b0140b876b REVIEWED: GPU skninning on Web, some gotchas! #4412 2024-10-24 12:25:05 +02:00
Ray
f141c75cde Removed trailing spaces 2024-10-21 17:00:52 +02:00
Ray
c935ca3168 Reviewed formatting #4408 2024-10-21 16:59:55 +02:00
f402147a63 Updated instanced rendering support loading (#4408) 2024-10-21 16:56:19 +02:00
Ray
8cbf34ddc4 WARNING: BREAKING: Renamed several functions for data validation #3930 2024-10-16 19:26:12 +02:00
Ray
3fb1ba25ac Removed tabs and triple line-breaks 2024-10-08 18:45:52 +02:00
96d91a3892 [rlgl] Fix rlgl standalone defaults (#4357)
* Fix rlgl standalone defaults

* Fix rmodels
2024-10-02 11:41:21 +02:00
09987b01cc [MODELS] Better fix for GPU skinning issues (#4353)
* Make the max VBO match the animation flag.

* re-enable GPU skinning for mac, and fix the max buffer to be correct based on the GPU skinning support flag.
2024-10-02 10:49:56 +02:00
282d6478ba Complements the #4348 GPU skinning fix (#4352) 2024-10-01 12:09:06 +02:00
0e7bcd5639 [MODELS] Disable GPU skinning for MacOS platform (#4348)
* Update raylib_api.* by CI

* Disable GPU skinning on MacOS
Add GPU skinning example to MSVC Projects.

* Update raylib_api.* by CI

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-30 12:10:02 +02:00
212b1e5fe7 Fix rlgl standalone defaults (#4334) 2024-09-21 23:11:40 +02:00
Ray
e5d0cc978a Some minor tweaks 2024-09-20 17:32:01 +02:00
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
5604f6d8a3 Update rlgl.h 2024-08-25 12:57:05 +02:00
Ray
157c7c21d4 ADDED: more uniform data type options #4137 2024-08-25 12:52:27 +02:00
d314afc451 rlgl.h: glint64 did not exist before OpenGL 3.2 (#4284)
Compilation breaks on rlgl.h for early OpenGL versions.
Glint64 did not exist on those versions (< OpenGL 3.2)
2024-08-24 20:35:49 +02:00
Ray
78e86b6ea5 Update rlgl.h 2024-08-24 18:58:43 +02:00
Ray
f70d8a33cb REVIEWED: Shader load failing returns 0, instead of fallback 2024-08-17 00:46:08 +02:00
13491a485a Fixed compilation for OpenGL ES (#4243) 2024-08-09 19:02:18 +02:00
2590a30d04 [rlgl] Adding warnings in case OpenGL 4.3 is not enabled (#4202)
* Adding warnings for OpenGL 4.3

* Removed logging from frequently called functions
2024-08-09 09:05:46 +02:00
Ray
5af331d708 REVIEWED #4206 2024-08-07 01:01:45 +02:00
Ray
9c2ba3bfb7 REVIEWED: possible overflow... again #4206 2024-08-04 23:22:27 +02:00
Ray
923f983719 REVIEWED: Possible overflow #4206 2024-08-04 22:08:38 +02:00
92f60a99f6 [rlgl] use GLint64 for glGetBufferParameteri64v (#4197) 2024-08-04 21:53:56 +02:00
bbcb0109e1 Add default vertex/fragment shader to OpenGL ES 3.0 based on the ones from OpenGL 3.3 (#4178) 2024-07-23 21:10:23 +02:00
8d5374a443 Replace glGetInteger64v with glGetBufferParameteri64v (#4154) 2024-07-11 21:31:13 +02:00
Ray
9a280cda0b Update rlgl.h 2024-07-04 11:12:24 +02:00
Ray
1e1061d5c7 REVIEWED: Formatting, follow raylib coding conventions 2024-06-30 11:37:58 +02:00
Ray
385e60dd41 Minor tweaks 2024-06-24 18:41:33 +02:00
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
735c0160b5 Update rlgl.h (#4059)
- The function rlGetMatrixProjectionStereo and rlGetMatrixViewOffsetStereo have RLAPI for the function declaration and cause error when compiling using RLGL_IMPLEMENTATION.
2024-06-12 19:36:25 +02:00
f05316b11d [rlgl] Rename near, far variables (#4039) 2024-06-06 15:29:15 +02:00
Ray
7a1cad3e61 Reviewed input params #3974 2024-05-12 13:31:38 +02:00
23385231c6 [rlgl] Fix incorrect matrix multiplication order in rlMultMatrixf (#3935) 2024-05-05 20:19:25 +02:00