Commit graph raylib/examples/models/models_animation_timing.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
0f0983c065 Remove trailing spaces 2026-03-25 16:51:02 +01:00
Ray
483d687900 Updated examples versions, validated with REXM 2026-03-16 17:19:27 +01:00
Ray
e2aed43410 Update examples version to latest raylib 6.0 2026-03-16 17:03:02 +01:00
Jeffery Myers
72b206624f
MSVC warnings (#5595) 2026-02-26 18:33:08 +01:00
Ray
29b5844119 REVIEWED: Comments and header 2026-02-24 12:48:54 +01: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
Renamed from examples/models/models_animation_timming.c (Browse further)