Commit Graph

457 Commits

Author SHA1 Message Date
44d3cee5d1 Minor tweak 2022-01-28 21:25:40 +01:00
f57727995a REVIEWED: rlLoadShaderCode() 2022-01-13 19:05:45 +01:00
e621efe79f rlLoadShaderCode - set ShaderId variables to RLGL.State.default[VF]ShaderId if repesctive Code is NULL (#2281) 2022-01-13 18:42:44 +01:00
Ray
7a159664bc Improved shader loading code 2022-01-08 20:12:03 +01:00
Ray
612c4ad1dc Reviewed possible issue with shaders detaching 2022-01-08 19:55:14 +01:00
ba1e91b4d7 Change comment about custom blend modes in rlgl.h (#2260) 2022-01-02 22:50:39 +01:00
a940f41b4b Update year to 2022 2021-12-31 20:06:22 +01:00
0454acaacf REVIEWED: Clear SSBO buffers on loading #2185 2021-12-15 13:09:24 +01:00
478b70e53e fixed typo: aproximation to approximation (#2163) 2021-11-21 18:06:20 +01:00
Ray
b7bf220598 REVIEWED: rlUpdateTexture() 2021-11-15 10:25:24 +01:00
35cbacc68b Allow GL4.3 capabilities to be shown (#2124)
Now that 4.3 was added this can be enabled with the compile flag.
2021-11-09 15:24:39 +01:00
Ray
14e4992d73 REVIEWED: rlGetCompressedFormatName() 2021-11-09 11:53:18 +01:00
Ray
21ec8c38ae Review variables initialization
- All variables are initialized on declaration, some arrays were not properly initialized
 - Static array buffers require memset() for re-initialization on every function call
2021-11-09 11:49:03 +01:00
Ray
1fac09d0f4 REVIEWED: example: Compute shader Game-of-life 2021-10-31 12:28:04 +01:00
Ray
25642cff36 Update comments for OpenGL 4.3 2021-10-26 22:23:16 +02:00
fec0ce34c5 Remove trailing spaces 2021-10-19 14:57:12 +02:00
719c1551cc Reviewed latest PR formatting and details 2021-10-19 13:30:23 +02:00
9f2ff3e4d6 Support create OpenGL debug context in OpenGL 4.3 (#2068)
* - support create OpenGL debug context in OpenGL 4.3

* - additional events in debug message
- fixed glEnable(GL_DEBUG_OUTPUT)

* Reviewed OpenGL Debug Context
2021-10-19 12:43:27 +02:00
b28e353626 Reviewed glDisableVertexAttribArray() issue #2068 2021-10-18 13:22:52 +02:00
a3f9ba8704 Removed useless GL calls #2068 2021-10-18 13:16:07 +02:00
Ray
ccf4329792 Review comments 2021-10-18 00:23:26 +02:00
a6fb2dafc6 Fix rlLoadComputeShaderProgram define (#2067)
Now uses correct version.
2021-10-17 23:11:42 +02:00
7a16834124 UPDATE: Officially support OpenGL 4.3 2021-10-17 21:41:19 +02:00
cf12992b6a Remove trailing spaces 2021-10-17 21:00:20 +02:00
Ray
99f6707e2c Support OpenGL 4.3
- Support Compute Shaders by rlgl API
 - Support SSBO by rlgl API
2021-10-16 23:49:31 +02:00
Ray
e36dc01b91 Support GRAPHICS_API_OPENGL_43 2021-10-16 23:39:21 +02:00
Ray
8523d13683 Update rlgl.h 2021-10-16 23:30:30 +02:00
dba29e4405 Compute shaders support (#2061)
* Add basic compute shader and ssbo support in rlgl.

* Add rlBindImageTexture (untested), now requires SUPPORT_COMPILE_SHADERS

* Delete glad.c

* Delete glad.h

* Delete khrplatform.h

* Revert to previous glad.h

* Remove "glad.c"

Co-authored-by: Ray <raysan5@gmail.com>
2021-10-16 23:26:25 +02:00
Ray
0aefe256d0 REVIEWED: rlLoadDrawQuad() description #2058 2021-10-16 22:39:22 +02:00
Ray
1b793e76dc Reviewed memory usage 2021-10-16 22:36:47 +02:00
Ray
84edd22612 Reviewed unsigned int issue (discussion #2054) 2021-10-15 11:25:17 +02:00
Ray
83b3478fe4 Reviewed some TODO 2021-10-13 23:45:57 +02:00
Ray
a91f61262e Review RLAPI to avoid warnings 2021-10-10 23:24:05 +02:00
8722ff7043 REVIEWED: RLGL.State.vertexCounter (See detailed comment)
`RLGL.State.vertexCounter` is a generic counter and it's reused for all `rlRenderBatch`, actually, once render batch is filled, required vertex count is provided through the draw calls, so, the total accumulated count of vertices is not directly registered inside the rlRenderBatch.

`RLGL.State.vertexCounter` keeps that count but one possible improvement(?) could be moving the `vertexCounter` inside `rlRenderBatch` to always keep a register of the total accumulated vertices in that batch (despite that info is provided by the accumulated `draws[i].vertexCount`.

Simplifying, `RLGL.State.vertexCounter = SUM(draws[i].vertexCount)`

The decision to move the counter out of `rlVertexBuffer` is to keep only the data that I think should belong to `rlVertexBuffer` and make it more generic, aligned with raylib `Mesh` structure.

The decision to not add it to `rlRenderBatch` is because it could contain multiple `rlVertexBuffer` and it would be confusing (because it would only register the count of the last filled one).
2021-10-06 11:44:57 +02:00
Ray
8d7f97ee04 Remove trailing spaces 2021-10-06 01:20:46 +02:00
Ray
9a4fb25285 REDESIGNED: Simplify vertex data recording
Instead of registering vertex texcoords and colors on every call, we keep the last defined value and we record everything on `glVertex*()`. Actually that behavior is aligned with OpenGL 1.1 standard.
2021-10-06 01:17:20 +02:00
b972b8d324 REVIEWED: API functions specifiers 2021-10-05 18:33:41 +02:00
Ray
f869229b7f Minor format tweaks 2021-10-03 12:09:59 +02:00
dfbb134bfe RLGL: restore draw batch state after limit check (#2018) 2021-09-29 23:26:29 +02:00
Ray
00a763ea44 Reviewed some TODO comments 2021-09-23 00:18:47 +02:00
Ray
9362eaf9c6 REVIEWED: Naming: length vs size 2021-09-01 23:40:51 +02:00
Ray
a0f8682905 REVIEWED: <name>Count for consistency
Following english rules, it should be singular name before Count.
2021-09-01 23:09:30 +02:00
Ray
14e443afba REVIEWED: OpenGL 1.1 compilation issue 2021-08-25 23:41:33 +02:00
Ray
a5beb940f8 Remove trailing spaces 2021-08-16 23:23:16 +02:00
Ray
f3385b6ad2 Update rlgl.h 2021-08-16 19:52:57 +02:00
Ray
ef8526ae36 Update rlgl.h 2021-08-16 19:26:10 +02:00
Ray
92a13878dc Add some comments 2021-08-16 19:23:06 +02:00
aae60e1e44 REVIEWED: extern "C" definition position for consistency
Note that `extern "C"` calling convention only affects objects that need to be seen by the linker, in our case only functions... but it would also be required by global variables exposed, if any.
2021-08-15 13:02:53 +02:00
1dff5814be ADDED: rlUpdateVertexBufferElements() #1915 2021-08-12 21:01:09 +02:00
26db391576 ADDED: rlActiveDrawBuffers() #1911
- ADDED: rlEnableColorBlend()/rlDisableColorBlend()
2021-08-12 20:38:57 +02:00