Enable GPU skinning for GL 3.3+, (#5902)

only do GPU skinning if the shader supports bone IDs.
This commit is contained in:
Jeffery Myers
2026-06-01 11:25:09 -07:00
committed by GitHub
parent 10a889c482
commit f1d602029c
2 changed files with 9 additions and 2 deletions

View File

@@ -2487,9 +2487,12 @@ static void UpdateModelAnimationVertexBuffers(Model model)
float boneWeight = 0.0f;
bool bufferUpdateRequired = false; // Flag to check when anim vertex information is updated
#if defined (SUPPORT_GPU_SKINNING)
Material material = model.materials[model.meshMaterial[m]];
// Skip if missing bone data or missing anim buffers initialization
if ((mesh.boneWeights == NULL) || (mesh.boneIndices == NULL) ||
if ((material.shader.locs[SHADER_LOC_VERTEX_BONEIDS] != -1) && (mesh.boneWeights == NULL) || (mesh.boneIndices == NULL) ||
(mesh.animVertices == NULL) || (mesh.animNormals == NULL)) continue;
#endif
for (int vCounter = 0; vCounter < vertexValuesCount; vCounter += 3)
{