[Fixes #381] Replaces GPU Skinning for Animation Blending#380
[Fixes #381] Replaces GPU Skinning for Animation Blending#380execphantasmagoria wants to merge 8 commits intoRobLoach:nextfrom
Conversation
…ad animations and unload them.
…ne animation. Replaced UpdateBones() with Blend() which utilizes UpdateModelAnimationEx()
|
It shouldn't have any more build errors. |
| */ | ||
| void Unload(int animCount) { ::UnloadModelAnimations(this, animCount); } | ||
| void Unload() { | ||
| ::UnloadModelAnimations(this, 1); |
There was a problem hiding this comment.
There's an int* animCount that's returned when calling LoadModelAnimations(). Would there be a way for us to leverage that so that we don't have to worry about unloading 1 when there could be 10?
There was a problem hiding this comment.
In order to use the populated int* animCount, we would have to make the Load() function a non-static method, such that it can store the object's animCount in an attribute and use in while unloading.
however, making it so requires a ModelAnimation object to call load, that may defeat the design philosphy of raylib. I will try to think of a workaround. The current workaround for this would be to use function overloading. Have the Unload() optionally accept an animCount. This assumes the programmer knows how many animations are loaded.
There was a problem hiding this comment.
Hmmm, that is a challenge. Surprised it's not kept in the ModelAnimation struct itself.
There was a problem hiding this comment.
After talking to raysan, it is my understanding that UnloadModelAnimations() is meant to unload an array of animations, and a ModelAnimation object would only have 1. In that case, i believe there should a UnloadAnimations(int animCount) static method can be called with an array of animations, along with Unload() to unload the animation data of the object that calls it.
I have implemented the same.
This series of commits do three things:
Matrix Multiply()andMatrix operator*()to polymorphically use the newMatrixMultiplyValue()when passed in a float argument.count.