Commit graph raylib/examples/models/models_animation_gpu_skinning.c
Author SHA1 Message Date
zaveshaa
59cf1df522 Guard animation examples against missing model resources
LoadModelAnimations() returns NULL with animCount = 0 when the glTF file
can not be read, and the animation examples then crash dereferencing
animations by index. Reported as a segfault in models_animation_blending
when resources/models/gltf/robot.glb is missing.

The same pattern hits three more examples:
- models_animation_timing: update loop is guarded but the UI drawing
  reads anims[animIndex] unconditionally every frame
- models_animation_gpu_skinning: modulo by zero animCount on key press,
  then anims[animIndex] read
- models_animation_blend_custom: index clamping does not help because
  the array itself is NULL

All four now exit early with a warning, unloading what was created.
2026-08-25 12:42:42 +03:00
Ray
895154bcb2 Clarify that GPU_SKINNING is not enabled by default and the requirements 2026-06-01 21:00:17 +02:00
Ray
d4dc038e2e WARNING: BREAKING: REDESIGNED: **Animation System** #4606
REVIEWED: Reorganized structures for a clearer distinction between "skeleton", "skin" and "skinning" data
ADDED: New structures: `ModelSkeleton`, `ModelAnimPose` (alias `Transform*`)
ADDED: Runtime data `currentPose` and `boneMatrices` to `Model` structure
ADDED: Support animation frames-blending, for timing control
ADDED: Support animations blending, between two animations
REVIEWED: All models animation loading functions
ADDED: `UpdateModelAnimationEx()` for two animations blending
REMOVED: `UpdateModelAnimationBones*()`, simplified API
REVIEWED: Shader attributes/uniforms names for animations, for consistency
REVIEWED: Multiple tweaks on animations loading for consistency between formats
ADDED: example: `models_animation_timing`
ADDED: example: `models_animation_blending`
REVIEWED: example: `models_animation_gpu_skinning`
REVIEWED: example: `models_animation_blend_custom`
REVIEWED: All animated models loading examples
2026-02-24 01:18:57 +01:00
Ray
ae6d34a731 Renamed some models examples for consistency 2026-02-23 01:43:53 +01:00
Ray
068978d5b3 REXM: RENAME: example: models_gpu_skinning --> models_animation_gpu_skinning 2025-09-14 10:26:04 +02:00
Renamed from examples/models/models_gpu_skinning.c (Browse further)