Explorar el Código

Implement UnloadModelAnimations (#1648)

pull/1650/head
Hristo Stamenov hace 4 años
cometido por GitHub
padre
commit
bc9194690c
No se encontró ninguna clave conocida en la base de datos para esta firma ID de clave GPG: 4AEE18F83AFDEB23
Se han modificado 2 ficheros con 8 adiciones y 0 borrados
  1. +7
    -0
      src/models.c
  2. +1
    -0
      src/raylib.h

+ 7
- 0
src/models.c Ver fichero

@ -1112,6 +1112,13 @@ void UpdateModelAnimation(Model model, ModelAnimation anim, int frame)
}
}
// Unload animation array data
void UnloadModelAnimations(ModelAnimation* animations, unsigned int count)
{
for (int i = 0; i < count; i++) UnloadModelAnimation(animations[i]);
RL_FREE(animations);
}
// Unload animation data
void UnloadModelAnimation(ModelAnimation anim)
{

+ 1
- 0
src/raylib.h Ver fichero

@ -1369,6 +1369,7 @@ RLAPI void SetModelMeshMaterial(Model *model, int meshId, int materialId);
RLAPI ModelAnimation *LoadModelAnimations(const char *fileName, int *animsCount); // Load model animations from file
RLAPI void UpdateModelAnimation(Model model, ModelAnimation anim, int frame); // Update model animation pose
RLAPI void UnloadModelAnimation(ModelAnimation anim); // Unload animation data
RLAPI void UnloadModelAnimations(ModelAnimation* animations, unsigned int count); // Unload animation array data
RLAPI bool IsModelAnimationValid(Model model, ModelAnimation anim); // Check model animation skeleton match
// Mesh generation functions

Cargando…
Cancelar
Guardar