Commit Graph

587 Commits

Author SHA1 Message Date
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
Ray
33b32ca53a Default shader attrib locations need to be exposed
They need to be exposed on `rlgl.h` header section (not implementation section) because with some specific use cases (custom config.h, rmodels module enabled), building fails otherwise.
2024-05-01 18:41:28 +02:00
Ray
f15455552d Review formatting 2024-04-23 19:38:45 +02:00
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
d80febde7d [rlgl] Implement vertex normals for RLGL immediate drawing mode (#3866)
* Fix several non-functional `target_compile_definitions`

* Avoid hardcoding the default vertex attribute locations

* Implement functional `rlNormal3f`

* Add normal definitions for `DrawCube`

* Update the basic lighting example to use `DrawCube` and `DrawPlane`
2024-04-23 14:22:29 +02:00
Ray
f795941521 REVIEWED: rlSetVertexAttribute(), define last parameter as offset #3800 2024-04-20 23:37:31 +02:00
214b1997a8 Changed RLGL_VERSION from "4.5" to "5.0 (#3914)
Line 110 of file rlgl.h is the one in question.
2024-04-13 23:33:21 +02:00
Ray
646d70e93a Remove trailing spaces 2024-04-02 09:38:06 +02:00
Ray
d7ff0175c1 Fix #3876 and also rlgl review on #3783 2024-03-18 09:09:26 +01:00
Ray
8b0dd44316 Fix #3876 and also rlgl review on #3783 2024-03-18 09:08:51 +01:00
Ray
e42e3188f5 Remove some unneeded line breaks 2024-02-18 11:59:40 +01:00
Ray
c31559101a REVIEWED: rlLoadFramebuffer(), parameters not required 2024-02-04 11:52:49 +01:00
Ray
25306eae42 REVIEWED: Issue on parsing #3765 2024-02-01 00:05:30 +01:00
Ray
deaffb0698 Review PR #3746 formating 2024-01-29 21:16:17 +01:00
bebf9547bd [CORE,RLGL] Fix scale issues when ending a mode (#3746)
* Only restore GL scale back to screen scale if we are returning to a screen, not a render texture.

* blankspace

* reset back to default screen scale when ending a render texture since we are back on the default fbo
2024-01-29 21:10:23 +01:00
f4add5f10d Fix rlSetUniformSampler (#3759)
Fix rlSetUniformSampler not setting sampler uniform if the same texture was already passed to a different sampler uniform
2024-01-28 13:45:19 +01:00
27645e16ab fixed small typo, replaced th with the (#3752) 2024-01-22 11:36:38 +01:00
Ray
3f1e59a7cf Update copyright to 2024 2024-01-02 20:58:12 +01:00
Ray
68b6c79c3f Update rlgl.h 2023-12-20 01:03:52 +01:00
Ray
2fe68a8a12 REVIEWED PR deferred render 2023-12-20 00:51:51 +01:00
e71153258b fix for deferred rendering example. (#3655)
* fix for deferred rendering example.

* missed defines to build.
2023-12-20 00:27:59 +01:00
55e7d1aad1 Expose OpenGL take 2 (#3588)
For some reason, there are actually two macros needed to control this.
Yes, I tried with only one, both are needed
2023-11-30 22:43:02 +01:00
ef5069862d Fix mistake in pr #3572 (#3587) 2023-11-30 20:07:50 +01:00
Ray
e9ddb15d9d REVIEWED: rlgl function description and comments 2023-11-30 19:04:38 +01:00
e7a486fa81 Hide unneeded internal symbols when building raylib as an so or dylib (#3573) 2023-11-28 20:43:45 +01:00
94aba23ef4 Expose glad functions when building raylib as a shared lib (#3572) 2023-11-24 00:41:44 +01:00
b122270aa3 Fix version info in rlgl.h (#3558) 2023-11-21 22:47:52 +01:00
9099077075 [rlgl] Fixed return type of GetCompressedFormatName (#3529)
The return type of `GetCompressedFormatName` has been corrected from `char *` to `const char *`
2023-11-12 00:09:00 +01:00
Ray
30dcbaff20 Update rlgl.h 2023-11-10 13:33:42 +01:00
Ray
807516a991 Support OpenGL ES 3.0 building on Web
For some reason, the equivalent requested context (WebGL 2.0) is not provided, despite being properly requested.
2023-11-02 18:13:37 +01:00
Ray
35d27fb11b REVIEWED: Pointers exposing not required for ES3 2023-11-02 09:04:05 +01:00
Ray
64d64cc181 REVIEWED: Potential code issues reported by CodeQL #3476 2023-11-01 15:28:18 +01:00
Ray
1407f6eb46 ADDED: rlBlitFramebuffer(), required for deferred render 2023-10-31 20:46:06 +01:00
Ray
de7beef05d Remove trailing spaces 2023-10-31 15:54:52 +01:00
ff04d52f12 Added rlEnablePointMode (#3490)
for rendering meshes with points.
similar to wire mode.
(NOTE) they still backface cull, so disable that if you want to show the entire mesh.
2023-10-31 08:43:32 +01:00