RENAMED: UpdateModelAnimationBoneMatrices()
to UpdateModelAnimationBones()
Still, not fully convinced of those functions naming, despite quite descriptive, sounds a bit confusing to me...
This commit is contained in:
parent
24724d33bb
commit
be360d2ad1
3 changed files with 5 additions and 5 deletions
|
@ -82,7 +82,7 @@ int main(void)
|
||||||
ModelAnimation anim = modelAnimations[animIndex];
|
ModelAnimation anim = modelAnimations[animIndex];
|
||||||
animCurrentFrame = (animCurrentFrame + 1)%anim.frameCount;
|
animCurrentFrame = (animCurrentFrame + 1)%anim.frameCount;
|
||||||
characterModel.transform = MatrixTranslate(position.x, position.y, position.z);
|
characterModel.transform = MatrixTranslate(position.x, position.y, position.z);
|
||||||
UpdateModelAnimationBoneMatrices(characterModel, anim, animCurrentFrame);
|
UpdateModelAnimationBones(characterModel, anim, animCurrentFrame);
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|
||||||
// Draw
|
// Draw
|
||||||
|
|
|
@ -1602,7 +1602,7 @@ RLAPI void SetModelMeshMaterial(Model *model, int meshId, int materialId);
|
||||||
// Model animations loading/unloading functions
|
// Model animations loading/unloading functions
|
||||||
RLAPI ModelAnimation *LoadModelAnimations(const char *fileName, int *animCount); // Load model animations from file
|
RLAPI ModelAnimation *LoadModelAnimations(const char *fileName, int *animCount); // Load model animations from file
|
||||||
RLAPI void UpdateModelAnimation(Model model, ModelAnimation anim, int frame); // Update model animation pose (CPU)
|
RLAPI void UpdateModelAnimation(Model model, ModelAnimation anim, int frame); // Update model animation pose (CPU)
|
||||||
RLAPI void UpdateModelAnimationBoneMatrices(Model model, ModelAnimation anim, int frame); // Update model animation mesh bone matrices (GPU skinning)
|
RLAPI void UpdateModelAnimationBones(Model model, ModelAnimation anim, int frame); // Update model animation mesh bone matrices (GPU skinning)
|
||||||
RLAPI void UnloadModelAnimation(ModelAnimation anim); // Unload animation data
|
RLAPI void UnloadModelAnimation(ModelAnimation anim); // Unload animation data
|
||||||
RLAPI void UnloadModelAnimations(ModelAnimation *animations, int animCount); // Unload animation array data
|
RLAPI void UnloadModelAnimations(ModelAnimation *animations, int animCount); // Unload animation array data
|
||||||
RLAPI bool IsModelAnimationValid(Model model, ModelAnimation anim); // Check model animation skeleton match
|
RLAPI bool IsModelAnimationValid(Model model, ModelAnimation anim); // Check model animation skeleton match
|
||||||
|
|
|
@ -1508,7 +1508,7 @@ void DrawMesh(Mesh mesh, Material material, Matrix transform)
|
||||||
|
|
||||||
#ifdef RL_SUPPORT_MESH_GPU_SKINNING
|
#ifdef RL_SUPPORT_MESH_GPU_SKINNING
|
||||||
// Upload Bone Transforms
|
// Upload Bone Transforms
|
||||||
if (material.shader.locs[SHADER_LOC_BONE_MATRICES] != -1 && mesh.boneMatrices)
|
if ((material.shader.locs[SHADER_LOC_BONE_MATRICES] != -1) && mesh.boneMatrices)
|
||||||
{
|
{
|
||||||
rlSetUniformMatrices(material.shader.locs[SHADER_LOC_BONE_MATRICES], mesh.boneMatrices, mesh.boneCount);
|
rlSetUniformMatrices(material.shader.locs[SHADER_LOC_BONE_MATRICES], mesh.boneMatrices, mesh.boneCount);
|
||||||
}
|
}
|
||||||
|
@ -1754,7 +1754,7 @@ void DrawMeshInstanced(Mesh mesh, Material material, const Matrix *transforms, i
|
||||||
|
|
||||||
#ifdef RL_SUPPORT_MESH_GPU_SKINNING
|
#ifdef RL_SUPPORT_MESH_GPU_SKINNING
|
||||||
// Upload Bone Transforms
|
// Upload Bone Transforms
|
||||||
if (material.shader.locs[SHADER_LOC_BONE_MATRICES] != -1 && mesh.boneMatrices)
|
if ((material.shader.locs[SHADER_LOC_BONE_MATRICES] != -1) && mesh.boneMatrices)
|
||||||
{
|
{
|
||||||
rlSetUniformMatrices(material.shader.locs[SHADER_LOC_BONE_MATRICES], mesh.boneMatrices, mesh.boneCount);
|
rlSetUniformMatrices(material.shader.locs[SHADER_LOC_BONE_MATRICES], mesh.boneMatrices, mesh.boneCount);
|
||||||
}
|
}
|
||||||
|
@ -2367,7 +2367,7 @@ void UpdateModelAnimation(Model model, ModelAnimation anim, int frame)
|
||||||
// Update model animated bones transform matrices for a given frame
|
// Update model animated bones transform matrices for a given frame
|
||||||
// NOTE: Updated data is not uploaded to GPU but kept at model.meshes[i].boneMatrices[boneId],
|
// NOTE: Updated data is not uploaded to GPU but kept at model.meshes[i].boneMatrices[boneId],
|
||||||
// to be uploaded to shader at drawing, in case GPU skinning is enabled
|
// to be uploaded to shader at drawing, in case GPU skinning is enabled
|
||||||
void UpdateModelAnimationBoneMatrices(Model model, ModelAnimation anim, int frame)
|
void UpdateModelAnimationBones(Model model, ModelAnimation anim, int frame)
|
||||||
{
|
{
|
||||||
if ((anim.frameCount > 0) && (anim.bones != NULL) && (anim.framePoses != NULL))
|
if ((anim.frameCount > 0) && (anim.bones != NULL) && (anim.framePoses != NULL))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue