summaryrefslogtreecommitdiffhomepage
path: root/src/external
diff options
context:
space:
mode:
authorraysan5 <[email protected]>2021-10-06 11:44:57 +0200
committerraysan5 <[email protected]>2021-10-06 11:44:57 +0200
commit8722ff7043a1c6844d59a9448e48aa5345c27058 (patch)
treeda3152b60c7e744b315a8e82d2ba2ab007c59189 /src/external
parent8d7f97ee04c1908caf703771bd3576ef5f26b3c1 (diff)
downloadraylib-8722ff7043a1c6844d59a9448e48aa5345c27058.tar.gz
raylib-8722ff7043a1c6844d59a9448e48aa5345c27058.zip
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).
Diffstat (limited to 'src/external')
0 files changed, 0 insertions, 0 deletions