`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).
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.
* [rcore] fix rpi4 Failed to get DRM resources
card1 is not always the the correct card to use on rpi4
rpi os finds the correct card and links it to /dev/dri/by-path/platform-gpu-card during boot.
this fix makes sure that we always point to the correct card on rpi4
* Update rcore.c
* Match build-windows.bat changes
The location for manual setting of the vcvarsall.bat location moved to line 38 in the latest change.
* Update flags for clean x64/x86 building
std:c11 is required for initialization features used in raylib. UTF-8 for consistency in contemporary systems. /W3 gets rid of puzzling slack byte and linker in-lining warnings. /sdl for some insecure library usages in the user code that beginners should learn about early.
* 2021-10-01 core_basic_windows.c adjustment
1. The press F6 message and the placement of the compiled executable statement are incorrect for the scripts case.
2. <raylib.h> because "raylib.h" is meaningful only when compiling inside raylib/src/ folder.
3. main(void) to get rid of a novice-confusing warning.
* Supress most warnings on rmodels.c
NOTE: unused symbols have been deleted and the following report will show in what location they were previously.
Unused symbols:
- ArrayInt - vox_loader.h: line 84
- initArrayInt - vox_loader.h: line 168
- insertArrayInt - vox_loader.h: line 175
- freeArrayInt - vox_loader.h: line 186
- offsetX, offsetY, offsetZ - vox_loader.h: line 610
- chunkTotalChildSize - vox_loader.h: line 623
Other warnings:
- initialization discards 'const' qualifier - vox_loader.h: line 572
- incompatible types for VoxVector3 and Vector3 - rmodels.c: line 5748
- incompatible types for VoxColor and Color - rmodels: line 5749
* Remove ToVector3 and ToColor functions and assign values directly
CONVENTIONS:
- Functions are always self-contained, no function use another raymath function inside, required code is directly re-implemented inside
- Functions input parameters are always received by value
- Functions use always a "result" variable for return
- Functions are always defined inline
- Angles are always in radians (DEG2RAD/RAD2DEG macros provided for convenience)
* Match build-windows.bat changes
The location for manual setting of the vcvarsall.bat location moved to line 38 in the latest change.
* Update flags for clean x64/x86 building
std:c11 is required for initialization features used in raylib. UTF-8 for consistency in contemporary systems. /W3 gets rid of puzzling slack byte and linker in-lining warnings. /sdl for some insecure library usages in the user code that beginners should learn about early.
* Fixed gltf missing transforms on load
mend
* extracted Matrix calculation in to static method and added skinning check
* fixed formatting
* Fixed write to access to nullptr when animation has no normals
* Refactored UpdateModelAnimation to only update changed vertices when needed (allows for multi animation playing)
* add check for models that were missed during BindGLTFPrimitiveToBones to not segfault the program
* fixed id mismatch between animation and model
* draft on fixing the mesh to skin mapping
* dont look at this
* removing debug info
LoadModelAnimations takes an `int` for the animation count parameter.
The animation count should never be negative, so it makes sense to
specify it as unsigned in the API. This matches the API for
UnloadModelAnimations, which expects an unsigned int. Both GLTF and IQMM
also store the animation count internally as unsigned, and we were
casting to a signed int for no reason.
GLTF actually uses `size_t` internally, so we're technically risking
overflow, but having 2^32 animations seems unlikely.